[gnome-control-center] Update the ignored hosts list when the location changes (bug #581472)
- From: Jens Granseuer <jensg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Update the ignored hosts list when the location changes (bug #581472)
- Date: Sun, 23 Aug 2009 08:01:07 +0000 (UTC)
commit 9e84e0ac38851a06d3afa5344f0b111a0126d87f
Author: Maxim Ermilov <zaspire rambler ru>
Date: Sun Aug 23 10:00:08 2009 +0200
Update the ignored hosts list when the location changes (bug #581472)
capplets/network/gnome-network-properties.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/capplets/network/gnome-network-properties.c b/capplets/network/gnome-network-properties.c
index d874146..9170535 100644
--- a/capplets/network/gnome-network-properties.c
+++ b/capplets/network/gnome-network-properties.c
@@ -1108,6 +1108,19 @@ connect_sensitivity_signals (GtkBuilder *builder, GSList *mode_group)
}
static void
+cb_ignore_hosts_gconf_changed (GConfClient *client, guint cnxn_id,
+ GConfEntry *entry, gpointer user_data)
+{
+ g_slist_foreach (ignore_hosts, (GFunc) g_free, NULL);
+ g_slist_free (ignore_hosts);
+
+ ignore_hosts = gconf_client_get_list (client, IGNORE_HOSTS_KEY,
+ GCONF_VALUE_STRING, NULL);
+
+ populate_listmodel (GTK_LIST_STORE (model), ignore_hosts);
+}
+
+static void
setup_dialog (GtkBuilder *builder)
{
GConfPropertyEditor *peditor;
@@ -1135,6 +1148,8 @@ setup_dialog (GtkBuilder *builder)
gconf_client_add_dir (client, LOCATION_DIR, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
gconf_client_notify_add (client, CURRENT_LOCATION, (GConfClientNotifyFunc) cb_current_location, builder, NULL, NULL);
+ gconf_client_notify_add (client, IGNORE_HOSTS_KEY, cb_ignore_hosts_gconf_changed, NULL, NULL, NULL);
+
g_signal_connect (location_box, "changed", G_CALLBACK (cb_location_changed), builder);
g_signal_connect (gtk_builder_get_object (builder, "delete_button"), "clicked", G_CALLBACK (cb_delete_button_clicked), builder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]