summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Borges <felipeborges@gnome.org>2019-07-16 13:13:21 +0000
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2019-08-06 11:59:41 +0000
commit041a3e92f16713e4da6b7e1cf42d1805bafa6649 (patch)
tree3556bf9f0ee95689d519674eb3f179a3070fa8de
parent3f4f43f020e10244a6a0935ae5161aa4a0ddf58c (diff)
downloadgnome-control-center-041a3e92f16713e4da6b7e1cf42d1805bafa6649.tar.gz
search: Do not allow selecting rows
There is no functionality involving selecting a row here.
-rw-r--r--panels/search/cc-search-panel-row.ui1
-rw-r--r--panels/search/cc-search-panel.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/panels/search/cc-search-panel-row.ui b/panels/search/cc-search-panel-row.ui
index b147fb8f2..1cb76aede 100644
--- a/panels/search/cc-search-panel-row.ui
+++ b/panels/search/cc-search-panel-row.ui
@@ -4,6 +4,7 @@
<template class="CcSearchPanelRow" parent="GtkListBoxRow">
<property name="visible">True</property>
<property name="can-focus">True</property>
+ <property name="selectable">False</property>
<signal name="drag_data_received" handler="drag_data_received_cb" object="CcSearchPanelRow" swapped="yes"/>
<child>
<object class="GtkEventBox" id="drag_handle">
diff --git a/panels/search/cc-search-panel.c b/panels/search/cc-search-panel.c
index 34cb66170..e7095d8cb 100644
--- a/panels/search/cc-search-panel.c
+++ b/panels/search/cc-search-panel.c
@@ -35,6 +35,7 @@ struct _CcSearchPanel
GtkWidget *search_vbox;
GtkWidget *search_frame;
GtkWidget *settings_button;
+ CcSearchPanelRow *selected_row;
GCancellable *load_cancellable;
GSettings *search_settings;
@@ -169,7 +170,7 @@ search_panel_move_selected (CcSearchPanel *self,
g_autoptr(GList) children = NULL;
GList *l, *other;
- row = gtk_list_box_get_selected_row (GTK_LIST_BOX (self->list_box));
+ row = GTK_LIST_BOX_ROW (self->selected_row);
app_info = cc_search_panel_row_get_app_info (CC_SEARCH_PANEL_ROW (row));
app_id = g_app_info_get_id (app_info);
@@ -272,7 +273,7 @@ row_moved_cb (CcSearchPanel *self,
gint dest_idx = gtk_list_box_row_get_index (GTK_LIST_BOX_ROW (dest_row));
gboolean down;
- gtk_list_box_select_row (GTK_LIST_BOX (self->list_box), GTK_LIST_BOX_ROW (row));
+ self->selected_row = row;
down = (source_idx - dest_idx) < 0;
for (int i = 0; i < ABS (source_idx - dest_idx); i++)