[gnome-control-center] display: Use new listbox helpers
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] display: Use new listbox helpers
- Date: Tue, 24 Jun 2014 09:44:31 +0000 (UTC)
commit d632e5988e5f5bcdbb3302ba1ad481134263fd65
Author: Bastien Nocera <hadess hadess net>
Date: Mon Jun 23 15:37:34 2014 +0200
display: Use new listbox helpers
https://bugzilla.gnome.org/show_bug.cgi?id=732106
panels/display/cc-display-panel.c | 24 +++---------------------
1 files changed, 3 insertions(+), 21 deletions(-)
---
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index a228e00..ee12793 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -31,6 +31,7 @@
#include <gdesktop-enums.h>
#include <math.h>
+#include "shell/list-box-helper.h"
#include "cc-rr-labeler.h"
#include <libupower-glib/upower.h>
@@ -1676,25 +1677,6 @@ list_box_item (const gchar *title,
}
static void
-cc_display_panel_list_box_update_header (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
setup_resolution_combo_box (CcDisplayPanel *panel,
GnomeRRMode **modes,
GnomeRRMode *current_mode)
@@ -2152,7 +2134,7 @@ show_setup_dialog (CcDisplayPanel *panel)
listbox = gtk_list_box_new ();
gtk_container_add (GTK_CONTAINER (frame), listbox);
gtk_list_box_set_header_func (GTK_LIST_BOX (listbox),
- cc_display_panel_list_box_update_header,
+ cc_list_box_update_header_func,
NULL, NULL);
g_signal_connect (listbox, "row-selected",
G_CALLBACK (setup_listbox_row_activated), panel);
@@ -2421,7 +2403,7 @@ cc_display_panel_init (CcDisplayPanel *self)
priv->displays_listbox = gtk_list_box_new ();
gtk_list_box_set_header_func (GTK_LIST_BOX (priv->displays_listbox),
- cc_display_panel_list_box_update_header, NULL,
+ cc_list_box_update_header_func, NULL,
NULL);
g_signal_connect (priv->displays_listbox, "row-activated",
G_CALLBACK (cc_display_panel_box_row_activated),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]