summaryrefslogtreecommitdiff
path: root/gtk/gtkpathbar.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2006-11-08 19:46:56 +0000
committerCarlos Garnacho <carlosg@src.gnome.org>2006-11-08 19:46:56 +0000
commit6549346d0880264e85f20e7565fd9cd0b363e039 (patch)
treef44a5a2fc084740b0a7d7e6dca66ea1ed19a70d1 /gtk/gtkpathbar.c
parentfc3b48468871473b0e76425bc275615f9e061753 (diff)
downloadgtk+-6549346d0880264e85f20e7565fd9cd0b363e039.tar.gz
added, do not leave the scroll timeout running if the slider buttons are
2006-11-08 Carlos Garnacho <carlosg@gnome.org> * gtk/gtkpathbar.c (on_slider_unmap): added, do not leave the scroll timeout running if the slider buttons are hidden. (#372527)
Diffstat (limited to 'gtk/gtkpathbar.c')
-rw-r--r--gtk/gtkpathbar.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index 442ef7f606..07631b13a6 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */
/* gtkpathbar.c
* Copyright (C) 2004 Red Hat, Inc., Jonathan Blandford <jrb@gnome.org>
*
@@ -116,6 +117,16 @@ static void gtk_path_bar_update_button_appearance (GtkPathBar *path_bar,
ButtonData *button_data,
gboolean current_dir);
+static void
+on_slider_unmap (GtkWidget *widget,
+ GtkPathBar *path_bar)
+{
+ if (path_bar->timer &&
+ (widget == path_bar->up_slider_button && path_bar->scrolling_up) ||
+ (widget == path_bar->down_slider_button && path_bar->scrolling_down))
+ gtk_path_bar_stop_scrolling (path_bar);
+}
+
static GtkWidget *
get_slider_button (GtkPathBar *path_bar,
GtkArrowType arrow_type)
@@ -130,6 +141,9 @@ get_slider_button (GtkPathBar *path_bar,
gtk_container_add (GTK_CONTAINER (path_bar), button);
gtk_widget_show_all (button);
+ g_signal_connect (G_OBJECT (button), "unmap",
+ G_CALLBACK (on_slider_unmap), path_bar);
+
gtk_widget_pop_composite_child ();
return button;