From 6549346d0880264e85f20e7565fd9cd0b363e039 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 8 Nov 2006 19:46:56 +0000 Subject: [PATCH] added, do not leave the scroll timeout running if the slider buttons are 2006-11-08 Carlos Garnacho * gtk/gtkpathbar.c (on_slider_unmap): added, do not leave the scroll timeout running if the slider buttons are hidden. (#372527) --- ChangeLog | 5 +++++ gtk/gtkpathbar.c | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9807615467..66f573b586 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-08 Carlos Garnacho + + * gtk/gtkpathbar.c (on_slider_unmap): added, do not leave the scroll + timeout running if the slider buttons are hidden. (#372527) + 2006-11-08 Christian Persch * gtk/gtkfilechooserdefault.c (browse_widgets_create): Don't make 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 * @@ -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;