diff --git a/data/guake.schemas b/data/guake.schemas
index dec327399..187f6d062 100644
--- a/data/guake.schemas
+++ b/data/guake.schemas
@@ -208,10 +208,10 @@
/schemas/apps/guake/general/window_width
/apps/guake/general/window_width
guake
- float
+ int
100
- Window Width.
+ Window width.
Percent of the screen that will be used by guake
terminal horizontally.
@@ -224,7 +224,7 @@
int
50
- Window size.
+ Window height.
Percent of the screen that will be used by guake
terminal vertically.
diff --git a/data/prefs.glade b/data/prefs.glade
index 8b7e79a2d..d9ac3f979 100644
--- a/data/prefs.glade
+++ b/data/prefs.glade
@@ -674,7 +674,7 @@
True
False
6
- <b>Main Window height</b>
+ <b>Main Window Height</b>
True
@@ -688,6 +688,139 @@
3
+
+
+ True
+ False
+ 0
+ none
+
+
+ True
+ False
+ 12
+
+
+ True
+ True
+ discontinuous
+ 50 10 110 10 10 10
+ 0
+ False
+ right
+
+
+
+
+
+
+
+ True
+ False
+ 6
+ <b>Main Window Width</b>
+ True
+
+
+ label_item
+
+
+
+
+ True
+ True
+ 4
+
+
+
+
+ True
+ False
+ 0
+ none
+
+
+ True
+ False
+ 12
+
+
+ True
+ False
+
+
+ Left
+ True
+ True
+ False
+ False
+ True
+
+
+
+ False
+ False
+ 0
+
+
+
+
+ Center
+ True
+ True
+ False
+ False
+ True
+ True
+ radiobutton_align_left
+
+
+
+ False
+ False
+ 1
+
+
+
+
+ Right
+ True
+ True
+ False
+ False
+ True
+ radiobutton_align_left
+
+
+
+ False
+ False
+ 2
+
+
+
+
+
+
+
+
+ True
+ False
+ 6
+ <b>Main Window Horizontal Alignment</b>
+ True
+
+
+ label_item
+
+
+
+
+ True
+ True
+ 5
+
+
diff --git a/src/prefs.py b/src/prefs.py
index 1eb50896a..9e0c9aa37 100644
--- a/src/prefs.py
+++ b/src/prefs.py
@@ -33,6 +33,9 @@
from guake.common import gladefile
from guake.common import hexify_color
from guake.common import pixmapfile
+from guake.globals import ALIGN_CENTER
+from guake.globals import ALIGN_LEFT
+from guake.globals import ALIGN_RIGHT
from guake.globals import GCONF_PATH
from guake.globals import KEY
from guake.globals import LOCALE_DIR
@@ -274,6 +277,23 @@ def on_window_height_value_changed(self, hscale):
val = hscale.get_value()
self.client.set_int(KEY('/general/window_height'), int(val))
+ def on_window_width_value_changed(self, wscale):
+ """Changes the value of window_width in gconf
+ """
+ val = wscale.get_value()
+ self.client.set_int(KEY('/general/window_width'), int(val))
+
+ def on_window_halign_value_changed(self, halign_button):
+ """Changes the value of window_halignment in gconf
+ """
+ if halign_button.get_active():
+ which_align = {
+ 'radiobutton_align_left': ALIGN_LEFT,
+ 'radiobutton_align_right': ALIGN_RIGHT,
+ 'radiobutton_align_center': ALIGN_CENTER
+ }
+ self.client.set_int(KEY('/general/window_halignment'), which_align[halign_button.get_name()])
+
# scrolling tab
def on_use_scrollbar_toggled(self, chk):
@@ -586,9 +606,26 @@ def load_configs(self):
value = self.client.get_bool(KEY('/general/use_vte_titles'))
self.get_widget('use_vte_titles').set_active(value)
- value = self.client.get_int(KEY('/general/window_height'))
+ try:
+ value = self.client.get_int(KEY('/general/window_height'))
+ except:
+ value = self.client.get_float(KEY('/general/window_height'))
self.get_widget('window_height').set_value(value)
+ try:
+ value = self.client.get_int(KEY('/general/window_width'))
+ except:
+ value = self.client.get_float(KEY('/general/window_width'))
+ self.get_widget('window_width').set_value(value)
+
+ value = self.client.get_int(KEY('/general/window_halignment'))
+ which_button = {
+ ALIGN_RIGHT: 'radiobutton_align_right',
+ ALIGN_LEFT: 'radiobutton_align_left',
+ ALIGN_CENTER: 'radiobutton_align_center'
+ }
+ self.get_widget(which_button[value]).set_active(True)
+
value = self.client.get_bool(KEY('/general/open_tab_cwd'))
self.get_widget('open_tab_cwd').set_active(value)