From 473d087e563d557a572ee85dd12778f37f8f18ec Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 5 Feb 2000 10:33:57 +0000 Subject: [PATCH] wxWindow no longer emits any scroll events after 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 | 2 +- src/generic/filedlgg.cpp | 21 ++++++++++----------- src/generic/listctrl.cpp | 4 ++-- src/gtk/window.cpp | 32 ++++++++++++++++++++++++++++++++ src/gtk1/window.cpp | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 77 insertions(+), 14 deletions(-) diff --git a/include/wx/generic/listview.xpm b/include/wx/generic/listview.xpm index 9be04dcad6..5cc4ba1c8d 100644 --- a/include/wx/generic/listview.xpm +++ b/include/wx/generic/listview.xpm @@ -9,6 +9,7 @@ static char * listview_xpm[] = { " ", " ", " ................ ", +" .++++++++++++++. ", " .+@@+++++@@++++. ", " .+@+@+.#+@+@+.+. ", " .+@@@++++@@@+++. ", @@ -22,7 +23,6 @@ static char * listview_xpm[] = { " .+@@+++++@@++++. ", " .+@+@+.#+@+@+.+. ", " .+@@@++++@@@+++. ", -" .++++++++++++++. ", " ................ ", " ", " "}; diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index e8364dd3d4..c2ce7eacf2 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -65,25 +65,24 @@ class wxFileIconEntry : public wxObject { - public: - wxFileIconEntry(int i) { id = i; } +public: + wxFileIconEntry(int i) { id = i; } - int id; + int id; }; 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; diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index c6c67c9613..6f14abfd3e 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -1467,13 +1467,13 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) } else { - if (event.ShiftDown()) + if (event.ControlDown()) { m_current = line; m_current->ReverseHilight(); RefreshLine( m_current ); } - else if (event.ControlDown()) + else if (event.ShiftDown()) { m_current = line; diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index b760a98993..e138b71350 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3332,9 +3332,25 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible, } 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_connect( GTK_OBJECT(m_hAdjust), "changed", + (GtkSignalFunc) gtk_window_hscroll_change_callback, (gpointer) this ); + } 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_connect( GTK_OBJECT(m_vAdjust), "changed", + (GtkSignalFunc) gtk_window_vscroll_change_callback, (gpointer) this ); + } } 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) + { + 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_connect( GTK_OBJECT(m_hAdjust), "value_changed", + (GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this ); + } 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_connect( GTK_OBJECT(m_vAdjust), "value_changed", + (GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this ); + } } } diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index b760a98993..e138b71350 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -3332,9 +3332,25 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible, } 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_connect( GTK_OBJECT(m_hAdjust), "changed", + (GtkSignalFunc) gtk_window_hscroll_change_callback, (gpointer) this ); + } 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_connect( GTK_OBJECT(m_vAdjust), "changed", + (GtkSignalFunc) gtk_window_vscroll_change_callback, (gpointer) this ); + } } 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) + { + 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_connect( GTK_OBJECT(m_hAdjust), "value_changed", + (GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this ); + } 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_connect( GTK_OBJECT(m_vAdjust), "value_changed", + (GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this ); + } } } -- 2.45.2