+2004-03-17 Morten Welinder <terra@gnome.org>
+
+ * gtk/gtkpathbar.c (gtk_path_bar_forall): Make this work when the
+ slider buttons have been destroyed.
+ (gtk_path_bar_remove): Make this work for slider buttons too.
+ Fixes http://bugzilla.gnome.org/show_bug.cgi?id=137257
+
+2004-03-15 Morten Welinder <terra@gnome.org>
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_add_bookmark_from_path):
+ Sanitize and plug leak.
+ (check_icon_theme): Only do something if the widget has a screen.
+
Wed Mar 17 01:20:28 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
+2004-03-17 Morten Welinder <terra@gnome.org>
+
+ * gtk/gtkpathbar.c (gtk_path_bar_forall): Make this work when the
+ slider buttons have been destroyed.
+ (gtk_path_bar_remove): Make this work for slider buttons too.
+ Fixes http://bugzilla.gnome.org/show_bug.cgi?id=137257
+
+2004-03-15 Morten Welinder <terra@gnome.org>
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_add_bookmark_from_path):
+ Sanitize and plug leak.
+ (check_icon_theme): Only do something if the widget has a screen.
+
Wed Mar 17 01:20:28 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
+2004-03-17 Morten Welinder <terra@gnome.org>
+
+ * gtk/gtkpathbar.c (gtk_path_bar_forall): Make this work when the
+ slider buttons have been destroyed.
+ (gtk_path_bar_remove): Make this work for slider buttons too.
+ Fixes http://bugzilla.gnome.org/show_bug.cgi?id=137257
+
+2004-03-15 Morten Welinder <terra@gnome.org>
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_add_bookmark_from_path):
+ Sanitize and plug leak.
+ (check_icon_theme): Only do something if the widget has a screen.
+
Wed Mar 17 01:20:28 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
+2004-03-17 Morten Welinder <terra@gnome.org>
+
+ * gtk/gtkpathbar.c (gtk_path_bar_forall): Make this work when the
+ slider buttons have been destroyed.
+ (gtk_path_bar_remove): Make this work for slider buttons too.
+ Fixes http://bugzilla.gnome.org/show_bug.cgi?id=137257
+
+2004-03-15 Morten Welinder <terra@gnome.org>
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_add_bookmark_from_path):
+ Sanitize and plug leak.
+ (check_icon_theme): Only do something if the widget has a screen.
+
Wed Mar 17 01:20:28 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
+2004-03-17 Morten Welinder <terra@gnome.org>
+
+ * gtk/gtkpathbar.c (gtk_path_bar_forall): Make this work when the
+ slider buttons have been destroyed.
+ (gtk_path_bar_remove): Make this work for slider buttons too.
+ Fixes http://bugzilla.gnome.org/show_bug.cgi?id=137257
+
+2004-03-15 Morten Welinder <terra@gnome.org>
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_add_bookmark_from_path):
+ Sanitize and plug leak.
+ (check_icon_theme): Only do something if the widget has a screen.
+
Wed Mar 17 01:20:28 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
gtk_widget_set_parent (widget, GTK_WIDGET (container));
}
+static void
+gtk_path_bar_remove_1 (GtkContainer *container,
+ GtkWidget *widget)
+{
+ gboolean was_visible = GTK_WIDGET_VISIBLE (widget);
+ gtk_widget_unparent (widget);
+ if (was_visible)
+ gtk_widget_queue_resize (GTK_WIDGET (container));
+}
+
static void
gtk_path_bar_remove (GtkContainer *container,
GtkWidget *widget)
path_bar = GTK_PATH_BAR (container);
- children = path_bar->button_list;
+ if (widget == path_bar->up_slider_button)
+ {
+ gtk_path_bar_remove_1 (container, widget);
+ path_bar->up_slider_button = NULL;
+ return;
+ }
+ if (widget == path_bar->down_slider_button)
+ {
+ gtk_path_bar_remove_1 (container, widget);
+ path_bar->down_slider_button = NULL;
+ return;
+ }
+
+ children = path_bar->button_list;
while (children)
{
if (widget == BUTTON_DATA (children->data)->button)
{
- gboolean was_visible;
-
- was_visible = GTK_WIDGET_VISIBLE (widget);
- gtk_widget_unparent (widget);
-
+ gtk_path_bar_remove_1 (container, widget);
path_bar->button_list = g_list_remove_link (path_bar->button_list, children);
g_list_free (children);
-
- if (was_visible)
- gtk_widget_queue_resize (GTK_WIDGET (container));
- break;
+ return;
}
children = children->next;
(* callback) (child, callback_data);
}
- (* callback) (path_bar->up_slider_button, callback_data);
- (* callback) (path_bar->down_slider_button, callback_data);
+ if (path_bar->up_slider_button)
+ (* callback) (path_bar->up_slider_button, callback_data);
+
+ if (path_bar->down_slider_button)
+ (* callback) (path_bar->down_slider_button, callback_data);
}
static void