Commit 06c8f092 authored by Paolo Bacchilega's avatar Paolo Bacchilega

shortcuts: make search and slideshow shortcuts customizable

parent 3450a75e
......@@ -40,6 +40,11 @@ static const GActionEntry actions[] = {
};
static const GthShortcut shortcuts[] = {
{ "find", N_("Find files"), GTH_SHORTCUT_CONTEXT_BROWSER_VIEWER, GTH_SHORTCUT_CATEGORY_FILE_MANAGER, "<Primary>f" },
};
typedef struct {
GtkWidget *refresh_button;
} BrowserData;
......@@ -63,12 +68,17 @@ search__gth_browser_construct_cb (GthBrowser *browser)
actions,
G_N_ELEMENTS (actions),
browser);
gth_window_add_shortcuts (GTH_WINDOW (browser),
shortcuts,
G_N_ELEMENTS (shortcuts));
gth_browser_add_header_bar_button (browser,
GTH_BROWSER_HEADER_SECTION_BROWSER_COMMANDS,
"edit-find-symbolic",
_("Find files"),
"win.find",
"<Control>F");
NULL);
data = g_new0 (BrowserData, 1);
g_object_set_data_full (G_OBJECT (browser), BROWSER_DATA_KEY, data, (GDestroyNotify) browser_data_free);
......
......@@ -35,6 +35,11 @@ static const GActionEntry actions[] = {
};
static const GthShortcut shortcuts[] = {
{ "slideshow", N_("Presentation"), GTH_SHORTCUT_CONTEXT_BROWSER_VIEWER, GTH_SHORTCUT_CATEGORY_FILE_MANAGER, "F5" },
};
void
ss__gth_browser_construct_cb (GthBrowser *browser)
{
......@@ -45,12 +50,16 @@ ss__gth_browser_construct_cb (GthBrowser *browser)
G_N_ELEMENTS (actions),
browser);
gth_window_add_shortcuts (GTH_WINDOW (browser),
shortcuts,
G_N_ELEMENTS (shortcuts));
gth_browser_add_header_bar_button (browser,
GTH_BROWSER_HEADER_SECTION_BROWSER_VIEW,
"view-presentation-symbolic",
_("Presentation"),
"win.slideshow",
"F5");
NULL);
}
......
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