Commit 872e70fc authored by Vanadiae's avatar Vanadiae Committed by Michael Catanzaro
Browse files

window: Add shortcut to show downloads list

It uses Ctrl+Shift+Y to stay consistent with Firefox.
parent b4137046
Pipeline #289493 passed with stages
in 13 minutes and 6 seconds
......@@ -312,6 +312,12 @@ ephy_action_bar_end_set_show_bookmarks_button (EphyActionBarEnd *action_bar_end,
gtk_widget_set_visible (action_bar_end->bookmarks_button, show);
}
void
ephy_action_bar_end_show_downloads (EphyActionBarEnd *action_bar_end)
{
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (action_bar_end->downloads_button), TRUE);
}
void
ephy_action_bar_end_show_bookmarks (EphyActionBarEnd *action_bar_end)
{
......
......@@ -32,6 +32,7 @@ G_DECLARE_FINAL_TYPE (EphyActionBarEnd, ephy_action_bar_end, EPHY, ACTION_BAR_EN
EphyActionBarEnd *ephy_action_bar_end_new (void);
void ephy_action_bar_end_set_show_bookmarks_button (EphyActionBarEnd *action_bar_end,
gboolean show);
void ephy_action_bar_end_show_downloads (EphyActionBarEnd *action_bar_end);
void ephy_action_bar_end_show_bookmarks (EphyActionBarEnd *action_bar_end);
GtkWidget *ephy_action_bar_end_get_downloads_revealer (EphyActionBarEnd *action_bar_end);
......
......@@ -105,6 +105,7 @@ const struct {
{ "win.find-next", { "<Primary>G", NULL } },
{ "win.bookmark-page", { "<Primary>D", "AddFavorite", NULL } },
{ "win.bookmarks", { "<alt><Primary>D", NULL } },
{ "win.show-downloads", { "<shift><Primary>Y", NULL } },
{ "win.encoding", { NULL } },
{ "win.page-source", { "<Primary>U", NULL } },
{ "win.toggle-inspector", { "<shift><Primary>I", "F12", NULL } },
......@@ -862,6 +863,7 @@ static const GActionEntry window_entries [] = {
{ "open-bookmark", window_cmd_open_bookmark, "s" },
{ "bookmark-page", window_cmd_bookmark_page },
{ "bookmarks", window_cmd_bookmarks },
{ "show-downloads", window_cmd_show_downloads },
{ "encoding", window_cmd_encoding },
{ "page-source", window_cmd_page_source },
{ "toggle-inspector", window_cmd_toggle_inspector },
......
......@@ -76,6 +76,13 @@
<property name="accelerator">&lt;Primary&gt;question</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Show bookmarks list</property>
<property name="accelerator">&lt;shift&gt;&lt;Primary&gt;Y</property>
</object>
</child>
</object>
</child>
......
......@@ -2383,6 +2383,20 @@ window_cmd_bookmarks (GSimpleAction *action,
ephy_action_bar_end_show_bookmarks (action_bar_end);
}
void
window_cmd_show_downloads (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
EphyWindow *window = EPHY_WINDOW (user_data);
EphyHeaderBar *header_bar;
EphyActionBarEnd *action_bar_end;
header_bar = EPHY_HEADER_BAR (ephy_window_get_header_bar (window));
action_bar_end = EPHY_ACTION_BAR_END (ephy_header_bar_get_action_bar_end (header_bar));
ephy_action_bar_end_show_downloads (action_bar_end);
}
void
window_cmd_zoom_in (GSimpleAction *action,
GVariant *parameter,
......
......@@ -137,6 +137,9 @@ void window_cmd_bookmark_page (GSimpleAction *action,
void window_cmd_bookmarks (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void window_cmd_show_downloads (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void window_cmd_zoom_in (GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment