diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-08-17 02:48:24 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-08-17 02:48:24 +0000 |
commit | 54d00408c3a1d36899fdd8b4f085aa2a2946009e (patch) | |
tree | 9bfa7a6827ef1a815ff969717d8b8dcfdeba6673 /libs/gtkmm2ext/gtkapplication_quartz.mm | |
parent | f5c4c8a2931f383c76212ea1cfdb6f85f43bb72f (diff) |
forward port 2.X changes up to and including rev 6842
git-svn-id: svn://localhost/ardour2/branches/3.0@7637 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext/gtkapplication_quartz.mm')
-rw-r--r-- | libs/gtkmm2ext/gtkapplication_quartz.mm | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/libs/gtkmm2ext/gtkapplication_quartz.mm b/libs/gtkmm2ext/gtkapplication_quartz.mm index b6d6b71d5d..c5fb8b12e2 100644 --- a/libs/gtkmm2ext/gtkapplication_quartz.mm +++ b/libs/gtkmm2ext/gtkapplication_quartz.mm @@ -50,6 +50,8 @@ * */ +static gint _exiting = 0; + static guint gdk_quartz_keyval_to_ns_keyval (guint keyval) { @@ -891,9 +893,13 @@ cocoa_menu_item_accel_changed (GtkAccelGroup *accel_group, GClosure *accel_closure, GtkWidget *widget) { - GNSMenuItem *cocoa_item = cocoa_menu_item_get (widget); + GNSMenuItem *cocoa_item; GtkWidget *label; + if (_exiting) + return; + + cocoa_item = cocoa_menu_item_get (widget); get_menu_label_text (widget, &label); if (GTK_IS_ACCEL_LABEL (label) && @@ -945,7 +951,12 @@ cocoa_menu_item_notify_label (GObject *object, GParamSpec *pspec, gpointer data) { - GNSMenuItem *cocoa_item = cocoa_menu_item_get (GTK_WIDGET (object)); + GNSMenuItem *cocoa_item; + + if (_exiting) + return; + + cocoa_item = cocoa_menu_item_get (GTK_WIDGET (object)); if (!strcmp (pspec->name, "label")) { @@ -964,6 +975,9 @@ cocoa_menu_item_notify (GObject *object, GParamSpec *pspec, NSMenuItem *cocoa_item) { + if (_exiting) + return; + if (!strcmp (pspec->name, "sensitive") || !strcmp (pspec->name, "visible")) { @@ -1449,10 +1463,18 @@ gtk_application_ready () extern "C" void gtk_application_cleanup() { - if (_window_menu) + _exiting = 1; + + if (_window_menu) { [ _window_menu release ]; - if (_app_menu) + _window_menu = 0; + } + if (_app_menu) { [ _app_menu release ]; - if (_main_menubar) + _app_menu = 0; + } + if (_main_menubar) { [ _main_menubar release ]; + _main_menubar = 0; + } } |