network: add the manual proxy port spin buttons
This commit is contained in:
parent
a134e09848
commit
77e70598d9
2 changed files with 106 additions and 17 deletions
|
@ -619,7 +619,7 @@ panel_add_devices_columns (CcNetworkPanel *panel, GtkTreeView *treeview)
|
|||
|
||||
/* image */
|
||||
renderer = gtk_cell_renderer_pixbuf_new ();
|
||||
g_object_set (renderer, "stock-size", GTK_ICON_SIZE_DIALOG, NULL);
|
||||
g_object_set (renderer, "stock-size", GTK_ICON_SIZE_DND, NULL);
|
||||
column = gtk_tree_view_column_new_with_attributes ("", renderer,
|
||||
"icon-name", PANEL_COLUMN_ICON,
|
||||
NULL);
|
||||
|
@ -907,6 +907,7 @@ cc_network_panel_init (CcNetworkPanel *panel)
|
|||
GSettings *settings_tmp;
|
||||
GtkTreePath *path;
|
||||
GtkTreeSelection *selection;
|
||||
GtkAdjustment *adjustment;
|
||||
GtkWidget *widget;
|
||||
|
||||
panel->priv = NETWORK_PANEL_PRIVATE (panel);
|
||||
|
@ -961,36 +962,56 @@ cc_network_panel_init (CcNetworkPanel *panel)
|
|||
/* bind the proxy values */
|
||||
settings_tmp = g_settings_new ("org.gnome.system.proxy.http");
|
||||
widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
|
||||
"label_proxy_http"));
|
||||
"entry_proxy_http"));
|
||||
g_settings_bind (settings_tmp, "host",
|
||||
widget, "label",
|
||||
widget, "text",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
adjustment = GTK_ADJUSTMENT (gtk_builder_get_object (panel->priv->builder,
|
||||
"adjustment_proxy_port_http"));
|
||||
g_settings_bind (settings_tmp, "port",
|
||||
adjustment, "value",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
g_object_unref (settings_tmp);
|
||||
|
||||
/* bind the proxy values */
|
||||
settings_tmp = g_settings_new ("org.gnome.system.proxy.https");
|
||||
widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
|
||||
"label_proxy_https"));
|
||||
"entry_proxy_https"));
|
||||
g_settings_bind (settings_tmp, "host",
|
||||
widget, "label",
|
||||
widget, "text",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
adjustment = GTK_ADJUSTMENT (gtk_builder_get_object (panel->priv->builder,
|
||||
"adjustment_proxy_port_https"));
|
||||
g_settings_bind (settings_tmp, "port",
|
||||
adjustment, "value",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
g_object_unref (settings_tmp);
|
||||
|
||||
/* bind the proxy values */
|
||||
settings_tmp = g_settings_new ("org.gnome.system.proxy.ftp");
|
||||
widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
|
||||
"label_proxy_ftp"));
|
||||
"entry_proxy_ftp"));
|
||||
g_settings_bind (settings_tmp, "host",
|
||||
widget, "label",
|
||||
widget, "text",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
adjustment = GTK_ADJUSTMENT (gtk_builder_get_object (panel->priv->builder,
|
||||
"adjustment_proxy_port_ftp"));
|
||||
g_settings_bind (settings_tmp, "port",
|
||||
adjustment, "value",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
g_object_unref (settings_tmp);
|
||||
|
||||
/* bind the proxy values */
|
||||
settings_tmp = g_settings_new ("org.gnome.system.proxy.socks");
|
||||
widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
|
||||
"label_proxy_socks"));
|
||||
"entry_proxy_socks"));
|
||||
g_settings_bind (settings_tmp, "host",
|
||||
widget, "label",
|
||||
widget, "text",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
adjustment = GTK_ADJUSTMENT (gtk_builder_get_object (panel->priv->builder,
|
||||
"adjustment_proxy_port_socks"));
|
||||
g_settings_bind (settings_tmp, "port",
|
||||
adjustment, "value",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
g_object_unref (settings_tmp);
|
||||
|
||||
|
|
|
@ -1071,9 +1071,10 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_proxy_http">
|
||||
<object class="GtkEntry" id="entry_proxy_http">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">dave.lan</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -1081,6 +1082,17 @@
|
|||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="spinbutton_proxy_http">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="adjustment">adjustment_proxy_port_http</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -1115,9 +1127,10 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_proxy_https">
|
||||
<object class="GtkEntry" id="entry_proxy_https">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">dave.lan</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -1125,6 +1138,17 @@
|
|||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="spinbutton_proxy_https">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="adjustment">adjustment_proxy_port_https</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -1159,9 +1183,10 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_proxy_ftp">
|
||||
<object class="GtkEntry" id="entry_proxy_ftp">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">dave.lan</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -1169,6 +1194,17 @@
|
|||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="spinbutton_proxy_ftp">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="adjustment">adjustment_proxy_port_ftp</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -1203,9 +1239,10 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_proxy_socks">
|
||||
<object class="GtkEntry" id="entry_proxy_socks">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">dave.lan</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -1213,6 +1250,17 @@
|
|||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="spinbutton_proxy_socks">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="adjustment">adjustment_proxy_port_socks</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -1410,4 +1458,24 @@
|
|||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_proxy_port_http">
|
||||
<property name="lower">0</property>
|
||||
<property name="upper">65535</property>
|
||||
<property name="step_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_proxy_port_https">
|
||||
<property name="lower">0</property>
|
||||
<property name="upper">65535</property>
|
||||
<property name="step_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_proxy_port_ftp">
|
||||
<property name="lower">0</property>
|
||||
<property name="upper">65535</property>
|
||||
<property name="step_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_proxy_port_socks">
|
||||
<property name="lower">0</property>
|
||||
<property name="upper">65535</property>
|
||||
<property name="step_increment">1</property>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue