Code

* src/widgets/desktop-widget.cpp: Minor fix for OS X menubar: Don't try to access...
authormiloszd <miloszd@users.sourceforge.net>
Fri, 6 Feb 2009 01:36:23 +0000 (01:36 +0000)
committermiloszd <miloszd@users.sourceforge.net>
Fri, 6 Feb 2009 01:36:23 +0000 (01:36 +0000)
src/widgets/desktop-widget.cpp

index a64d53bb61e7c21719f0adb44793efec267d5a2e..0751e57831185c11c16d80c13336d6e1fcf95d01 100644 (file)
@@ -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);