From: Christian Dywan Date: Mon, 16 Nov 2009 22:33:32 +0000 (+0100) Subject: Follow up preferences refactoring for Mac OSX build X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8471e76f6ad8f94c22896befaf0233852efdd728;p=midori Follow up preferences refactoring for Mac OSX build --- diff --git a/katze/katze-preferences.c b/katze/katze-preferences.c index 8dd899b8..bc0a5467 100644 --- a/katze/katze-preferences.c +++ b/katze/katze-preferences.c @@ -174,8 +174,8 @@ katze_preferences_prepare (KatzePreferences* preferences) gtk_container_set_border_width (GTK_CONTAINER (priv->notebook), 6); #if HAVE_OSX - gtk_notebook_set_show_tabs (GTK_NOTEBOOK (preferences->notebook), FALSE); - gtk_notebook_set_show_border (GTK_NOTEBOOK (preferences->notebook), FALSE); + gtk_notebook_set_show_tabs (GTK_NOTEBOOK (priv->notebook), FALSE); + gtk_notebook_set_show_border (GTK_NOTEBOOK (priv->notebook), FALSE); priv->toolbar = gtk_toolbar_new (); gtk_toolbar_set_style (GTK_TOOLBAR (priv->toolbar), GTK_TOOLBAR_BOTH); gtk_toolbar_set_show_arrow (GTK_TOOLBAR (priv->toolbar), FALSE); @@ -200,15 +200,15 @@ katze_preferences_prepare (KatzePreferences* preferences) #if HAVE_OSX GtkWidget* icon; - hbox = gtk_hbox_new (FALSE, 0); - button = gtk_button_new (); + GtkWidget* hbox = gtk_hbox_new (FALSE, 0); + GtkWidget* button = gtk_button_new (); icon = gtk_image_new_from_stock (GTK_STOCK_HELP, GTK_ICON_SIZE_BUTTON); gtk_button_set_image (GTK_BUTTON (button), icon); g_signal_connect (button, "clicked", G_CALLBACK (katze_preferences_help_clicked_cb), preferences); gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 4); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (preferences)->vbox), + gtk_box_pack_end (GTK_BOX (GTK_DIALOG (preferences)->action_area), hbox, FALSE, FALSE, 0); #endif gtk_widget_show_all (GTK_DIALOG (preferences)->vbox); @@ -262,12 +262,13 @@ katze_preferences_add_category (KatzePreferences* preferences, gtk_radio_tool_button_new_from_widget ( GTK_RADIO_TOOL_BUTTON (priv->toolbutton)) : gtk_radio_tool_button_new (NULL)); + gtk_widget_show (priv->toolbutton); gtk_tool_button_set_label (GTK_TOOL_BUTTON (priv->toolbutton), label); gtk_tool_button_set_stock_id (GTK_TOOL_BUTTON (priv->toolbutton), icon); - gtk_toolbar_insert (GTK_TOOLBAR (toolbar), + gtk_toolbar_insert (GTK_TOOLBAR (priv->toolbar), GTK_TOOL_ITEM (priv->toolbutton), -1); g_signal_connect (priv->toolbutton, "clicked", - G_CALLBACK (katze_preferences_toolbutton_clicked_cb), page); + G_CALLBACK (katze_preferences_toolbutton_clicked_cb), priv->page); if (priv->toolbutton) g_object_set_data (G_OBJECT (priv->toolbutton), "notebook", priv->notebook); #endif diff --git a/midori/midori-preferences.c b/midori/midori-preferences.c index 0596b0fa..b8d919e2 100644 --- a/midori/midori-preferences.c +++ b/midori/midori-preferences.c @@ -192,13 +192,6 @@ midori_preferences_notify_auto_detect_proxy_cb (MidoriWebSettings* settings, #endif #if HAVE_OSX -static void -midori_preferences_help_clicked_cb (GtkWidget* button, - GtkDialog* dialog) -{ - gtk_dialog_response (dialog, GTK_RESPONSE_HELP); -} - static void midori_preferences_toolbutton_clicked_cb (GtkWidget* toolbutton, GtkWidget* page) diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c index 2445eae1..eeefba44 100644 --- a/midori/midori-websettings.c +++ b/midori/midori-websettings.c @@ -1098,7 +1098,7 @@ midori_web_settings_finalize (GObject* object) G_OBJECT_CLASS (midori_web_settings_parent_class)->finalize (object); } -#if defined (G_OS_UNIX) +#if defined (G_OS_UNIX) && !HAVE_OSX static gchar* get_sys_name (void) {