From: miloszd Date: Fri, 6 Feb 2009 01:36:23 +0000 (+0000) Subject: * src/widgets/desktop-widget.cpp: Minor fix for OS X menubar: Don't try to access... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6505d592693046c7ded08e8aecaca46ec11a6d8d;p=inkscape.git * src/widgets/desktop-widget.cpp: Minor fix for OS X menubar: Don't try to access NULL GtkWidget pointer --- diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index a64d53bb6..0751e5783 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -1202,11 +1202,13 @@ sp_desktop_widget_layout (SPDesktopWidget *dtw) pref_root = "/window/"; } +#ifndef GDK_WINDOWING_QUARTZ if (!prefs->getBool(pref_root + "menu/state", true)) { gtk_widget_hide_all (dtw->menubar); } else { gtk_widget_show_all (dtw->menubar); } +#endif if (!prefs->getBool(pref_root + "commands/state", true)) { gtk_widget_hide_all (dtw->commands_toolbox); @@ -1318,7 +1320,7 @@ SPDesktopWidget::isToolboxButtonActive (const gchar* id) SPViewWidget * sp_desktop_widget_new (SPNamedView *namedview) { - SPDesktopWidget *dtw = (SPDesktopWidget*)gtk_type_new (SP_TYPE_DESKTOP_WIDGET); + SPDesktopWidget *dtw = (SPDesktopWidget*)g_object_new(SP_TYPE_DESKTOP_WIDGET, NULL); dtw->dt2r = 1.0 / namedview->doc_units->unittobase; @@ -1347,8 +1349,10 @@ sp_desktop_widget_new (SPNamedView *namedview) dtw->layer_selector->setDesktop(dtw->desktop); dtw->menubar = sp_ui_main_menubar (dtw->desktop); +#ifndef GDK_WINDOWING_QUARTZ gtk_widget_show_all (dtw->menubar); gtk_box_pack_start (GTK_BOX (dtw->vbox), dtw->menubar, FALSE, FALSE, 0); +#endif sp_desktop_widget_layout (dtw);