keyboard: Rename listbox to shortcuts_listbox
So that we can add another listbox and not confused them.
This commit is contained in:
parent
72b4dec098
commit
3fe047828c
2 changed files with 13 additions and 13 deletions
|
@ -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,11 +684,11 @@ 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, reset_button);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, search_bar);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, search_button);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, search_entry);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, shortcuts_listbox);
|
||||
|
||||
gtk_widget_class_bind_template_callback (widget_class, reset_all_clicked_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, shortcut_row_activated);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue