]> git.saurik.com Git - wxWidgets.git/commitdiff
wxWindow no longer emits any scroll events after
authorRobert Roebling <robert@roebling.de>
Sat, 5 Feb 2000 10:33:57 +0000 (10:33 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 5 Feb 2000 10:33:57 +0000 (10:33 +0000)
    a programmatic change to its scrollbars.
  Reverted sense of SHIFT and CONTROL in wxListCtrl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/listview.xpm
src/generic/filedlgg.cpp
src/generic/listctrl.cpp
src/gtk/window.cpp
src/gtk1/window.cpp

index 9be04dcad6d58df0f08447ab2bd439eebcb1f0a8..5cc4ba1c8d46705171294630d8cbaa2cd29da4d1 100644 (file)
@@ -9,6 +9,7 @@ static char * listview_xpm[] = {
 "                    ",
 "                    ",
 "  ................  ",
 "                    ",
 "                    ",
 "  ................  ",
+"  .++++++++++++++.  ",
 "  .+@@+++++@@++++.  ",
 "  .+@+@+.#+@+@+.+.  ",
 "  .+@@@++++@@@+++.  ",
 "  .+@@+++++@@++++.  ",
 "  .+@+@+.#+@+@+.+.  ",
 "  .+@@@++++@@@+++.  ",
@@ -22,7 +23,6 @@ static char * listview_xpm[] = {
 "  .+@@+++++@@++++.  ",
 "  .+@+@+.#+@+@+.+.  ",
 "  .+@@@++++@@@+++.  ",
 "  .+@@+++++@@++++.  ",
 "  .+@+@+.#+@+@+.+.  ",
 "  .+@@@++++@@@+++.  ",
-"  .++++++++++++++.  ",
 "  ................  ",
 "                    ",
 "                    "};
 "  ................  ",
 "                    ",
 "                    "};
index e8364dd3d40e5a3c4324d60970281f66bfb9f811..c2ce7eacf2156dc15dcbd6839705dee1cce62a0a 100644 (file)
 
 class wxFileIconEntry : public wxObject
 {
 
 class wxFileIconEntry : public wxObject
 {
-    public:
-        wxFileIconEntry(int i) { id = i; }
+public:
+    wxFileIconEntry(int i) { id = i; }
 
 
-        int id;
+    int id;
 };
 
 
 class wxFileIconsTable
 {
 };
 
 
 class wxFileIconsTable
 {
-    public:
-
-        wxFileIconsTable();
+public:
+    wxFileIconsTable();
 
 
-        int GetIconID(const wxString& extension, const wxString& mime = wxEmptyString);
-        wxImageList *GetImageList() { return &m_ImageList; }
+    int GetIconID(const wxString& extension, const wxString& mime = wxEmptyString);
+    wxImageList *GetImageList() { return &m_ImageList; }
 
 
-    protected:
-        wxImageList m_ImageList;
-        wxHashTable m_HashTable;
+protected:
+    wxImageList m_ImageList;
+    wxHashTable m_HashTable;
 };
 
 static wxFileIconsTable *g_IconsTable = NULL;
 };
 
 static wxFileIconsTable *g_IconsTable = NULL;
index c6c67c9613f13f2888f33ce291335213eb696271..6f14abfd3e1474c8930b68836bf4a1608d4cda0d 100644 (file)
@@ -1467,13 +1467,13 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
         }
         else
         {
         }
         else
         {
-            if (event.ShiftDown())
+            if (event.ControlDown())
             {
                 m_current = line;
                 m_current->ReverseHilight();
                 RefreshLine( m_current );
             }
             {
                 m_current = line;
                 m_current->ReverseHilight();
                 RefreshLine( m_current );
             }
-            else if (event.ControlDown())
+            else if (event.ShiftDown())
             {
                 m_current = line;
 
             {
                 m_current = line;
 
index b760a98993ae0f65c4801d64a9cf75bd7b04551c..e138b71350cc52efc3193a2cb3e74bb3ed099071 100644 (file)
@@ -3332,9 +3332,25 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible,
     }
 
     if (orient == wxHORIZONTAL)
     }
 
     if (orient == wxHORIZONTAL)
+    {
+        gtk_signal_disconnect_by_func( GTK_OBJECT(m_hAdjust),
+            (GtkSignalFunc) gtk_window_hscroll_change_callback, (gpointer) this );
+    
         gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "changed" );
         gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "changed" );
+        
+        gtk_signal_connect( GTK_OBJECT(m_hAdjust), "changed",
+            (GtkSignalFunc) gtk_window_hscroll_change_callback, (gpointer) this );
+    }
     else
     else
+    {
+        gtk_signal_disconnect_by_func( GTK_OBJECT(m_vAdjust),
+            (GtkSignalFunc) gtk_window_vscroll_change_callback, (gpointer) this );
+
         gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "changed" );
         gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "changed" );
+        
+        gtk_signal_connect( GTK_OBJECT(m_vAdjust), "changed",
+            (GtkSignalFunc) gtk_window_vscroll_change_callback, (gpointer) this );
+    }
 }
 
 void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
 }
 
 void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
@@ -3367,9 +3383,25 @@ void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
     if (m_wxwindow->window)
     {
         if (orient == wxHORIZONTAL)
     if (m_wxwindow->window)
     {
         if (orient == wxHORIZONTAL)
+        {
+            gtk_signal_disconnect_by_func( GTK_OBJECT(m_hAdjust),
+                (GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this );
+                
             gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "value_changed" );
             gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "value_changed" );
+            
+            gtk_signal_connect( GTK_OBJECT(m_hAdjust), "value_changed",
+                (GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this );
+        }
         else
         else
+        {
+            gtk_signal_disconnect_by_func( GTK_OBJECT(m_vAdjust),
+                (GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this );
+        
             gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "value_changed" );
             gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "value_changed" );
+
+            gtk_signal_connect( GTK_OBJECT(m_vAdjust), "value_changed",
+                (GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this );
+        }
     }
 }
 
     }
 }
 
index b760a98993ae0f65c4801d64a9cf75bd7b04551c..e138b71350cc52efc3193a2cb3e74bb3ed099071 100644 (file)
@@ -3332,9 +3332,25 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible,
     }
 
     if (orient == wxHORIZONTAL)
     }
 
     if (orient == wxHORIZONTAL)
+    {
+        gtk_signal_disconnect_by_func( GTK_OBJECT(m_hAdjust),
+            (GtkSignalFunc) gtk_window_hscroll_change_callback, (gpointer) this );
+    
         gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "changed" );
         gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "changed" );
+        
+        gtk_signal_connect( GTK_OBJECT(m_hAdjust), "changed",
+            (GtkSignalFunc) gtk_window_hscroll_change_callback, (gpointer) this );
+    }
     else
     else
+    {
+        gtk_signal_disconnect_by_func( GTK_OBJECT(m_vAdjust),
+            (GtkSignalFunc) gtk_window_vscroll_change_callback, (gpointer) this );
+
         gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "changed" );
         gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "changed" );
+        
+        gtk_signal_connect( GTK_OBJECT(m_vAdjust), "changed",
+            (GtkSignalFunc) gtk_window_vscroll_change_callback, (gpointer) this );
+    }
 }
 
 void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
 }
 
 void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
@@ -3367,9 +3383,25 @@ void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
     if (m_wxwindow->window)
     {
         if (orient == wxHORIZONTAL)
     if (m_wxwindow->window)
     {
         if (orient == wxHORIZONTAL)
+        {
+            gtk_signal_disconnect_by_func( GTK_OBJECT(m_hAdjust),
+                (GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this );
+                
             gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "value_changed" );
             gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "value_changed" );
+            
+            gtk_signal_connect( GTK_OBJECT(m_hAdjust), "value_changed",
+                (GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this );
+        }
         else
         else
+        {
+            gtk_signal_disconnect_by_func( GTK_OBJECT(m_vAdjust),
+                (GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this );
+        
             gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "value_changed" );
             gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "value_changed" );
+
+            gtk_signal_connect( GTK_OBJECT(m_vAdjust), "value_changed",
+                (GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this );
+        }
     }
 }
 
     }
 }