Skip to content

Commit 0dd4e56

Browse files
committed
Remove gsettings; let window size be handled by GTK
1 parent 8ea908d commit 0dd4e56

File tree

4 files changed

+0
-55
lines changed

4 files changed

+0
-55
lines changed

data/com.github.elfenware.obliviate.gschema.xml

Lines changed: 0 additions & 28 deletions
This file was deleted.

data/meson.build

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,3 @@ i18n.merge_file (
3131
install_dir: join_paths (get_option ('datadir'), 'metainfo')
3232
)
3333

34-
# Install schema
35-
install_data (
36-
meson.project_name () + '.gschema.xml',
37-
install_dir: join_paths (get_option ('datadir'), 'glib-2.0', 'schemas')
38-
)

meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ subdir('data')
6262
subdir('po')
6363

6464
gnome.post_install(
65-
glib_compile_schemas: true,
6665
gtk_update_icon_cache: true,
6766
update_desktop_database: true
6867
)

src/MainWindow.vala

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
*/
2020

2121
public class Obliviate.MainWindow : Gtk.Window {
22-
private GLib.Settings settings;
23-
2422
public MainWindow (Gtk.Application app) {
2523
Object (application: app);
2624
}
@@ -37,15 +35,7 @@ public class Obliviate.MainWindow : Gtk.Window {
3735

3836
set_size_request (440, 280);
3937

40-
settings = new GLib.Settings ("com.github.elfenware.obliviate.state");
41-
42-
set_default_size (settings.get_int ("window-width"), settings.get_int ("window-height"));
43-
4438
show ();
45-
46-
this.close_request.connect (e => {
47-
return before_destroy ();
48-
});
4939
}
5040

5141
private Gtk.HeaderBar get_headerbar () {
@@ -74,15 +64,4 @@ public class Obliviate.MainWindow : Gtk.Window {
7464

7565
return headerbar;
7666
}
77-
78-
private bool before_destroy () {
79-
int width, height;
80-
81-
get_default_size (out width, out height);
82-
83-
settings.set_int ("window-width", width);
84-
settings.set_int ("window-height", height);
85-
86-
return false;
87-
}
8867
}

0 commit comments

Comments
 (0)