texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Qt-Patches: various issues


From: Norbert Nemec
Subject: [Texmacs-dev] Qt-Patches: various issues
Date: Sat, 09 May 2009 09:44:56 +0100
User-agent: Thunderbird 2.0.0.21 (X11/20090409)

Hi there,

enclosed are several patches Qt-related patches, solving various minor issues. Each one has comments enclosed in the header.

Especially the last one for the deadkeys should be checked carefully whether it works correctly on other systems as well.

B.t.w: These do not yet touch the issue of the event loop. I have that part mostly sorted out as well, but it needs a bit more work before I can hand it on.

Greetings,
Norbert
remove trailing spaces and expand tabs

From:  <>


---

 src/plugins/asymptote/bin/perl-tm_asy            |    0 
 src/src/Plugins/Qt/QTMGuiHelper.hpp              |    2 
 src/src/Plugins/Qt/QTMInteractiveInputHelper.hpp |    4 
 src/src/Plugins/Qt/QTMMenuHelper.hpp             |    2 
 src/src/Plugins/Qt/QTMStyle.cpp                  |    8 -
 src/src/Plugins/Qt/QTMStyle.hpp                  |    2 
 src/src/Plugins/Qt/QTMWidget.cpp                 |   74 ++++-----
 src/src/Plugins/Qt/QTMWidget.hpp                 |    8 -
 src/src/Plugins/Qt/QTMWindow.hpp                 |    8 -
 src/src/Plugins/Qt/qt_basic_widgets.hpp          |    4 
 src/src/Plugins/Qt/qt_dialogues.cpp              |   68 ++++----
 src/src/Plugins/Qt/qt_gui.cpp                    |   38 ++--
 src/src/Plugins/Qt/qt_gui.hpp                    |    8 -
 src/src/Plugins/Qt/qt_menu.cpp                   |   60 ++++---
 src/src/Plugins/Qt/qt_other_widgets.hpp          |   20 +-
 src/src/Plugins/Qt/qt_renderer.cpp               |   76 ++++-----
 src/src/Plugins/Qt/qt_renderer.hpp               |    8 -
 src/src/Plugins/Qt/qt_simple_widget.hpp          |    2 
 src/src/Plugins/Qt/qt_utilities.cpp              |    6 -
 src/src/Plugins/Qt/qt_widget.cpp                 |  186 +++++++++++-----------
 src/src/Plugins/Qt/qt_widget.hpp                 |   16 +-
 21 files changed, 300 insertions(+), 300 deletions(-)
 mode change 100644 => 100755 src/plugins/asymptote/bin/perl-tm_asy


diff --git a/src/plugins/asymptote/bin/perl-tm_asy 
b/src/plugins/asymptote/bin/perl-tm_asy
old mode 100644
new mode 100755
diff --git a/src/src/Plugins/Qt/QTMGuiHelper.hpp 
b/src/src/Plugins/Qt/QTMGuiHelper.hpp
index 735ce76..a53ba20 100644
--- a/src/src/Plugins/Qt/QTMGuiHelper.hpp
+++ b/src/src/Plugins/Qt/QTMGuiHelper.hpp
@@ -18,7 +18,7 @@
 class QTMGuiHelper : public QObject {
   Q_OBJECT
   qt_gui_rep* gui;
-  
+
 public:
   inline QTMGuiHelper (qt_gui_rep *_gui) : QObject (), gui (_gui) {}
 
diff --git a/src/src/Plugins/Qt/QTMInteractiveInputHelper.hpp 
b/src/src/Plugins/Qt/QTMInteractiveInputHelper.hpp
index 8af8981..37a7907 100644
--- a/src/src/Plugins/Qt/QTMInteractiveInputHelper.hpp
+++ b/src/src/Plugins/Qt/QTMInteractiveInputHelper.hpp
@@ -11,8 +11,8 @@
 
 #ifndef QTMINTERACTIVEINPUTHELPER_HPP
 #define QTMINTERACTIVEINPUTHELPER_HPP
- 
-//#include "qt_other_widgets.hpp" 
+
+//#include "qt_other_widgets.hpp"
 #include <QObject>
 
 class qt_tm_widget_rep;
diff --git a/src/src/Plugins/Qt/QTMMenuHelper.hpp 
b/src/src/Plugins/Qt/QTMMenuHelper.hpp
index 3be1047..3369c1d 100644
--- a/src/src/Plugins/Qt/QTMMenuHelper.hpp
+++ b/src/src/Plugins/Qt/QTMMenuHelper.hpp
@@ -21,7 +21,7 @@
 class QTMCommand: public QObject {
   Q_OBJECT
   command cmd;
-       
+        
 public:
   inline QTMCommand (command _cmd):
     cmd (_cmd) {  }
diff --git a/src/src/Plugins/Qt/QTMStyle.cpp b/src/src/Plugins/Qt/QTMStyle.cpp
index ca80a0c..cd92b03 100644
--- a/src/src/Plugins/Qt/QTMStyle.cpp
+++ b/src/src/Plugins/Qt/QTMStyle.cpp
@@ -144,14 +144,14 @@ QTMStyle::drawPrimitive (PrimitiveElement element, const 
QStyleOption *option, Q
   //  if (element == QStyle::PE_FrameStatusBarItem) return;
   if (element == QStyle::PE_FrameStatusBar) return;
   style->drawPrimitive(element,option,painter,widget);
-}  
+}
 
 int
 QTMStyle::pixelMetric (PixelMetric metric, const QStyleOption *opt, const 
QWidget *widget) const {
   switch (metric) {
   case PM_ToolBarItemSpacing:
     return 0;
-  default: 
+  default:
     return style->pixelMetric(metric,opt,widget);
   }
 }
@@ -160,9 +160,9 @@ QTMStyle::pixelMetric (PixelMetric metric, const 
QStyleOption *opt, const QWidge
 void
 QTMStyle::drawControl (ControlElement element, const QStyleOption* option, 
QPainter* painter, const QWidget* widget) const {
   switch (element) {
-  case CE_MenuItem: 
+  case CE_MenuItem:
     if (const QStyleOptionMenuItem *mi =
-       qstyleoption_cast<const QStyleOptionMenuItem *> (option)) {
+       qstyleoption_cast<const QStyleOptionMenuItem *> (option)) {
       QStyleOptionMenuItem mi2(*mi);
       mi2.text= QString ("pippo");
       style->drawControl (element, &mi2, painter, widget);
diff --git a/src/src/Plugins/Qt/QTMStyle.hpp b/src/src/Plugins/Qt/QTMStyle.hpp
index 95f011c..76aa010 100644
--- a/src/src/Plugins/Qt/QTMStyle.hpp
+++ b/src/src/Plugins/Qt/QTMStyle.hpp
@@ -21,7 +21,7 @@ class QTMProxyStyle: public QStyle {
   Q_OBJECT
 protected:
   QStyle* style;
-               
+                
 public:
   explicit QTMProxyStyle (QStyle* _style);
   ~QTMProxyStyle ();
diff --git a/src/src/Plugins/Qt/QTMWidget.cpp b/src/src/Plugins/Qt/QTMWidget.cpp
index fdebc0f..a29b435 100644
--- a/src/src/Plugins/Qt/QTMWidget.cpp
+++ b/src/src/Plugins/Qt/QTMWidget.cpp
@@ -43,7 +43,7 @@ extern int timeout_time;
 hashmap<int,string> qtkeymap (0);
 
 inline void
-scale (QPoint& point) {        
+scale (QPoint& point) {
   point.rx() *= PIXEL; point.ry() *= -PIXEL;
 }
 
@@ -140,7 +140,7 @@ initkeymap () {
   // map (Qt::Key_Undo        , "undo" );
   // map (Qt::Key_Redo        , "redo" );
   // map (Qt::Key_Find        , "find" );
-  // map (Qt::Key_ModeSwitchFunctionKey, "modeswitch" );  
+  // map (Qt::Key_ModeSwitchFunctionKey, "modeswitch" );
 }
 
 void
@@ -153,7 +153,7 @@ QTMWidget::postponedUpdate () {
       << "," <<  rect.width()
       << "," <<  rect.height() << ")\n" ;
     }
-    //FIXME: the call below to update is ignored sometimes (usually in long 
documents). 
+    //FIXME: the call below to update is ignored sometimes (usually in long 
documents).
     //       It is a confirmed Qt/Mac bug (#251792). See
     //       
http://www.qtsoftware.com/developer/task-tracker/index_html?method=entry&id=251792
 #ifdef Q_WS_MAC
@@ -169,7 +169,7 @@ QTMWidget::postponedUpdate () {
 void
 QTMWidget::paintEvent (QPaintEvent* event) {
   QRect rect = event->rect ();
- 
+
   if (DEBUG_EVENTS) {
     QPainter p(this);
     QBrush brush (QColor ("red"));
@@ -180,7 +180,7 @@ QTMWidget::paintEvent (QPaintEvent* event) {
     << "," <<  rect.y()
     << "," <<  rect.width()
     << "," <<  rect.height() << ")\n" ;
-    
+
   }
 
   if (!qt_update_flag) {
@@ -208,33 +208,33 @@ QTMWidget::paintEvent (QPaintEvent* event) {
     r->begin (static_cast<QPaintDevice*>(this));
 #endif
 
-    tm_widget()->set_current_renderer(r);    
+    tm_widget()->set_current_renderer(r);
+
+
 
-    
-    
     r -> set_clipping
-    (rect.x()*PIXEL, -(rect.y()+rect.height())*PIXEL, 
+    (rect.x()*PIXEL, -(rect.y()+rect.height())*PIXEL,
      (rect.x()+rect.width())*PIXEL, -rect.y()*PIXEL);
     tm_widget()->handle_repaint
-    (rect.x()*PIXEL, -(rect.y()+rect.height())*PIXEL, 
+    (rect.x()*PIXEL, -(rect.y()+rect.height())*PIXEL,
      (rect.x()+rect.width())*PIXEL, -rect.y()*PIXEL);
-    
+
     if (r->interrupted()) {
       if (DEBUG_EVENTS)
-        cout << "Interrupted\n"; 
+        cout << "Interrupted\n";
       qt_update_flag= true;
     }
 
     r->end();
-    
-    tm_widget()->set_current_renderer(NULL);    
+
+    tm_widget()->set_current_renderer(NULL);
     //int end= texmacs_time ();
     //if (end > start) cout << "Repaint " << end - start << "\n";
   }
 
   if (qt_update_flag) {
     if (DEBUG_EVENTS)
-      cout << "Postponed redrawing\n"; 
+      cout << "Postponed redrawing\n";
     delayed_rects= list<QRect> (rect, delayed_rects);
     QTimer::singleShot (1, this, SLOT (postponedUpdate ()));
   }
@@ -252,12 +252,12 @@ QTMWidget::keyPressEvent (QKeyEvent* event) {
     initkeymap();
     fInit= true;
   }
-       
+
   if (DEBUG_EVENTS)
     cout << "keypressed\n";
   simple_widget_rep *wid =  tm_widget();
   if (!wid) return;
-  
+
   {
     // char str[256];
     int key = event->key();
@@ -289,21 +289,21 @@ QTMWidget::keyPressEvent (QKeyEvent* event) {
       unsigned short unic= nss.data()[0].unicode();
       //cout << "unic= " << unic << "\n";
       if (unic < 32 && key < 128) {
-       if ((mods & Qt::ShiftModifier) == 0)
-         if (((char) key) >= 'A' && ((char) key) <= 'Z')
-           key= (int) (key + ((int) 'a') - ((int) 'A'));
-       r= string ((char) key);
+        if ((mods & Qt::ShiftModifier) == 0)
+          if (((char) key) >= 'A' && ((char) key) <= 'Z')
+            key= (int) (key + ((int) 'a') - ((int) 'A'));
+        r= string ((char) key);
       }
       else {
-       if (unic == 168) r= "umlaut";
-       if (unic == 96) {
-         if ((mods & Qt::AltModifier) != 0) r= "grave";
-         else r= "`";
-       }
-       if (unic == 180) r= "acute";
-       if (unic == 710) r= "hat";
-       if (unic == 732) r= "tilde";
-       flag= false;
+        if (unic == 168) r= "umlaut";
+        if (unic == 96) {
+          if ((mods & Qt::AltModifier) != 0) r= "grave";
+          else r= "`";
+        }
+        if (unic == 180) r= "acute";
+        if (unic == 710) r= "hat";
+        if (unic == 732) r= "tilde";
+        flag= false;
       }
     }
 
@@ -323,7 +323,7 @@ QTMWidget::keyPressEvent (QKeyEvent* event) {
     if (DEBUG_EVENTS)
       cout << "key press: " << r << LF;
     //int start= texmacs_time ();
-    wid -> handle_keypress (r, texmacs_time());        
+    wid -> handle_keypress (r, texmacs_time());
     //int end= texmacs_time ();
     //if (end > start) cout << "Keypress " << end - start << "\n";
     the_gui->update (); // FIXME: remove this line when
@@ -378,7 +378,7 @@ QTMWidget::mousePressEvent (QMouseEvent* event) {
   wid -> handle_mouse (s, point.x (), point.y (), mstate, texmacs_time ());
   if (DEBUG_EVENTS)
     cout << "mouse event: " << s << " at "
-        << point.x () << ", " << point.y () << LF;
+         << point.x () << ", " << point.y () << LF;
 }
 
 void
@@ -392,7 +392,7 @@ QTMWidget::mouseReleaseEvent (QMouseEvent* event) {
   wid -> handle_mouse (s, point.x (), point.y (), mstate, texmacs_time ());
   if (DEBUG_EVENTS)
     cout << "mouse event: " << s << " at "
-        << point.x () << ", " << point.y () << LF;
+         << point.x () << ", " << point.y () << LF;
 }
 
 void
@@ -406,7 +406,7 @@ QTMWidget::mouseMoveEvent (QMouseEvent* event) {
   wid -> handle_mouse (s, point.x (), point.y (), mstate, texmacs_time ());
   if (DEBUG_EVENTS)
     cout << "mouse event: " << s << " at "
-        << point.x () << ", " << point.y () << LF;
+         << point.x () << ", " << point.y () << LF;
 }
 
 
@@ -416,12 +416,12 @@ QTMWidget::event (QEvent* event) {
     QKeyEvent *ke = static_cast<QKeyEvent*> (event);
     keyPressEvent (ke);
     return true;
-  }  
+  }
   return QWidget::event (event);
 }
 
 
-void 
+void
 QTMWidget::focusInEvent ( QFocusEvent * event )
 {
   if (DEBUG_EVENTS) cout << "FOCUSIN" << LF;
@@ -432,7 +432,7 @@ QTMWidget::focusInEvent ( QFocusEvent * event )
   QWidget::focusInEvent (event);
 }
 
-void 
+void
 QTMWidget::focusOutEvent ( QFocusEvent * event )
 {
   if (DEBUG_EVENTS)   cout << "FOCUSOUT" << LF;
diff --git a/src/src/Plugins/Qt/QTMWidget.hpp b/src/src/Plugins/Qt/QTMWidget.hpp
index 225045d..89f03ae 100644
--- a/src/src/Plugins/Qt/QTMWidget.hpp
+++ b/src/src/Plugins/Qt/QTMWidget.hpp
@@ -12,7 +12,7 @@
 #ifndef QTMWIDGET_HPP
 #define QTMWIDGET_HPP
 
-#include "qt_simple_widget.hpp" 
+#include "qt_simple_widget.hpp"
 #include <QVariant>
 #include <QWidget>
 
@@ -21,7 +21,7 @@ class QTMWidget: public QWidget {
   list<QRect> delayed_rects;
 
 public:
-  inline QTMWidget(simple_widget_rep *_wid): QWidget () { 
+  inline QTMWidget(simple_widget_rep *_wid): QWidget () {
     setObjectName("A QTMWidget");
     setFocusPolicy (Qt::StrongFocus);
     // setBackgroundRole(QPalette::Window);
@@ -34,7 +34,7 @@ public:
   }
 
   inline simple_widget_rep*
-  tm_widget() { 
+  tm_widget() {
     QVariant v= property("texmacs_widget");
     return (simple_widget_rep *)
       (v.canConvert<void*> ()? v.value<void*> (): NULL);
@@ -43,7 +43,7 @@ public:
 public slots:
   void postponedUpdate ();
 
-protected:     
+protected:
   virtual void paintEvent (QPaintEvent* event);
   virtual void focusInEvent (QFocusEvent* event);
   virtual void focusOutEvent (QFocusEvent* event);
diff --git a/src/src/Plugins/Qt/QTMWindow.hpp b/src/src/Plugins/Qt/QTMWindow.hpp
index 4e5a6a9..4103109 100644
--- a/src/src/Plugins/Qt/QTMWindow.hpp
+++ b/src/src/Plugins/Qt/QTMWindow.hpp
@@ -12,7 +12,7 @@
 #ifndef QTMWINDOW_HPP
 #define QTMWINDOW_HPP
 
-#include "qt_other_widgets.hpp" 
+#include "qt_other_widgets.hpp"
 #include <QVariant>
 #include <QMainWindow>
 
@@ -20,19 +20,19 @@ class QTMWindow: public QMainWindow {
   Q_OBJECT
 
 public:
-  inline QTMWindow(qt_tm_widget_rep *_wid): QMainWindow () { 
+  inline QTMWindow(qt_tm_widget_rep *_wid): QMainWindow () {
     setObjectName("A QTMWindow");
     setProperty ("texmacs_tm_widget", QVariant::fromValue ((void*) _wid));
   }
 
   inline qt_tm_widget_rep *
-  tm_widget() { 
+  tm_widget() {
     QVariant v= property("texmacs_tm_widget");
     return (qt_tm_widget_rep *)
       (v.canConvert<void*> ()? v.value<void*> (): NULL);
   }
 
-protected:     
+protected:
   virtual void closeEvent (QCloseEvent *event);
 };
 
diff --git a/src/src/Plugins/Qt/qt_basic_widgets.hpp 
b/src/src/Plugins/Qt/qt_basic_widgets.hpp
index b9f68a6..9099d36 100755
--- a/src/src/Plugins/Qt/qt_basic_widgets.hpp
+++ b/src/src/Plugins/Qt/qt_basic_widgets.hpp
@@ -27,7 +27,7 @@ public:
 class qt_image_widget_rep: public qt_widget_rep {
 public:
   url image;
-  
+
   inline qt_image_widget_rep (url _image): image(_image) {}
   virtual QAction *as_qaction();
 };
@@ -35,7 +35,7 @@ public:
 class qt_balloon_widget_rep: public qt_widget_rep {
 public:
   widget text, hint;
-  
+
   inline qt_balloon_widget_rep (widget _text, widget _hint):
     text (_text), hint (_hint) {}
   virtual QAction* as_qaction ();
diff --git a/src/src/Plugins/Qt/qt_dialogues.cpp 
b/src/src/Plugins/Qt/qt_dialogues.cpp
index cc0df87..b24e81c 100755
--- a/src/src/Plugins/Qt/qt_dialogues.cpp
+++ b/src/src/Plugins/Qt/qt_dialogues.cpp
@@ -9,7 +9,7 @@
 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
 ******************************************************************************/
 
-#include "widget.hpp" 
+#include "widget.hpp"
 #include "message.hpp"
 #include "qt_dialogues.hpp"
 #include "qt_utilities.hpp"
@@ -30,7 +30,7 @@ extern char  *slot_name(slot s); // in qt_widget.cpp
 #pragma mark qt_chooser_widget_rep
 
 class qt_chooser_widget_rep: public qt_widget_rep {
-protected:     
+protected:      
   command cmd;
   string type;
   string mgn;
@@ -39,7 +39,7 @@ protected:
   coord2 position;
   coord2 size;
   string file;
-       
+        
 public:
   qt_chooser_widget_rep (command, string, string);
   ~qt_chooser_widget_rep ();
@@ -64,7 +64,7 @@ qt_chooser_widget_rep::qt_chooser_widget_rep
 {
   if (DEBUG_EVENTS)
     cout << "qt_chooser_widget_rep::qt_chooser_widget_rep type=\""
-        << type << "\" mgn=\"" << mgn << "\"" << LF; 
+         << type << "\" mgn=\"" << mgn << "\"" << LF;
 }
 
 qt_chooser_widget_rep::~qt_chooser_widget_rep() {}
@@ -75,11 +75,11 @@ qt_chooser_widget_rep::send (slot s, blackbox val) {
     cout << "qt_chooser_widget_rep::send " << slot_name(s) << LF;
   switch (s) {
   case SLOT_VISIBILITY:
-    {  
+    {   
       check_type<bool> (val, "SLOT_VISIBILITY");
       bool flag = open_box<bool> (val);
       (void) flag;
-      NOT_IMPLEMENTED 
+      NOT_IMPLEMENTED
     }
     break;
   case SLOT_SIZE:
@@ -87,16 +87,16 @@ qt_chooser_widget_rep::send (slot s, blackbox val) {
     size = open_box<coord2> (val);
     break;
   case SLOT_POSITION:
-    TYPE_CHECK (type_box (val) == type_helper<coord2>::id); 
+    TYPE_CHECK (type_box (val) == type_helper<coord2>::id);
     position = open_box<coord2> (val);
     break;
   case SLOT_KEYBOARD_FOCUS:
     TYPE_CHECK (type_box (val) == type_helper<bool>::id);
     perform_dialog ();
-    break;             
+    break;              
   case SLOT_STRING_INPUT:
     // send_string (THIS, "input", val);
-      NOT_IMPLEMENTED 
+      NOT_IMPLEMENTED
     break;
   case SLOT_INPUT_TYPE:
     TYPE_CHECK (type_box (val) == type_helper<string>::id);
@@ -105,19 +105,19 @@ qt_chooser_widget_rep::send (slot s, blackbox val) {
 #if 0
   case SLOT_INPUT_PROPOSAL:
     //send_string (THIS, "default", val);
-      NOT_IMPLEMENTED 
+      NOT_IMPLEMENTED
     break;
 #endif
   case SLOT_FILE:
     //send_string (THIS, "file", val);
-      NOT_IMPLEMENTED 
+      NOT_IMPLEMENTED
     break;
   case SLOT_DIRECTORY:
     TYPE_CHECK (type_box (val) == type_helper<string>::id);
     directory = open_box<string> (val);
     directory = as_string (url_pwd () * url_system (directory));
     break;
-      
+
   default:
     qt_widget_rep::send (s, val);
   }
@@ -128,7 +128,7 @@ qt_chooser_widget_rep::query (slot s, int type_id) {
   if (DEBUG_EVENTS)
     cout << "qt_chooser_widget_rep::query " << slot_name(s) << LF;
   switch (s) {
-  case SLOT_POSITION:  
+  case SLOT_POSITION:
     {
       typedef pair<SI,SI> coord2;
       TYPE_CHECK (type_id == type_helper<coord2>::id);
@@ -227,18 +227,18 @@ qt_chooser_widget_rep::perform_dialog () {
 
   dialog.setDirectory(to_qstring(directory));
   cout << "Dir: " << directory << LF;
-  
+
   QPoint pos = to_qpoint(position);
   //cout << "Size :" << size.x1 << "," << size.x2 << LF;
   cout << "Position :" << pos.x() << "," << pos.y() << LF;
-  
+
   dialog.updateGeometry();
   QSize sz = dialog.sizeHint();
   QRect r; r.setSize(sz);
   r.moveCenter(pos);
   dialog.setGeometry(r);
-  
-  
+
+
   QStringList fileNames;
   if (dialog.exec ()) {
     fileNames = dialog.selectedFiles();
@@ -247,8 +247,8 @@ qt_chooser_widget_rep::perform_dialog () {
       url u = url_system (scm_unquote (file));
       if (type == "image")
         file = "(list (url-system " *
-         scm_quote (as_string (u)) *
-         ") \"100\" \"100\" \"0\" \"0\" \"10\" \"10\")";
+          scm_quote (as_string (u)) *
+          ") \"100\" \"100\" \"0\" \"0\" \"10\" \"10\")";
       //FIXME: fake image dimensions
       else
         file = "(url-system " * scm_quote (as_string (u)) * ")";
@@ -256,7 +256,7 @@ qt_chooser_widget_rep::perform_dialog () {
   } else {
     file = "#f";
   }
-  cmd ();      
+  cmd ();       
 }
 
 #pragma mark qt_input_widget_rep
@@ -264,15 +264,15 @@ qt_chooser_widget_rep::perform_dialog () {
 class qt_field_widget;
 
 class qt_input_widget_rep: public qt_widget_rep {
-protected:     
+protected:      
   command cmd;
   array<qt_field_widget> fields;
   coord2 size, position;
-  string win_title;    
+  string win_title;     
 public:
   qt_input_widget_rep (command, array<string>);
   ~qt_input_widget_rep ();
-       
+        
   virtual void send (slot s, blackbox val);
   virtual blackbox query (slot s, int type_id);
   virtual widget read (slot s, blackbox index);
@@ -369,12 +369,12 @@ qt_input_widget_rep::send (slot s, blackbox val) {
 
   switch (s) {
   case SLOT_VISIBILITY:
-    {  
+    {   
       check_type<bool> (val, "SLOT_VISIBILITY");
       bool flag = open_box<bool> (val);
       (void) flag;
-      NOT_IMPLEMENTED 
-    }  
+      NOT_IMPLEMENTED
+    }   
     break;
   case SLOT_SIZE:
     TYPE_CHECK (type_box (val) == type_helper<coord2>::id);
@@ -399,7 +399,7 @@ qt_input_widget_rep::query (slot s, int type_id) {
   if (DEBUG_EVENTS)
     cout << "qt_input_widget_rep::query " << slot_name(s) << LF;
   switch (s) {
-  case SLOT_POSITION:  
+  case SLOT_POSITION:
     {
       typedef pair<SI,SI> coord2;
       TYPE_CHECK (type_id == type_helper<coord2>::id);
@@ -464,9 +464,9 @@ void
 qt_input_widget_rep::perform_dialog() {
   QDialog d (0, Qt::Sheet);
   QVBoxLayout* vl = new QVBoxLayout(&d);
-  
+
   QVector<QComboBox*> cbs (N (fields));
-  
+
   for(int i=0; i<N(fields); i++) {
     QHBoxLayout *hl = new QHBoxLayout(&d);
     QLabel *lab = new QLabel (to_qstring (fields[i]->prompt),&d);
@@ -491,7 +491,7 @@ qt_input_widget_rep::perform_dialog() {
   {
     QDialogButtonBox* buttonBox =
       new QDialogButtonBox (QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
-                           Qt::Horizontal, &d);
+                            Qt::Horizontal, &d);
     QObject::connect (buttonBox, SIGNAL (accepted()), &d, SLOT (accept()));
     QObject::connect (buttonBox, SIGNAL (rejected()), &d, SLOT (reject()));
     vl->addWidget (buttonBox);
@@ -501,13 +501,13 @@ qt_input_widget_rep::perform_dialog() {
   QPoint pos = to_qpoint(position);
   //cout << "Size :" << size.x1 << "," << size.x2 << LF;
   //cout << "Position :" << pos.x() << "," << pos.y() << LF;
-  
+
   d.updateGeometry();
   QSize sz = d.sizeHint();
   QRect r; r.setSize(sz);
   r.moveCenter(pos);
   d.setGeometry(r);
-  
+
   int result = d.exec ();
   if (result == QDialog::Accepted) {
     for(int i=0; i<N(fields); i++) {
@@ -519,7 +519,7 @@ qt_input_widget_rep::perform_dialog() {
       fields[i]->input = "#f";
     }
   }
-  cmd ();  
+  cmd ();
 }
 
 widget
@@ -547,7 +547,7 @@ qt_tm_widget_rep::do_interactive_prompt () {
   bool ok;
   QString item =
     QInputDialog::getItem (NULL, "Interactive Prompt", label,
-                          items, 0, true, &ok );
+                           items, 0, true, &ok );
   if (ok && !item.isEmpty()) {
     ((qt_input_text_widget_rep*) int_input.rep) -> text=
       scm_quote (from_qstring (item));
diff --git a/src/src/Plugins/Qt/qt_gui.cpp b/src/src/Plugins/Qt/qt_gui.cpp
index 5f2e4db..be4fba5 100755
--- a/src/src/Plugins/Qt/qt_gui.cpp
+++ b/src/src/Plugins/Qt/qt_gui.cpp
@@ -53,7 +53,7 @@ void
 qt_gui_rep::get_extents (SI& width, SI& height) {
   QDesktopWidget* d= QApplication::desktop();
   int w = d->width();  // returns desktop width
-  int h = d->height(); // returns desktop height       
+  int h = d->height(); // returns desktop height        
   width = ((SI) w) * PIXEL;
   height= ((SI) h) * PIXEL;
 }
@@ -65,8 +65,8 @@ qt_gui_rep::get_max_size (SI& width, SI& height) {
 }
 
 
-qt_gui_rep::~qt_gui_rep()  { 
-} 
+qt_gui_rep::~qt_gui_rep()  {
+}
 
 /******************************************************************************
 * interclient communication
@@ -105,11 +105,11 @@ qt_gui_rep::set_selection (string key, tree t, string s) {
     //XSetSelectionOwner (dpy, XA_PRIMARY, win, CurrentTime);
     //if (XGetSelectionOwner(dpy, XA_PRIMARY)==None) return false;
     selection= as_charp (s);
-       
+        
     QClipboard *clipboard = QApplication::clipboard();
     QString originalText = clipboard->text();
-               
-    clipboard->setText(selection);     
+                
+    clipboard->setText(selection);      
   }
   return true;
 }
@@ -180,8 +180,8 @@ qt_gui_rep::update () {
 }
 
 void
-QTMGuiHelper::doUpdate() { 
-  gui->update(); 
+QTMGuiHelper::doUpdate() {
+  gui->update();
 }
 
 void
@@ -232,7 +232,7 @@ gui_close () {
 }
 
 void
-gui_root_extents (SI& width, SI& height) {   
+gui_root_extents (SI& width, SI& height) {
   // get the screen size
   the_gui->get_extents (width, height);
 }
@@ -255,16 +255,16 @@ gui_refresh () {
 
 void
 set_default_font (string name) {
-       (void) name;
+        (void) name;
   // set the name of the default font
   // this is ignored since Qt handles fonts for the widgets
 }
 
 font
 get_default_font (bool tt) {
-       (void) tt;      
+        (void) tt;      
   // get the default font or monospaced font (if tt is true)
-       
+        
   // return a null font since this function is not called in the Qt port.
   if (DEBUG_EVENTS) cout << "get_default_font(): SHOULD NOT BE CALLED\n";
   return NULL;
@@ -276,10 +276,10 @@ get_default_font (bool tt) {
 
 void
 load_system_font (string family, int size, int dpi,
-                 font_metric& fnm, font_glyphs& fng)
+                  font_metric& fnm, font_glyphs& fng)
 {
-       (void) family; (void) size; (void) dpi; (void) fnm; (void) fng;
-       if (DEBUG_EVENTS) cout << "load_system_font(): SHOULD NOT BE CALLED\n";
+        (void) family; (void) size; (void) dpi; (void) fnm; (void) fng;
+        if (DEBUG_EVENTS) cout << "load_system_font(): SHOULD NOT BE CALLED\n";
 }
 
 /******************************************************************************
@@ -298,7 +298,7 @@ get_selection (string key, tree& t, string& s) {
   // Retrieve the selection 't' with string equivalent 's' from clipboard 'cb'
   // Returns true on success; sets t to (extern s) for external selections
   return the_gui->get_selection (key, t, s);
-} 
+}
 
 void
 clear_selection (string key) {
@@ -332,11 +332,11 @@ check_event (int type) {
 void image_gc (string name) {
 // Garbage collect images of a given name (may use wildcards)
 // This routine only needs to be implemented if you use your own image cache
- the_qt_renderer()->image_gc(name); 
+ the_qt_renderer()->image_gc(name);
 }
 
 void
-show_help_balloon (widget balloon, SI x, SI y) { 
+show_help_balloon (widget balloon, SI x, SI y) {
   // Display a help balloon at position (x, y); the help balloon should
   // disappear as soon as the user presses a key or moves the mouse
   (void) balloon; (void) x; (void) y;
@@ -348,7 +348,7 @@ show_wait_indicator (widget base, string message, string 
argument) {
   // The indicator might for instance be displayed at the center of
   // the base widget which triggered the lengthy operation;
   // the indicator should be removed if the message is empty
-  the_gui->show_wait_indicator(base,message,argument); 
+  the_gui->show_wait_indicator(base,message,argument);
 }
 
 font x_font (string family, int size, int dpi)
diff --git a/src/src/Plugins/Qt/qt_gui.hpp b/src/src/Plugins/Qt/qt_gui.hpp
index 56ce599..d36795e 100755
--- a/src/src/Plugins/Qt/qt_gui.hpp
+++ b/src/src/Plugins/Qt/qt_gui.hpp
@@ -19,7 +19,7 @@
 #include "timer.hpp"
 #include "gui.hpp"
 #include "font.hpp"
-#include "widget.hpp" 
+#include "widget.hpp"
 #include "array.hpp"
 #include "hashmap.hpp"
 
@@ -51,19 +51,19 @@ public:
 
   /* important routines */
   void event_loop ();
-  
+
   /* interclient communication */
   virtual bool get_selection (string key, tree& t, string& s);
   virtual bool set_selection (string key, tree t, string s);
   virtual void clear_selection (string key);
-  
+
   /* miscellaneous */
   void image_gc (string name= "*");
   void set_mouse_pointer (string name);
   void set_mouse_pointer (string curs_name, string mask_name);
   void show_wait_indicator (widget w, string message, string arg);
   bool check_event (int type);
-  
+
   void update();
   void update_fast ();
 };
diff --git a/src/src/Plugins/Qt/qt_menu.cpp b/src/src/Plugins/Qt/qt_menu.cpp
index 073db43..af312bb 100755
--- a/src/src/Plugins/Qt/qt_menu.cpp
+++ b/src/src/Plugins/Qt/qt_menu.cpp
@@ -16,8 +16,8 @@
 #include "qt_basic_widgets.hpp"
 #include "QTMMenuHelper.hpp"
 #include "QTMStyle.hpp"
-#include "analyze.hpp" 
-#include "widget.hpp" 
+#include "analyze.hpp"
+#include "widget.hpp"
 #include "message.hpp"
 #include "promise.hpp"
 //#import "TMView.h"
@@ -50,18 +50,18 @@ public:
   ~qt_menu_rep () { if (item && !flag) delete item; }
 
   virtual void send (slot s, blackbox val);
-  virtual widget make_popup_widget (); 
-  virtual widget popup_window_widget (string s); 
+  virtual widget make_popup_widget ();
+  virtual widget popup_window_widget (string s);
   virtual QAction* as_qaction ();
 };
 
 QAction*
-qt_menu_rep::as_qaction() { 
+qt_menu_rep::as_qaction() {
   // FIXME: the convention is that as_qaction give ownership of
   // the action to the caller. However in this case we do not want
   // to replicate the action so we must be sure to be called only once.
-  if (flag) cout << "THIS MUST NOT HAPPEN (CALLED TWICE)!!\n"; 
-  flag = true; 
+  if (flag) cout << "THIS MUST NOT HAPPEN (CALLED TWICE)!!\n";
+  flag = true;
   return item;
 }
 
@@ -85,21 +85,21 @@ qt_menu_rep::send (slot s, blackbox val) {
     ASSERT (type_box (val) == type_helper<coord2>::id, "type mismatch");
     break;
   case SLOT_VISIBILITY:
-    {  
+    {   
       check_type<bool> (val, "SLOT_VISIBILITY");
       bool flag = open_box<bool> (val);
       (void) flag;
-    }  
+    }   
     break;
   case SLOT_MOUSE_GRAB:
-    {  
+    {   
       check_type<bool> (val, "SLOT_MOUSE_GRAB");
       bool flag = open_box<bool> (val);
       (void) flag;
       // [NSMenu popUpContextMenu:[item submenu] withEvent:[NSApp 
currentEvent] forView:( (qt_view_widget_rep*)(the_keyboard_focus.rep))->view ];
       if (item->menu ())
-       item->menu()->exec (QCursor::pos ());
-    }  
+        item->menu()->exec (QCursor::pos ());
+    }   
     break;
   default:
     FAILED ("cannot handle slot type");
@@ -124,7 +124,7 @@ horizontal_menu (array<widget> arr) {
   }
   act->setMenu (m);
   //m->QObject::setParent(act);
-  return tm_new<qt_menu_rep> (act);    
+  return tm_new<qt_menu_rep> (act);     
 }
 
 widget
@@ -145,7 +145,7 @@ public:
 
 class QTMToolButton: public QToolButton {
 public:
-  QTMToolButton (QWidget* parent = 0): QToolButton(parent) {}  
+  QTMToolButton (QWidget* parent = 0): QToolButton(parent) {}
   void mouseReleaseEvent(QMouseEvent *event);
   void mousePressEvent(QMouseEvent *event);
   void paintEvent(QPaintEvent *event);
@@ -157,14 +157,14 @@ QTMToolButton::mousePressEvent (QMouseEvent* event) {
   QToolButton::mousePressEvent (event);
   // this one forwards the event to the parent
   // (which eventually is the menu)
-  QWidget::mousePressEvent (event);  
+  QWidget::mousePressEvent (event);
 }
 
 void
 QTMToolButton::mouseReleaseEvent (QMouseEvent* event) {
   // this one triggers the action and untoggles the button
   QToolButton::mouseReleaseEvent (event);
-  // this one forwards the event to the parent 
+  // this one forwards the event to the parent
   // (which eventually is the menu which then close itself)
   QWidget::mouseReleaseEvent (event);
 }
@@ -199,11 +199,11 @@ public:
       QAction *act = concrete(arr[i])->as_qaction();
       act->setParent(this);
       actions.append(act);
-    };      
+    };
   }
   QWidget* createWidget(QWidget* parent);
   // virtual void activate (ActionEvent event) {
-  //   cout << "TRIG\n"; QWidgetAction::activate (event); } 
+  //   cout << "TRIG\n"; QWidgetAction::activate (event); }
 };
 
 // FIXME: QTMTileAction::createWidget is called twice:
@@ -235,14 +235,14 @@ QTMTileAction::createWidget(QWidget* parent) {
 }
 
 widget
-tile_menu (array<widget> a, int cols) { 
+tile_menu (array<widget> a, int cols) {
   // a menu rendered as a table of cols columns wide & made up of widgets in a
-  (void) cols; 
+  (void) cols;
 #if 1
-  QWidgetAction* act= new QTMTileAction (NULL, a, cols);  
+  QWidgetAction* act= new QTMTileAction (NULL, a, cols);
   return tm_new<qt_menu_rep> (act);
 #else
-  return horizontal_menu (a); 
+  return horizontal_menu (a);
 #endif
 }
 
@@ -252,7 +252,7 @@ menu_separator (bool vertical) {
   (void) vertical;
   QAction* a= new QTMAction (NULL);
   a->setSeparator (true);
-  return tm_new<qt_menu_rep> (a); 
+  return tm_new<qt_menu_rep> (a);
 }
 
 widget
@@ -274,7 +274,7 @@ pulldown_button (widget w, promise<widget> pw) {
   a->setMenu (lm);
   if (old_menu) {
     cout << "this should not happen\n";
-    delete old_menu;    
+    delete old_menu;
   }
   return tm_new<qt_menu_rep> (a);
 }
@@ -297,7 +297,7 @@ qt_image_widget_rep::as_qaction () {
   QAction* a= new QTMAction (NULL);
   QPixmap* img= the_qt_renderer () -> xpm_image (image);
   QIcon icon (*img);
-  a->setIcon (icon);  
+  a->setIcon (icon);
   return a;
 }
 
@@ -328,7 +328,7 @@ menu_button (widget w, command cmd, string pre, string ks, 
bool ok) {
   QTMCommand* c= new QTMCommand (cmd.rep);
   c->setParent (a);
   QObject::connect (a, SIGNAL (triggered ()), c, SLOT (apply ()),
-                   Qt::QueuedConnection);
+                    Qt::QueuedConnection);
   if (N(ks) > 0) {
     string qtks = conv (ks);
     QKeySequence qks (to_qstring (qtks));
@@ -348,7 +348,7 @@ menu_button (widget w, command cmd, string pre, string ks, 
bool ok) {
 }
 
 widget
-balloon_widget (widget w, widget help)  { 
+balloon_widget (widget w, widget help)  {
   // given a button widget w, specify a help balloon which should be displayed
   // when the user leaves the mouse pointer on the button for a small while
   return tm_new<qt_balloon_widget_rep> (w, help);
@@ -395,10 +395,10 @@ impress (simple_widget_rep* wid) {
     //cout << "impress (" << s.width() << "," << s.height() << ")\n";
     pxm.fill (Qt::transparent);
     the_qt_renderer()->begin (static_cast<QPaintDevice*>(&pxm));
-    wid->set_current_renderer(the_qt_renderer());    
+    wid->set_current_renderer(the_qt_renderer());
 
     the_qt_renderer()->set_clipping
-      (rect.x() * PIXEL, -(rect.y() + rect.height()) * PIXEL, 
+      (rect.x() * PIXEL, -(rect.y() + rect.height()) * PIXEL,
        (rect.x() + rect.width()) * PIXEL, -rect.y() * PIXEL);
     wid->handle_repaint
       (rect.x() * PIXEL, -(rect.y() + rect.height()) * PIXEL,
@@ -427,7 +427,7 @@ QTMLazyMenu::force () {
   if (!forced) {
     // widget w= pm->eval ();
     widget w= pm ();
-    qt_menu_rep* wid= (qt_menu_rep*) (w.rep); 
+    qt_menu_rep* wid= (qt_menu_rep*) (w.rep);
     QMenu* menu2= wid->item->menu ();
     replaceActions (this, menu2);
     delete (wid->item);
diff --git a/src/src/Plugins/Qt/qt_other_widgets.hpp 
b/src/src/Plugins/Qt/qt_other_widgets.hpp
index f30f2d6..bd0afa5 100755
--- a/src/src/Plugins/Qt/qt_other_widgets.hpp
+++ b/src/src/Plugins/Qt/qt_other_widgets.hpp
@@ -21,36 +21,36 @@
 #include <QToolBar>
 
 class qt_tm_widget_rep: public qt_view_widget_rep {
-public:        
+public: 
   QLabel *rightLabel;
   QLabel *leftLabel;
 
   QToolBar *mainToolBar;
   QToolBar *contextToolBar;
   QToolBar *userToolBar;
-         
-  QTMInteractiveInputHelper helper;  
-       
+        
+  QTMInteractiveInputHelper helper;
+        
   qt_widget int_prompt;
   qt_widget int_input;
 
-  bool visibility[5]; 
-  
+  bool visibility[5];
+
   command quit;
 
 public:
   qt_tm_widget_rep (int mask, command _quit);
   ~qt_tm_widget_rep ();
-       
+        
   virtual void send (slot s, blackbox val);
   virtual blackbox query (slot s, int type_id);
   virtual widget read (slot s, blackbox index);
   virtual void write (slot s, blackbox index, widget w);
-  // virtual void notify (slot s, blackbox new_val);   
+  // virtual void notify (slot s, blackbox new_val);    
   // virtual void connect (slot s, widget w2, slot s2);
   // virtual void deconnect (slot s, widget w2, slot s2);
   virtual widget plain_window_widget (string s);
-       
+        
   inline QMainWindow* tm_mainwindow () {
     return qobject_cast<QMainWindow*> (view); }
   inline QScrollArea* tm_scrollarea () {
@@ -58,7 +58,7 @@ public:
   inline QWidget* tm_canvas () {
     return tm_scrollarea()->widget(); }
 
-  
+
   // void layout();
   void updateVisibility();
   void do_interactive_prompt ();
diff --git a/src/src/Plugins/Qt/qt_renderer.cpp 
b/src/src/Plugins/Qt/qt_renderer.cpp
index 2786780..c5e3b49 100755
--- a/src/src/Plugins/Qt/qt_renderer.cpp
+++ b/src/src/Plugins/Qt/qt_renderer.cpp
@@ -71,7 +71,7 @@ CONCRETE_NULL_CODE(qt_pixmap);
 ******************************************************************************/
 
 static hashmap<basic_character,qt_image> character_image;  // bitmaps of all 
characters
-static hashmap<string,qt_pixmap> images; 
+static hashmap<string,qt_pixmap> images;
 
 /******************************************************************************
 * qt_renderer
@@ -82,15 +82,15 @@ qt_renderer_rep::qt_renderer_rep (int w2, int h2):
 
 qt_renderer_rep::~qt_renderer_rep () {}
 
-void 
-qt_renderer_rep::begin (void* handle) { 
+void
+qt_renderer_rep::begin (void* handle) {
    QPaintDevice *device = (QPaintDevice*)handle;
-  painter.begin (device);   
+  painter.begin (device);
 }
 
 void qt_renderer_rep::end () { painter.end (); }
 
-QColor 
+QColor
 qt_color(color c)
 {
   int r, g, b;
@@ -162,7 +162,7 @@ qt_renderer_rep::clear (SI x1, SI y1, SI x2, SI y2) {
   if ((x1>=x2) || (y1<=y2)) return;
   QBrush brush (qt_color(cur_bg));
   painter.setRenderHints (0);
-  painter.fillRect (x1, y2, x2-x1, y1-y2, brush);      
+  painter.fillRect (x1, y2, x2-x1, y1-y2, brush);       
 }
 
 void
@@ -177,18 +177,18 @@ qt_renderer_rep::fill (SI x1, SI y1, SI x2, SI y2) {
     y1 -= (d>>1);
     y2 += ((d+1)>>1);
   }
-  
+
   x1= max (x1, cx1-ox); y1= max (y1, cy1-oy);
   x2= min (x2, cx2-ox); y2= min (y2, cy2-oy);
   // outer_round (x1, y1, x2, y2); might still be needed somewhere
   if ((x1>=x2) || (y1>=y2)) return;
-  
+
   decode (x1, y1);
   decode (x2, y2);
 
   QBrush brush (qt_color(cur_fg));
   painter.setRenderHints (0);
-  painter.fillRect (x1, y2, x2-x1, y1-y2, brush);      
+  painter.fillRect (x1, y2, x2-x1, y1-y2, brush);       
 }
 
 void
@@ -210,7 +210,7 @@ qt_renderer_rep::fill_arc (SI x1, SI y1, SI x2, SI y2, int 
alpha, int delta) {
 }
 
 void
-qt_renderer_rep::polygon (array<SI> x, array<SI> y, bool convex) {  
+qt_renderer_rep::polygon (array<SI> x, array<SI> y, bool convex) {
   int i, n= N(x);
   if ((N(y) != n) || (n<1)) return;
   QPolygonF poly(n);
@@ -242,25 +242,25 @@ struct qt_cache_image_rep: cache_image_element_rep {
 
 void
 qt_renderer_rep::image (url u, SI w, SI h, SI x, SI y,
-                        double cx1, double cy1, double cx2, double cy2) 
+                        double cx1, double cy1, double cx2, double cy2)
 {
   // Given an image of original size (W, H),
   // we display the part (cx1 * W, xy1 * H, cx2 * W, cy2 * H)
   // at position (x, y) in a rectangle of size (w, h)
-  
+
   // if (DEBUG_EVENTS) cout << "qt_renderer_rep::image " << as_string(u) << LF;
-  
+
   w= w/pixel; h= h/pixel;
   decode (x, y);
-  
+
   //painter.setRenderHints (0);
   //painter.drawRect (QRect (x, y-h, w, h));
-  
+
   QImage *pm = NULL;
   tree lookup= tuple (u->t);
   lookup << as_string (w ) << as_string (h )
-        << as_string (cx1) << as_string (cy1)
-        << as_string (cx2) << as_string (cy2) << "qt-image" ;
+         << as_string (cx1) << as_string (cy1)
+         << as_string (cx2) << as_string (cy2) << "qt-image" ;
   cache_image_element ci = get_image_cache(lookup);
   if (!is_nil(ci)) {
     pm= static_cast<QImage*> (ci->ptr);
@@ -273,7 +273,7 @@ qt_renderer_rep::image (url u, SI w, SI h, SI x, SI y,
              suffix (u) == "pdf") {
       url temp= url_temp (".png");
 #ifdef MACOSX_EXTENSIONS
-      mac_image_to_png (u, temp); 
+      mac_image_to_png (u, temp);
 #else
       system ("convert", u, temp);
 #endif
@@ -289,7 +289,7 @@ qt_renderer_rep::image (url u, SI w, SI h, SI x, SI y,
     set_image_cache(lookup, ci);
     (ci->nr)++;
   }
-  
+
   int iw= pm->width ();
   int ih= pm->height ();
   int x1= as_int (cx1 * iw);
@@ -298,7 +298,7 @@ qt_renderer_rep::image (url u, SI w, SI h, SI x, SI y,
   int y2= as_int (cy2 * ih);
   int ww= x2 - x1;
   int hh= y2 - y1;
-  
+
   painter.setRenderHints (0);
   //painter.setRenderHints (QPainter::SmoothPixmapTransform);
   painter.drawImage (QRect (x, y-h, w, h), *pm, QRect (x1, hh-y2, ww, hh));
@@ -317,7 +317,7 @@ qt_renderer_rep::draw_clipped (QImage *im, int w, int h, SI 
x, SI y) {
   painter.setRenderHints (0);
   painter.drawImage (x, y, *im);
   // [im drawAtPoint:NSMakePoint(x,y) fromRect:NSMakeRect(0,0,w,h) 
operation:NSCompositeSourceAtop fraction:1.0];
-}  
+}
 
 void
 qt_renderer_rep::draw_clipped (QPixmap *im, int w, int h, SI x, SI y) {
@@ -327,7 +327,7 @@ qt_renderer_rep::draw_clipped (QPixmap *im, int w, int h, 
SI x, SI y) {
   painter.setRenderHints (0);
   painter.drawPixmap (x, y, w, h, *im);
   // [im drawAtPoint:NSMakePoint(x,y) fromRect:NSMakeRect(0,0,w,h) 
operation:NSCompositeSourceAtop fraction:1.0];
-}  
+}
 
 
 
@@ -348,18 +348,18 @@ qt_renderer_rep::draw (int c, font_glyphs fng, SI x, SI 
y) {
     {
       int nr_cols= sfactor*sfactor;
       if (nr_cols >= 64) nr_cols= 64;
-                 
+                
       QPainter pp(im);
       QPen pen(painter.pen());
-      QBrush brush(pen.color());       
+      QBrush brush(pen.color());        
       pp.setPen(Qt::NoPen);
       im->fill (Qt::transparent);
       for (j=0; j<h; j++)
-       for (i=0; i<w; i++) {
-         int col = gl->get_x (i, j);
-         brush.setColor (QColor (r, g, b, (255*col)/(nr_cols+1)));
-         pp.fillRect (i, j, 1, 1, brush);
-       }
+        for (i=0; i<w; i++) {
+          int col = gl->get_x (i, j);
+          brush.setColor (QColor (r, g, b, (255*col)/(nr_cols+1)));
+          pp.fillRect (i, j, 1, 1, brush);
+        }
       pp.end();
     }
 #else
@@ -371,13 +371,13 @@ qt_renderer_rep::draw (int c, font_glyphs fng, SI x, SI 
y) {
 
       // the following line is disabled because
       // it causes a crash on Qt/X11 4.4.3
-      //im->fill (Qt::transparent); 
+      //im->fill (Qt::transparent);
 
       for (j=0; j<h; j++)
-       for (i=0; i<w; i++) {
-         int col = gl->get_x (i, j);
-         im->setPixel (i, j, qRgba (r, g, b, (255*col)/(nr_cols+1)));
-       }
+        for (i=0; i<w; i++) {
+          int col = gl->get_x (i, j);
+          im->setPixel (i, j, qRgba (r, g, b, (255*col)/(nr_cols+1)));
+        }
     }
 #endif
     qt_image mi2 (im, xo, yo, w, h);
@@ -386,7 +386,7 @@ qt_renderer_rep::draw (int c, font_glyphs fng, SI x, SI y) {
     character_image (xc)= mi;
     // FIXME: we must release the image at some point (this should be ok now, 
see qt_image)
   }
-  
+
   // draw the character
   draw_clipped (mi->img, mi->w, mi->h, x- mi->xo*sfactor, y+ mi->yo*sfactor);
 }
@@ -398,10 +398,10 @@ qt_renderer_rep::draw (int c, font_glyphs fng, SI x, SI 
y) {
 extern int char_clip;
 
 QPixmap*
-qt_renderer_rep::xpm_image (url file_name) { 
+qt_renderer_rep::xpm_image (url file_name) {
   QPixmap *pxm= NULL;
   qt_pixmap mi= images [as_string (file_name)];
-  if (is_nil (mi)) {    
+  if (is_nil (mi)) {
     string sss;
     load_string ("$TEXMACS_PIXMAP_PATH" * file_name, sss, false);
     if (sss == "")
@@ -415,7 +415,7 @@ qt_renderer_rep::xpm_image (url file_name) {
     qt_pixmap mi2 (pxm, 0, 0, pxm->width(), pxm->height());
     mi= mi2;
     images (as_string (file_name))= mi2;
-  }  
+  }
   else pxm=  mi->img ;
   return pxm;
 }
diff --git a/src/src/Plugins/Qt/qt_renderer.hpp 
b/src/src/Plugins/Qt/qt_renderer.hpp
index 2e41239..9892497 100755
--- a/src/src/Plugins/Qt/qt_renderer.hpp
+++ b/src/src/Plugins/Qt/qt_renderer.hpp
@@ -19,7 +19,7 @@
 #include <QtGlobal>
 #include <QWidget>
 
-// if QTMPIXMAPS is defined we use QPixmap for characters 
+// if QTMPIXMAPS is defined we use QPixmap for characters
 // otherwise we use QImage (which support alpha also under X11)
 
 #ifdef Q_WS_MAC
@@ -45,8 +45,8 @@ public:
 
   void begin (void* handle);
   void end ();
-  
-  
+
+
   void  draw (int char_code, font_glyphs fn, SI x, SI y);
   void  set_color (color c);
   void  set_line_style (SI w, int type=0, bool round=true);
@@ -59,7 +59,7 @@ public:
   void  polygon (array<SI> x, array<SI> y, bool convex=true);
   void  xpm (url file_name, SI x, SI y);
   void  image (url u, SI w, SI h, SI x, SI y,
-              double cx1, double cy1, double cx2, double cy2);
+               double cx1, double cy1, double cx2, double cy2);
 
   void draw_clipped (QImage * im, int w, int h, SI x, SI y);
   void draw_clipped (QPixmap * im, int w, int h, SI x, SI y);
diff --git a/src/src/Plugins/Qt/qt_simple_widget.hpp 
b/src/src/Plugins/Qt/qt_simple_widget.hpp
index 9198cdc..fe93dde 100755
--- a/src/src/Plugins/Qt/qt_simple_widget.hpp
+++ b/src/src/Plugins/Qt/qt_simple_widget.hpp
@@ -18,7 +18,7 @@
 class simple_widget_rep: public qt_view_widget_rep {
 public:
   simple_widget_rep ();
-       
+        
   virtual void handle_get_size_hint (SI& w, SI& h);
   virtual void handle_notify_resize (SI w, SI h);
   virtual void handle_keypress (string key, time_t t);
diff --git a/src/src/Plugins/Qt/qt_utilities.cpp 
b/src/src/Plugins/Qt/qt_utilities.cpp
index c01edc6..3cda1c8 100755
--- a/src/src/Plugins/Qt/qt_utilities.cpp
+++ b/src/src/Plugins/Qt/qt_utilities.cpp
@@ -38,7 +38,7 @@ from_qrect (QRect& rect) {
   c1= rect.x() * PIXEL;
   c2= rect.y() * PIXEL;
   c3= (rect.x() + rect.width()) * PIXEL;
-  c4= (rect.y() + rect.height()) * PIXEL;      
+  c4= (rect.y() + rect.height()) * PIXEL;       
   return coord4 (c1, c2, c3, c4);
 }
 
@@ -68,13 +68,13 @@ to_qstring (string s) {
 
 string
 from_qstring (QString &s) {
-  QByteArray arr= s.toUtf8 (); 
+  QByteArray arr= s.toUtf8 ();
   const char* cstr= arr.constData ();
   return utf8_to_cork (string ((char*) cstr));
 }
 
 QString
-to_qstring_utf8 (string s) { 
+to_qstring_utf8 (string s) {
   s= cork_to_utf8 (s);
   char* p= as_charp (s);
   QString nss= QString::fromUtf8 (p, N(s));
diff --git a/src/src/Plugins/Qt/qt_widget.cpp b/src/src/Plugins/Qt/qt_widget.cpp
index d3ad309..2d556c8 100755
--- a/src/src/Plugins/Qt/qt_widget.cpp
+++ b/src/src/Plugins/Qt/qt_widget.cpp
@@ -17,7 +17,7 @@
 #include "qt_menu.hpp"
 
 #include "gui.hpp"
-#include "widget.hpp" 
+#include "widget.hpp"
 #include "message.hpp"
 #include "promise.hpp"
 #include "analyze.hpp"
@@ -69,7 +69,7 @@ qt_widget_rep::popup_window_widget (string s) {
 ostream&
 operator << (ostream& out, QRect rect) {
   return out << "(" << rect.x() << "," << rect.y() << ","
-            << rect.width() << "," << rect.height() << ")";
+             << rect.width() << "," << rect.height() << ")";
 }
 
 char*
@@ -94,14 +94,14 @@ slot_name (slot s) {
     "SLOT_REPAINT",
     "SLOT_DELAYED_MESSAGE",
     "SLOT_DESTROY",
-    
+
     "SLOT_SHRINKING_FACTOR",
     "SLOT_EXTENTS",
     "SLOT_VISIBLE_PART",
     "SLOT_SCROLLBARS_VISIBILITY",
     "SLOT_SCROLL_POSITION",
     "SLOT_CANVAS",
-    
+
     "SLOT_HEADER_VISIBILITY",
     "SLOT_MAIN_MENU",
     "SLOT_MAIN_ICONS_VISIBILITY",
@@ -116,7 +116,7 @@ slot_name (slot s) {
     "SLOT_INTERACTIVE_MODE",
     "SLOT_INTERACTIVE_PROMPT",
     "SLOT_INTERACTIVE_INPUT",
-    
+
     "SLOT_FORM_FIELD",
     "SLOT_STRING_INPUT",
     "SLOT_INPUT_TYPE",
@@ -132,18 +132,18 @@ slot_name (slot s) {
 ******************************************************************************/
 
 // policy: qt_view_widget_rep owns the QWidget
- 
+
 qt_view_widget_rep::qt_view_widget_rep (QWidget* v):
   qt_widget_rep(), view(v), current_renderer(NULL)  {}
 
-qt_view_widget_rep::~qt_view_widget_rep() { 
-  if (view) delete view; 
-  //FIXME: I'm (MG) not sure if we should delete manually all the QWidgets we 
create 
+qt_view_widget_rep::~qt_view_widget_rep() {
+  if (view) delete view;
+  //FIXME: I'm (MG) not sure if we should delete manually all the QWidgets we 
create
   //       or exclusively the top level ones (the windows)
-  //       - Qt spectify that widgets with a parent are deleted by the parent. 
+  //       - Qt spectify that widgets with a parent are deleted by the parent.
   //       - Out policy is that qt_view_widget_rep owns the QWidget (so it is 
responsible to delete it)
   //       are these two requirements compatible ?
-  if (DEBUG_EVENTS) 
+  if (DEBUG_EVENTS)
     cout << "qt_view_widget_rep::~qt_view_widget_rep()\n";
 }
 
@@ -153,7 +153,7 @@ qt_view_widget_rep::send (slot s, blackbox val) {
     cout << "qt_view_widget_rep::send " << slot_name (s) << LF;
   switch (s) {
   case SLOT_NAME:
-    {  
+    {   
       check_type<string> (val, "SLOT_NAME");
       string name = open_box<string> (val);
       view->window() -> setWindowTitle (to_qstring (name));
@@ -172,7 +172,7 @@ qt_view_widget_rep::send (slot s, blackbox val) {
     ASSERT (is_nil (val), "type mismatch");
     view->update(); // [view setNeedsDisplay:YES];
     break;
-    
+
   case SLOT_MOUSE_GRAB:
     NOT_IMPLEMENTED;
     //send_mouse_grab (THIS, val);
@@ -189,7 +189,7 @@ qt_view_widget_rep::send (slot s, blackbox val) {
     if (open_box<bool> (val)) the_keyboard_focus = this;
       if (DEBUG_EVENTS) cout << "Ignored!\n";
     break;
-                       
+                        
   default:
     FAILED ("unhandled slot type");
   }
@@ -203,7 +203,7 @@ blackbox
 qt_view_widget_rep::query (slot s, int type_id) {
   if ((DEBUG_EVENTS) && (s != SLOT_RENDERER))
     cout << "qt_view_widget_rep::query " << slot_name(s) << LF;
-  
+
   switch (s) {
   case SLOT_IDENTIFIER:
     TYPE_CHECK (type_id == type_helper<int>::id);
@@ -219,16 +219,16 @@ qt_view_widget_rep::query (slot s, int type_id) {
       if (!r) r = the_qt_renderer();
       return close_box<renderer> (r);
     }
-  case SLOT_POSITION:  
+  case SLOT_POSITION:
     {
       typedef pair<SI,SI> coord2;
       TYPE_CHECK (type_id == type_helper<coord2>::id);
       QPoint pt= view->pos();
       if (DEBUG_EVENTS)
-       cout << "Position (" << pt.x() << "," << pt.y() << ")\n";
+        cout << "Position (" << pt.x() << "," << pt.y() << ")\n";
       return close_box<coord2> (from_qpoint (pt));
     }
-      
+
 #if 0
   case SLOT_VISIBLE_PART:
     {
@@ -239,7 +239,7 @@ qt_view_widget_rep::query (slot s, int type_id) {
       return close_box<coord4> (c);
     }
 #endif
-      
+
   default:
     FAILED ("cannot handle slot type");
     return blackbox ();
@@ -269,16 +269,16 @@ qt_view_widget_rep::read (slot s, blackbox index) {
     cout << "qt_view_widget_rep::read " << slot_name(s) << LF;
 
   switch (s) {
-    case SLOT_WINDOW: 
-      {    
-       check_type_void (index, "SLOT_WINDOW");
-       QWidget* qwin = view->window();
-       QVariant v= qwin->property ("texmacs_window_widget");
-       if (v.canConvert<void*> ()) 
-         return (widget_rep*) (v.value<void*> ());
-       else FAILED ("QWidget property not set");
+    case SLOT_WINDOW:
+      {
+        check_type_void (index, "SLOT_WINDOW");
+        QWidget* qwin = view->window();
+        QVariant v= qwin->property ("texmacs_window_widget");
+        if (v.canConvert<void*> ())
+          return (widget_rep*) (v.value<void*> ());
+        else FAILED ("QWidget property not set");
       }
-      break; // not reached    
+      break; // not reached     
     default:
       FAILED ("cannot handle slot type");
       return widget();
@@ -304,7 +304,7 @@ qt_view_widget_rep::plain_window_widget (string s) {
   //return this;
   widget wid= tm_new<qt_window_widget_rep> (view);
   //FIXME: is this the right thing to do?
-  return wid; 
+  return wid;
 }
 
 
@@ -317,10 +317,10 @@ qt_tm_widget_rep::qt_tm_widget_rep(int mask, command 
_quit):
   visibility[2] = (mask & 4)  == 4;  // context
   visibility[3] = (mask & 8)  == 8;  // user
   visibility[4] = (mask & 16) == 16; // footer
-  
-  
+
+
   QMainWindow* mw= tm_mainwindow ();
- 
+
   QScrollArea* sa= new QScrollArea (mw);
   sa->setBackgroundRole (QPalette::Dark);
   mw->setCentralWidget (sa);
@@ -349,17 +349,17 @@ qt_tm_widget_rep::qt_tm_widget_rep(int mask, command 
_quit):
   mw->addToolBarBreak ();
 
   updateVisibility();
-  
+
   mw->setIconSize (QSize (17, 17));
 
   mw->setFocusPolicy (Qt::NoFocus);
   sa->setFocusPolicy (Qt::NoFocus);
-  
-  
+
+
 }
 
 qt_tm_widget_rep::~qt_tm_widget_rep () {
-  if (DEBUG_EVENTS) 
+  if (DEBUG_EVENTS)
     cout << "qt_tm_widget_rep::~qt_tm_widget_rep\n";
 }
 
@@ -450,7 +450,7 @@ qt_tm_widget_rep::send (slot s, blackbox val) {
       rightLabel->update ();
     }
     break;
-                       
+
   case SLOT_SCROLL_POSITION:
     {
       TYPE_CHECK (type_box (val) == type_helper<coord2>::id);
@@ -460,21 +460,21 @@ qt_tm_widget_rep::send (slot s, blackbox val) {
       // QPoint pt2= tm_mainwindow()->mapToGlobal (pt);
       // pt= tm_scrollarea()->widget()->mapFromGlobal (pt2);
       if (DEBUG_EVENTS)
-       cout << "Position (" << pt.x() << "," << pt.y() << ")\n ";
+        cout << "Position (" << pt.x() << "," << pt.y() << ")\n ";
 #if 0
       cout << "scrollarea ("
-          << tm_scrollarea()->x() << ","
-          << tm_scrollarea()->y() << "," 
-          << tm_scrollarea()->width() << ","
-          << tm_scrollarea()->height() << ")\n";
+           << tm_scrollarea()->x() << ","
+           << tm_scrollarea()->y() << ","
+           << tm_scrollarea()->width() << ","
+           << tm_scrollarea()->height() << ")\n";
       cout << "widget     ("
-          << tm_scrollarea()->widget()->x() << ","
-          << tm_scrollarea()->widget()->y() << "," 
-          << tm_scrollarea()->widget()->width() << ","
-          << tm_scrollarea()->widget()->height() << ")\n";             
+           << tm_scrollarea()->widget()->x() << ","
+           << tm_scrollarea()->widget()->y() << ","
+           << tm_scrollarea()->widget()->width() << ","
+           << tm_scrollarea()->widget()->height() << ")\n";
       cout << "GOING TO ("
-          << pt.x()+tm_scrollarea()->width()/2 << ","
-          << pt.y()+tm_scrollarea()->height()/2 << ")\n";
+           << pt.x()+tm_scrollarea()->width()/2 << ","
+           << pt.y()+tm_scrollarea()->height()/2 << ")\n";
 #endif
       // It is still not very clear to me because this shift of half h/w size 
works...
       int sx= pt.x () + tm_scrollarea () -> width  () / 2;
@@ -485,12 +485,12 @@ qt_tm_widget_rep::send (slot s, blackbox val) {
       tm_scrollarea () -> update();
     }
     break;
-      
+
   case SLOT_SCROLLBARS_VISIBILITY:
     // ignore this: qt handles scrollbars independently
-    //                 send_int (THIS, "scrollbars", val);
+    //                send_int (THIS, "scrollbars", val);
     break;
-      
+
   case SLOT_INTERACTIVE_MODE:
     {
       TYPE_CHECK (type_box (val) == type_helper<bool>::id);
@@ -509,7 +509,7 @@ qt_tm_widget_rep::send (slot s, blackbox val) {
       tmw->tm_widget()->handle_set_shrinking_factor (new_sf);
     }
     break;
-    
+
   default:
     qt_view_widget_rep::send (s, val);
   }
@@ -531,7 +531,7 @@ qt_tm_widget_rep::query (slot s, int type_id) {
       TYPE_CHECK (type_id == type_helper<coord2>::id);
       QPoint pt= tm_canvas()->pos();
       if (DEBUG_EVENTS)
-       cout << "Position (" << pt.x() << "," << pt.y() << ")\n"; 
+        cout << "Position (" << pt.x() << "," << pt.y() << ")\n";
       return close_box<coord2> (from_qpoint (pt));
     }
 
@@ -552,7 +552,7 @@ qt_tm_widget_rep::query (slot s, int type_id) {
       if (DEBUG_EVENTS) cout << "Visible Region " << rect << LF;
       return close_box<coord4> (c);
     }
-                       
+                        
   case SLOT_USER_ICONS_VISIBILITY:
     TYPE_CHECK (type_id == type_helper<bool>::id);
     return close_box<bool> (visibility[3]);
@@ -560,11 +560,11 @@ qt_tm_widget_rep::query (slot s, int type_id) {
   case SLOT_CONTEXT_ICONS_VISIBILITY:
     TYPE_CHECK (type_id == type_helper<bool>::id);
     return close_box<bool> (visibility[2]);
-      
+
   case SLOT_MAIN_ICONS_VISIBILITY:
     TYPE_CHECK (type_id == type_helper<bool>::id);
     return close_box<bool> (visibility[1]);
-      
+
   case SLOT_HEADER_VISIBILITY:
     TYPE_CHECK (type_id == type_helper<bool>::id);
     return close_box<bool> (visibility[0]);
@@ -578,7 +578,7 @@ qt_tm_widget_rep::query (slot s, int type_id) {
     return close_box<string>
       (((qt_input_text_widget_rep*) int_input.rep) -> text);
     // return close_box<string> ("FIXME");
- 
+
   case SLOT_INTERACTIVE_MODE:
     TYPE_CHECK (type_id == type_helper<bool>::id);
     return close_box<bool> (false); // FIXME: who needs this info?
@@ -637,12 +637,12 @@ qt_tm_widget_rep::write (slot s, blackbox index, widget 
w) {
     cout << "qt_tm_widget_rep::write " << slot_name (s) << LF;
 
   switch (s) {
-  case SLOT_CANVAS: 
+  case SLOT_CANVAS:
     {
       check_type_void (index, "SLOT_CANVAS");
       QWidget* qw= ((qt_view_widget_rep*) w.rep)->view;
-      QWidget* old_canvas= tm_scrollarea()->takeWidget(); 
-      tm_scrollarea()->setWidget (qw);                 
+      QWidget* old_canvas= tm_scrollarea()->takeWidget();
+      tm_scrollarea()->setWidget (qw);                  
       (void) old_canvas;
       // old_canvas will be deleted when the corresponding qt_view_widget_rep 
is destroyed
       qw->setFocusPolicy (Qt::StrongFocus);
@@ -660,7 +660,7 @@ qt_tm_widget_rep::write (slot s, blackbox index, widget w) {
       delete m;
     }
     break;
-  
+
   case SLOT_MAIN_ICONS:
     check_type_void (index, "SLOT_MAIN_ICONS");
     {
@@ -669,19 +669,19 @@ qt_tm_widget_rep::write (slot s, blackbox index, widget 
w) {
       delete m;
     }
     break;
-  
+
   case SLOT_CONTEXT_ICONS:
     check_type_void (index, "SLOT_CONTEXT_ICONS");
-    {  
+    {   
       QMenu* m= to_qmenu (w);
       replaceButtons (contextToolBar, m);
       delete m;
     }
     break;
-  
+
   case SLOT_USER_ICONS:
     check_type_void (index, "SLOT_USER_ICONS");
-    {  
+    {   
       QMenu* m= to_qmenu (w);
       replaceButtons (userToolBar, m);
       delete m;
@@ -690,14 +690,14 @@ qt_tm_widget_rep::write (slot s, blackbox index, widget 
w) {
 
   case SLOT_INTERACTIVE_PROMPT:
     check_type_void (index, "SLOT_INTERACTIVE_PROMPT");
-    int_prompt= concrete (w); 
+    int_prompt= concrete (w);
     break;
-  
+
   case SLOT_INTERACTIVE_INPUT:
     check_type_void (index, "SLOT_INTERACTIVE_INPUT");
     int_input= concrete (w);
     break;
-  
+
   default:
     qt_view_widget_rep::write (s, index, w);
   }
@@ -716,11 +716,11 @@ qt_window_widget_rep::qt_window_widget_rep (QWidget* 
_wid):
   widget_rep(), wid(_wid)
 {
   wid->setProperty ("texmacs_window_widget",
-                   QVariant::fromValue ((void*) this));
+                    QVariant::fromValue ((void*) this));
   nr_windows++;
 }
 
-qt_window_widget_rep::~qt_window_widget_rep () 
+qt_window_widget_rep::~qt_window_widget_rep ()
 {
   nr_windows--;
 }
@@ -736,8 +736,8 @@ qt_window_widget_rep::send (slot s, blackbox val) {
       TYPE_CHECK (type_box (val) == type_helper<coord2>::id);
       coord2 p= open_box<coord2> (val);
       if (wid) {
-             QSize size= to_qsize (p);
-             wid->resize (size);
+              QSize size= to_qsize (p);
+              wid->resize (size);
       }
     }
     break;
@@ -746,29 +746,29 @@ qt_window_widget_rep::send (slot s, blackbox val) {
     {
       TYPE_CHECK (type_box (val) == type_helper<coord2>::id);
       coord2 p= open_box<coord2> (val);
-      if (wid) { 
-             QPoint pt = to_qpoint (p); 
-             pt.ry() += 40;
+      if (wid) {
+              QPoint pt = to_qpoint (p);
+              pt.ry() += 40;
         // to avoid window under menu bar on MAC when moving at (0,0)
-             if (DEBUG_EVENTS) cout << "Moving to (" << pt.x() << "," << 
pt.y() << ")" << LF; 
+              if (DEBUG_EVENTS) cout << "Moving to (" << pt.x() << "," << 
pt.y() << ")" << LF;
         wid->move (pt);
       }
     }
     break;
-      
+
   case SLOT_VISIBILITY:
     {
       check_type<bool> (val, "SLOT_VISIBILITY");
       bool flag = open_box<bool> (val);
       if (wid) {
-             if (flag) wid->show();
-             else wid->hide();
+              if (flag) wid->show();
+              else wid->hide();
       }
     }
     break;
 
   case SLOT_NAME:
-    {  
+    {   
       check_type<string> (val, "SLOT_NAME");
       string name = open_box<string> (val);
       if (wid) wid->setWindowTitle (to_qstring (name));
@@ -788,7 +788,7 @@ qt_window_widget_rep::send (slot s, blackbox val) {
     //win->set_full_screen (open_box<bool> (val));
     }
     break;
-      
+
   case SLOT_UPDATE:
     NOT_IMPLEMENTED ;
     //send_update (THIS, val);
@@ -809,13 +809,13 @@ qt_window_widget_rep::query (slot s, int type_id) {
     // we need only to know if the widget is attached to some gui window
     return close_box<int> (wid? 1: 0);
     // return close_box<int> ((int)wid);
-  case SLOT_POSITION:  
+  case SLOT_POSITION:
     {
       typedef pair<SI,SI> coord2;
       TYPE_CHECK (type_id == type_helper<coord2>::id);
       QPoint pt= wid->pos();
       if (DEBUG_EVENTS)
-       cout << "Position (" << pt.x() << "," << pt.y() << ")\n";
+        cout << "Position (" << pt.x() << "," << pt.y() << ")\n";
       return close_box<coord2> (from_qpoint (pt));
     }
   case SLOT_SIZE:
@@ -844,7 +844,7 @@ qt_window_widget_rep::notify (slot s, blackbox new_val) {
 
 widget
 qt_window_widget_rep::read (slot s, blackbox index) {
-  (void) index; 
+  (void) index;
   if (DEBUG_EVENTS)
     cout << "qt_window_widget_rep::read " << slot_name(s) << LF;
   switch (s) {
@@ -857,7 +857,7 @@ qt_window_widget_rep::read (slot s, blackbox index) {
 void
 qt_window_widget_rep::write (slot s, blackbox index, widget w) {
   (void) w; (void) index;
-  if (DEBUG_EVENTS)    
+  if (DEBUG_EVENTS)
     cout << "qt_window_widget_rep::write " << slot_name(s) << LF;
 
   switch (s) {
@@ -871,8 +871,8 @@ qt_window_widget_rep::write (slot s, blackbox index, widget 
w) {
 ******************************************************************************/
 
 simple_widget_rep::simple_widget_rep ():
-  qt_view_widget_rep (new QTMWidget (this)) 
-{ 
+  qt_view_widget_rep (new QTMWidget (this))
+{
   // view->setProperty ("texmacs_widget", QVariant::fromValue ((void*) this));
 }
 
@@ -883,12 +883,12 @@ simple_widget_rep::simple_widget_rep ():
 
 void
 simple_widget_rep::handle_get_size_hint (SI& w, SI& h) {
-  gui_root_extents (w, h);  
+  gui_root_extents (w, h);
 }
 
 void
 simple_widget_rep::handle_notify_resize (SI w, SI h) {
-  (void) w; (void) h; 
+  (void) w; (void) h;
 }
 
 void
@@ -980,7 +980,7 @@ destroy_window_widget (widget w) {
   // FIXME: Handle correcly
   // destroys a window as created by the above routines
   (void) w;
-  
+
   // In the QT implementation explicitly destroying window widgets should not 
be necessary
   // since the widget itself destroy the Qt widget as soon as its destructor 
is called.
   // No memory leak should be caused by this trivial implementation.
@@ -998,7 +998,7 @@ texmacs_widget (int mask, command quit) {
   // are visible or not
   (void) mask; (void) quit; // FIXME: handle correctly mask and quit
   widget w= tm_new<qt_tm_widget_rep> (mask, quit);
-  return w; 
+  return w;
 }
 
 widget
@@ -1032,9 +1032,9 @@ glue_widget (bool hx, bool vx, SI w, SI h) {
 }
 
 widget
-wait_widget (SI width, SI height, string message) { 
+wait_widget (SI width, SI height, string message) {
   // a widget of a specified width and height, displaying a wait message
   // this widget is only needed when using the X11 plugin
   (void) width; (void) height; (void) message;
-  return widget(); 
+  return widget();
 }
diff --git a/src/src/Plugins/Qt/qt_widget.hpp b/src/src/Plugins/Qt/qt_widget.hpp
index 0bdf5df..4dd81c2 100755
--- a/src/src/Plugins/Qt/qt_widget.hpp
+++ b/src/src/Plugins/Qt/qt_widget.hpp
@@ -23,20 +23,20 @@ void replaceActions(QWidget *dest, QWidget *src);
 class qt_widget_rep : public widget_rep {
 public:
   qt_widget_rep() : widget_rep () { };
-       
-  virtual widget plain_window_widget (string s); 
-  virtual widget make_popup_widget (); 
-  virtual widget popup_window_widget (string s); 
- 
+
+  virtual widget plain_window_widget (string s);
+  virtual widget make_popup_widget ();
+  virtual widget popup_window_widget (string s);
+
   virtual QAction *as_qaction() { return NULL; };
   // virtual TMMenuItem *as_menuitem() { return NULL; };
 };
 
 class qt_view_widget_rep: public qt_widget_rep {
-public:        
+public:
   QWidget *view;
   basic_renderer current_renderer;
-  
+
 public:
   qt_view_widget_rep (QWidget *v);
   ~qt_view_widget_rep ();
@@ -56,7 +56,7 @@ public:
 //  virtual void deconnect (slot s, widget w2, slot s2);
     // deconnect a state slot s from another slot s2 of another widget w2
 
-       virtual widget plain_window_widget (string s); 
+  virtual widget plain_window_widget (string s);
   void set_current_renderer(basic_renderer _r) { current_renderer = _r;  }
   basic_renderer get_current_renderer() {  return current_renderer; }
 };
Correct use of "const char *"

From:  <>


---

 src/src/Graphics/Renderer/rgb_colors.hpp |    4 ++--
 src/src/Plugins/Qt/qt_widget.cpp         |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/src/src/Graphics/Renderer/rgb_colors.hpp 
b/src/src/Graphics/Renderer/rgb_colors.hpp
index 8f6859f..f15982d 100755
--- a/src/src/Graphics/Renderer/rgb_colors.hpp
+++ b/src/src/Graphics/Renderer/rgb_colors.hpp
@@ -12,8 +12,8 @@
 ******************************************************************************/
 
 typedef struct { 
-  char *name;
-  int r,g,b; 
+  const char *name;
+  int r,g,b;
 } rgb_record;
 
 #define RGB(r,g,b)  r, g, b 
diff --git a/src/src/Plugins/Qt/qt_widget.cpp b/src/src/Plugins/Qt/qt_widget.cpp
index 2d556c8..8c88c49 100755
--- a/src/src/Plugins/Qt/qt_widget.cpp
+++ b/src/src/Plugins/Qt/qt_widget.cpp
@@ -72,9 +72,9 @@ operator << (ostream& out, QRect rect) {
              << rect.width() << "," << rect.height() << ")";
 }
 
-char*
+const char *
 slot_name (slot s) {
-  static char * slot_names[]= {
+  static const char * slot_names[]= {
     "SLOT_IDENTIFIER",
     "SLOT_WINDOW",
     "SLOT_RENDERER",
Pass argc argument as reference (needed by Qt -- QApplication)

From:  <>


---

 src/src/Graphics/Gui/gui.hpp      |    2 +-
 src/src/Plugins/Cocoa/aqua_gui.h  |    2 +-
 src/src/Plugins/Cocoa/aqua_gui.mm |    6 +++---
 src/src/Plugins/Qt/qt_gui.cpp     |   10 +++++-----
 src/src/Plugins/Qt/qt_gui.hpp     |    2 +-
 src/src/Plugins/X11/x_gui.hpp     |    2 +-
 src/src/Plugins/X11/x_init.cpp    |    4 ++--
 7 files changed, 14 insertions(+), 14 deletions(-)


diff --git a/src/src/Graphics/Gui/gui.hpp b/src/src/Graphics/Gui/gui.hpp
index e567dba..abe10e8 100644
--- a/src/src/Graphics/Gui/gui.hpp
+++ b/src/src/Graphics/Gui/gui.hpp
@@ -30,7 +30,7 @@ typedef int color;
 * Main routines
 ******************************************************************************/
 
-void gui_open (int argc= 0, char** argv= NULL);
+void gui_open (int& argc, char** argv);
   // start the gui
 void gui_interpose (void (*) (void));
   // specify an interpose routine for the main loop
diff --git a/src/src/Plugins/Cocoa/aqua_gui.h b/src/src/Plugins/Cocoa/aqua_gui.h
index d93ec80..0def357 100644
--- a/src/src/Plugins/Cocoa/aqua_gui.h
+++ b/src/src/Plugins/Cocoa/aqua_gui.h
@@ -36,7 +36,7 @@ public:
   hashmap<string,string>       selection_s;
 
 public:
-  aqua_gui_rep(int argc, char **argv);
+  aqua_gui_rep(int& argc, char **argv);
   virtual ~aqua_gui_rep();
   
   
diff --git a/src/src/Plugins/Cocoa/aqua_gui.mm 
b/src/src/Plugins/Cocoa/aqua_gui.mm
index 7db1e72..bf57dd6 100644
--- a/src/src/Plugins/Cocoa/aqua_gui.mm
+++ b/src/src/Plugins/Cocoa/aqua_gui.mm
@@ -36,10 +36,10 @@ int timeout_time;
  
******************************************************************************/
 
 
-aqua_gui_rep::aqua_gui_rep(int argc2, char **argv2): 
+aqua_gui_rep::aqua_gui_rep(int& argc, char** argv): 
   interrupted(false), selection(NULL)
 {
-  (void) argc2; (void) argv2;
+  (void) argc; (void) argv;
 //  argc               = argc2;
 //  argv               = argv2;
   interrupted        = false;
@@ -367,7 +367,7 @@ static NSAutoreleasePool *pool = nil;
 * Main routines
 ******************************************************************************/
 
-void gui_open (int argc2, char** argv2)
+void gui_open (int& argc2, char** argv2)
   // start the gui
 {
   if (!NSApp) {
diff --git a/src/src/Plugins/Qt/qt_gui.cpp b/src/src/Plugins/Qt/qt_gui.cpp
index be4fba5..1bf8c15 100755
--- a/src/src/Plugins/Qt/qt_gui.cpp
+++ b/src/src/Plugins/Qt/qt_gui.cpp
@@ -36,10 +36,10 @@ int timeout_time;
 * Constructor and geometry
 ******************************************************************************/
 
-qt_gui_rep::qt_gui_rep(int argc2, char **argv2):
+qt_gui_rep::qt_gui_rep(int &argc, char **argv):
   interrupted (false), selection (NULL)
 {
-  (void) argc2; (void) argv2;
+  (void) argc; (void) argv;
   // argc= argc2;
   // argv= argv2;
   interrupted   = false;
@@ -211,10 +211,10 @@ qt_gui_rep::event_loop () {
 ******************************************************************************/
 
 void
-gui_open (int argc2, char** argv2) {
+gui_open (int& argc, char** argv) {
   // start the gui
-  new QApplication (argc2,argv2);
-  the_gui = tm_new<qt_gui_rep> (argc2, argv2);
+  new QApplication (argc,argv);
+  the_gui = tm_new<qt_gui_rep> (argc, argv);
 }
 
 void
diff --git a/src/src/Plugins/Qt/qt_gui.hpp b/src/src/Plugins/Qt/qt_gui.hpp
index d36795e..284339f 100755
--- a/src/src/Plugins/Qt/qt_gui.hpp
+++ b/src/src/Plugins/Qt/qt_gui.hpp
@@ -41,7 +41,7 @@ public:
   hashmap<string,string> selection_s;
 
 public:
-  qt_gui_rep (int argc, char **argv);
+  qt_gui_rep (int &argc, char **argv);
   virtual ~qt_gui_rep ();
 
   /********************* extents, grabbing, selections ***********************/
diff --git a/src/src/Plugins/X11/x_gui.hpp b/src/src/Plugins/X11/x_gui.hpp
index 24840fa..27fc21b 100644
--- a/src/src/Plugins/X11/x_gui.hpp
+++ b/src/src/Plugins/X11/x_gui.hpp
@@ -132,7 +132,7 @@ public:
   Atom XA_TARGETS;
 
 public:
-  x_gui_rep (int argc, char** argv);
+  x_gui_rep (int& argc, char** argv);
   ~x_gui_rep ();
 
   /******************************* Colors ************************************/
diff --git a/src/src/Plugins/X11/x_init.cpp b/src/src/Plugins/X11/x_init.cpp
index b83175d..ec470e0 100644
--- a/src/src/Plugins/X11/x_init.cpp
+++ b/src/src/Plugins/X11/x_init.cpp
@@ -803,7 +803,7 @@ x_gui_rep::get_max_size (SI& width, SI& height) {
 * Main initialization
 ******************************************************************************/
 
-x_gui_rep::x_gui_rep (int argc2, char** argv2):
+x_gui_rep::x_gui_rep (int& argc2, char** argv2):
   color_scale ((void*) NULL),
   character_bitmap (NULL), character_pixmap ((pointer) 0),
   xpm_bitmap (0), xpm_pixmap (0),
@@ -863,7 +863,7 @@ x_gui_rep::~x_gui_rep () {
 }
 
 void
-gui_open (int argc2, char** argv2) {
+gui_open (int& argc2, char** argv2) {
   ASSERT (the_gui == NULL, "gui already open");
   the_gui= tm_new<x_gui_rep> (argc2, argv2);
 }
Enclose server sv in block (within TeXmacs_main), so its automatic deletion 
happens before closing of windows

From:  <>


---

 src/src/Texmacs/Texmacs/texmacs.cpp |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


diff --git a/src/src/Texmacs/Texmacs/texmacs.cpp 
b/src/src/Texmacs/Texmacs/texmacs.cpp
index e56b014..8cef9a8 100644
--- a/src/src/Texmacs/Texmacs/texmacs.cpp
+++ b/src/src/Texmacs/Texmacs/texmacs.cpp
@@ -75,7 +75,7 @@ TeXmacs_main (int argc, char** argv) {
       }
       else if ((s == "-fn") || (s == "-font")) {
        i++;
-       if (i<argc) the_default_font= argv[i];  
+       if (i<argc) the_default_font= argv[i];
       }
       else if ((s == "-g") || (s == "-geometry")) {
        i++;
@@ -95,7 +95,7 @@ TeXmacs_main (int argc, char** argv) {
            geometry_w= max (as_int (g (0, j1)), 320);
            geometry_h= max (as_int (g (j1+1, j2)), 200);
          }
-         if (j3<N(g)) { 
+         if (j3<N(g)) {
            if (g[j2] == '-') geometry_x= as_int (g (j2, j3)) - 1;
            else geometry_x= as_int (g (j2+1, j3));
            if (g[j3] == '-') geometry_y= as_int (g (j3, N(g))) - 1;
@@ -187,6 +187,7 @@ TeXmacs_main (int argc, char** argv) {
   gui_open (argc, argv);
   set_default_font (the_default_font);
   if (DEBUG_STD) cout << "TeXmacs] Starting server...\n";
+  { // opening scope for server sv
   server sv;
 
   for (i=1; i<argc; i++) {
@@ -228,6 +229,9 @@ TeXmacs_main (int argc, char** argv) {
   texmacs_started= true;
   gui_start_loop ();
 
+  if (DEBUG_STD) cout << "TeXmacs] Stopping server...\n";
+  } // ending scope for server sv
+
   if (DEBUG_STD) cout << "TeXmacs] Closing display...\n";
   gui_close ();
   if (DEBUG_STD) cout << "TeXmacs] Good bye...\n";
Qt: Make sure closeEvent of windows is handled only through the TeXmacs engine.

From:  <>


---

 src/src/Plugins/Qt/QTMWindow.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/src/src/Plugins/Qt/QTMWindow.cpp b/src/src/Plugins/Qt/QTMWindow.cpp
index 42d79ca..1904022 100644
--- a/src/src/Plugins/Qt/QTMWindow.cpp
+++ b/src/src/Plugins/Qt/QTMWindow.cpp
@@ -20,8 +20,11 @@ void QTMWindow::closeEvent ( QCloseEvent *event )
   if (DEBUG_EVENTS)   cout << "CLOSE WINDOW" << LF;
   qt_tm_widget_rep *wid = tm_widget ();
   if (wid) {
+    // pass the close request on to TeXmacs and ignore
+    // the direct handling
     wid -> quit ();
+    event -> ignore();
   }
-  QMainWindow::closeEvent (event);
+//  QMainWindow::closeEvent (event);
 }
 
Set SH_MenuBar_AltKeyNavigation to false. Typically this would be the job of 
the style that is selected.

From:  <>

However: That mechanism seems to be broken with some Qt versions. Furthermore, 
the Alt key is heavily
used within TeXmacs, so the menubar navigation gets in the way quite often.
---

 src/src/Plugins/Qt/QTMStyle.cpp  |   10 ++++++++++
 src/src/Plugins/Qt/QTMStyle.hpp  |    1 +
 src/src/Plugins/Qt/qt_widget.cpp |    2 ++
 3 files changed, 13 insertions(+), 0 deletions(-)


diff --git a/src/src/Plugins/Qt/QTMStyle.cpp b/src/src/Plugins/Qt/QTMStyle.cpp
index cd92b03..0e5a6de 100644
--- a/src/src/Plugins/Qt/QTMStyle.cpp
+++ b/src/src/Plugins/Qt/QTMStyle.cpp
@@ -174,6 +174,16 @@ QTMStyle::drawControl (ControlElement element, const 
QStyleOption* option, QPain
 }
 #endif
 
+int
+QTMStyle::styleHint (StyleHint hint, const QStyleOption* option, const 
QWidget* widget, QStyleHintReturn* returnData) const {
+  switch (hint) {
+  case SH_MenuBar_AltKeyNavigation:
+    return 0;
+  default:
+    return style->styleHint (hint, option, widget, returnData);
+  }
+}
+
 QTMStyle*
 qtmstyle () {
   static QTMStyle* qtmstyle= NULL;
diff --git a/src/src/Plugins/Qt/QTMStyle.hpp b/src/src/Plugins/Qt/QTMStyle.hpp
index 76aa010..612311c 100644
--- a/src/src/Plugins/Qt/QTMStyle.hpp
+++ b/src/src/Plugins/Qt/QTMStyle.hpp
@@ -60,6 +60,7 @@ public:
   void drawPrimitive (PrimitiveElement element, const QStyleOption *option, 
QPainter *painter, const QWidget *widget) const;
   int pixelMetric (PixelMetric metric, const QStyleOption *opt, const QWidget 
*widget) const;
   // void drawControl (ControlElement element, const QStyleOption* option, 
QPainter* painter, const QWidget* widget = 0)  const;
+  int styleHint (StyleHint hint, const QStyleOption* option = 0, const 
QWidget* widget = 0, QStyleHintReturn* returnData = 0) const;
 };
 
 QTMStyle* qtmstyle ();
diff --git a/src/src/Plugins/Qt/qt_widget.cpp b/src/src/Plugins/Qt/qt_widget.cpp
index 8c88c49..0f1a520 100755
--- a/src/src/Plugins/Qt/qt_widget.cpp
+++ b/src/src/Plugins/Qt/qt_widget.cpp
@@ -320,6 +320,7 @@ qt_tm_widget_rep::qt_tm_widget_rep(int mask, command _quit):
 
 
   QMainWindow* mw= tm_mainwindow ();
+  mw->setStyle (qtmstyle ());
 
   QScrollArea* sa= new QScrollArea (mw);
   sa->setBackgroundRole (QPalette::Dark);
@@ -655,6 +656,7 @@ qt_tm_widget_rep::write (slot s, blackbox index, widget w) {
     {
       QMenu* m= to_qmenu (w);
       QMenuBar* b= new QMenuBar ();
+      b->setStyle (qtmstyle ());
       replaceActions (b, m);
       tm_mainwindow()->setMenuBar (b);
       delete m;
Prevent qt to pass on plain modifier key-events (like "C-", "Mod1-" etc) to be 
passed on to TeXmacs.

From:  <>

This used to cause "stuck" Alt keypresses to modify the next keypress, even 
though the Alt key had
been released afterwards.
---

 src/src/Plugins/Qt/QTMWidget.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/src/src/Plugins/Qt/QTMWidget.cpp b/src/src/Plugins/Qt/QTMWidget.cpp
index a29b435..b187512 100644
--- a/src/src/Plugins/Qt/QTMWidget.cpp
+++ b/src/src/Plugins/Qt/QTMWidget.cpp
@@ -307,6 +307,8 @@ QTMWidget::keyPressEvent (QKeyEvent* event) {
       }
     }
 
+    if (r == "") return;
+
 #ifdef Q_WS_MAC
     if (mods & Qt::MetaModifier) r= "C-" * r;
     if (mods & Qt::ControlModifier) r= "Mod1-" * r;
@@ -319,7 +321,6 @@ QTMWidget::keyPressEvent (QKeyEvent* event) {
     if (mods & Qt::MetaModifier) r= "Mod4-" * r;
 #endif
 
-    if (r == "") return;
     if (DEBUG_EVENTS)
       cout << "key press: " << r << LF;
     //int start= texmacs_time ();
Fix handling of deadkeys in qt keymap

From:  <>


---

 src/src/Plugins/Qt/QTMWidget.cpp |   44 ++++++++++++++++++++++++++------------
 1 files changed, 30 insertions(+), 14 deletions(-)


diff --git a/src/src/Plugins/Qt/QTMWidget.cpp b/src/src/Plugins/Qt/QTMWidget.cpp
index b187512..1d7f0c5 100644
--- a/src/src/Plugins/Qt/QTMWidget.cpp
+++ b/src/src/Plugins/Qt/QTMWidget.cpp
@@ -41,6 +41,7 @@ extern int time_credit;
 extern int timeout_time;
 
 hashmap<int,string> qtkeymap (0);
+hashmap<int,string> qtdeadmap (0);
 
 inline void
 scale (QPoint& point) {
@@ -51,6 +52,10 @@ inline void
 map (int code, string name) {
   qtkeymap(code) = name;
 }
+inline void
+deadmap (int code, string name) {
+  qtdeadmap(code) = name;
+}
 
 void
 initkeymap () {
@@ -116,11 +121,11 @@ initkeymap () {
   map (Qt::Key_Execute   , "execute" );
   map (Qt::Key_Help      , "help" );
 
-  map (Qt::Key_Dead_Acute     , "acute");
-  map (Qt::Key_Dead_Grave     , "grave");
-  map (Qt::Key_Dead_Diaeresis , "umlaut");
-  map (Qt::Key_Dead_Circumflex, "hat");
-  map (Qt::Key_Dead_Tilde     , "tilde");
+  deadmap (Qt::Key_Dead_Acute     , "acute");
+  deadmap (Qt::Key_Dead_Grave     , "grave");
+  deadmap (Qt::Key_Dead_Diaeresis , "umlaut");
+  deadmap (Qt::Key_Dead_Circumflex, "hat");
+  deadmap (Qt::Key_Dead_Tilde     , "tilde");
 
   // map (0x0003              , "K-enter");
   // map (Qt::Key_Begin       , "begin" );
@@ -279,6 +284,8 @@ QTMWidget::keyPressEvent (QKeyEvent* event) {
     if (qtkeymap->contains (key)) {
       r = qtkeymap[key];
       if (mods & Qt::ShiftModifier) r= "S-" * r;
+    } else if (qtdeadmap->contains (key)) {
+      r = qtdeadmap[key];
     }
     else {
       QByteArray buf= nss.toUtf8();
@@ -294,17 +301,26 @@ QTMWidget::keyPressEvent (QKeyEvent* event) {
             key= (int) (key + ((int) 'a') - ((int) 'A'));
         r= string ((char) key);
       }
+
       else {
-        if (unic == 168) r= "umlaut";
-        if (unic == 96) {
-          if ((mods & Qt::AltModifier) != 0) r= "grave";
-          else r= "`";
-        }
-        if (unic == 180) r= "acute";
-        if (unic == 710) r= "hat";
-        if (unic == 732) r= "tilde";
         flag= false;
+       switch(unic) {
+       case 168:  r= "umlaut"; break;
+       case 96:   if ((mods & Qt::AltModifier) != 0) r= "grave";
+                   else r= "`";
+                  break;
+       case 180:  r= "acute"; break;
+       // the following combining characters should be caught by qtdeadmap
+       // case 0x300: r= "grave";
+       // case 0x301: r= "acute";
+       // case 0x302: r= "hat";
+       // case 0x308: r= "umlaut";
+       // case 0x33e: r= "tilde";
+       default:
+           flag= true;
+        }
       }
+
     }
 
     if (r == "") return;
@@ -316,7 +332,7 @@ QTMWidget::keyPressEvent (QKeyEvent* event) {
     if (flag && ((mods & Qt::AltModifier) != 0)) r= "Mod4-" * r;
 #else
     if (mods & Qt::ControlModifier) r= "C-" * r;
-    if (mods & Qt::AltModifier) r= "Mod1-" * r;
+    if (flag && ((mods & Qt::AltModifier) != 0)) r= "Mod1-" * r;
     //if (mods & Qt::KeypadModifier) r= "Mod3-" * r;
     if (mods & Qt::MetaModifier) r= "Mod4-" * r;
 #endif

reply via email to

[Prev in Thread] Current Thread [Next in Thread]