[gnome-control-center/wip/alt-chars-key: 387/388] keyboard: Rename listbox to shortcuts_listbox



commit 3d0a24589e55993c0a3479646de259f90c38d6ea
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Mar 29 12:06:10 2018 +0200

    keyboard: Rename listbox to shortcuts_listbox
    
    So that we can add another listbox and not confused them.

 panels/keyboard/cc-keyboard-panel.c  | 22 +++++++++++-----------
 panels/keyboard/cc-keyboard-panel.ui |  4 ++--
 2 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/panels/keyboard/cc-keyboard-panel.c b/panels/keyboard/cc-keyboard-panel.c
index 56fa08b4f..bb2ed69e0 100644
--- a/panels/keyboard/cc-keyboard-panel.c
+++ b/panels/keyboard/cc-keyboard-panel.c
@@ -54,7 +54,7 @@ struct _CcKeyboardPanel
   guint               search_bar_handler_id;
 
   /* Shortcuts */
-  GtkWidget          *listbox;
+  GtkWidget          *shortcuts_listbox;
   GtkListBoxRow      *add_shortcut_row;
   GtkSizeGroup       *accelerator_sizegroup;
 
@@ -199,7 +199,7 @@ reset_all_clicked_cb (CcKeyboardPanel *self)
 
   if (response == GTK_RESPONSE_ACCEPT)
     {
-      gtk_container_foreach (GTK_CONTAINER (self->listbox),
+      gtk_container_foreach (GTK_CONTAINER (self->shortcuts_listbox),
                              reset_all_shortcuts_cb,
                              self);
     }
@@ -309,7 +309,7 @@ add_item (CcKeyboardPanel *self,
                           row_data_new (item, section_id, section_title),
                           (GDestroyNotify) row_data_free);
 
-  gtk_container_add (GTK_CONTAINER (self->listbox), row);
+  gtk_container_add (GTK_CONTAINER (self->shortcuts_listbox), row);
 }
 
 static void
@@ -318,7 +318,7 @@ remove_item (CcKeyboardPanel *self,
 {
   GList *children, *l;
 
-  children = gtk_container_get_children (GTK_CONTAINER (self->listbox));
+  children = gtk_container_get_children (GTK_CONTAINER (self->shortcuts_listbox));
 
   for (l = children; l != NULL; l = l->next)
     {
@@ -328,7 +328,7 @@ remove_item (CcKeyboardPanel *self,
 
       if (row_data->item == item)
         {
-          gtk_container_remove (GTK_CONTAINER (self->listbox), l->data);
+          gtk_container_remove (GTK_CONTAINER (self->shortcuts_listbox), l->data);
           break;
         }
     }
@@ -684,7 +684,7 @@ cc_keyboard_panel_class_init (CcKeyboardPanelClass *klass)
 
   gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, add_shortcut_row);
   gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, empty_search_placeholder);
-  gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, listbox);
+  gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, shortcuts_listbox);
   gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, reset_button);
   gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, search_bar);
   gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, search_button);
@@ -734,22 +734,22 @@ cc_keyboard_panel_init (CcKeyboardPanel *self)
   /* Shortcut editor dialog */
   self->shortcut_editor = cc_keyboard_shortcut_editor_new (self->manager);
 
-  /* Setup the shortcuts listbox */
-  gtk_list_box_set_sort_func (GTK_LIST_BOX (self->listbox),
+  /* Setup the shortcuts shortcuts_listbox */
+  gtk_list_box_set_sort_func (GTK_LIST_BOX (self->shortcuts_listbox),
                               sort_function,
                               self,
                               NULL);
 
-  gtk_list_box_set_header_func (GTK_LIST_BOX (self->listbox),
+  gtk_list_box_set_header_func (GTK_LIST_BOX (self->shortcuts_listbox),
                                 header_function,
                                 self,
                                 NULL);
 
-  gtk_list_box_set_filter_func (GTK_LIST_BOX (self->listbox),
+  gtk_list_box_set_filter_func (GTK_LIST_BOX (self->shortcuts_listbox),
                                 filter_function,
                                 self,
                                 NULL);
 
-  gtk_list_box_set_placeholder (GTK_LIST_BOX (self->listbox), self->empty_search_placeholder);
+  gtk_list_box_set_placeholder (GTK_LIST_BOX (self->shortcuts_listbox), self->empty_search_placeholder);
 }
 
diff --git a/panels/keyboard/cc-keyboard-panel.ui b/panels/keyboard/cc-keyboard-panel.ui
index d562a6f80..aad179e5c 100644
--- a/panels/keyboard/cc-keyboard-panel.ui
+++ b/panels/keyboard/cc-keyboard-panel.ui
@@ -27,7 +27,7 @@
               <object class="GtkSearchEntry" id="search_entry">
                 <property name="visible">True</property>
                 <property name="width_chars">30</property>
-                <signal name="notify::text" handler="gtk_list_box_invalidate_filter" object="listbox" 
swapped="yes" />
+                <signal name="notify::text" handler="gtk_list_box_invalidate_filter" 
object="shortcuts_listbox" swapped="yes" />
               </object>
             </child>
           </object>
@@ -58,7 +58,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkListBox" id="listbox">
+                      <object class="GtkListBox" id="shortcuts_listbox">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="selection-mode">none</property>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]