[gtk/wip/baedert/for-master] recorder: Don't select new row when adding recording
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master] recorder: Don't select new row when adding recording
- Date: Sat, 27 Jun 2020 09:50:35 +0000 (UTC)
commit 8cc2a44268484ff981244a3deb1ed7d9863b9f03
Author: Timm Bäder <mail baedert org>
Date: Sat Jun 27 11:30:02 2020 +0200
recorder: Don't select new row when adding recording
This is what makes the recorder slow. We might want to scroll down in
the list though.
gtk/inspector/recorder.c | 16 ----------------
1 file changed, 16 deletions(-)
---
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
index 4db3ef650c..40a5e66c26 100644
--- a/gtk/inspector/recorder.c
+++ b/gtk/inspector/recorder.c
@@ -1257,24 +1257,8 @@ gtk_inspector_recorder_add_recording (GtkInspectorRecorder *recorder,
GtkInspectorRecording *recording)
{
GtkInspectorRecorderPrivate *priv = gtk_inspector_recorder_get_instance_private (recorder);
- guint count;
- GtkListBoxRow *selected_row;
- gboolean should_select_new_row;
-
- count = g_list_model_get_n_items (priv->recordings);
- selected_row = gtk_list_box_get_selected_row (GTK_LIST_BOX (priv->recordings_list));
- if (count == 0 || selected_row == NULL)
- should_select_new_row = TRUE;
- else
- should_select_new_row = (gtk_list_box_row_get_index (selected_row) == count - 1);
g_list_store_append (G_LIST_STORE (priv->recordings), recording);
-
- if (should_select_new_row)
- {
- gtk_list_box_select_row (GTK_LIST_BOX (priv->recordings_list),
- gtk_list_box_get_row_at_index (GTK_LIST_BOX (priv->recordings_list), count));
- }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]