gtk_container_add (GTK_CONTAINER (button), icon);
gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
gtk_widget_show_all (box);
- gtk_box_pack_start (GTK_BOX (browser->transferbar), box,
- FALSE, FALSE, 3);
+ gtk_box_pack_start (GTK_BOX (browser->transferbar), box, FALSE, FALSE, 3);
g_signal_connect (download, "notify::progress",
G_CALLBACK (midori_browser_download_notify_progress_cb), progress);
menuitem = sokoke_action_create_popup_menu_item (
_action_by_name (browser, "Bookmarkbar"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
- /*menuitem = sokoke_action_create_popup_menu_item (
+ menuitem = sokoke_action_create_popup_menu_item (
_action_by_name (browser, "Transferbar"));
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); */
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
menuitem = sokoke_action_create_popup_menu_item (
_action_by_name (browser, "Statusbar"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
sokoke_widget_set_visible (browser->bookmarkbar, active);
}
+static void
+_action_transferbar_activate (GtkToggleAction* action,
+ MidoriBrowser* browser)
+{
+ gboolean active = gtk_toggle_action_get_active (action);
+ if (browser->settings)
+ g_object_set (browser->settings, "show-transferbar", active, NULL);
+ sokoke_widget_set_visible (browser->transferbar, active);
+}
+
static void
_action_statusbar_activate (GtkToggleAction* action,
MidoriBrowser* browser)
N_("_Bookmarkbar"), "",
N_("Show bookmarkbar"), G_CALLBACK (_action_bookmarkbar_activate),
FALSE },
- /* { "Transferbar", NULL,
+ { "Transferbar", NULL,
N_("_Transferbar"), "",
N_("Show transferbar"), G_CALLBACK (_action_transferbar_activate),
- FALSE }, */
+ FALSE },
{ "Statusbar", NULL,
N_("_Statusbar"), "",
N_("Show statusbar"), G_CALLBACK (_action_statusbar_activate),
"<menuitem action='Menubar'/>"
"<menuitem action='Navigationbar'/>"
"<menuitem action='Bookmarkbar'/>"
- /* "<menuitem action='Transferbar'/>" */
+ "<menuitem action='Transferbar'/>"
"<menuitem action='Statusbar'/>"
"</menu>"
"<menuitem action='Panel'/>"
g_object_set (_action_by_name (browser, "Menubar"), "visible", FALSE, NULL);
g_object_set (_action_by_name (browser, "Statusbar"), "visible", FALSE, NULL);
#endif
- /* if (!g_signal_lookup ("download-requested", WEBKIT_TYPE_WEB_VIEW))
- _action_set_sensitive (browser, "Transferbar", FALSE); */
+ #if !WEBKIT_CHECK_VERSION (1, 1, 3)
+ _action_set_sensitive (browser, "Transferbar", FALSE);
+ #endif
_action_set_sensitive (browser, "EncodingCustom", FALSE);
_action_set_sensitive (browser, "SelectionSourceView", FALSE);
gtk_box_pack_start (GTK_BOX (browser->statusbar), browser->transferbar,
FALSE, FALSE, 3);
gtk_widget_show (browser->transferbar);
+ g_signal_connect (browser->statusbar, "button-press-event",
+ G_CALLBACK (midori_browser_toolbar_item_button_press_event_cb), browser);
g_object_unref (ui_manager);
}
gboolean compact_sidepanel, right_align_sidepanel;
gint last_panel_position, last_panel_page;
gboolean show_menubar, show_bookmarkbar;
- gboolean show_panel;
+ gboolean show_panel, show_transferbar;
MidoriToolbarStyle toolbar_style;
gchar* toolbar_items;
gint last_web_search;
"show-navigationbar", &browser->show_navigationbar,
"show-bookmarkbar", &show_bookmarkbar,
"show-panel", &show_panel,
+ "show-transferbar", &show_transferbar,
"show-statusbar", &browser->show_statusbar,
"toolbar-style", &toolbar_style,
"toolbar-items", &toolbar_items,
_action_set_active (browser, "Navigationbar", browser->show_navigationbar);
_action_set_active (browser, "Bookmarkbar", show_bookmarkbar);
_action_set_active (browser, "Panel", show_panel);
+ #if WEBKIT_CHECK_VERSION (1, 1, 3)
+ _action_set_active (browser, "Transferbar", show_transferbar);
+ #endif
_action_set_active (browser, "Statusbar", browser->show_statusbar);
g_free (toolbar_items);
gboolean show_navigationbar;
gboolean show_bookmarkbar;
gboolean show_panel;
+ gboolean show_transferbar;
gboolean show_statusbar;
MidoriToolbarStyle toolbar_style;
PROP_SHOW_NAVIGATIONBAR,
PROP_SHOW_BOOKMARKBAR,
PROP_SHOW_PANEL,
+ PROP_SHOW_TRANSFERBAR,
PROP_SHOW_STATUSBAR,
PROP_TOOLBAR_STYLE,
FALSE,
flags));
+ /**
+ * MidoriWebSettings:show-transferbar:
+ *
+ * Whether to show the transferbar.
+ *
+ * Since: 0.1.5
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_SHOW_TRANSFERBAR,
+ g_param_spec_boolean (
+ "show-transferbar",
+ _("Show Transferbar"),
+ _("Whether to show the transferbar"),
+ TRUE,
+ flags));
+
g_object_class_install_property (gobject_class,
PROP_SHOW_STATUSBAR,
g_param_spec_boolean (
case PROP_SHOW_PANEL:
web_settings->show_panel = g_value_get_boolean (value);
break;
+ case PROP_SHOW_TRANSFERBAR:
+ web_settings->show_transferbar = g_value_get_boolean (value);
+ break;
case PROP_SHOW_STATUSBAR:
web_settings->show_statusbar = g_value_get_boolean (value);
break;
case PROP_SHOW_PANEL:
g_value_set_boolean (value, web_settings->show_panel);
break;
+ case PROP_SHOW_TRANSFERBAR:
+ g_value_set_boolean (value, web_settings->show_transferbar);
+ break;
case PROP_SHOW_STATUSBAR:
g_value_set_boolean (value, web_settings->show_statusbar);
break;