[gnome-logs] eventviewlist: remove priv->results_listbox



commit 08583a095f4f7b7ce1e70a8c10f07d1b36cb0834
Author: Lars Uebernickel <lars uebernic de>
Date:   Sat Feb 14 19:41:37 2015 +0100

    eventviewlist: remove priv->results_listbox
    
    It's always set to the same value as priv->active_listbox.

 src/gl-eventviewlist.c |   18 +++++-------------
 1 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/src/gl-eventviewlist.c b/src/gl-eventviewlist.c
index 081f423..4f40792 100644
--- a/src/gl-eventviewlist.c
+++ b/src/gl-eventviewlist.c
@@ -43,7 +43,6 @@ typedef struct
     GtkWidget *search_entry;
     gchar *search_text;
 
-    GtkListBox *results_listbox;
     GQueue *pending_results;
     GList *results;
     guint insert_idle_id;
@@ -336,7 +335,7 @@ insert_devices_idle (GlEventViewList *view)
                 row = gl_event_view_row_new (result,
                                              GL_EVENT_VIEW_ROW_STYLE_SIMPLE,
                                              priv->clock_format);
-                gtk_container_add (GTK_CONTAINER (priv->results_listbox), row);
+                gtk_container_add (GTK_CONTAINER (priv->active_listbox), row);
                 gtk_widget_show_all (row);
             }
             else
@@ -344,7 +343,6 @@ insert_devices_idle (GlEventViewList *view)
                 g_queue_free (priv->pending_results);
                 gl_journal_results_free (priv->results);
                 priv->pending_results = NULL;
-                priv->results_listbox = NULL;
                 priv->results = NULL;
 
                 priv->insert_idle_id = 0;
@@ -405,7 +403,7 @@ insert_journal_query_devices (GlEventViewList *view,
 
     priv = gl_event_view_list_get_instance_private (view);
 
-    priv->results_listbox = listbox;
+    priv->active_listbox = listbox;
     gl_journal_query_async (priv->journal, query, NULL, query_devices_ready,
                             view);
 }
@@ -438,7 +436,7 @@ insert_security_idle (GlEventViewList *view)
                 row = gl_event_view_row_new (result,
                                              GL_EVENT_VIEW_ROW_STYLE_CMDLINE,
                                              priv->clock_format);
-                gtk_container_add (GTK_CONTAINER (priv->results_listbox), row);
+                gtk_container_add (GTK_CONTAINER (priv->active_listbox), row);
                 gtk_widget_show_all (row);
             }
             else
@@ -446,7 +444,6 @@ insert_security_idle (GlEventViewList *view)
                 g_queue_free (priv->pending_results);
                 gl_journal_results_free (priv->results);
                 priv->pending_results = NULL;
-                priv->results_listbox = NULL;
                 priv->results = NULL;
 
                 priv->insert_idle_id = 0;
@@ -507,7 +504,6 @@ insert_journal_query_security (GlEventViewList *view,
 
     priv = gl_event_view_list_get_instance_private (view);
 
-    priv->results_listbox = listbox;
     gl_journal_query_async (priv->journal, query, NULL, query_security_ready,
                             view);
 }
@@ -535,7 +531,7 @@ insert_simple_idle (GlEventViewList *view)
                 row = gl_event_view_row_new (result,
                                              GL_EVENT_VIEW_ROW_STYLE_SIMPLE,
                                              priv->clock_format);
-                gtk_container_add (GTK_CONTAINER (priv->results_listbox), row);
+                gtk_container_add (GTK_CONTAINER (priv->active_listbox), row);
                 gtk_widget_show_all (row);
             }
             else
@@ -543,7 +539,6 @@ insert_simple_idle (GlEventViewList *view)
                 g_queue_free (priv->pending_results);
                 gl_journal_results_free (priv->results);
                 priv->pending_results = NULL;
-                priv->results_listbox = NULL;
                 priv->results = NULL;
 
                 priv->insert_idle_id = 0;
@@ -602,7 +597,6 @@ insert_journal_query_simple (GlEventViewList *view,
     GlEventViewListPrivate *priv;
 
     priv = gl_event_view_list_get_instance_private (view);
-    priv->results_listbox = listbox;
     gl_journal_query_async (priv->journal, query, NULL, query_simple_ready,
                             view);
 }
@@ -630,7 +624,7 @@ insert_cmdline_idle (GlEventViewList *view)
                 row = gl_event_view_row_new (result,
                                              GL_EVENT_VIEW_ROW_STYLE_CMDLINE,
                                              priv->clock_format);
-                gtk_container_add (GTK_CONTAINER (priv->results_listbox), row);
+                gtk_container_add (GTK_CONTAINER (priv->active_listbox), row);
                 gtk_widget_show_all (row);
             }
             else
@@ -638,7 +632,6 @@ insert_cmdline_idle (GlEventViewList *view)
                 g_queue_free (priv->pending_results);
                 gl_journal_results_free (priv->results);
                 priv->pending_results = NULL;
-                priv->results_listbox = NULL;
                 priv->results = NULL;
 
                 priv->insert_idle_id = 0;
@@ -698,7 +691,6 @@ insert_journal_query_cmdline (GlEventViewList *view,
     GlEventViewListPrivate *priv;
 
     priv = gl_event_view_list_get_instance_private (view);
-    priv->results_listbox = listbox;
     gl_journal_query_async (priv->journal, query, NULL, query_cmdline_ready,
                             view);
 }


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