diff --git a/NEWS b/NEWS
index e35f32adb..d9169fa0a 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ Verison 0.7.0:
- Fix issue with the quit confirmation dialog box (#499)
- Add shortcut for transparency level (#481)
- Add label to tell user how to disable a shortcut (#488)
+- Expose cursor_shape and blink cursor method in pref window (#505)
Version 0.6.2:
- Packaging issue fixes
diff --git a/data/prefs.glade b/data/prefs.glade
index 0c259e426..766b4327f 100644
--- a/data/prefs.glade
+++ b/data/prefs.glade
@@ -447,8 +447,8 @@
-
- Use VTE titles for tab names
+
+ Hide on lose focus
True
True
False
@@ -456,7 +456,7 @@
True
True
True
-
+
False
@@ -465,8 +465,8 @@
-
- Hide on lose focus
+
+ Use VTE titles for tab names
True
True
False
@@ -474,7 +474,7 @@
True
True
True
-
+
False
@@ -1108,8 +1108,8 @@
True
False
- 4
- 2
+ 5
+ 4
12
6
@@ -1157,7 +1157,7 @@
1
- 2
+ 4
1
2
@@ -1178,21 +1178,6 @@
-
-
- True
- False
- 0
- Background color:
- True
-
-
- 3
- 4
- GTK_FILL
-
-
-
True
@@ -1225,7 +1210,88 @@
-
+
+ True
+ False
+ 0
+ Background color:
+ True
+
+
+ 2
+ 3
+ 2
+ 3
+ GTK_FILL
+
+
+
+
+
+ True
+ False
+ 0
+ Cursor shape:
+ True
+
+
+ 3
+ 4
+ GTK_FILL
+
+
+
+
+
+ True
+ False
+ 0
+ Cursor blink mode:
+ True
+
+
+ 4
+ 5
+ GTK_FILL
+
+
+
+
+
+ True
+ False
+ Follow GTK+ setting
+Blink on
+Blink off
+
+
+
+ 1
+ 4
+ 4
+ 5
+
+
+
+
+
+ True
+ False
+ Block
+I-Beam
+Underline
+
+
+
+ 1
+ 4
+ 3
+ 4
+
+
+
+
+
True
False
@@ -1248,13 +1314,19 @@
- 1
- 2
- 3
- 4
+ 3
+ 4
+ 2
+ 3
+
+
+
+
+
+
diff --git a/src/guake/prefs.py b/src/guake/prefs.py
index 75748aab6..f5c2b88ac 100644
--- a/src/guake/prefs.py
+++ b/src/guake/prefs.py
@@ -601,6 +601,17 @@ def on_palette_name_changed(self, combo):
PALETTES[palette_index])
self.set_palette_colors(PALETTES[palette_index])
+ def on_cursor_shape_changed(self, combo):
+ """Changes the value of cursor_shape in gconf
+ """
+ index = combo.get_active()
+ self.client.set_int(KEY('/style/cursor_shape'), index)
+
+ def on_blink_cursor_toggled(self, chk):
+ """Changes the value of blink_cursor in gconf
+ """
+ self.client.set_int(KEY('/style/cursor_blink_mode'), chk.get_active())
+
def on_palette_color_set(self, btn):
"""Changes the value of palette in gconf
"""
@@ -621,6 +632,12 @@ def set_palette_name(self, palette):
if palette == PALETTES[i]:
self.get_widget('palette_name').set_active(i)
+ def set_cursor_shape(self, shape_index):
+ self.get_widget('cursor_shape').set_active(shape_index)
+
+ def set_cursor_blink_mode(self, mode_index):
+ self.get_widget('cursor_blink_mode').set_active(mode_index)
+
def set_palette_colors(self, palette):
"""Updates the color buttons with the given palette
"""
@@ -831,6 +848,14 @@ def load_configs(self):
self.set_palette_name(value)
self.set_palette_colors(value)
+ # cursor shape
+ value = self.client.get_int(KEY('/style/cursor_shape'))
+ self.set_cursor_shape(value)
+
+ # cursor blink
+ value = self.client.get_int(KEY('/style/cursor_blink_mode'))
+ self.set_cursor_blink_mode(value)
+
# background image
value = self.client.get_string(KEY('/style/background/image'))
if os.path.isfile(value or ''):