network-manager-applet r684 - in trunk: . src/connection-editor



Author: dcbw
Date: Thu Apr 17 15:24:37 2008
New Revision: 684
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=684&view=rev

Log:
2008-04-16  Dan Williams  <dcbw redhat com>

	* src/connection-editor/ce-page-wired.glade
	  src/connection-editor/ce-page-wireless.glade
	  src/connection-editor/page-wireless.c
		- Fix up option constraints on MTU, Rate, and TX power
		- Use "automatic" not "default"
		- Add units labels to MTU, Rate, and TX Power

	* src/connection-editor/nm-connection-editor.c
		- (ce_spin_output_with_default): use 'automatic' not 'default'



Modified:
   trunk/ChangeLog
   trunk/src/connection-editor/ce-page-wired.glade
   trunk/src/connection-editor/ce-page-wireless.glade
   trunk/src/connection-editor/nm-connection-editor.c
   trunk/src/connection-editor/page-wireless.c

Modified: trunk/src/connection-editor/ce-page-wired.glade
==============================================================================
--- trunk/src/connection-editor/ce-page-wired.glade	(original)
+++ trunk/src/connection-editor/ce-page-wired.glade	Thu Apr 17 15:24:37 2008
@@ -60,7 +60,7 @@
       <child>
 	<widget class="GtkComboBox" id="wired_port">
 	  <property name="visible">True</property>
-	  <property name="items" translatable="yes">default
+	  <property name="items" translatable="yes">Automatic
 Twisted Pair (TP)
 Attachment Unit Interface (AUI)
 BNC
@@ -109,7 +109,7 @@
       <child>
 	<widget class="GtkComboBox" id="wired_speed">
 	  <property name="visible">True</property>
-	  <property name="items" translatable="yes">default
+	  <property name="items" translatable="yes">Automatic
 10 Mb/s
 100 Mb/s
 1 Gb/s
@@ -229,40 +229,79 @@
       </child>
 
       <child>
-	<widget class="GtkSpinButton" id="wired_mtu">
+	<widget class="Custom" id="wired_mac_address">
 	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="climb_rate">1</property>
-	  <property name="digits">0</property>
-	  <property name="numeric">False</property>
-	  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-	  <property name="snap_to_ticks">False</property>
-	  <property name="wrap">False</property>
-	  <property name="adjustment">0 0 100 1 10 10</property>
+	  <property name="creation_function">create_byte_array_editor</property>
+	  <property name="int1">0</property>
+	  <property name="int2">0</property>
+	  <property name="last_modification_time">Wed, 29 Aug 2007 12:24:08 GMT</property>
 	</widget>
 	<packing>
 	  <property name="left_attach">1</property>
 	  <property name="right_attach">2</property>
-	  <property name="top_attach">5</property>
-	  <property name="bottom_attach">6</property>
-	  <property name="y_options"></property>
+	  <property name="top_attach">4</property>
+	  <property name="bottom_attach">5</property>
+	  <property name="x_options">expand|shrink|fill</property>
+	  <property name="y_options">fill</property>
 	</packing>
       </child>
 
       <child>
-	<widget class="Custom" id="wired_mac_address">
+	<widget class="GtkHBox" id="hbox1">
 	  <property name="visible">True</property>
-	  <property name="creation_function">create_byte_array_editor</property>
-	  <property name="int1">0</property>
-	  <property name="int2">0</property>
-	  <property name="last_modification_time">Wed, 29 Aug 2007 12:24:08 GMT</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkSpinButton" id="wired_mtu">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="climb_rate">1</property>
+	      <property name="digits">0</property>
+	      <property name="numeric">False</property>
+	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="snap_to_ticks">False</property>
+	      <property name="wrap">False</property>
+	      <property name="adjustment">0 0 10000 1 10 10</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label28">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">bytes</property>
+	      <property name="use_underline">False</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>
 	<packing>
 	  <property name="left_attach">1</property>
 	  <property name="right_attach">2</property>
-	  <property name="top_attach">4</property>
-	  <property name="bottom_attach">5</property>
-	  <property name="x_options">expand|shrink|fill</property>
+	  <property name="top_attach">5</property>
+	  <property name="bottom_attach">6</property>
+	  <property name="x_options">fill</property>
 	  <property name="y_options">fill</property>
 	</packing>
       </child>

Modified: trunk/src/connection-editor/ce-page-wireless.glade
==============================================================================
--- trunk/src/connection-editor/ce-page-wireless.glade	(original)
+++ trunk/src/connection-editor/ce-page-wireless.glade	Thu Apr 17 15:24:37 2008
@@ -136,7 +136,7 @@
       <child>
 	<widget class="GtkComboBox" id="wireless_band">
 	  <property name="visible">True</property>
-	  <property name="items" translatable="yes">default
+	  <property name="items" translatable="yes">Automatic
 A (5 GHz)
 B/G (2.4 GHz)</property>
 	  <property name="add_tearoffs">False</property>
@@ -290,48 +290,6 @@
       </child>
 
       <child>
-	<widget class="GtkSpinButton" id="wireless_rate">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="climb_rate">1</property>
-	  <property name="digits">0</property>
-	  <property name="numeric">False</property>
-	  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-	  <property name="snap_to_ticks">False</property>
-	  <property name="wrap">False</property>
-	  <property name="adjustment">0 0 100 1 10 10</property>
-	</widget>
-	<packing>
-	  <property name="left_attach">1</property>
-	  <property name="right_attach">2</property>
-	  <property name="top_attach">5</property>
-	  <property name="bottom_attach">6</property>
-	  <property name="y_options"></property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkSpinButton" id="wireless_tx_power">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="climb_rate">1</property>
-	  <property name="digits">0</property>
-	  <property name="numeric">False</property>
-	  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-	  <property name="snap_to_ticks">False</property>
-	  <property name="wrap">False</property>
-	  <property name="adjustment">0 0 100 1 10 10</property>
-	</widget>
-	<packing>
-	  <property name="left_attach">1</property>
-	  <property name="right_attach">2</property>
-	  <property name="top_attach">6</property>
-	  <property name="bottom_attach">7</property>
-	  <property name="y_options"></property>
-	</packing>
-      </child>
-
-      <child>
 	<widget class="GtkLabel" id="label35">
 	  <property name="visible">True</property>
 	  <property name="label" translatable="yes">_MAC address:</property>
@@ -390,27 +348,6 @@
       </child>
 
       <child>
-	<widget class="GtkSpinButton" id="wireless_mtu">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="climb_rate">1</property>
-	  <property name="digits">0</property>
-	  <property name="numeric">False</property>
-	  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-	  <property name="snap_to_ticks">False</property>
-	  <property name="wrap">False</property>
-	  <property name="adjustment">0 0 100 1 10 10</property>
-	</widget>
-	<packing>
-	  <property name="left_attach">1</property>
-	  <property name="right_attach">2</property>
-	  <property name="top_attach">8</property>
-	  <property name="bottom_attach">9</property>
-	  <property name="y_options"></property>
-	</packing>
-      </child>
-
-      <child>
 	<widget class="Custom" id="wireless_bssid">
 	  <property name="visible">True</property>
 	  <property name="creation_function">create_byte_array_editor</property>
@@ -463,6 +400,186 @@
 	  <property name="y_options"></property>
 	</packing>
       </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox2">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkSpinButton" id="wireless_rate">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="climb_rate">1</property>
+	      <property name="digits">0</property>
+	      <property name="numeric">False</property>
+	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="snap_to_ticks">False</property>
+	      <property name="wrap">False</property>
+	      <property name="adjustment">0 0 500 1 10 10</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="rate_units">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Mb/s</property>
+	      <property name="use_underline">False</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</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>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">5</property>
+	  <property name="bottom_attach">6</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox3">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkSpinButton" id="wireless_mtu">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="climb_rate">1</property>
+	      <property name="digits">0</property>
+	      <property name="numeric">False</property>
+	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="snap_to_ticks">False</property>
+	      <property name="wrap">False</property>
+	      <property name="adjustment">0 0 10000 1 10 10</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="mtu_units">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">bytes</property>
+	      <property name="use_underline">False</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</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>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">8</property>
+	  <property name="bottom_attach">9</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox1">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkSpinButton" id="wireless_tx_power">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="climb_rate">1</property>
+	      <property name="digits">0</property>
+	      <property name="numeric">False</property>
+	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="snap_to_ticks">False</property>
+	      <property name="wrap">False</property>
+	      <property name="adjustment">0 0 500 1 10 10</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="tx_power_units">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">mW</property>
+	      <property name="use_underline">False</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</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>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">6</property>
+	  <property name="bottom_attach">7</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
     </widget>
   </child>
 </widget>

Modified: trunk/src/connection-editor/nm-connection-editor.c
==============================================================================
--- trunk/src/connection-editor/nm-connection-editor.c	(original)
+++ trunk/src/connection-editor/nm-connection-editor.c	Thu Apr 17 15:24:37 2008
@@ -297,7 +297,7 @@
 
 	val = gtk_spin_button_get_value_as_int (spin);
 	if (val == defvalue)
-		buf = g_strdup (_("default"));
+		buf = g_strdup (_("automatic"));
 	else
 		buf = g_strdup_printf ("%d", val);
 

Modified: trunk/src/connection-editor/page-wireless.c
==============================================================================
--- trunk/src/connection-editor/page-wireless.c	(original)
+++ trunk/src/connection-editor/page-wireless.c	Thu Apr 17 15:24:37 2008
@@ -49,6 +49,8 @@
 	GtkSpinButton *tx_power;
 	GtkSpinButton *mtu;
 
+	GtkSizeGroup *group;
+
 	int last_channel;
 	gboolean disposed;
 } CEPageWirelessPrivate;
@@ -58,16 +60,28 @@
 {
 	CEPageWirelessPrivate *priv = CE_PAGE_WIRELESS_GET_PRIVATE (self);
 	GladeXML *xml;
+	GtkWidget *widget;
 
 	xml = CE_PAGE (self)->xml;
 
+	priv->group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+
 	priv->ssid     = GTK_ENTRY (glade_xml_get_widget (xml, "wireless_ssid"));
 	priv->mode     = GTK_COMBO_BOX (glade_xml_get_widget (xml, "wireless_mode"));
 	priv->band     = GTK_COMBO_BOX (glade_xml_get_widget (xml, "wireless_band"));
 	priv->channel  = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "wireless_channel"));
+
 	priv->rate     = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "wireless_rate"));
+	widget = glade_xml_get_widget (xml, "rate_units");
+	gtk_size_group_add_widget (priv->group, widget);
+
 	priv->tx_power = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "wireless_tx_power"));
+	widget = glade_xml_get_widget (xml, "tx_power_units");
+	gtk_size_group_add_widget (priv->group, widget);
+
 	priv->mtu      = GTK_SPIN_BUTTON (glade_xml_get_widget (xml, "wireless_mtu"));
+	widget = glade_xml_get_widget (xml, "mtu_units");
+	gtk_size_group_add_widget (priv->group, widget);
 }
 
 static gboolean



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