diff options
author | Maxim Ermilov <zaspire@rambler.ru> | 2009-08-23 10:00:08 +0200 |
---|---|---|
committer | Jens Granseuer <jensgr@gmx.net> | 2009-08-23 10:00:08 +0200 |
commit | 9e84e0ac38851a06d3afa5344f0b111a0126d87f (patch) | |
tree | d4b9607941ab73371f91b1d5131fb7667e741271 | |
parent | 56c3163a41e75dba74272085718d8540fe408193 (diff) | |
download | gnome-control-center-9e84e0ac38851a06d3afa5344f0b111a0126d87f.tar.gz |
Update the ignored hosts list when the location changes (bug #581472)
-rw-r--r-- | 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 d8741466f..91705351c 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); |