summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2014-06-23 15:37:34 +0200
committerBastien Nocera <hadess@hadess.net>2014-06-24 11:35:31 +0200
commit3f75672f2dcc0bb6366f571844458026191e612e (patch)
tree99a9b0f073cb6cd58ce0fb31732ef9f61bd3622c
parent55fe239e99b88286e8f99ff410ee25064f5dad57 (diff)
downloadgnome-control-center-3f75672f2dcc0bb6366f571844458026191e612e.tar.gz
notifications: Use new listbox helpers
https://bugzilla.gnome.org/show_bug.cgi?id=732106
-rw-r--r--panels/notifications/cc-notifications-panel.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/panels/notifications/cc-notifications-panel.c b/panels/notifications/cc-notifications-panel.c
index f2cc9ed37..5f06e9e4c 100644
--- a/panels/notifications/cc-notifications-panel.c
+++ b/panels/notifications/cc-notifications-panel.c
@@ -25,6 +25,7 @@
#include <gio/gio.h>
#include <gio/gdesktopappinfo.h>
+#include "shell/list-box-helper.h"
#include "cc-notifications-panel.h"
#include "cc-notifications-resources.h"
#include "cc-edit-dialog.h"
@@ -91,25 +92,6 @@ cc_notifications_panel_finalize (GObject *object)
}
static void
-update_header_func (GtkListBoxRow *row,
- GtkListBoxRow *before,
- gpointer user_data)
-{
- GtkWidget *current;
-
- if (before == NULL)
- return;
-
- current = gtk_list_box_row_get_header (row);
- if (current == NULL)
- {
- current = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
- gtk_widget_show (current);
- gtk_list_box_row_set_header (row, current);
- }
-}
-
-static void
cc_notifications_panel_init (CcNotificationsPanel *panel)
{
GtkWidget *w;
@@ -146,7 +128,7 @@ cc_notifications_panel_init (CcNotificationsPanel *panel)
gtk_list_box_set_selection_mode (panel->list_box, GTK_SELECTION_NONE);
gtk_list_box_set_sort_func (panel->list_box, (GtkListBoxSortFunc)sort_apps, NULL, NULL);
gtk_list_box_set_header_func (panel->list_box,
- update_header_func,
+ cc_list_box_update_header_func,
NULL, NULL);
g_signal_connect (panel->list_box, "row-activated",