aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fiv.c10
-rw-r--r--fiv.gschema.xml8
2 files changed, 16 insertions, 2 deletions
diff --git a/fiv.c b/fiv.c
index b7c0848..f58cc28 100644
--- a/fiv.c
+++ b/fiv.c
@@ -1231,6 +1231,7 @@ on_key_press_view(G_GNUC_UNUSED GtkWidget *widget, GdkEventKey *event,
switch (event->state & gtk_accelerator_get_default_mod_mask()) {
case 0:
switch (event->keyval) {
+ // XXX: The same shortcut focuses GtkPaned's handle.
case GDK_KEY_F8:
gtk_widget_set_visible(g.view_toolbar,
!gtk_widget_is_visible(g.view_toolbar));
@@ -1985,7 +1986,6 @@ main(int argc, char *argv[])
GTK_STACK(g.stack), GTK_STACK_TRANSITION_TYPE_NONE);
gtk_container_add(GTK_CONTAINER(g.stack), g.view_box);
gtk_container_add(GTK_CONTAINER(g.stack), g.browser_paned);
- gtk_widget_show_all(g.stack);
g.window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(g.window, "destroy",
@@ -2006,6 +2006,12 @@ main(int argc, char *argv[])
g_object_set(g.browser, "thumbnail-size",
g_settings_get_enum(settings, "thumbnail-size"), NULL);
+ gtk_widget_show_all(menu_box);
+ gtk_widget_set_visible(g.browser_sidebar,
+ g_settings_get_boolean(settings, "show-browser-sidebar"));
+ gtk_widget_set_visible(g.view_toolbar,
+ g_settings_get_boolean(settings, "show-view-toolbar"));
+
// Try to get half of the screen vertically, in 4:3 aspect ratio.
//
// We need the GdkMonitor before the GtkWindow has a GdkWindow (i.e.,
@@ -2045,7 +2051,7 @@ main(int argc, char *argv[])
g_object_unref(file);
}
- gtk_widget_show_all(g.window);
+ gtk_widget_show(g.window);
gtk_main();
return 0;
}
diff --git a/fiv.gschema.xml b/fiv.gschema.xml
index 84a66ba..a0b9aab 100644
--- a/fiv.gschema.xml
+++ b/fiv.gschema.xml
@@ -21,6 +21,14 @@
<default>false</default>
<summary>Use a dark theme variant on start-up</summary>
</key>
+ <key name='show-browser-sidebar' type='b'>
+ <default>true</default>
+ <summary>Show the browser's sidebar</summary>
+ </key>
+ <key name='show-view-toolbar' type='b'>
+ <default>true</default>
+ <summary>Show a toolbar in the image view</summary>
+ </key>
<key name='thumbnail-size' enum='name.janouch.fiv.thumbnail-size'>
<default>'Normal'</default>
<summary>Thumbnail size to assume on start-up</summary>