Commit 06116092 authored by Daniel Elstner's avatar Daniel Elstner Committed by Daniel Elstner

Override hide_all in addition to show_all in order to keep them symmetric.

2003-01-23  Daniel Elstner  <daniel.elstner@gmx.net>

* gtk/gtktoolbar.c (gtk_toolbar_hide_all): Override hide_all
in addition to show_all in order to keep them symmetric. (#102201)
parent 8f5b3bf2
2003-01-23 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (gtk_toolbar_hide_all): Override hide_all
in addition to show_all in order to keep them symmetric. (#102201)
Wed Jan 22 14:18:46 2003 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkevents-x11.c (translate_key_event): add a "return" at
......
2003-01-23 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (gtk_toolbar_hide_all): Override hide_all
in addition to show_all in order to keep them symmetric. (#102201)
Wed Jan 22 14:18:46 2003 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkevents-x11.c (translate_key_event): add a "return" at
......
2003-01-23 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (gtk_toolbar_hide_all): Override hide_all
in addition to show_all in order to keep them symmetric. (#102201)
Wed Jan 22 14:18:46 2003 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkevents-x11.c (translate_key_event): add a "return" at
......
2003-01-23 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (gtk_toolbar_hide_all): Override hide_all
in addition to show_all in order to keep them symmetric. (#102201)
Wed Jan 22 14:18:46 2003 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkevents-x11.c (translate_key_event): add a "return" at
......
2003-01-23 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (gtk_toolbar_hide_all): Override hide_all
in addition to show_all in order to keep them symmetric. (#102201)
Wed Jan 22 14:18:46 2003 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkevents-x11.c (translate_key_event): add a "return" at
......
......@@ -97,6 +97,7 @@ static gboolean gtk_toolbar_focus (GtkWidget *widget,
static void gtk_toolbar_screen_changed (GtkWidget *widget,
GdkScreen *previous_screen);
static void gtk_toolbar_show_all (GtkWidget *widget);
static void gtk_toolbar_hide_all (GtkWidget *widget);
static void gtk_toolbar_add (GtkContainer *container,
GtkWidget *widget);
static void gtk_toolbar_remove (GtkContainer *container,
......@@ -194,6 +195,7 @@ gtk_toolbar_class_init (GtkToolbarClass *class)
widget_class->size_allocate = gtk_toolbar_size_allocate;
widget_class->style_set = gtk_toolbar_style_set;
widget_class->show_all = gtk_toolbar_show_all;
widget_class->hide_all = gtk_toolbar_hide_all;
widget_class->focus = gtk_toolbar_focus;
widget_class->screen_changed = gtk_toolbar_screen_changed;
......@@ -848,6 +850,26 @@ gtk_toolbar_show_all (GtkWidget *widget)
gtk_widget_show (widget);
}
static void
child_hide_all (GtkWidget *widget)
{
/* Don't hide our own children, since that would also hide
* widgets that won't be shown again by gtk_toolbar_show_all().
*/
if (!g_object_get_data (G_OBJECT (widget),
"gtk-toolbar-is-child"))
gtk_widget_hide_all (widget);
}
static void
gtk_toolbar_hide_all (GtkWidget *widget)
{
gtk_container_foreach (GTK_CONTAINER (widget),
(GtkCallback) child_hide_all,
NULL);
gtk_widget_hide (widget);
}
static void
gtk_toolbar_add (GtkContainer *container,
GtkWidget *widget)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment