[gnome-control-center/gnome-3-2] info: Split the hostname setting
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-2] info: Split the hostname setting
- Date: Sun, 18 Sep 2011 13:16:04 +0000 (UTC)
commit 20623a5ff4511a64576f9ebaa0337e7e1057bca5
Author: Bastien Nocera <hadess hadess net>
Date: Sun Sep 18 13:49:07 2011 +0100
info: Split the hostname setting
Into a separate function.
panels/info/cc-info-panel.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
index ee8c5b2..04216cd 100644
--- a/panels/info/cc-info-panel.c
+++ b/panels/info/cc-info-panel.c
@@ -1076,16 +1076,13 @@ info_panel_get_hostname (CcInfoPanel *self)
}
static void
-text_changed_cb (GtkEntry *entry,
- CcInfoPanel *self)
+info_panel_set_hostname (CcInfoPanel *self,
+ const char *text)
{
- const char *text;
char *hostname;
GVariant *variant;
GError *error = NULL;
- text = gtk_entry_get_text (GTK_ENTRY (entry));
-
variant = g_dbus_proxy_call_sync (self->priv->hostnamed_proxy,
"SetPrettyHostname",
g_variant_new ("(sb)", text, FALSE),
@@ -1123,6 +1120,16 @@ text_changed_cb (GtkEntry *entry,
}
static void
+text_changed_cb (GtkEntry *entry,
+ CcInfoPanel *self)
+{
+ const char *text;
+
+ text = gtk_entry_get_text (GTK_ENTRY (entry));
+ info_panel_set_hostname (self, text);
+}
+
+static void
info_panel_setup_hostname (CcInfoPanel *self,
GPermission *permission)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]