Add hidden setting for close buttons on the left
This value can be changed by distributions using window decorations on the left side. Fixes: https://bugs.launchpad.net/midori/+bug/699972
This commit is contained in:
parent
74549eff9d
commit
d19396a065
2 changed files with 41 additions and 9 deletions
|
@ -4573,15 +4573,18 @@ midori_view_get_proxy_tab_label (MidoriView* view)
|
||||||
align = gtk_alignment_new (1.0, 0.0, 0.0, 0.0);
|
align = gtk_alignment_new (1.0, 0.0, 0.0, 0.0);
|
||||||
gtk_container_add (GTK_CONTAINER (align), view->tab_close);
|
gtk_container_add (GTK_CONTAINER (align), view->tab_close);
|
||||||
|
|
||||||
#if HAVE_OSX
|
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_icon, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_end (GTK_BOX (hbox), view->tab_title, FALSE, TRUE, 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);
|
gtk_box_pack_start (GTK_BOX (hbox), align, FALSE, FALSE, 0);
|
||||||
#else
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), view->tab_icon, FALSE, FALSE, 0);
|
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_start (GTK_BOX (hbox), view->tab_title, FALSE, TRUE, 0);
|
||||||
gtk_box_pack_end (GTK_BOX (hbox), align, FALSE, FALSE, 0);
|
gtk_box_pack_end (GTK_BOX (hbox), align, FALSE, FALSE, 0);
|
||||||
#endif
|
}
|
||||||
gtk_widget_show_all (GTK_WIDGET (event_box));
|
gtk_widget_show_all (GTK_WIDGET (event_box));
|
||||||
|
|
||||||
if (view->minimized)
|
if (view->minimized)
|
||||||
|
|
|
@ -48,6 +48,7 @@ struct _MidoriWebSettings
|
||||||
MidoriPreferredEncoding preferred_encoding : 3;
|
MidoriPreferredEncoding preferred_encoding : 3;
|
||||||
gboolean always_show_tabbar : 1;
|
gboolean always_show_tabbar : 1;
|
||||||
gboolean close_buttons_on_tabs : 1;
|
gboolean close_buttons_on_tabs : 1;
|
||||||
|
gboolean close_buttons_left : 1;
|
||||||
MidoriNewPage open_new_pages_in : 2;
|
MidoriNewPage open_new_pages_in : 2;
|
||||||
MidoriNewPage open_external_pages_in : 2;
|
MidoriNewPage open_external_pages_in : 2;
|
||||||
gboolean middle_click_opens_selection : 1;
|
gboolean middle_click_opens_selection : 1;
|
||||||
|
@ -134,6 +135,7 @@ enum
|
||||||
|
|
||||||
PROP_ALWAYS_SHOW_TABBAR,
|
PROP_ALWAYS_SHOW_TABBAR,
|
||||||
PROP_CLOSE_BUTTONS_ON_TABS,
|
PROP_CLOSE_BUTTONS_ON_TABS,
|
||||||
|
PROP_CLOSE_BUTTONS_LEFT,
|
||||||
PROP_OPEN_NEW_PAGES_IN,
|
PROP_OPEN_NEW_PAGES_IN,
|
||||||
PROP_OPEN_EXTERNAL_PAGES_IN,
|
PROP_OPEN_EXTERNAL_PAGES_IN,
|
||||||
PROP_MIDDLE_CLICK_OPENS_SELECTION,
|
PROP_MIDDLE_CLICK_OPENS_SELECTION,
|
||||||
|
@ -730,6 +732,27 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
|
||||||
TRUE,
|
TRUE,
|
||||||
flags));
|
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,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_OPEN_NEW_PAGES_IN,
|
PROP_OPEN_NEW_PAGES_IN,
|
||||||
g_param_spec_enum (
|
g_param_spec_enum (
|
||||||
|
@ -1353,6 +1376,9 @@ midori_web_settings_set_property (GObject* object,
|
||||||
case PROP_CLOSE_BUTTONS_ON_TABS:
|
case PROP_CLOSE_BUTTONS_ON_TABS:
|
||||||
web_settings->close_buttons_on_tabs = g_value_get_boolean (value);
|
web_settings->close_buttons_on_tabs = g_value_get_boolean (value);
|
||||||
break;
|
break;
|
||||||
|
case PROP_CLOSE_BUTTONS_LEFT:
|
||||||
|
web_settings->close_buttons_left = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
case PROP_OPEN_NEW_PAGES_IN:
|
case PROP_OPEN_NEW_PAGES_IN:
|
||||||
web_settings->open_new_pages_in = g_value_get_enum (value);
|
web_settings->open_new_pages_in = g_value_get_enum (value);
|
||||||
break;
|
break;
|
||||||
|
@ -1599,6 +1625,9 @@ midori_web_settings_get_property (GObject* object,
|
||||||
case PROP_CLOSE_BUTTONS_ON_TABS:
|
case PROP_CLOSE_BUTTONS_ON_TABS:
|
||||||
g_value_set_boolean (value, web_settings->close_buttons_on_tabs);
|
g_value_set_boolean (value, web_settings->close_buttons_on_tabs);
|
||||||
break;
|
break;
|
||||||
|
case PROP_CLOSE_BUTTONS_LEFT:
|
||||||
|
g_value_set_boolean (value, web_settings->close_buttons_left);
|
||||||
|
break;
|
||||||
case PROP_OPEN_NEW_PAGES_IN:
|
case PROP_OPEN_NEW_PAGES_IN:
|
||||||
g_value_set_enum (value, web_settings->open_new_pages_in);
|
g_value_set_enum (value, web_settings->open_new_pages_in);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue