Commit 109eff42 authored by Daiki Ueno's avatar Daiki Ueno
Browse files

Check "start-fullscreen" GSettings key.

parent 0896096a
...@@ -16,5 +16,10 @@ ...@@ -16,5 +16,10 @@
<summary>Hide keyboard automatically when focus is out</summary> <summary>Hide keyboard automatically when focus is out</summary>
<description>If true, hide keyboard automatically when focus is out.</description> <description>If true, hide keyboard automatically when focus is out.</description>
</key> </key>
<key name="start-fullscreen" type="b">
<default>false</default>
<summary>Switch to fullscreen mode when startup</summary>
<description>If true, switch to fullscreen mode when startup.</description>
</key>
</schema> </schema>
</schemalist> </schemalist>
...@@ -131,6 +131,7 @@ main (int argc, char **argv) ...@@ -131,6 +131,7 @@ main (int argc, char **argv)
GOptionContext *option_context; GOptionContext *option_context;
GMainLoop *loop; GMainLoop *loop;
gint focus; gint focus;
GSettings *settings;
if (!gtk_init_check (&argc, &argv)) { if (!gtk_init_check (&argc, &argv)) {
g_printerr ("Can't init GTK\n"); g_printerr ("Can't init GTK\n");
...@@ -186,9 +187,9 @@ main (int argc, char **argv) ...@@ -186,9 +187,9 @@ main (int argc, char **argv)
exit (1); exit (1);
} }
settings = g_settings_new ("org.fedorahosted.eekboard");
focus = FOCUS_NONE; focus = FOCUS_NONE;
if (opt_focus) { if (opt_focus) {
GSettings *settings = g_settings_new ("org.fedorahosted.eekboard");
gchar *focus_listener = g_settings_get_string (settings, gchar *focus_listener = g_settings_get_string (settings,
"focus-listener"); "focus-listener");
g_object_unref (settings); g_object_unref (settings);
...@@ -312,7 +313,8 @@ main (int argc, char **argv) ...@@ -312,7 +313,8 @@ main (int argc, char **argv)
g_object_unref (context); g_object_unref (context);
} }
if (opt_fullscreen) { if (opt_fullscreen ||
g_settings_get_boolean (settings, "start-fullscreen")) {
g_object_get (client, "context", &context, NULL); g_object_get (client, "context", &context, NULL);
eekboard_context_set_fullscreen (context, TRUE, NULL); eekboard_context_set_fullscreen (context, TRUE, NULL);
g_object_unref (context); g_object_unref (context);
......
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