network-manager-applet r1063 - in branches/NETWORKMANAGER_APPLET_0_7: . src/connection-editor



Author: dcbw
Date: Tue Dec  9 16:13:16 2008
New Revision: 1063
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=1063&view=rev

Log:
2008-12-09  Dan Williams  <dcbw redhat com>

	* src/connection-editor/ip4-routes-dialog.c
		- (ip4_routes_dialog_new, ip4_routes_dialog_update_setting): get and
			set never-default accordingly

	* src/connection-editor/ce-page-ip4.glade
		- Add never-default checkbox to the IP4 routes dialog



Modified:
   branches/NETWORKMANAGER_APPLET_0_7/ChangeLog
   branches/NETWORKMANAGER_APPLET_0_7/src/connection-editor/ce-page-ip4.glade
   branches/NETWORKMANAGER_APPLET_0_7/src/connection-editor/ip4-routes-dialog.c

Modified: branches/NETWORKMANAGER_APPLET_0_7/src/connection-editor/ce-page-ip4.glade
==============================================================================
--- branches/NETWORKMANAGER_APPLET_0_7/src/connection-editor/ce-page-ip4.glade	(original)
+++ branches/NETWORKMANAGER_APPLET_0_7/src/connection-editor/ce-page-ip4.glade	Tue Dec  9 16:13:16 2008
@@ -141,24 +141,40 @@
             <property name="column_spacing">6</property>
             <property name="row_spacing">6</property>
             <child>
-              <widget class="GtkEntry" id="ip4_dns_servers_entry">
+              <widget class="GtkEntry" id="ip4_dhcp_client_id_entry">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="tooltip_text">Example: 10.0.0.1, 10.0.0.2</property>
               </widget>
               <packing>
                 <property name="left_attach">1</property>
                 <property name="right_attach">2</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkEntry" id="ip4_dns_searches_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="tooltip_text">Example: lab.gnome.org, gnome.org</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
                 <property name="y_options"></property>
               </packing>
             </child>
             <child>
-              <widget class="GtkLabel" id="ip4_dns_servers_label">
+              <widget class="GtkLabel" id="ip4_dhcp_client_id_label">
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
-                <property name="label" translatable="yes">DNS Servers:</property>
+                <property name="label" translatable="yes">DHCP Client ID:</property>
               </widget>
               <packing>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
                 <property name="x_options">GTK_FILL</property>
                 <property name="y_options"></property>
               </packing>
@@ -177,44 +193,28 @@
               </packing>
             </child>
             <child>
-              <widget class="GtkLabel" id="ip4_dhcp_client_id_label">
+              <widget class="GtkLabel" id="ip4_dns_servers_label">
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
-                <property name="label" translatable="yes">DHCP Client ID:</property>
+                <property name="label" translatable="yes">DNS Servers:</property>
               </widget>
               <packing>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
                 <property name="x_options">GTK_FILL</property>
                 <property name="y_options"></property>
               </packing>
             </child>
             <child>
-              <widget class="GtkEntry" id="ip4_dns_searches_entry">
+              <widget class="GtkEntry" id="ip4_dns_servers_entry">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="tooltip_text">Example: lab.gnome.org, gnome.org</property>
+                <property name="tooltip_text">Example: 10.0.0.1, 10.0.0.2</property>
               </widget>
               <packing>
                 <property name="left_attach">1</property>
                 <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
                 <property name="y_options"></property>
               </packing>
             </child>
-            <child>
-              <widget class="GtkEntry" id="ip4_dhcp_client_id_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-              </packing>
-            </child>
           </widget>
           <packing>
             <property name="expand">False</property>
@@ -359,15 +359,37 @@
           </packing>
         </child>
         <child>
-          <widget class="GtkCheckButton" id="ip4_ignore_auto_routes">
+          <widget class="GtkVBox" id="vbox1">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="label" translatable="yes">Ignore automatically obtained routes</property>
-            <property name="response_id">0</property>
-            <property name="draw_indicator">True</property>
+            <property name="spacing">6</property>
+            <child>
+              <widget class="GtkCheckButton" id="ip4_ignore_auto_routes">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="label" translatable="yes">Ignore automatically obtained routes</property>
+                <property name="response_id">0</property>
+                <property name="draw_indicator">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkCheckButton" id="ip4_never_default">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="tooltip" translatable="yes">If enabled, this connection will never be used as the default network connection.</property>
+                <property name="label" translatable="yes">Use this connection only for resources on its network</property>
+                <property name="response_id">0</property>
+                <property name="draw_indicator">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
           </widget>
           <packing>
-            <property name="expand">False</property>
             <property name="position">2</property>
           </packing>
         </child>

Modified: branches/NETWORKMANAGER_APPLET_0_7/src/connection-editor/ip4-routes-dialog.c
==============================================================================
--- branches/NETWORKMANAGER_APPLET_0_7/src/connection-editor/ip4-routes-dialog.c	(original)
+++ branches/NETWORKMANAGER_APPLET_0_7/src/connection-editor/ip4-routes-dialog.c	Tue Dec  9 16:13:16 2008
@@ -358,6 +358,10 @@
 	                              nm_setting_ip4_config_get_ignore_auto_routes (s_ip4));
 	gtk_widget_set_sensitive (widget, automatic);
 
+	widget = glade_xml_get_widget (xml, "ip4_never_default");
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget),
+	                              nm_setting_ip4_config_get_never_default (s_ip4));
+
 	return dialog;
 }
 
@@ -525,5 +529,10 @@
 	g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES,
 	              gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)),
 	              NULL);
+
+	widget = glade_xml_get_widget (xml, "ip4_never_default");
+	g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_NEVER_DEFAULT,
+	              gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)),
+	              NULL);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]