]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Minor Macos menu entry modification fix
authorDirk Hohndel <dirk@hohndel.org>
Sat, 18 Aug 2012 02:52:49 +0000 (19:52 -0700)
committerDirk Hohndel <dirk@hohndel.org>
Sat, 18 Aug 2012 02:54:27 +0000 (19:54 -0700)
We have removed a menu separator from the gtk gui and that was still
referenced in the Macos code. And just in case, we are now testing
for the widget for the other separator to be non-NULL before
destroying it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
macos.c

diff --git a/macos.c b/macos.c
index 931d4fa1e8a7c74faba0c5ff94b39f09470f5fdc..1b7da1ec6192e6143809cda9787a91fafc5045e8 100644 (file)
--- a/macos.c
+++ b/macos.c
@@ -98,10 +98,9 @@ void subsurface_ui_setup(GtkSettings *settings, GtkWidget *menubar,
        gtk_widget_hide (menubar);
        gtk_osxapplication_set_menu_bar(osx_app, GTK_MENU_SHELL(menubar));
 
-       sep = gtk_ui_manager_get_widget(ui_manager, "/MainMenu/FileMenu/Separator3");
-       gtk_widget_destroy(sep);
        sep = gtk_ui_manager_get_widget(ui_manager, "/MainMenu/FileMenu/Separator2");
-       gtk_widget_destroy(sep);
+       if (sep)
+               gtk_widget_destroy(sep);
 
        menu_item = gtk_ui_manager_get_widget(ui_manager, "/MainMenu/FileMenu/Quit");
        gtk_widget_hide (menu_item);