Commit 3c590964 authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

fixed showing/hiding interface parts

parent c3b9b4d9
......@@ -496,6 +496,19 @@ gth_browser_activate_show_statusbar (GSimpleAction *action,
}
void
gth_browser_activate_toggle_statusbar (GSimpleAction *action,
GVariant *state,
gpointer user_data)
{
GSettings *settings;
settings = g_settings_new (GTHUMB_BROWSER_SCHEMA);
g_settings_set_boolean (settings, PREF_BROWSER_STATUSBAR_VISIBLE, ! g_settings_get_boolean (settings, PREF_BROWSER_STATUSBAR_VISIBLE));
g_object_unref (settings);
}
void
gth_browser_activate_show_sidebar (GSimpleAction *action,
GVariant *state,
......@@ -511,6 +524,19 @@ gth_browser_activate_show_sidebar (GSimpleAction *action,
}
void
gth_browser_activate_toggle_sidebar (GSimpleAction *action,
GVariant *state,
gpointer user_data)
{
GSettings *settings;
settings = g_settings_new (GTHUMB_BROWSER_SCHEMA);
g_settings_set_boolean (settings, PREF_BROWSER_SIDEBAR_VISIBLE, ! g_settings_get_boolean (settings, PREF_BROWSER_SIDEBAR_VISIBLE));
g_object_unref (settings);
}
void
gth_browser_activate_show_thumbnail_list (GSimpleAction *action,
GVariant *state,
......@@ -526,6 +552,19 @@ gth_browser_activate_show_thumbnail_list (GSimpleAction *action,
}
void
gth_browser_activate_toggle_thumbnail_list (GSimpleAction *action,
GVariant *state,
gpointer user_data)
{
GSettings *settings;
settings = g_settings_new (GTHUMB_BROWSER_SCHEMA);
g_settings_set_boolean (settings, PREF_BROWSER_THUMBNAIL_LIST_VISIBLE, ! g_settings_get_boolean (settings, PREF_BROWSER_THUMBNAIL_LIST_VISIBLE));
g_object_unref (settings);
}
void
gth_browser_activate_show_first_image (GSimpleAction *action,
GVariant *state,
......
......@@ -59,6 +59,9 @@ DEF_ACTION_CALLBACK (gth_browser_activate_sort_by)
DEF_ACTION_CALLBACK (gth_browser_activate_show_statusbar)
DEF_ACTION_CALLBACK (gth_browser_activate_show_sidebar)
DEF_ACTION_CALLBACK (gth_browser_activate_show_thumbnail_list)
DEF_ACTION_CALLBACK (gth_browser_activate_toggle_statusbar)
DEF_ACTION_CALLBACK (gth_browser_activate_toggle_sidebar)
DEF_ACTION_CALLBACK (gth_browser_activate_toggle_thumbnail_list)
DEF_ACTION_CALLBACK (gth_browser_activate_show_first_image)
DEF_ACTION_CALLBACK (gth_browser_activate_show_last_image)
DEF_ACTION_CALLBACK (gth_browser_activate_show_previous_image)
......
......@@ -60,6 +60,10 @@ static const GActionEntry gth_browser_actions[] = {
{ "show-sidebar", toggle_action_activated, NULL, "false", gth_browser_activate_show_sidebar },
{ "show-thumbnail-list", toggle_action_activated, NULL, "false", gth_browser_activate_show_thumbnail_list },
{ "toggle-statusbar", gth_browser_activate_toggle_statusbar },
{ "toggle-sidebar", gth_browser_activate_toggle_sidebar },
{ "toggle-thumbnail-list", gth_browser_activate_toggle_thumbnail_list },
{ "show-first-image", gth_browser_activate_show_first_image },
{ "show-last-image", gth_browser_activate_show_last_image },
{ "show-previous-image", gth_browser_activate_show_previous_image },
......@@ -83,6 +87,9 @@ static const GthShortcut gth_browser_shortcuts[] = {
{ "open-location", N_("Open location"), GTH_SHORTCUT_CONTEXT_BROWSER, GTH_SHORTCUT_CATEGORY_NAVIGATION, "o" },
{ "fullscreen", N_("Fullscreen"), GTH_SHORTCUT_CONTEXT_BROWSER_VIEWER, GTH_SHORTCUT_CATEGORY_VIEWER, "f" },
{ "revert-to-saved", N_("Revert image to saved"), GTH_SHORTCUT_CONTEXT_BROWSER, GTH_SHORTCUT_CATEGORY_FILE_MANAGER, "F4" },
{ "toggle-sidebar", N_("Sidebar"), GTH_SHORTCUT_CONTEXT_BROWSER, GTH_SHORTCUT_CATEGORY_UI, "F9" },
{ "toggle-statusbar", N_("Statusbar"), GTH_SHORTCUT_CONTEXT_BROWSER_VIEWER, GTH_SHORTCUT_CATEGORY_UI, "F7" },
{ "toggle-thumbnail-list", N_("Thumbnails list"), GTH_SHORTCUT_CONTEXT_VIEWER, GTH_SHORTCUT_CATEGORY_UI, "F8" },
{ "go-back", N_("Load previuos location"), GTH_SHORTCUT_CONTEXT_BROWSER, GTH_SHORTCUT_CATEGORY_NAVIGATION, "<Alt>Left" },
{ "go-forward", N_("Load next location"), GTH_SHORTCUT_CONTEXT_BROWSER, GTH_SHORTCUT_CATEGORY_NAVIGATION, "<Alt>Right" },
......
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