Commit ba12105
store window size
Changed files (5)
modifiedsrc/GlyphCanvas.valamodifiedsrc/GtkInterface.valamodifiedsrc/MainWindow.valamodifiedsrc/Preferences.valamodifiedsrc/wscript
Diff
@@ -63,7 +63,7 @@ class GlyphCanvas : DrawingArea { } Supplement.current_glyph.resized (alloc, allocation); - Preferences.update_window_size (); + MainWindow.native_window.update_window_size (); } alloc = allocation; @@ -185,12 +185,24 @@ public class GtkWindow : Gtk.Window, NativeWindow { // (Supplement.exe:1300): Gdk-CRITICAL **: gdk_window_set_cursor: assertion `GDK_IS_WINDOW (window)' failed // singleton.frame.set_cursor (cursor); }- ++ public void update_window_size () {+ int w, h;+ get_size (out w, out h);+ + print ("window_width $w\n");+ + Preferences.set ("window_width", @"$w");+ Preferences.set ("window_height", @"$h");+ }+ private void set_size_and_position () { int w = Preferences.get_window_width (); int h = Preferences.get_window_height (); - set_default_size (w, h);+ print ("window_width $w\n");+ + set_default_size (1000, h); // move (10, 240); } @@ -21,15 +21,6 @@ using WebKit; namespace Supplement { -public interface NativeWindow : GLib.Object { - public abstract string? file_chooser (string title); - public abstract string? set_title (string title); - - public abstract void toggle_expanded_margin_bottom (); - public abstract void toggle_expanded_margin_right (); - -} - internal class MainWindow { public static Toolbox tools; @@ -83,15 +83,6 @@ internal class Preferences { return (h == 0) ? 500 : h; } - public static void update_window_size () {-/* int w, h;- MainWindow.get_current_window ().get_size (out w, out h);- - set ("window_width", @"$w");- set ("window_height", @"$h");-*/- }- public static void load () { File app_dir = Supplement.get_settings_directory (); File settings = app_dir.get_child ("settings");@@ -33,6 +33,7 @@ BIRDFONT = [ 'MenuTab.vala', 'MergeTool.vala', 'MoveTool.vala',+ 'NativeWindow.vala', 'Intersection.vala', 'IntersectionList.vala', 'IOThread.vala',