source_view = midori_view_new ();
midori_view_set_settings (MIDORI_VIEW (source_view), browser->settings);
midori_view_set_uri (MIDORI_VIEW (source_view), uri);
- midori_view_notify_icon_cb (source_view, NULL, browser);
+ midori_view_notify_icon_cb (MIDORI_VIEW (source_view), NULL, browser);
g_free (uri);
gtk_widget_show (source_view);
n = midori_browser_add_tab (browser, source_view);
FALSE, FALSE, 3);
g_object_unref (ui_manager);
-
- #ifndef WEBKIT_CHECK_VERSION
- _action_set_sensitive (browser, "ZoomIn", FALSE);
- _action_set_sensitive (browser, "ZoomOut", FALSE);
- #endif
}
static void
{
gboolean remember_last_window_size;
gint last_window_width, last_window_height;
+ gboolean compact_sidepanel;
gint last_panel_position, last_panel_page;
gboolean show_menubar, show_navigationbar, show_bookmarkbar;
gboolean show_panel, show_statusbar;
"remember-last-window-size", &remember_last_window_size,
"last-window-width", &last_window_width,
"last-window-height", &last_window_height,
+ "compact-sidepanel", &compact_sidepanel,
"last-panel-position", &last_panel_position,
"last-panel-page", &last_panel_page,
"show-menubar", &show_menubar,
_action_by_name (browser, "Search")), item);
}
+ midori_panel_set_compact (MIDORI_PANEL (browser->panel), compact_sidepanel);
gtk_paned_set_position (GTK_PANED (gtk_widget_get_parent (browser->panel)),
last_panel_position);
midori_panel_set_current_page (MIDORI_PANEL (browser->panel), last_panel_page);
_midori_browser_set_toolbar_style (browser, g_value_get_enum (&value));
else if (name == g_intern_string ("toolbar-items"))
_midori_browser_set_toolbar_items (browser, g_value_get_string (&value));
+ else if (name == g_intern_string ("compact-sidepanel"))
+ midori_panel_set_compact (MIDORI_PANEL (browser->panel),
+ g_value_get_boolean (&value));
else if (name == g_intern_string ("always-show-tabbar"))
_toggle_tabbar_smartly (browser);
else if (!g_object_class_find_property (G_OBJECT_GET_CLASS (web_settings),
return GTK_WIDGET (panel);
}
+/**
+ * midori_panel_set_compact:
+ * @compact: %TRUE if the panel should be compact
+ *
+ * Determines if the panel should be compact.
+ **/
+void
+midori_panel_set_compact (MidoriPanel* panel,
+ gboolean compact)
+{
+ g_return_if_fail (MIDORI_IS_PANEL (panel));
+
+ gtk_toolbar_set_style (GTK_TOOLBAR (panel->toolbar),
+ compact ? GTK_TOOLBAR_ICONS : GTK_TOOLBAR_BOTH);
+}
+
static void
midori_panel_menu_item_activate_cb (GtkWidget* widget,
MidoriPanel* panel)
GtkWidget*
midori_panel_new (void);
+void
+midori_panel_set_compact (MidoriPanel* panel,
+ gboolean compact);
+
gint
midori_panel_append_page (MidoriPanel* panel,
GtkWidget* child,
/* Page "Interface" */
PAGE_NEW (GTK_STOCK_CONVERT, _("Interface"));
FRAME_NEW (_("Navigationbar"));
- TABLE_NEW (4, 2);
+ TABLE_NEW (3, 2);
INDENTED_ADD (katze_property_label (settings, "toolbar-style"), 0, 1, 0, 1);
button = katze_property_proxy (settings, "toolbar-style", NULL);
FILLED_ADD (button, 1, 2, 0, 1);
"ReloadStop, ZoomIn, ZoomOut, Back, Forward, Homepage, Search, Trash"
"</span>");
FILLED_ADD (button, 0, 2, 2, 3);
- button = katze_property_proxy (settings, "always-show-tabbar", NULL);
- INDENTED_ADD (button, 0, 1, 3, 4);
FRAME_NEW (_("Browsing"));
- TABLE_NEW (3, 2);
+ TABLE_NEW (4, 2);
label = katze_property_label (settings, "open-external-pages-in");
INDENTED_ADD (label, 0, 1, 0, 1);
button = katze_property_proxy (settings, "open-external-pages-in", NULL);
INDENTED_ADD (label, 0, 1, 0, 1);
button = katze_property_proxy (settings, "open-new-pages-in", NULL);
FILLED_ADD (button, 1, 2, 0, 1); */
- button = katze_property_proxy (settings, "middle-click-opens-selection", NULL);
+ button = katze_property_proxy (settings, "always-show-tabbar", NULL);
INDENTED_ADD (button, 0, 1, 1, 2);
+ button = katze_property_proxy (settings, "compact-sidepanel", NULL);
+ INDENTED_ADD (button, 1, 2, 1, 2);
+ button = katze_property_proxy (settings, "middle-click-opens-selection", NULL);
+ INDENTED_ADD (button, 0, 1, 2, 3);
button = katze_property_proxy (settings, "open-tabs-in-the-background", NULL);
- WIDGET_ADD (button, 1, 2, 1, 2);
+ WIDGET_ADD (button, 1, 2, 2, 3);
/* button = katze_property_proxy (settings, "open-popups-in-tabs", NULL);
SPANNED_ADD (button, 0, 1, 2, 3);*/
button = katze_property_proxy (settings, "open-tabs-next-to-current", NULL);
- WIDGET_ADD (button, 0, 1, 2, 3);
+ WIDGET_ADD (button, 0, 1, 3, 4);
button = katze_property_proxy (settings, "close-buttons-on-tabs", NULL);
- WIDGET_ADD (button, 1, 2, 2, 3);
+ WIDGET_ADD (button, 1, 2, 3, 4);
/* Page "Network" */
/*PAGE_NEW (GTK_STOCK_NETWORK, _("Network"));
MidoriToolbarStyle toolbar_style;
gchar* toolbar_items;
- gboolean always_show_tabbar;
- gboolean show_new_tab;
- gboolean show_homepage;
- gboolean show_web_search;
- gboolean show_trash;
+ gboolean compact_sidepanel;
MidoriStartup load_on_startup;
gchar* homepage;
gchar* location_entry_search;
MidoriPreferredEncoding preferred_encoding;
+ gboolean always_show_tabbar;
gboolean close_buttons_on_tabs;
MidoriNewPage open_new_pages_in;
MidoriNewPage open_external_pages_in;
PROP_TOOLBAR_STYLE,
PROP_TOOLBAR_ITEMS,
- PROP_ALWAYS_SHOW_TABBAR,
- PROP_SHOW_NEW_TAB,
- PROP_SHOW_HOMEPAGE,
- PROP_SHOW_WEB_SEARCH,
- PROP_SHOW_TRASH,
+ PROP_COMPACT_SIDEPANEL,
PROP_LOAD_ON_STARTUP,
PROP_HOMEPAGE,
PROP_LOCATION_ENTRY_SEARCH,
PROP_PREFERRED_ENCODING,
+ PROP_ALWAYS_SHOW_TABBAR,
PROP_CLOSE_BUTTONS_ON_TABS,
PROP_OPEN_NEW_PAGES_IN,
PROP_OPEN_EXTERNAL_PAGES_IN,
flags));
g_object_class_install_property (gobject_class,
- PROP_ALWAYS_SHOW_TABBAR,
+ PROP_COMPACT_SIDEPANEL,
g_param_spec_boolean (
- "always-show-tabbar",
- _("Always Show Tabbar"),
- _("Always show the tabbar"),
+ "compact-sidepanel",
+ _("Compact Sidepanel"),
+ _("Whether to make the sidepanel compact"),
FALSE,
flags));
- g_object_class_install_property (gobject_class,
- PROP_SHOW_NEW_TAB,
- g_param_spec_boolean (
- "show-new-tab",
- _("Show New Tab"),
- _("Show the New Tab button in the toolbar"),
- TRUE,
- flags));
-
- g_object_class_install_property (gobject_class,
- PROP_SHOW_HOMEPAGE,
- g_param_spec_boolean (
- "show-homepage",
- _("Show Homepage"),
- _("Show the Homepage button in the toolbar"),
- TRUE,
- flags));
-
- g_object_class_install_property (gobject_class,
- PROP_SHOW_WEB_SEARCH,
- g_param_spec_boolean (
- "show-web-search",
- _("Show Web search"),
- _("Show the Web search entry in the toolbar"),
- TRUE,
- flags));
-
- g_object_class_install_property (gobject_class,
- PROP_SHOW_TRASH,
- g_param_spec_boolean (
- "show-trash",
- _("Show Trash"),
- _("Show the Trash button in the toolbar"),
- TRUE,
- flags));
-
-
g_object_class_install_property (gobject_class,
PROP_LOAD_ON_STARTUP,
flags));
+ g_object_class_install_property (gobject_class,
+ PROP_ALWAYS_SHOW_TABBAR,
+ g_param_spec_boolean (
+ "always-show-tabbar",
+ _("Always Show Tabbar"),
+ _("Always show the tabbar"),
+ FALSE,
+ flags));
+
g_object_class_install_property (gobject_class,
PROP_CLOSE_BUTTONS_ON_TABS,
g_param_spec_boolean (
case PROP_TOOLBAR_ITEMS:
katze_assign (web_settings->toolbar_items, g_value_dup_string (value));
break;
- case PROP_ALWAYS_SHOW_TABBAR:
- web_settings->always_show_tabbar = g_value_get_boolean (value);
- break;
- case PROP_SHOW_NEW_TAB:
- web_settings->show_new_tab = g_value_get_boolean (value);
- break;
- case PROP_SHOW_HOMEPAGE:
- web_settings->show_homepage = g_value_get_boolean (value);
- break;
- case PROP_SHOW_WEB_SEARCH:
- web_settings->show_web_search = g_value_get_boolean (value);
- break;
- case PROP_SHOW_TRASH:
- web_settings->show_trash = g_value_get_boolean (value);
+ case PROP_COMPACT_SIDEPANEL:
+ web_settings->compact_sidepanel = g_value_get_boolean (value);
break;
case PROP_LOAD_ON_STARTUP:
}
break;
+ case PROP_ALWAYS_SHOW_TABBAR:
+ web_settings->always_show_tabbar = g_value_get_boolean (value);
+ break;
case PROP_CLOSE_BUTTONS_ON_TABS:
web_settings->close_buttons_on_tabs = g_value_get_boolean (value);
break;
case PROP_TOOLBAR_ITEMS:
g_value_set_string (value, web_settings->toolbar_items);
break;
- case PROP_ALWAYS_SHOW_TABBAR:
- g_value_set_boolean (value, web_settings->always_show_tabbar);
- break;
- case PROP_SHOW_NEW_TAB:
- g_value_set_boolean (value, web_settings->show_new_tab);
- break;
- case PROP_SHOW_HOMEPAGE:
- g_value_set_boolean (value, web_settings->show_homepage);
- break;
- case PROP_SHOW_WEB_SEARCH:
- g_value_set_boolean (value, web_settings->show_web_search);
- break;
- case PROP_SHOW_TRASH:
- g_value_set_boolean (value, web_settings->show_trash);
+ case PROP_COMPACT_SIDEPANEL:
+ g_value_set_boolean (value, web_settings->compact_sidepanel);
break;
case PROP_LOAD_ON_STARTUP:
g_value_set_enum (value, web_settings->preferred_encoding);
break;
+ case PROP_ALWAYS_SHOW_TABBAR:
+ g_value_set_boolean (value, web_settings->always_show_tabbar);
+ break;
case PROP_CLOSE_BUTTONS_ON_TABS:
g_value_set_boolean (value, web_settings->close_buttons_on_tabs);
break;