Add thumbnail size to GSettings
This commit is contained in:
parent
9f1041988d
commit
e18f729488
10
fiv.c
10
fiv.c
@ -1912,10 +1912,6 @@ main(int argc, char *argv[])
|
|||||||
gtk_icon_theme_add_resource_path(
|
gtk_icon_theme_add_resource_path(
|
||||||
gtk_icon_theme_get_default(), "/org/gnome/design/IconLibrary/");
|
gtk_icon_theme_get_default(), "/org/gnome/design/IconLibrary/");
|
||||||
|
|
||||||
GSettings *settings = g_settings_new(PROJECT_NS PROJECT_NAME);
|
|
||||||
if (g_settings_get_boolean(settings, "dark-theme"))
|
|
||||||
toggle_sunlight();
|
|
||||||
|
|
||||||
GtkCssProvider *provider = gtk_css_provider_new();
|
GtkCssProvider *provider = gtk_css_provider_new();
|
||||||
gtk_css_provider_load_from_data(
|
gtk_css_provider_load_from_data(
|
||||||
provider, stylesheet, sizeof stylesheet - 1, NULL);
|
provider, stylesheet, sizeof stylesheet - 1, NULL);
|
||||||
@ -2004,6 +2000,12 @@ main(int argc, char *argv[])
|
|||||||
gtk_container_add(GTK_CONTAINER(menu_box), g.stack);
|
gtk_container_add(GTK_CONTAINER(menu_box), g.stack);
|
||||||
gtk_container_add(GTK_CONTAINER(g.window), menu_box);
|
gtk_container_add(GTK_CONTAINER(g.window), menu_box);
|
||||||
|
|
||||||
|
GSettings *settings = g_settings_new(PROJECT_NS PROJECT_NAME);
|
||||||
|
if (g_settings_get_boolean(settings, "dark-theme"))
|
||||||
|
toggle_sunlight();
|
||||||
|
g_object_set(g.browser, "thumbnail-size",
|
||||||
|
g_settings_get_enum(settings, "thumbnail-size"), NULL);
|
||||||
|
|
||||||
// Try to get half of the screen vertically, in 4:3 aspect ratio.
|
// 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.,
|
// We need the GdkMonitor before the GtkWindow has a GdkWindow (i.e.,
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<schemalist>
|
<schemalist>
|
||||||
|
<enum id="name.janouch.fiv.thumbnail-size">
|
||||||
|
<value nick='Small' value='0'/>
|
||||||
|
<value nick='Normal' value='1'/>
|
||||||
|
<value nick='Large' value='2'/>
|
||||||
|
<value nick='Huge' value='3'/>
|
||||||
|
</enum>
|
||||||
|
|
||||||
<schema path="/name/janouch/fiv/" id="name.janouch.fiv">
|
<schema path="/name/janouch/fiv/" id="name.janouch.fiv">
|
||||||
<key name='native-view-window' type='b'>
|
<key name='native-view-window' type='b'>
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
@ -12,7 +19,11 @@
|
|||||||
</key>
|
</key>
|
||||||
<key name='dark-theme' type='b'>
|
<key name='dark-theme' type='b'>
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
<summary>Use a dark theme variant</summary>
|
<summary>Use a dark theme variant on start-up</summary>
|
||||||
|
</key>
|
||||||
|
<key name='thumbnail-size' enum='name.janouch.fiv.thumbnail-size'>
|
||||||
|
<default>'Normal'</default>
|
||||||
|
<summary>Thumbnail size to assume on start-up</summary>
|
||||||
</key>
|
</key>
|
||||||
</schema>
|
</schema>
|
||||||
</schemalist>
|
</schemalist>
|
||||||
|
Loading…
Reference in New Issue
Block a user