GNOME Bugzilla – Bug 700034
gnome-clocks could store the user defined settings for window size
Last modified: 2013-05-14 19:48:53 UTC
Created attachment 243736 [details] [review] a patch proposal, which enhances the current window size situation. It would be greate if gnome-clocks could store the window width and height with gsettings instead of fixed sizes!! The sized size approach claims that: // Default size is enough for two rows of three clocks but on my laptop I either have one row of tree clocks, which turns into two rows of two clocks once I add one more)))
Review of attachment 243736 [details] [review]: The patch looks good (though I have not tested it yet) A couple of very minor nitpicks below. I guess since you did this, you could also make a follow up patch and store in state.panel the current "page" (world, alarm, timer, stopwatch) :) ::: src/window.vala @@ -47,3 +44,3 @@ add_action_entries (action_entries, this); - set_size_request (DEFAULT_WIDTH, DEFAULT_HEIGHT); + settings = new Settings("org.gnome.clocks.state.window"); maybe we should still have a min size request to prevent shrinking the window too much... @@ -118,2 +125,4 @@ } + protected override bool configure_event (Gdk.EventConfigure event) { + if (this.get_realized () && !(Gdk.WindowState.MAXIMIZED in get_window ().get_state ())) { do we need "this."? @@ -120,0 +127,6 @@ + protected override bool configure_event (Gdk.EventConfigure event) { + if (this.get_realized () && !(Gdk.WindowState.MAXIMIZED in get_window ().get_state ())) { + settings.set ("size", "(ii)", event.width, event.height); ... 3 more ... space before ( @@ -120,0 +127,12 @@ + protected override bool configure_event (Gdk.EventConfigure event) { + if (this.get_realized () && !(Gdk.WindowState.MAXIMIZED in get_window ().get_state ())) { + settings.set ("size", "(ii)", event.width, event.height); ... 9 more ... small tabs vs spaces issue
Created attachment 244008 [details] [review] a patch proposal, which enhances the current window size situation.
Created attachment 244143 [details] [review] change panel-id gschema type from int to enum this is the follow up patch [2]
Created attachment 244144 [details] [review] change panel-id gschema type from int to enum this is the follow up patch [2]
Created attachment 244171 [details] [review] Store window size and panel state with gsettings
Created attachment 244177 [details] [review] move panels to an array and eliminate switch block
Created attachment 244182 [details] [review] Store window size and panel state with gsettings
Comment on attachment 244182 [details] [review] Store window size and panel state with gsettings Works great! Thanks a lot for the patch and for the patience with my review.