Work around peditor bug that resets the port when we start up for the
Tue Aug 26 15:00:34 2003 Jonathan Blandford <jrb@redhat.com> * gnome-network-preferences.c (setup_dialog): Work around peditor bug that resets the port when we start up for the first time, #120111
This commit is contained in:
parent
c147f80298
commit
ee02657f62
3 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Tue Aug 26 15:00:34 2003 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
|
* gnome-network-preferences.c (setup_dialog): Work around peditor
|
||||||
|
bug that resets the port when we start up for the first time,
|
||||||
|
#120111
|
||||||
|
|
||||||
2003-07-18 Dennis Cranston <dennis_cranston at yahoo com>
|
2003-07-18 Dennis Cranston <dennis_cranston at yahoo com>
|
||||||
|
|
||||||
* gnome-network-capplet.png: New file.
|
* gnome-network-capplet.png: New file.
|
||||||
|
|
|
@ -208,10 +208,16 @@ setup_dialog (GladeXML *dialog)
|
||||||
GConfPropertyEditor *peditor;
|
GConfPropertyEditor *peditor;
|
||||||
GSList *mode_group;
|
GSList *mode_group;
|
||||||
GType mode_type = 0;
|
GType mode_type = 0;
|
||||||
|
GConfClient *client;
|
||||||
|
gint port_value;
|
||||||
|
|
||||||
mode_type = g_enum_register_static ("NetworkPreferencesProxyType",
|
mode_type = g_enum_register_static ("NetworkPreferencesProxyType",
|
||||||
proxytype_values);
|
proxytype_values);
|
||||||
|
|
||||||
|
/* There's a bug in peditors that cause them to not initialize the entry
|
||||||
|
* correctly. */
|
||||||
|
client = gconf_client_get_default ();
|
||||||
|
|
||||||
/* Hackety hack */
|
/* 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 ("none_radiobutton"))->child), TRUE);
|
||||||
gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (WID ("manual_radiobutton"))->child), TRUE);
|
gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (WID ("manual_radiobutton"))->child), TRUE);
|
||||||
|
@ -226,6 +232,8 @@ setup_dialog (GladeXML *dialog)
|
||||||
TRUE, NULL));
|
TRUE, NULL));
|
||||||
|
|
||||||
/* Http */
|
/* Http */
|
||||||
|
port_value = gconf_client_get_int (client, HTTP_PROXY_PORT_KEY, NULL);
|
||||||
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (WID ("http_port_spinbutton")), (gdouble) port_value);
|
||||||
peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
|
peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
|
||||||
NULL, HTTP_PROXY_HOST_KEY, WID ("http_host_entry"),
|
NULL, HTTP_PROXY_HOST_KEY, WID ("http_host_entry"),
|
||||||
"conv-from-widget-cb", extract_proxy_host,
|
"conv-from-widget-cb", extract_proxy_host,
|
||||||
|
@ -239,6 +247,8 @@ setup_dialog (GladeXML *dialog)
|
||||||
WID ("network_dialog"));
|
WID ("network_dialog"));
|
||||||
|
|
||||||
/* Secure */
|
/* Secure */
|
||||||
|
port_value = gconf_client_get_int (client, SECURE_PROXY_PORT_KEY, NULL);
|
||||||
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (WID ("secure_port_spinbutton")), (gdouble) port_value);
|
||||||
peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
|
peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
|
||||||
NULL, SECURE_PROXY_HOST_KEY, WID ("secure_host_entry"),
|
NULL, SECURE_PROXY_HOST_KEY, WID ("secure_host_entry"),
|
||||||
"conv-from-widget-cb", extract_proxy_host,
|
"conv-from-widget-cb", extract_proxy_host,
|
||||||
|
@ -248,6 +258,8 @@ setup_dialog (GladeXML *dialog)
|
||||||
NULL));
|
NULL));
|
||||||
|
|
||||||
/* Ftp */
|
/* Ftp */
|
||||||
|
port_value = gconf_client_get_int (client, FTP_PROXY_PORT_KEY, NULL);
|
||||||
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (WID ("ftp_port_spinbutton")), (gdouble) port_value);
|
||||||
peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
|
peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
|
||||||
NULL, FTP_PROXY_HOST_KEY, WID ("ftp_host_entry"),
|
NULL, FTP_PROXY_HOST_KEY, WID ("ftp_host_entry"),
|
||||||
"conv-from-widget-cb", extract_proxy_host,
|
"conv-from-widget-cb", extract_proxy_host,
|
||||||
|
@ -257,6 +269,8 @@ setup_dialog (GladeXML *dialog)
|
||||||
NULL));
|
NULL));
|
||||||
|
|
||||||
/* Socks */
|
/* Socks */
|
||||||
|
port_value = gconf_client_get_int (client, SOCKS_PROXY_PORT_KEY, NULL);
|
||||||
|
gtk_spin_button_set_value (GTK_SPIN_BUTTON (WID ("socks_port_spinbutton")), (gdouble) port_value);
|
||||||
peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
|
peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
|
||||||
NULL, SOCKS_PROXY_HOST_KEY, WID ("socks_host_entry"),
|
NULL, SOCKS_PROXY_HOST_KEY, WID ("socks_host_entry"),
|
||||||
"conv-from-widget-cb", extract_proxy_host,
|
"conv-from-widget-cb", extract_proxy_host,
|
||||||
|
|
|
@ -862,7 +862,7 @@
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="editable">True</property>
|
<property name="editable">True</property>
|
||||||
<property name="visibility">True</property>
|
<property name="visibility">False</property>
|
||||||
<property name="max_length">0</property>
|
<property name="max_length">0</property>
|
||||||
<property name="text" translatable="yes"></property>
|
<property name="text" translatable="yes"></property>
|
||||||
<property name="has_frame">True</property>
|
<property name="has_frame">True</property>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue