[maemo-commits] [maemo-commits] r13246 - in projects/haf/trunk/gtk+: . gtk
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu Aug 16 14:29:28 EEST 2007
- Previous message: [maemo-commits] r13245 - in projects/haf/trunk/hildon-theme-layout-4: . debian
- Next message: [maemo-commits] r13248 - projects/haf/hafbuildbot
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: xan Date: 2007-08-16 14:29:26 +0300 (Thu, 16 Aug 2007) New Revision: 13246 Modified: projects/haf/trunk/gtk+/ChangeLog projects/haf/trunk/gtk+/gtk/gtkmenu.c projects/haf/trunk/gtk+/gtk/gtkwindow.c projects/haf/trunk/gtk+/gtk/gtkwindow.h Log: 2007-08-16 Xan Lopez <xan.lopez at nokia.com> * gtk/gtkwindow.c (gtk_window_map): call gtk_window_close_other_temporaries if we are not a temporary window. * gtk/gtkwindow.h: make gtk_window_close_other_temporaries private again. * gtk/gtkmenu.c (gtk_menu_init): mark the toplevel window associated to the menu as temporary and make menus ignore the delete-event that will come from _GTK_DELETE_TEMPORARIES, otherwise they will be destroyed when a non-temporary window is mapped and they will stop working or will crash the next time the user tries to open them. Modified: projects/haf/trunk/gtk+/ChangeLog =================================================================== --- projects/haf/trunk/gtk+/ChangeLog 2007-08-16 11:29:06 UTC (rev 13245) +++ projects/haf/trunk/gtk+/ChangeLog 2007-08-16 11:29:26 UTC (rev 13246) @@ -1,3 +1,15 @@ +2007-08-16 Xan Lopez <xan.lopez at nokia.com> + + * gtk/gtkwindow.c (gtk_window_map): call gtk_window_close_other_temporaries + if we are not a temporary window. + + * gtk/gtkwindow.h: make gtk_window_close_other_temporaries private again. + + * gtk/gtkmenu.c (gtk_menu_init): mark the toplevel window associated to the menu + as temporary and make menus ignore the delete-event that will come from _GTK_DELETE_TEMPORARIES, + otherwise they will be destroyed when a non-temporary window is mapped and they will stop working + or will crash the next time the user tries to open them. + 2007-08-16 Kristian Rietveld <kris at imendio.com> Improve on "row-activate on single tap, but now until @@ -11,7 +23,7 @@ (gtk_tree_view_button_press): set queue_{shift,ctrl}_pressed, (gtk_tree_view_button_release): improve the delayed row-activation handling by correctly handling shift/ctrl+clicks. - + 2007-08-15 Kristian Rietveld <kris at imendio.com> * gtk/gtktreeview.c (gtk_tree_view_button_press): only continue Modified: projects/haf/trunk/gtk+/gtk/gtkmenu.c =================================================================== --- projects/haf/trunk/gtk+/gtk/gtkmenu.c 2007-08-16 11:29:06 UTC (rev 13245) +++ projects/haf/trunk/gtk+/gtk/gtkmenu.c 2007-08-16 11:29:26 UTC (rev 13246) @@ -851,7 +851,7 @@ * signals. */ if (event->client.message_type == gdk_atom_intern_static_string ("_GTK_DELETE_TEMPORARIES") && - _gtk_window_is_on_client_data (GTK_WINDOW (window), event) == FALSE && + _gtk_window_is_on_client_data (GTK_WINDOW (window), (GdkEventClient*)event) == FALSE && window == GTK_MENU (menu)->toplevel && GTK_WIDGET_MAPPED (GTK_MENU (menu)->toplevel)) { @@ -859,6 +859,10 @@ handled = TRUE; } break; + case GDK_DELETE: + /* Do nothing for the delete event that will come from _GTK_DELETE_TEMPORARIES */ + handled = TRUE; + break; #endif /* MAEMO_CHANGES */ default: break; @@ -925,6 +929,7 @@ #ifdef MAEMO_CHANGES gtk_window_set_decorated (GTK_WINDOW (menu->toplevel), FALSE); gtk_widget_add_events (menu->toplevel, GDK_VISIBILITY_NOTIFY_MASK); + gtk_window_set_is_temporary (GTK_WINDOW (menu->toplevel), TRUE); #endif /* MAEMO_CHANGES */ /* Refloat the menu, so that reference counting for the menu isn't Modified: projects/haf/trunk/gtk+/gtk/gtkwindow.c =================================================================== --- projects/haf/trunk/gtk+/gtk/gtkwindow.c 2007-08-16 11:29:06 UTC (rev 13245) +++ projects/haf/trunk/gtk+/gtk/gtkwindow.c 2007-08-16 11:29:26 UTC (rev 13246) @@ -4123,6 +4123,11 @@ GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE (window); GdkWindow *toplevel; +#if defined(MAEMO_CHANGES) + if (! gtk_window_get_is_temporary (window)) + gtk_window_close_other_temporaries (window); +#endif + GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED); if (window->bin.child && Modified: projects/haf/trunk/gtk+/gtk/gtkwindow.h =================================================================== --- projects/haf/trunk/gtk+/gtk/gtkwindow.h 2007-08-16 11:29:06 UTC (rev 13245) +++ projects/haf/trunk/gtk+/gtk/gtkwindow.h 2007-08-16 11:29:26 UTC (rev 13246) @@ -273,7 +273,6 @@ gboolean gtk_window_get_is_temporary (GtkWindow *window); gboolean _gtk_window_is_on_client_data (GtkWindow *window, GdkEventClient *event); -void gtk_window_close_other_temporaries (GtkWindow *window); #endif void gtk_window_set_icon_list (GtkWindow *window,
- Previous message: [maemo-commits] r13245 - in projects/haf/trunk/hildon-theme-layout-4: . debian
- Next message: [maemo-commits] r13248 - projects/haf/hafbuildbot
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]