Follow up preferences refactoring for Mac OSX build

This commit is contained in:
Christian Dywan 2009-11-16 23:33:32 +01:00
parent e98731de8a
commit 8471e76f6a
3 changed files with 9 additions and 15 deletions

View file

@ -174,8 +174,8 @@ katze_preferences_prepare (KatzePreferences* preferences)
gtk_container_set_border_width (GTK_CONTAINER (priv->notebook), 6); gtk_container_set_border_width (GTK_CONTAINER (priv->notebook), 6);
#if HAVE_OSX #if HAVE_OSX
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (preferences->notebook), FALSE); gtk_notebook_set_show_tabs (GTK_NOTEBOOK (priv->notebook), FALSE);
gtk_notebook_set_show_border (GTK_NOTEBOOK (preferences->notebook), FALSE); gtk_notebook_set_show_border (GTK_NOTEBOOK (priv->notebook), FALSE);
priv->toolbar = gtk_toolbar_new (); priv->toolbar = gtk_toolbar_new ();
gtk_toolbar_set_style (GTK_TOOLBAR (priv->toolbar), GTK_TOOLBAR_BOTH); gtk_toolbar_set_style (GTK_TOOLBAR (priv->toolbar), GTK_TOOLBAR_BOTH);
gtk_toolbar_set_show_arrow (GTK_TOOLBAR (priv->toolbar), FALSE); gtk_toolbar_set_show_arrow (GTK_TOOLBAR (priv->toolbar), FALSE);
@ -200,15 +200,15 @@ katze_preferences_prepare (KatzePreferences* preferences)
#if HAVE_OSX #if HAVE_OSX
GtkWidget* icon; GtkWidget* icon;
hbox = gtk_hbox_new (FALSE, 0); GtkWidget* hbox = gtk_hbox_new (FALSE, 0);
button = gtk_button_new (); GtkWidget* button = gtk_button_new ();
icon = gtk_image_new_from_stock (GTK_STOCK_HELP, GTK_ICON_SIZE_BUTTON); icon = gtk_image_new_from_stock (GTK_STOCK_HELP, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (button), icon); gtk_button_set_image (GTK_BUTTON (button), icon);
g_signal_connect (button, "clicked", g_signal_connect (button, "clicked",
G_CALLBACK (katze_preferences_help_clicked_cb), preferences); G_CALLBACK (katze_preferences_help_clicked_cb), preferences);
gtk_box_pack_end (GTK_BOX (hbox), gtk_box_pack_end (GTK_BOX (hbox),
button, FALSE, FALSE, 4); 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); hbox, FALSE, FALSE, 0);
#endif #endif
gtk_widget_show_all (GTK_DIALOG (preferences)->vbox); 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_new_from_widget (
GTK_RADIO_TOOL_BUTTON (priv->toolbutton)) GTK_RADIO_TOOL_BUTTON (priv->toolbutton))
: gtk_radio_tool_button_new (NULL)); : 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_label (GTK_TOOL_BUTTON (priv->toolbutton), label);
gtk_tool_button_set_stock_id (GTK_TOOL_BUTTON (priv->toolbutton), icon); 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); GTK_TOOL_ITEM (priv->toolbutton), -1);
g_signal_connect (priv->toolbutton, "clicked", 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) if (priv->toolbutton)
g_object_set_data (G_OBJECT (priv->toolbutton), "notebook", priv->notebook); g_object_set_data (G_OBJECT (priv->toolbutton), "notebook", priv->notebook);
#endif #endif

View file

@ -192,13 +192,6 @@ midori_preferences_notify_auto_detect_proxy_cb (MidoriWebSettings* settings,
#endif #endif
#if HAVE_OSX #if HAVE_OSX
static void
midori_preferences_help_clicked_cb (GtkWidget* button,
GtkDialog* dialog)
{
gtk_dialog_response (dialog, GTK_RESPONSE_HELP);
}
static void static void
midori_preferences_toolbutton_clicked_cb (GtkWidget* toolbutton, midori_preferences_toolbutton_clicked_cb (GtkWidget* toolbutton,
GtkWidget* page) GtkWidget* page)

View file

@ -1098,7 +1098,7 @@ midori_web_settings_finalize (GObject* object)
G_OBJECT_CLASS (midori_web_settings_parent_class)->finalize (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* static gchar*
get_sys_name (void) get_sys_name (void)
{ {