After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757486 - Move 'Cursor Blinking' options from the Keyboard panel to the Universal Access panel
Move 'Cursor Blinking' options from the Keyboard panel to the Universal Acces...
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Universal Access
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks: 757489
 
 
Reported: 2015-11-02 15:25 UTC by Felipe Borges
Modified: 2015-11-04 12:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (107.24 KB, image/png)
2015-11-02 15:25 UTC, Felipe Borges
  Details
universal-access: add Cursor Blinking settings to the Typing section (13.52 KB, patch)
2015-11-02 15:26 UTC, Felipe Borges
none Details | Review
universal-access: add Cursor Blinking settings to the Typing section (13.57 KB, patch)
2015-11-04 09:04 UTC, Felipe Borges
committed Details | Review

Description Felipe Borges 2015-11-02 15:25:06 UTC
Created attachment 314651 [details]
screenshot

In the same case for https://bugzilla.gnome.org/show_bug.cgi?id=757464, this settings now belong to the Universal Access panel instead of the Keybard panel.
Comment 1 Felipe Borges 2015-11-02 15:26:51 UTC
Created attachment 314653 [details] [review]
universal-access: add Cursor Blinking settings to the Typing section
Comment 2 Bastien Nocera 2015-11-02 15:31:12 UTC
Review of attachment 314653 [details] [review]:

::: panels/universal-access/uap.ui
@@ +1510,3 @@
+          </object>
+          <packing>
+            <property name="pack_type">end</property>

The switch is expanded vertically.
Comment 3 Felipe Borges 2015-11-04 09:04:40 UTC
Created attachment 314795 [details] [review]
universal-access: add Cursor Blinking settings to the Typing section
Comment 4 Bastien Nocera 2015-11-04 10:51:34 UTC
Review of attachment 314795 [details] [review]:

That works.
Comment 5 Felipe Borges 2015-11-04 12:03:45 UTC
Comment on attachment 314795 [details] [review]
universal-access: add Cursor Blinking settings to the Typing section

>From 417ffaa014dd3bedf9458c3171c3f8644ad28ce5 Mon Sep 17 00:00:00 2001
>From: Felipe Borges <feborges@redhat.com>
>Date: Mon, 2 Nov 2015 16:16:53 +0100
>Subject: [PATCH] universal-access: add Cursor Blinking settings to the Typing
> section
>
>https://bugzilla.gnome.org/show_bug.cgi?id=757486
>---
> panels/universal-access/cc-ua-panel.c |  35 +++++++
> panels/universal-access/uap.ui        | 186 ++++++++++++++++++++++++++++++++++
> 2 files changed, 221 insertions(+)
>
>diff --git a/panels/universal-access/cc-ua-panel.c b/panels/universal-access/cc-ua-panel.c
>index 278a334..71ce67b 100644
>--- a/panels/universal-access/cc-ua-panel.c
>+++ b/panels/universal-access/cc-ua-panel.c
>@@ -48,6 +48,8 @@
> #define KEY_TEXT_SCALING_FACTOR      "text-scaling-factor"
> #define KEY_GTK_THEME                "gtk-theme"
> #define KEY_ICON_THEME               "icon-theme"
>+#define KEY_CURSOR_BLINKING          "cursor-blink"
>+#define KEY_CURSOR_BLINKING_TIME     "cursor-blink-time"
> 
> /* application settings */
> #define APPLICATION_SETTINGS         "org.gnome.desktop.a11y.applications"
>@@ -584,6 +586,16 @@ on_repeat_keys_toggled (GSettings *settings, const gchar *key, CcUaPanel *self)
> }
> 
> static void
>+on_cursor_blinking_toggled (GSettings *settings, const gchar *key, CcUaPanel *self)
>+{
>+  gboolean on;
>+
>+  on = g_settings_get_boolean (settings, KEY_CURSOR_BLINKING);
>+
>+  gtk_label_set_text (GTK_LABEL (WID ("value_row_cursor_blinking")), on ? _("On") : _("Off"));
>+}
>+
>+static void
> update_accessx_label (GSettings *settings, const gchar *key, CcUaPanel *self)
> {
>   gboolean on;
>@@ -643,6 +655,29 @@ cc_ua_panel_init_keyboard (CcUaPanel *self)
>                    gtk_range_get_adjustment (GTK_RANGE (WID ("repeat_keys_speed_scale"))), "value",
>                    G_SETTINGS_BIND_DEFAULT);
> 
>+  /* Cursor Blinking */
>+  g_signal_connect (priv->interface_settings, "changed",
>+                    G_CALLBACK (on_cursor_blinking_toggled), self);
>+
>+  dialog = WID ("cursor_blinking_dialog");
>+  priv->toplevels = g_slist_prepend (priv->toplevels, dialog);
>+
>+  g_object_set_data (G_OBJECT (WID ("row_cursor_blinking")), "dialog", dialog);
>+
>+  g_signal_connect (dialog, "delete-event",
>+                    G_CALLBACK (gtk_widget_hide_on_delete), NULL);
>+
>+  sw = WID ("cursor_blinking_switch");
>+  g_settings_bind (priv->interface_settings, KEY_CURSOR_BLINKING,
>+                   sw, "active",
>+                   G_SETTINGS_BIND_DEFAULT);
>+  on_cursor_blinking_toggled (priv->interface_settings, NULL, self);
>+
>+  g_settings_bind (priv->interface_settings, KEY_CURSOR_BLINKING_TIME,
>+                   gtk_range_get_adjustment (GTK_RANGE (WID ("cursor_blinking_scale"))), "value",
>+                   G_SETTINGS_BIND_DEFAULT);
>+
>+
>   /* accessx */
>   g_signal_connect (priv->kb_settings, "changed",
>                     G_CALLBACK (update_accessx_label), self);
>diff --git a/panels/universal-access/uap.ui b/panels/universal-access/uap.ui
>index c49eab9..d7bf232 100644
>--- a/panels/universal-access/uap.ui
>+++ b/panels/universal-access/uap.ui
>@@ -21,6 +21,13 @@
>     <property name="step_increment">1</property>
>     <property name="page_increment">1</property>
>   </object>
>+  <object class="GtkAdjustment" id="cursor_blink_time_adjustment">
>+    <property name="lower">100</property>
>+    <property name="upper">2500</property>
>+    <property name="value">1000</property>
>+    <property name="step_increment">200</property>
>+    <property name="page_increment">200</property>
>+  </object>
>   <!-- interface-requires gtk+ 3.0 -->
>       <object class="GtkScrolledWindow" id="universal_access_panel">
>         <property name="visible">True</property>
>@@ -613,6 +620,52 @@
>                               </object>
>                             </child>
>                             <child>
>+                              <object class="GtkListBoxRow" id="row_cursor_blinking">
>+                                <property name="visible">True</property>
>+                                <property name="can_focus">True</property>
>+                                <child>
>+                                  <object class="GtkBox" id="box_row_cursor_blinking">
>+                                    <property name="visible">True</property>
>+                                    <child>
>+                                      <object class="GtkLabel" id="heading_row_cursor_blinking">
>+                                        <property name="visible">True</property>
>+                                        <property name="can_focus">False</property>
>+                                        <property name="margin_start">20</property>
>+                                        <property name="margin_end">20</property>
>+                                        <property name="margin_top">6</property>
>+                                        <property name="margin_bottom">6</property>
>+                                        <property name="xalign">0</property>
>+                                        <property name="label" translatable="yes">_Cursor Blinking</property>
>+                                        <property name="use_underline">True</property>
>+                                      </object>
>+                                      <packing>
>+                                        <property name="expand">True</property>
>+                                        <property name="fill">True</property>
>+                                        <property name="position">0</property>
>+                                      </packing>
>+                                    </child>
>+                                    <child>
>+                                      <object class="GtkLabel" id="value_row_cursor_blinking">
>+                                        <property name="visible">True</property>
>+                                        <property name="can_focus">False</property>
>+                                        <property name="margin_start">20</property>
>+                                        <property name="margin_end">20</property>
>+                                        <property name="margin_top">6</property>
>+                                        <property name="margin_bottom">6</property>
>+                                        <property name="xalign">1</property>
>+                                        <property name="label" translatable="yes">Off</property>
>+                                      </object>
>+                                      <packing>
>+                                        <property name="expand">False</property>
>+                                        <property name="fill">True</property>
>+                                        <property name="position">1</property>
>+                                      </packing>
>+                                    </child>
>+                                  </object>
>+                                </child>
>+                              </object>
>+                            </child>
>+                            <child>
>                               <object class="GtkListBoxRow" id="row_accessx">
>                                 <property name="visible">True</property>
>                                 <property name="can_focus">True</property>
>@@ -1439,6 +1492,139 @@
>       </object>
>     </child>
>   </object>
>+  <object class="GtkDialog" id="cursor_blinking_dialog">
>+    <property name="can_focus">False</property>
>+    <property name="border_width">5</property>
>+    <property name="title" translatable="yes">Cursor Blinking</property>
>+    <property name="resizable">False</property>
>+    <property name="modal">True</property>
>+    <property name="type_hint">dialog</property>
>+    <property name="use_header_bar">1</property>
>+    <child internal-child="headerbar">
>+      <object class="GtkHeaderBar" id="cursor_blinking_headerbar">
>+        <property name="visible">True</property>
>+        <child>
>+          <object class="GtkSwitch" id="cursor_blinking_switch">
>+            <property name="visible">True</property>
>+            <property name="can_focus">True</property>
>+            <property name="valign">center</property>
>+          </object>
>+          <packing>
>+            <property name="pack_type">end</property>
>+          </packing>
>+        </child>
>+      </object>
>+    </child>
>+    <child internal-child="vbox">
>+      <object class="GtkBox" id="cursor_blinking-vbox5">
>+        <property name="can_focus">False</property>
>+        <property name="orientation">vertical</property>
>+        <child>
>+          <object class="GtkLabel" id="cursor_blinking-description">
>+            <property name="visible">True</property>
>+            <property name="use_underline">True</property>
>+            <property name="can_focus">False</property>
>+            <property name="xalign">0</property>
>+            <property name="label" translatable="yes">Cursor blinks in text fields.</property>
>+            <property name="margin_start">12</property>
>+            <property name="margin_end">6</property>
>+            <property name="margin_top">6</property>
>+            <property name="margin_bottom">12</property>
>+          </object>
>+          <packing>
>+            <property name="expand">True</property>
>+            <property name="fill">True</property>
>+            <property name="position">0</property>
>+          </packing>
>+        </child>
>+        <child>
>+          <object class="GtkGrid" id="cursor_blinking-grid">
>+            <property name="visible">True</property>
>+            <property name="can_focus">False</property>
>+            <property name="valign">start</property>
>+            <property name="margin_start">12</property>
>+            <property name="margin_end">6</property>
>+            <property name="margin_top">6</property>
>+            <property name="margin_bottom">12</property>
>+            <property name="orientation">vertical</property>
>+            <property name="row_spacing">18</property>
>+            <property name="column_spacing">24</property>
>+            <child>
>+              <object class="GtkBox" id="cursor_blinking-box6">
>+                <property name="visible">True</property>
>+                <property name="can_focus">False</property>
>+                <property name="valign">start</property>
>+                <property name="orientation">vertical</property>
>+                <property name="spacing">6</property>
>+                <child>
>+                  <object class="GtkBox" id="cursor_blinking-box7">
>+                    <property name="visible">True</property>
>+                    <property name="can_focus">False</property>
>+                    <property name="orientation">vertical</property>
>+                    <child>
>+                      <object class="GtkLabel" id="cursor_blinking-label">
>+                        <property name="visible">True</property>
>+                        <property name="use_underline">True</property>
>+                        <property name="can_focus">False</property>
>+                        <property name="xalign">0</property>
>+                        <property name="label" translatable="yes">Speed</property>
>+                        <property name="mnemonic_widget">cursor_blinking_scale</property>
>+                        <attributes>
>+                          <attribute name="weight" value="bold"/>
>+                        </attributes>
>+                      </object>
>+                      <packing>
>+                        <property name="expand">False</property>
>+                        <property name="fill">True</property>
>+                        <property name="position">0</property>
>+                      </packing>
>+                    </child>
>+                  </object>
>+                  <packing>
>+                    <property name="expand">False</property>
>+                    <property name="fill">True</property>
>+                    <property name="position">0</property>
>+                  </packing>
>+                </child>
>+              </object>
>+              <packing>
>+                <property name="left_attach">0</property>
>+                <property name="top_attach">1</property>
>+                <property name="width">1</property>
>+                <property name="height">1</property>
>+              </packing>
>+            </child>
>+            <child>
>+              <object class="GtkHScale" id="cursor_blinking_scale">
>+                <property name="visible">True</property>
>+                <property name="can_focus">True</property>
>+                <property name="hexpand">True</property>
>+                <property name="adjustment">cursor_blink_time_adjustment</property>
>+                <property name="draw_value">False</property>
>+                <property name="width-request">400</property>
>+                <child internal-child="accessible">
>+                  <object class="AtkObject" id="cursor_blinking_scale-atkobject">
>+                    <property name="AtkObject::accessible-description" translatable="yes">Cursor blinking speed</property>
>+                  </object>
>+                </child>
>+              </object>
>+              <packing>
>+                <property name="left_attach">1</property>
>+                <property name="top_attach">1</property>
>+                <property name="width">1</property>
>+                <property name="height">1</property>
>+              </packing>
>+            </child>
>+          </object>
>+          <packing>
>+            <property name="expand">True</property>
>+            <property name="fill">True</property>
>+            <property name="position">1</property>
>+          </packing>
>+        </child>
>+      </object>
>+    </child>
>+  </object>
>   <object class="GtkSizeGroup" id="repeat-keys-dialog-labels-sizegroup">
>     <widgets>
>       <widget name="repeat-keys-delay-label"/>
>-- 
>2.5.0