align = gtk_alignment_new (1.0, 0.0, 0.0, 0.0);
gtk_container_add (GTK_CONTAINER (align), view->tab_close);
- #if HAVE_OSX
- gtk_box_pack_end (GTK_BOX (hbox), view->tab_icon, FALSE, FALSE, 0);
- gtk_box_pack_end (GTK_BOX (hbox), view->tab_title, FALSE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), align, FALSE, FALSE, 0);
- #else
- gtk_box_pack_start (GTK_BOX (hbox), view->tab_icon, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), view->tab_title, FALSE, TRUE, 0);
- gtk_box_pack_end (GTK_BOX (hbox), align, FALSE, FALSE, 0);
- #endif
+ if (katze_object_get_boolean (view->settings, "close-buttons-left"))
+ {
+ gtk_box_pack_end (GTK_BOX (hbox), view->tab_icon, FALSE, FALSE, 0);
+ gtk_box_pack_end (GTK_BOX (hbox), view->tab_title, FALSE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), align, FALSE, FALSE, 0);
+ }
+ else
+ {
+ gtk_box_pack_start (GTK_BOX (hbox), view->tab_icon, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), view->tab_title, FALSE, TRUE, 0);
+ gtk_box_pack_end (GTK_BOX (hbox), align, FALSE, FALSE, 0);
+ }
gtk_widget_show_all (GTK_WIDGET (event_box));
if (view->minimized)
MidoriPreferredEncoding preferred_encoding : 3;
gboolean always_show_tabbar : 1;
gboolean close_buttons_on_tabs : 1;
+ gboolean close_buttons_left : 1;
MidoriNewPage open_new_pages_in : 2;
MidoriNewPage open_external_pages_in : 2;
gboolean middle_click_opens_selection : 1;
PROP_ALWAYS_SHOW_TABBAR,
PROP_CLOSE_BUTTONS_ON_TABS,
+ PROP_CLOSE_BUTTONS_LEFT,
PROP_OPEN_NEW_PAGES_IN,
PROP_OPEN_EXTERNAL_PAGES_IN,
PROP_MIDDLE_CLICK_OPENS_SELECTION,
TRUE,
flags));
+ /**
+ * MidoriWebSettings:close-buttons-left:
+ *
+ * Whether to show close buttons on the left side.
+ *
+ * Since: 0.3.1
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_CLOSE_BUTTONS_LEFT,
+ g_param_spec_boolean (
+ "close-buttons-left",
+ "Close buttons on the left",
+ "Whether to show close buttons on the left side",
+ #if HAVE_OSX
+ TRUE,
+ #else
+ FALSE,
+ #endif
+ flags));
+
+
g_object_class_install_property (gobject_class,
PROP_OPEN_NEW_PAGES_IN,
g_param_spec_enum (
case PROP_CLOSE_BUTTONS_ON_TABS:
web_settings->close_buttons_on_tabs = g_value_get_boolean (value);
break;
+ case PROP_CLOSE_BUTTONS_LEFT:
+ web_settings->close_buttons_left = g_value_get_boolean (value);
+ break;
case PROP_OPEN_NEW_PAGES_IN:
web_settings->open_new_pages_in = g_value_get_enum (value);
break;
case PROP_CLOSE_BUTTONS_ON_TABS:
g_value_set_boolean (value, web_settings->close_buttons_on_tabs);
break;
+ case PROP_CLOSE_BUTTONS_LEFT:
+ g_value_set_boolean (value, web_settings->close_buttons_left);
+ break;
case PROP_OPEN_NEW_PAGES_IN:
g_value_set_enum (value, web_settings->open_new_pages_in);
break;