[gnome-terminal] profile: editor: Add "Cursor blinking" preference
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] profile: editor: Add "Cursor blinking" preference
- Date: Sun, 31 Dec 2017 16:27:45 +0000 (UTC)
commit 757e6aedbf571c3c4410b84b92b2bffa7e2c8bbb
Author: Egmont Koblinger <egmont gmail com>
Date: Sun Dec 31 17:25:54 2017 +0100
profile: editor: Add "Cursor blinking" preference
https://bugzilla.gnome.org/show_bug.cgi?id=559990
src/profile-editor.c | 8 ++++
src/profile-preferences.ui | 84 ++++++++++++++++++++++++++++++++++++--------
2 files changed, 77 insertions(+), 15 deletions(-)
---
diff --git a/src/profile-editor.c b/src/profile-editor.c
index 3506d70..9439b6a 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -1064,6 +1064,14 @@ terminal_profile_edit (GSettings *profile,
(GSettingsBindGetMapping) string_to_enum,
(GSettingsBindSetMapping) enum_to_string,
vte_cursor_shape_get_type, NULL);
+ g_settings_bind_with_mapping (profile, TERMINAL_PROFILE_CURSOR_BLINK_MODE_KEY,
+ gtk_builder_get_object (builder,
+ "cursor-blink-mode-combobox"),
+ "active",
+ G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET,
+ (GSettingsBindGetMapping) string_to_enum,
+ (GSettingsBindSetMapping) enum_to_string,
+ vte_cursor_blink_mode_get_type, NULL);
g_settings_bind_with_mapping (profile, TERMINAL_PROFILE_TEXT_BLINK_MODE_KEY,
gtk_builder_get_object (builder,
"text-blink-mode-combobox"),
diff --git a/src/profile-preferences.ui b/src/profile-preferences.ui
index be7d8cf..aa4be4a 100644
--- a/src/profile-preferences.ui
+++ b/src/profile-preferences.ui
@@ -58,6 +58,23 @@
</row>
</data>
</object>
+ <object class="GtkListStore" id="model7">
+ <columns>
+ <!-- column-name gchararray -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes" comments="Cursor blink mode">Default</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes" comments="Cursor blink mode">Enabled</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes" comments="Cursor blink mode">Disabled</col>
+ </row>
+ </data>
+ </object>
<object class="GtkListStore" id="model5">
<columns>
<!-- column-name gchararray -->
@@ -194,7 +211,7 @@
<object class="GtkTable" id="general-table">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">9</property>
+ <property name="n_rows">10</property>
<property name="n_columns">4</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
@@ -386,6 +403,43 @@
</packing>
</child>
<child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Cursor blin_king:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">cursor-blink-mode-combobox</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="cursor-blink-mode-combobox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">model7</property>
+ <property name="focus_on_click">False</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer5"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkCheckButton" id="bell-checkbutton">
<property name="label" translatable="yes">Terminal _bell</property>
<property name="visible">True</property>
@@ -397,8 +451,8 @@
</object>
<packing>
<property name="right_attach">4</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
@@ -415,8 +469,8 @@
</object>
<packing>
<property name="right_attach">4</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
@@ -431,8 +485,8 @@
<property name="xalign">0</property>
</object>
<packing>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
@@ -452,8 +506,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">4</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
@@ -471,8 +525,8 @@
</object>
<packing>
<property name="right_attach">4</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
@@ -488,8 +542,8 @@
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
@@ -505,8 +559,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">4</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]