[gitg] Set and store paned positions
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Set and store paned positions
- Date: Thu, 21 Feb 2013 09:04:16 +0000 (UTC)
commit 028296da1856e24f413e8e67f8721582c2255118
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Feb 21 10:04:01 2013 +0100
Set and store paned positions
data/org.gnome.gitg.gschema.xml.in.in | 5 ++++-
gitg/gitg-window.vala | 10 ++++++++++
2 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/data/org.gnome.gitg.gschema.xml.in.in b/data/org.gnome.gitg.gschema.xml.in.in
index 874336f..9947057 100644
--- a/data/org.gnome.gitg.gschema.xml.in.in
+++ b/data/org.gnome.gitg.gschema.xml.in.in
@@ -111,9 +111,12 @@
<key name="size" type="(ii)">
<default>(650, 500)</default>
</key>
- <key name="vpaned-main-position" type="i">
+ <key name="paned-views-position" type="i">
<default>200</default>
</key>
+ <key name="paned-panels-position" type="i">
+ <default>400</default>
+ </key>
<key name="hpaned-commit1-position" type="i">
<default>200</default>
</key>
diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
index 2d1e61c..27b6040 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -213,6 +213,16 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable, Gtk.
d_state_settings.get ("size", "(ii)", out width, out height);
resize (width, height);
+ d_state_settings.bind("paned-views-position",
+ d_paned_views,
+ "position",
+ SettingsBindFlags.GET | SettingsBindFlags.SET);
+
+ d_state_settings.bind("paned-panels-position",
+ d_paned_panels,
+ "position",
+ SettingsBindFlags.GET | SettingsBindFlags.SET);
+
activate_default_view();
return true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]