[gnome-control-center] network: Add some more widget setting common code
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Add some more widget setting common code
- Date: Tue, 17 Jul 2012 15:58:47 +0000 (UTC)
commit 00c51443ae596b7e024b175e8c9f047c42fe5738
Author: Richard Hughes <richard hughsie com>
Date: Tue Jul 17 16:15:13 2012 +0100
network: Add some more widget setting common code
panels/network/panel-common.c | 20 ++++++++++++++++++++
panels/network/panel-common.h | 3 +++
2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/panel-common.c b/panels/network/panel-common.c
index 1321ae3..4c3e908 100644
--- a/panels/network/panel-common.c
+++ b/panels/network/panel-common.c
@@ -507,3 +507,23 @@ panel_set_device_widget_details (GtkBuilder *builder,
}
return TRUE;
}
+
+
+gboolean
+panel_set_device_widget_header (GtkBuilder *builder,
+ const gchar *widget_suffix,
+ const gchar *heading)
+{
+ gchar *label_id = NULL;
+ GtkWidget *widget;
+
+ label_id = g_strdup_printf ("heading_%s", widget_suffix);
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, label_id));
+ if (widget == NULL) {
+ g_critical ("no widget %s found", label_id);
+ return FALSE;
+ }
+ gtk_label_set_label (GTK_LABEL (widget), heading);
+ g_free (label_id);
+ return TRUE;
+}
diff --git a/panels/network/panel-common.h b/panels/network/panel-common.h
index 3ad53e3..2e7902d 100644
--- a/panels/network/panel-common.h
+++ b/panels/network/panel-common.h
@@ -40,6 +40,9 @@ const gchar *panel_device_state_reason_to_localized_string (NMDevice *device
gboolean panel_set_device_widget_details (GtkBuilder *builder,
const gchar *widget_suffix,
const gchar *value);
+gboolean panel_set_device_widget_header (GtkBuilder *builder,
+ const gchar *widget_suffix,
+ const gchar *value);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]