Index: capplets/network/gnome-network-preferences.glade
===================================================================
--- capplets/network/gnome-network-preferences.glade	(revision 8870)
+++ capplets/network/gnome-network-preferences.glade	(working copy)
@@ -21,11 +21,55 @@
   <property name="urgency_hint">False</property>
   <property name="has_separator">False</property>
 
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox1">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">2</property>
+      <child internal-child="vbox">
+	<widget class="GtkVBox" id="dialog-vbox1">
+	<property name="visible">True</property>
+	<property name="homogeneous">False</property>
+	<property name="spacing">2</property>
+	  <child>
+		<widget class="GtkHBox" id="hbox2">
+		  <property name="visible">True</property>
+		  <property name="spacing">3</property>
+		  <child>
+			<widget class="GtkLabel" id="label1">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Location:</property>
+			  <property name="xalign">1</property>
+			</widget>
+			<packing>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		  </child>
+		  <child>
+			<widget class="GtkComboBox" id="location_combobox">
+			  <property name="visible">True</property>
+			  <property name="items"> </property>
+			</widget>
+			<packing>
+			  <property name="position">1</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		  </child>
+		  <child>
+			<widget class="GtkLabel" id="label2">
+			  <property name="visible">True</property>
+			  <property name="label"></property>
+			  <property name="xalign">1</property>
+			</widget>
+			<packing>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		  <property name="position">1</property>
+		</packing>
+	..</child>
 
       <child internal-child="action_area">
 	<widget class="GtkHButtonBox" id="dialog-action_area1">
@@ -44,8 +88,61 @@
 	      <property name="response_id">-11</property>
 	    </widget>
 	  </child>
-
 	  <child>
+		<widget class="GtkButton" id="delete_button">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <child>
+			<widget class="GtkHBox" id="hbox5">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">2</property>
+			  <child>
+				<widget class="GtkImage" id="image1">
+				  <property name="visible">True</property>
+				  <property name="stock">gtk-delete</property>
+				  <property name="icon_size">4</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			  </child>
+			  <child>
+				<widget class="GtkLabel" id="label23">
+				  <property name="visible">True</property>
+				  <property name="label">Delete Location</property>
+				  <property name="use_underline">True</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			  </child>
+			</widget>
+		  </child>
+		  
+		</widget>
+	  </child>
+	  <child>
 	    <widget class="GtkButton" id="closebutton1">
 	      <property name="visible">True</property>
 	      <property name="can_default">True</property>
Index: capplets/network/gnome-network-preferences.c
===================================================================
--- capplets/network/gnome-network-preferences.c	(revision 8870)
+++ capplets/network/gnome-network-preferences.c	(working copy)
@@ -68,6 +68,8 @@
 #define SOCKS_PROXY_PORT_KEY  "/system/proxy/socks_port"
 #define OLD_SOCKS_PROXY_PORT_KEY  "/system/proxy/old_socks_port"
 #define PROXY_AUTOCONFIG_URL_KEY  "/system/proxy/autoconfig_url"
+#define LOCATION_DIR "/apps/control-center/network"
+#define CURRENT_LOCATION "/apps/control-center/network/clocation"
 
 static GtkWidget *details_dialog = NULL;
 static GSList *ignore_hosts = NULL;
@@ -180,7 +182,7 @@
 		capplet_help (GTK_WINDOW (dialog),
 			"user-guide.xml",
 			"goscustdesk-50");
-	else
+	if (response_id == GTK_RESPONSE_CLOSE || response_id == GTK_RESPONSE_DELETE_EVENT)
 	{
 		if (ignore_hosts) {
 			g_slist_foreach (ignore_hosts, (GFunc) g_free, NULL);
@@ -258,6 +260,407 @@
 }
 
 static void
+copy_location (gchar* from,gchar *to,GConfClient* client)
+{
+	int ti;
+	gboolean tb;
+	GSList *tl;
+	gchar *tstr, *dest, *fk;
+	/*USE_PROXY_KEY*/
+	dest = g_strconcat (to, USE_PROXY_KEY, NULL);
+	fk = g_strconcat (from, USE_PROXY_KEY, NULL);
+
+	tb = gconf_client_get_bool (client, fk, NULL);
+	gconf_client_set_bool (client, dest, tb, NULL);
+
+	g_free(dest);
+	g_free(fk);
+
+	/*USE_SAME_PROXY_KEY*/
+	dest = g_strconcat (to, USE_SAME_PROXY_KEY, NULL);
+	fk = g_strconcat (from, USE_SAME_PROXY_KEY, NULL);
+
+	tb = gconf_client_get_bool (client, fk, NULL);
+	gconf_client_set_bool (client, dest, tb, NULL);
+
+	g_free(dest);
+	g_free(fk);
+
+	/*HTTP_PROXY_HOST_KEY*/
+	dest = g_strconcat (to, HTTP_PROXY_HOST_KEY, NULL);
+	fk = g_strconcat (from, HTTP_PROXY_HOST_KEY, NULL);
+
+	tstr = gconf_client_get_string (client, fk, NULL);
+	gconf_client_set_string (client, dest, tstr, NULL);
+	g_free (tstr);
+
+	g_free(dest);
+	g_free(fk);
+
+	/*HTTP_PROXY_PORT_KEY*/
+	dest = g_strconcat (to, HTTP_PROXY_PORT_KEY, NULL);
+	fk = g_strconcat (from, HTTP_PROXY_PORT_KEY, NULL);
+
+	ti = gconf_client_get_int (client, fk, NULL);
+	gconf_client_set_int (client, dest, ti, NULL);
+
+	g_free(dest);
+	g_free(fk);
+
+	/*HTTP_USE_AUTH_KEY*/
+	dest = g_strconcat (to, HTTP_USE_AUTH_KEY, NULL);
+	fk = g_strconcat (from, HTTP_USE_AUTH_KEY, NULL);
+
+	tb = gconf_client_get_bool (client, fk, NULL);
+	gconf_client_set_bool (client, dest, tb, NULL);
+
+	g_free(dest);
+	g_free(fk);
+
+	/*HTTP_AUTH_USER_KEY*/
+	dest = g_strconcat (to, HTTP_USE_AUTH_KEY, NULL);
+	fk = g_strconcat (from, HTTP_USE_AUTH_KEY, NULL);
+
+	tb = gconf_client_get_bool (client, fk, NULL);
+	gconf_client_set_bool (client, dest, tb, NULL);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*HTTP_AUTH_PASSWD_KEY*/
+	dest = g_strconcat (to, HTTP_AUTH_PASSWD_KEY, NULL);
+	fk = g_strconcat (from, HTTP_AUTH_PASSWD_KEY, NULL);
+
+	tstr = gconf_client_get_string (client, fk, NULL);
+	gconf_client_set_string (client, dest, tstr, NULL);
+	g_free (tstr);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*IGNORE_HOSTS_KEY*/
+	dest = g_strconcat (to, IGNORE_HOSTS_KEY, NULL);
+	fk = g_strconcat (from, IGNORE_HOSTS_KEY, NULL);
+
+	tl = gconf_client_get_list (client, fk, GCONF_VALUE_STRING, NULL);
+	gconf_client_set_list (client, dest, GCONF_VALUE_STRING, tl, NULL);
+	g_slist_foreach ( tl, (GFunc) g_free, NULL);
+	g_slist_free (tl);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*PROXY_MODE_KEY*/
+	dest = g_strconcat (to, PROXY_MODE_KEY,NULL);
+	fk = g_strconcat (from, PROXY_MODE_KEY, NULL);
+
+	tstr = gconf_client_get_string (client, fk, NULL);
+	gconf_client_set_string (client, dest, tstr, NULL);
+	g_free (tstr);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*SECURE_PROXY_HOST_KEY*/
+	dest = g_strconcat (to, SECURE_PROXY_HOST_KEY, NULL);
+	fk = g_strconcat (from, SECURE_PROXY_HOST_KEY, NULL);
+
+	tstr = gconf_client_get_string (client, fk, NULL);
+	gconf_client_set_string (client, dest, tstr, NULL);
+	g_free (tstr);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*OLD_SECURE_PROXY_HOST_KEY*/
+	dest = g_strconcat (to, OLD_SECURE_PROXY_HOST_KEY, NULL);
+	fk = g_strconcat (from, OLD_SECURE_PROXY_HOST_KEY, NULL);
+
+	tstr = gconf_client_get_string (client, fk, NULL);
+	if (tstr != NULL) gconf_client_set_string (client, dest, tstr, NULL);
+	g_free (tstr);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*SECURE_PROXY_PORT_KEY*/
+	dest = g_strconcat (to, SECURE_PROXY_PORT_KEY, NULL);
+	fk = g_strconcat (from, SECURE_PROXY_PORT_KEY, NULL);
+
+	ti = gconf_client_get_int (client, fk, NULL);
+	gconf_client_set_int (client, dest, ti, NULL);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*OLD_SECURE_PROXY_PORT_KEY*/
+	dest = g_strconcat (to, OLD_SECURE_PROXY_PORT_KEY, NULL);
+	fk = g_strconcat (from, OLD_SECURE_PROXY_PORT_KEY, NULL);
+
+	ti = gconf_client_get_int (client, fk, NULL);
+	gconf_client_set_int (client, dest, ti, NULL);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*FTP_PROXY_HOST_KEY*/
+	dest = g_strconcat (to, FTP_PROXY_HOST_KEY, NULL);
+	fk = g_strconcat (from, FTP_PROXY_HOST_KEY, NULL);
+
+	tstr = gconf_client_get_string (client, fk, NULL);
+	gconf_client_set_string (client, dest, tstr, NULL);
+	g_free (tstr);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*OLD_FTP_PROXY_HOST_KEY*/
+	dest = g_strconcat (to, OLD_FTP_PROXY_HOST_KEY, NULL);
+	fk = g_strconcat (from, OLD_FTP_PROXY_HOST_KEY, NULL);
+
+	tstr = gconf_client_get_string (client, fk, NULL);
+	if (tstr != NULL) gconf_client_set_string (client, dest, tstr, NULL);
+	g_free (tstr);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*FTP_PROXY_PORT_KEY*/
+	dest = g_strconcat (to, FTP_PROXY_PORT_KEY, NULL);
+	fk = g_strconcat (from, FTP_PROXY_PORT_KEY, NULL);
+
+	ti = gconf_client_get_int (client, fk, NULL);
+	gconf_client_set_int (client, dest, ti, NULL);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*OLD_FTP_PROXY_PORT_KEY*/
+	dest = g_strconcat (to, OLD_FTP_PROXY_PORT_KEY, NULL);
+	fk = g_strconcat (from, OLD_FTP_PROXY_PORT_KEY, NULL);
+
+	ti = gconf_client_get_int (client, fk, NULL);
+	gconf_client_set_int (client, dest, ti, NULL);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*SOCKS_PROXY_HOST_KEY*/
+	dest = g_strconcat (to, SOCKS_PROXY_HOST_KEY, NULL);
+	fk = g_strconcat (from, SOCKS_PROXY_HOST_KEY, NULL);
+
+	tstr = gconf_client_get_string (client, fk, NULL);
+	gconf_client_set_string (client, dest, tstr, NULL);
+	g_free (tstr);
+
+	g_free	(dest);
+	g_free (fk);
+
+	/*OLD_SOCKS_PROXY_HOST_KEY*/
+	dest = g_strconcat (to, OLD_SOCKS_PROXY_HOST_KEY, NULL);
+	fk = g_strconcat (from, OLD_SOCKS_PROXY_HOST_KEY, NULL);
+
+	tstr = gconf_client_get_string (client, fk, NULL);
+	if (tstr != NULL) gconf_client_set_string (client, dest, tstr, NULL);
+	g_free (tstr);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*SOCKS_PROXY_PORT_KEY*/
+	dest = g_strconcat (to, SOCKS_PROXY_PORT_KEY, NULL);
+	fk = g_strconcat (from, SOCKS_PROXY_PORT_KEY, NULL);
+
+	ti = gconf_client_get_int (client, fk, NULL);
+	gconf_client_set_int (client, dest, ti, NULL);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*OLD_SOCKS_PROXY_PORT_KEY*/
+	dest = g_strconcat (to, OLD_SOCKS_PROXY_PORT_KEY, NULL);
+	fk = g_strconcat (from, OLD_SOCKS_PROXY_PORT_KEY, NULL);
+
+	ti = gconf_client_get_int (client, fk, NULL);
+	gconf_client_set_int (client, dest, ti, NULL);
+
+	g_free (dest);
+	g_free (fk);
+
+	/*PROXY_AUTOCONFIG_URL_KEY*/
+	dest = g_strconcat (to, PROXY_AUTOCONFIG_URL_KEY, NULL);
+	fk = g_strconcat (from, PROXY_AUTOCONFIG_URL_KEY, NULL);
+
+	tstr = gconf_client_get_string (client, fk, NULL);
+	gconf_client_set_string (client, dest, tstr, NULL);
+	g_free (tstr);
+
+	g_free (dest);
+	g_free (fk);
+}
+
+static void
+save_location (GConfClient *client,gchar* key)
+{
+	copy_location("", key, client);
+	gconf_client_notify (client, LOCATION_DIR);
+}
+
+static void
+location_new (GladeXML *dialog)
+{
+	GConfClient* client=gconf_client_get_default();
+	GtkWidget *askdialog, *text, *content_area;
+	askdialog = gtk_dialog_new_with_buttons ( _("Save As"),
+	                                         NULL,
+	                                         GTK_DIALOG_DESTROY_WITH_PARENT,
+	                                         GTK_STOCK_OK,
+	                                         GTK_RESPONSE_OK,
+	                                         GTK_STOCK_CANCEL,
+	                                         GTK_RESPONSE_CANCEL,
+	                                         NULL);
+	content_area = gtk_dialog_get_content_area (GTK_DIALOG (askdialog));
+	text = gtk_entry_new ();
+	gtk_widget_show (text);
+	gtk_container_add (GTK_CONTAINER (content_area), text);
+	if (gtk_dialog_run (GTK_DIALOG(askdialog)) == GTK_RESPONSE_OK)
+	{
+		gchar* key_name = NULL;
+		key_name = g_strconcat (LOCATION_DIR, "/", gtk_entry_get_text (GTK_ENTRY (text)), NULL);
+		if ( gconf_valid_key (key_name,NULL) )
+		{
+			save_location (client, key_name);
+			gconf_client_set_string (client, CURRENT_LOCATION, gtk_entry_get_text (GTK_ENTRY (text)), NULL);
+		}
+		else
+		{
+			GtkDialog *dialog=GTK_DIALOG (gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CANCEL, _("Incorrect location name")));
+			g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
+			gtk_dialog_run (dialog);
+			gconf_client_notify (client, CURRENT_LOCATION);
+		}
+		g_free (key_name);
+	}
+	gtk_widget_destroy (text);
+	gtk_widget_destroy (askdialog);
+	g_object_unref (client);
+}
+
+static void
+location_save_cb(GConfClient *client,
+			  guint cnxn_id,
+			  GConfEntry *entry,
+			  GladeXML *dialog)
+{
+	gchar* name = gconf_client_get_string (client, CURRENT_LOCATION, NULL);
+	gchar* key;
+	if (name == NULL) return;
+	key = g_strconcat (LOCATION_DIR, "/", name, NULL);
+	save_location (client, key);
+	g_free (key);
+	g_free (name);
+}
+
+static void
+cb_change_location_dir(GConfClient *client,
+						guint cnxn_id,
+						GConfEntry *entry,
+						GladeXML *dialog)
+{
+	int i,k;
+	gchar* current = gconf_client_get_string (client, CURRENT_LOCATION, NULL);
+	GtkComboBox *location = GTK_COMBO_BOX (WID ("location_combobox"));
+	GSList *list = gconf_client_all_dirs (client, LOCATION_DIR, NULL);
+	GSList *iter;
+	/*Clear GtkComboBox*/
+	gtk_combo_box_set_active (location, -1);
+	i = gtk_tree_model_iter_n_children (gtk_combo_box_get_model (location), NULL);
+	while (i>=0)
+	{
+		gtk_combo_box_remove_text (location, i);
+		i--;
+	}
+
+	gtk_combo_box_append_text (location, _("New Location..."));
+	gtk_combo_box_append_text (location, "Default");
+	for ( i = 2, k = 0, iter = list ; iter != NULL ; iter = g_slist_next(iter), i++ )
+	{
+		if ( strcmp ("Default",((gchar*)iter->data + strlen (LOCATION_DIR) + 1)) == 0)
+		{
+			i--;
+			continue;
+		}
+		gtk_combo_box_append_text (location, ((gchar*)iter->data + strlen (LOCATION_DIR) + 1));
+		if ( current != NULL && strcmp (((gchar*)iter->data + strlen (LOCATION_DIR) + 1), current) == 0)
+		{
+			gtk_combo_box_set_active (location, i);
+			k = 1;
+		}
+	}
+	if (k == 0) gtk_combo_box_set_active (location, 1);
+	g_free (current);
+	g_slist_foreach (list, (GFunc)gconf_entry_free, NULL);
+	g_slist_free (list);
+}
+
+static void
+cb_location_changed (GtkWidget *location,
+						 GladeXML *dialog)
+{
+	gchar *str;
+	GConfClient* client;
+	gchar* name = gtk_combo_box_get_active_text (GTK_COMBO_BOX (location));
+	gchar* current;
+	if (name == NULL) return;
+	client = gconf_client_get_default ();
+	current = gconf_client_get_string (client, CURRENT_LOCATION, NULL);
+	if (strcmp (name, _("New Location...")) == 0) location_new (dialog);
+	else
+	{
+		str=g_strconcat (LOCATION_DIR, "/", name, NULL);
+		if ( gconf_valid_key (str,NULL) )
+		{
+			if ( strcmp(current,name) != 0)
+			{
+				gconf_client_set_string (client, CURRENT_LOCATION, name, NULL);
+				copy_location (str, "", client);
+			}
+		}
+		else location_new (dialog);
+		g_free (str);
+	}
+	g_free (current);
+	g_free (name);
+	g_object_unref (client);
+}
+
+static void
+cb_delete_button_clicked (GtkWidget *deletebutton,
+						  GladeXML *dialog)
+{
+	gchar* str;
+	GConfClient* client = gconf_client_get_default ();
+	gchar* name = gtk_combo_box_get_active_text (GTK_COMBO_BOX (WID ("location_combobox")));
+
+	str = g_strconcat (LOCATION_DIR, "/", name, NULL);
+	if ( gconf_valid_key(str, NULL) )
+	{
+		if ( strcmp ("Default", name) != 0 )
+		{
+			gconf_client_recursive_unset (client, str, GCONF_UNSET_INCLUDING_SCHEMA_NAMES, NULL);
+			gconf_client_suggest_sync (client, NULL);
+			gconf_client_set_string(client, CURRENT_LOCATION, "Default", NULL);
+			copy_location (LOCATION_DIR"/""Default", "", client);
+		}
+	}
+	gconf_client_notify (client, LOCATION_DIR);
+
+	g_free (str);
+	g_free (name);
+	g_object_unref (client);
+}
+
+static void
 cb_use_same_proxy_checkbutton_clicked (GtkWidget *checkbutton,
 					GladeXML *dialog)
 {
@@ -445,7 +848,36 @@
 	/* There's a bug in peditors that cause them to not initialize the entry
 	 * correctly. */
 	client = gconf_client_get_default ();
+	/*Locations*/
+	cb_change_location_dir(client,0,NULL,dialog);
 
+	gconf_client_notify_add (client, USE_PROXY_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, USE_SAME_PROXY_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, HTTP_PROXY_HOST_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, HTTP_PROXY_PORT_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, HTTP_USE_AUTH_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, HTTP_AUTH_USER_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, HTTP_AUTH_PASSWD_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, IGNORE_HOSTS_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, PROXY_MODE_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, SECURE_PROXY_HOST_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, OLD_SECURE_PROXY_HOST_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, SECURE_PROXY_PORT_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, OLD_SECURE_PROXY_PORT_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, FTP_PROXY_HOST_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, OLD_FTP_PROXY_HOST_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, FTP_PROXY_PORT_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, OLD_FTP_PROXY_PORT_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, SOCKS_PROXY_HOST_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, OLD_SOCKS_PROXY_HOST_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, SOCKS_PROXY_PORT_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, OLD_SOCKS_PROXY_PORT_KEY, location_save_cb, dialog, NULL, NULL);
+	gconf_client_notify_add (client, PROXY_AUTOCONFIG_URL_KEY, location_save_cb, dialog, NULL, NULL);
+
+	gconf_client_notify_add (client, LOCATION_DIR, cb_change_location_dir, dialog, NULL, NULL);
+	gconf_client_notify_add (client, CURRENT_LOCATION, cb_change_location_dir, dialog, NULL, NULL);
+	g_signal_connect (WID ("location_combobox"), "changed", G_CALLBACK (cb_location_changed), dialog);
+	g_signal_connect (WID ("delete_button"), "clicked", G_CALLBACK (cb_delete_button_clicked), dialog);
 	/* Hackety hack */
 	gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (WID ("none_radiobutton"))->child), TRUE);
 	gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (WID ("manual_radiobutton"))->child), TRUE);
@@ -573,6 +1005,8 @@
 			      GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
 	gconf_client_add_dir (client, "/system/proxy",
 			      GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+	gconf_client_add_dir (client, LOCATION_DIR,
+			      GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
 
 	dialog = glade_xml_new (GNOMECC_GLADE_DIR "/gnome-network-preferences.glade",
 				"network_dialog", NULL);
