diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c index ba3a15a0e..1d405618e 100644 --- a/panels/info/cc-info-panel.c +++ b/panels/info/cc-info-panel.c @@ -1567,16 +1567,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), @@ -1613,6 +1610,16 @@ text_changed_cb (GtkEntry *entry, g_free (hostname); } +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)