diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-07-05 02:58:34 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-07-05 02:58:34 +0000 |
commit | c1a14d036d1abe6475a8b8776381dcca0fe5bbef (patch) | |
tree | eff0bb09ed9646522fc4958f00d8194a86ff0045 /gtk/gtkmenubar.c | |
parent | 3da3e77620e61145cff33e4d1e72eb4e976f676a (diff) | |
download | gdk-pixbuf-c1a14d036d1abe6475a8b8776381dcca0fe5bbef.tar.gz |
Check GTK_WIDGET_TOPLEVEL(gtk_widget_get_toplevel (widget)), not
Wed Jul 4 22:35:40 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c gtk/gtkmenubar.c gtk/gtktreeviewcolumn.c
gtk/gtkwidget.c:
Check GTK_WIDGET_TOPLEVEL(gtk_widget_get_toplevel (widget)),
not GTK_WIDGET_GET_ANCESTOR ... see
http://mail.gnome.org/archives/gtk-devel-list/2001-July/msg00072.html.
Indicate the best practice in the docs for gtk_widget_get_toplevel().
* gtk/gtkwidget.[ch]: Expose a private _gtk_widget_hierarchy_changed(),
so GtkPlug can give the correct signals when transforming
from a child to a toplevel.
* gtk/gtkdnd.c (gtk_drag_dest_hierarchy_changed): Handle
reparentation correctly.
* gtk/gtkwidget.c (gtk_widget_propagate_hierarchy_changed):
Propagate the previous_toplevel argument down properly.
* gtk/gtklabel.c (gtk_label_finalize): Fix unrefing
of wrong atr list.
* gtk/gtkplug.[ch]: Add an "embedded" signal.
* gtk/gtksocket.[ch]: Add "child_added", "child_removed"
signals.
* gtk/gtkplug.[ch] gtk/gtksocket.[ch]: Add
functions gtk_plug_get_id(), gtk_socket_get_id(),
to avoid the user having to worry about realization,
and gdkx.h.
* tests/testsocket.c: Extend to try out the new signals
and gtk_plug/socket_get_id().
* gtk/gtklabel.c (gtk_label_set_pattern_internal): Fix
setting of underline attributes.
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Ignore
DestroyNotify events from SubstructureNotifyMask
* gdk/x11/gdkwindow-x11.c (gdk_window_reparent):
Switch GDK_WINDOW_TYPE (window) as needed.
* gdk/x11/gdkwindow-x11.c (gdk_window_new): Clean up,
allow creation of toplevel windows as children of
foreign windows.
* gtk/gtkplug.c: Remove hacks involving changing private
fields of GdkWindow.
* gtk/gtkplug.[ch] gtk/gtksocket.c: Work to make
exactly the same signals and notification
be emitted for local embedding as for inter-process
embedding.
Diffstat (limited to 'gtk/gtkmenubar.c')
-rw-r--r-- | gtk/gtkmenubar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c index 298241892..d17952e95 100644 --- a/gtk/gtkmenubar.c +++ b/gtk/gtkmenubar.c @@ -483,10 +483,10 @@ gtk_menu_bar_hierarchy_changed (GtkWidget *widget, toplevel = gtk_widget_get_toplevel (widget); - if (old_toplevel && GTK_IS_WINDOW (old_toplevel)) + if (old_toplevel) remove_from_window (old_toplevel, menubar); - if (toplevel && GTK_IS_WINDOW (toplevel)) + if (GTK_WIDGET_TOPLEVEL (toplevel)) add_to_window (GTK_WINDOW (toplevel), menubar); } |