KatzeArray* trash;
KatzeArray* search_engines;
KatzeArray* history;
+ gboolean show_tabs;
KatzeNet* net;
PROP_BOOKMARKS,
PROP_TRASH,
PROP_SEARCH_ENGINES,
- PROP_HISTORY
+ PROP_HISTORY,
+ PROP_SHOW_TABS,
};
enum
guint n;
gboolean always_show_tabbar;
+ if (!browser->show_tabs)
+ return;
+
n = gtk_notebook_get_n_pages (GTK_NOTEBOOK (browser->notebook));
if (n < 2 && browser->settings)
{
KATZE_TYPE_ARRAY,
flags));
+ /**
+ * MidoriBrowser:show-tabs:
+ *
+ * Whether or not to show tabs.
+ *
+ * If disabled, no tab labels are shown. This is intended for
+ * extensions that want to provide alternative tab labels.
+ *
+ * Since 0.1.8
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_SHOW_TABS,
+ g_param_spec_boolean (
+ "show-tabs",
+ "Show Tabs",
+ "Whether or not to show tabs",
+ TRUE,
+ flags));
+
/* Add 2px space between tool buttons */
gtk_rc_parse_string (
"style \"tool-button-style\"\n {\n"
case PROP_HISTORY:
midori_browser_set_history (browser, g_value_get_object (value));
break;
+ case PROP_SHOW_TABS:
+ browser->show_tabs = g_value_get_boolean (value);
+ if (browser->show_tabs)
+ _toggle_tabbar_smartly (browser);
+ else
+ gtk_notebook_set_show_tabs (GTK_NOTEBOOK (browser->notebook), FALSE);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
case PROP_HISTORY:
g_value_set_object (value, browser->history);
break;
+ case PROP_SHOW_TABS:
+ g_value_set_boolean (value, browser->show_tabs);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;