fix schemas

This commit is contained in:
Chris Cromer 2018-12-23 19:58:48 -03:00
parent 0a7d34595c
commit 21f57a86e7
Signed by: cromer
GPG Key ID: 39CC813FF3C8708A
3 changed files with 10 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<schemalist> <schemalist>
<schema id="cl.cromer.ubb.sernatur.db" path="/cl/cromer/ubb/sernatur/" gettext-domain="sernatur"> <schema id="cl.cromer.ubb.sernatur.db" path="/cl/cromer/ubb/sernatur/db/" gettext-domain="sernatur">
<key name="host" type="s"> <key name="host" type="s">
<default>"localhost"</default> <default>"localhost"</default>
<summary>Host to connect to</summary> <summary>Host to connect to</summary>

View File

@ -1,5 +1,5 @@
<schemalist> <schemalist>
<schema id="cl.cromer.ubb.sernatur.window" path="/cl/cromer/ubb/sernatur/" gettext-domain="sernatur"> <schema id="cl.cromer.ubb.sernatur.window" path="/cl/cromer/ubb/sernatur/window/" gettext-domain="sernatur">
<key name="maximized" type="b"> <key name="maximized" type="b">
<default>false</default> <default>false</default>
<summary>Should the program open maximized or not</summary> <summary>Should the program open maximized or not</summary>

View File

@ -25,7 +25,7 @@ namespace Sernatur {
public class MainWindow : Gtk.ApplicationWindow { public class MainWindow : Gtk.ApplicationWindow {
/** /**
* This is a callback for when the window's state changes * This is a callback for when the window is maximized or unmaximized
* @param widget The widget that called this GtkCallback * @param widget The widget that called this GtkCallback
* @param state The event window state_handler * @param state The event window state_handler
* @return Returns true if the event is handled or false if it isn't * @return Returns true if the event is handled or false if it isn't
@ -41,9 +41,15 @@ namespace Sernatur {
// Unmaximized // Unmaximized
settings.set_boolean ("maximized", false); settings.set_boolean ("maximized", false);
} }
return true; return false;
} }
/**
* This is a callback for when the window's size is changed
* @param widget The widget that called this GtkCallback
* @param event The event that happened
* @return Returns true if the event is handled or false if it isn't
*/
[GtkCallback] [GtkCallback]
private bool resize_window(Gtk.Widget widget, Gdk.Event event) { private bool resize_window(Gtk.Widget widget, Gdk.Event event) {
Settings settings = new Settings ("cl.cromer.ubb.sernatur.window"); Settings settings = new Settings ("cl.cromer.ubb.sernatur.window");