]> Pileus Git - ~andy/gtk/commitdiff
Fix crashes in connection with pathbar scrolling (#321560, Bogdan Nicula)
authorMatthias Clasen <mclasen@redhat.com>
Sat, 19 Nov 2005 03:46:04 +0000 (03:46 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 19 Nov 2005 03:46:04 +0000 (03:46 +0000)
2005-11-18  Matthias Clasen  <mclasen@redhat.com>

Fix crashes in connection with pathbar scrolling (#321560,
Bogdan Nicula)

* gtk/gtkpathbar.c (gtk_path_bar_update_slider_buttons):
Stop scrolling when desensitising slider buttons.
(gtk_path_bar_scroll_timeout, gtk_path_bar_slider_button_press):
And use it here.

* gtk/gtkpathbar.h (struct _GtkPathBar): Add a separate
scrolling_down flag.

ChangeLog
ChangeLog.pre-2-10
gtk/gtkpathbar.c
gtk/gtkpathbar.h

index e65c94be58d4d5827ae2a217989724c3afea9dae..9fd880ee597c6cd9d57c0310ab23d90b0ac363f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2005-11-18  Matthias Clasen  <mclasen@redhat.com>
+
+       Fix crashes in connection with pathbar scrolling (#321560,
+       Bogdan Nicula)
+       
+       * gtk/gtkpathbar.c (gtk_path_bar_update_slider_buttons): 
+       Stop scrolling when desensitising slider buttons.
+       (gtk_path_bar_scroll_timeout, gtk_path_bar_slider_button_press): 
+       And use it here.  
+
+       * gtk/gtkpathbar.h (struct _GtkPathBar): Add a separate
+       scrolling_down flag.
+
 2005-11-18  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkpathbar.c (button_clicked_cb): Fix a C99ism.
index e65c94be58d4d5827ae2a217989724c3afea9dae..9fd880ee597c6cd9d57c0310ab23d90b0ac363f4 100644 (file)
@@ -1,3 +1,16 @@
+2005-11-18  Matthias Clasen  <mclasen@redhat.com>
+
+       Fix crashes in connection with pathbar scrolling (#321560,
+       Bogdan Nicula)
+       
+       * gtk/gtkpathbar.c (gtk_path_bar_update_slider_buttons): 
+       Stop scrolling when desensitising slider buttons.
+       (gtk_path_bar_scroll_timeout, gtk_path_bar_slider_button_press): 
+       And use it here.  
+
+       * gtk/gtkpathbar.h (struct _GtkPathBar): Add a separate
+       scrolling_down flag.
+
 2005-11-18  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkpathbar.c (button_clicked_cb): Fix a C99ism.
index cf8e802676809a6608704ce125debc222826ed76..5a8740bc0aa22a3db7dda956c6110fe05f2f12d2 100644 (file)
@@ -734,7 +734,7 @@ gtk_path_bar_scroll_timeout (GtkPathBar *path_bar)
     {
       if (path_bar->scrolling_up)
        gtk_path_bar_scroll_up (path_bar->up_slider_button, path_bar);
-      else 
+      else if (path_bar->scrolling_down)
        gtk_path_bar_scroll_down (path_bar->down_slider_button, path_bar);
 
       if (path_bar->need_timer) 
@@ -779,12 +779,14 @@ gtk_path_bar_slider_button_press (GtkWidget      *widget,
 
   if (widget == path_bar->up_slider_button)
     {
+      path_bar->scrolling_down = FALSE;
       path_bar->scrolling_up = TRUE;
       gtk_path_bar_scroll_up (path_bar->up_slider_button, path_bar);
     }
   else if (widget == path_bar->down_slider_button)
     {
       path_bar->scrolling_up = FALSE;
+      path_bar->scrolling_down = TRUE;
       gtk_path_bar_scroll_down (path_bar->down_slider_button, path_bar);
     }
 
index 2dca06b6f4042534aa443e87470155082a40033b..e395ccc0b021a6f8d8a48f5b434b28a71784fca9 100644 (file)
@@ -61,9 +61,10 @@ struct _GtkPathBar
   gint16 button_offset;
   guint timer;
   guint slider_visible : 1;
-  guint need_timer : 1;
-  guint ignore_click : 1;
-  guint scrolling_up : 1;
+  guint need_timer     : 1;
+  guint ignore_click   : 1;
+  guint scrolling_up   : 1;
+  guint scrolling_down : 1;
 };
 
 struct _GtkPathBarClass