search: Do not allow selecting rows

There is no functionality involving selecting a row here.
This commit is contained in:
Felipe Borges 2019-07-16 13:13:21 +00:00 committed by Georges Basile Stavracas Neto
parent 3f4f43f020
commit 041a3e92f1
2 changed files with 4 additions and 2 deletions

View file

@ -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">

View file

@ -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++)