Update of /cvsroot/mahogany/M/src/modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19644/src/modules

Modified Files:
        TextViewer.cpp 
Log Message:
another attempt to fix context menu under GTK2

Index: TextViewer.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/TextViewer.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -b -u -2 -r1.58 -r1.59
--- TextViewer.cpp      22 Jul 2004 22:44:18 -0000      1.58
+++ TextViewer.cpp      23 Jul 2004 11:17:25 -0000      1.59
@@ -347,13 +347,13 @@
 #endif // USE_AUTO_URL_DETECTION
 
+#ifdef __WXGTK20__
+   // we need to catch right down under GTK 2 as right up is eaten by the
+   // control itself (it shows its own menu if we don't handle right down)
+   EVT_RIGHT_DOWN(TextViewerWindow::OnMouseEvent)
+#else
    EVT_RIGHT_UP(TextViewerWindow::OnMouseEvent)
+#endif
    EVT_LEFT_UP(TextViewerWindow::OnMouseEvent)
    EVT_LEFT_DCLICK(TextViewerWindow::OnMouseEvent)
-
-#ifdef __WXGTK20__
-   // we need to catch right clicks under GTK 2 to get right up events,
-   // otherwise they're eaten by the control
-   EVT_RIGHT_DOWN(TextViewerWindow::OnMouseEvent)
-#endif // GTK+ 2.0
 END_EVENT_TABLE()
 
@@ -480,5 +480,9 @@
       {
          int id;
+#ifdef __WXGTK20__
+         if ( event.RightDown() )
+#else
          if ( event.RightUp() )
+#endif
          {
             id = WXMENU_LAYOUT_RCLICK;
@@ -505,12 +509,4 @@
             id = WXMENU_LAYOUT_LCLICK;
          }
-#ifdef __WXGTK20__
-         else if ( event.RightDown() )
-         {
-            // just don't skip this event -- otherwise we're not going to get
-            // RightUp() as the internal context menu would be shown
-            return true;
-         }
-#endif // GTK+ 2.0
          else // must be double click, what else?
          {



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to