network-manager-applet r474 - in trunk: . src



Author: dcbw
Date: Thu Jan 24 19:11:30 2008
New Revision: 474
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=474&view=rev

Log:
2008-01-24  Dan Williams  <dcbw redhat com>

	Fix gnome.org #505899

	* src/applet.c
	  src/applet.h
		- (applet_find_active_connection_for_device): make public

	* src/applet-dialogs.c
		- (info_dialog_get_label): remove; use glade_xml_get_widget() instead
		- (set_eap_info_label): handle label creation for 802.1x and WPA
			Enterprise connections
		- (info_dialog_update): add a "Security" label that shows the security
			in use (wireless only for now); also hide the "Secondary DNS" label
			if there's only one DNS server.  Use glade_xml_get_widget() instead
			of info_dialog_get_label().
		- (applet_info_dialog_show): get the active connection for the active
			device and pass that on



Modified:
   trunk/ChangeLog
   trunk/src/applet-dialogs.c
   trunk/src/applet.c
   trunk/src/applet.glade
   trunk/src/applet.h

Modified: trunk/src/applet-dialogs.c
==============================================================================
--- trunk/src/applet-dialogs.c	(original)
+++ trunk/src/applet-dialogs.c	Thu Jan 24 19:11:30 2008
@@ -26,6 +26,11 @@
 
 #include <nm-device-802-3-ethernet.h>
 #include <nm-device-802-11-wireless.h>
+#include <nm-gsm-device.h>
+#include <nm-cdma-device.h>
+
+#include <nm-setting-wireless.h>
+#include <nm-setting-wireless-security.h>
 
 #include <gtk/gtk.h>
 #include <gtk/gtkwidget.h>
@@ -35,22 +40,6 @@
 #include "applet-dialogs.h"
 
 
-static GtkWidget *
-info_dialog_get_label (GtkWidget *info_dialog,
-                       GladeXML *xml,
-                       const char *name)
-{
-	GtkWidget *label;
-
-	if (xml != NULL) {
-		label = glade_xml_get_widget (xml, name);
-		g_object_set_data (G_OBJECT (info_dialog), name, label);
-	} else
-		label = g_object_get_data (G_OBJECT (info_dialog), name);
-
-	return label;
-}
-
 static void
 info_dialog_show_error (const char *err)
 {
@@ -74,11 +63,52 @@
 	return ip_string;
 }
 
+static void
+set_eap_info_label (GtkWidget *label, NMSettingWirelessSecurity *sec)
+{
+	GString *str = NULL;
+	char *phase2_str = NULL;
+
+	if (!strcmp (sec->key_mgmt, "ieee8021x"))
+		str = g_string_new (_("Dynamic WEP"));
+	else if (!strcmp (sec->key_mgmt, "wpa-eap"))
+		str = g_string_new (_("WPA/WPA2"));
+	else {
+		str = g_string_new (_("Unknown"));
+		goto out;
+	}
+
+	if (sec->eap && sec->eap->data) {
+		char *eap_str = g_ascii_strup (sec->eap->data, -1);
+		g_string_append (str, ", EAP-");
+		g_string_append (str, eap_str);
+		g_free (eap_str);
+	}
+
+	if (sec->phase2_auth)
+		phase2_str = g_ascii_strup (sec->phase2_auth, -1);
+	else if (sec->phase2_autheap)
+		phase2_str = g_ascii_strup (sec->phase2_autheap, -1);
+
+	if (phase2_str) {
+		g_string_append (str, ", ");
+		g_string_append (str, phase2_str);
+		g_free (phase2_str);
+	}
+	
+out:
+	gtk_label_set_text (GTK_LABEL (label), str->str);
+
+	g_free (phase2_str);
+	g_string_free (str, TRUE);
+}
+
 static GtkWidget *
-info_dialog_update (GladeXML *xml, NMDevice *device)
+info_dialog_update (GladeXML *xml, NMDevice *device, NMConnection *connection)
 {
 	GtkWidget *dialog;
 	GtkWidget *label;
+	GtkWidget *label2;
 	NMIP4Config *cfg;
 	guint32 speed;
 	char *str;
@@ -108,19 +138,67 @@
 
 	str = nm_device_get_iface (device);
 	if (NM_IS_DEVICE_802_3_ETHERNET (device))
-		iface_and_type = g_strdup_printf (_("Wired Ethernet (%s)"), str);
+		iface_and_type = g_strdup_printf (_("Ethernet (%s)"), str);
 	else if (NM_IS_DEVICE_802_11_WIRELESS (device))
-		iface_and_type = g_strdup_printf (_("Wireless Ethernet (%s)"), str);
+		iface_and_type = g_strdup_printf (_("802.11 WiFi (%s)"), str);
+	else if (NM_IS_GSM_DEVICE (device))
+		iface_and_type = g_strdup_printf (_("GSM (%s)"), str);
+	else if (NM_IS_CDMA_DEVICE (device))
+		iface_and_type = g_strdup_printf (_("CDMA (%s)"), str);
 	else
 		iface_and_type = g_strdup (str);
 
 	g_free (str);
 
-	label = info_dialog_get_label (dialog, xml, "label-interface");
+	label = glade_xml_get_widget (xml, "label-interface");
 	gtk_label_set_text (GTK_LABEL (label), iface_and_type);
 	g_free (iface_and_type);
 
-	label = info_dialog_get_label (dialog, xml, "label-speed");
+	str = NULL;
+	if (NM_IS_DEVICE_802_3_ETHERNET (device))
+		str = nm_device_802_3_ethernet_get_hw_address (NM_DEVICE_802_3_ETHERNET (device));
+	else if (NM_IS_DEVICE_802_11_WIRELESS (device))
+		str = g_strdup (nm_device_802_11_wireless_get_hw_address (NM_DEVICE_802_11_WIRELESS (device)));
+
+	label = glade_xml_get_widget (xml, "label-hardware-address");
+	gtk_label_set_text (GTK_LABEL (label), str ? str : "");
+	g_free (str);
+
+	label = glade_xml_get_widget (xml, "label-security");
+	label2 = glade_xml_get_widget (xml, "label-security-label");
+	// FIXME: handle 802.1x wired auth too
+	if (NM_IS_DEVICE_802_11_WIRELESS (device)) {
+		NMSettingWireless *s_wireless;
+		NMSettingWirelessSecurity *s_wireless_sec;
+
+		s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+		s_wireless_sec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+		if (   s_wireless
+		    && s_wireless->security
+		    && !strcmp (s_wireless->security, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME)
+		    && s_wireless_sec) {
+
+			if (!strcmp (s_wireless_sec->key_mgmt, "none")) {
+				gtk_label_set_text (GTK_LABEL (label), _("WEP"));
+			} else if (!strcmp (s_wireless_sec->key_mgmt, "wpa-none")) {
+				gtk_label_set_text (GTK_LABEL (label), _("WPA/WPA2"));
+			} else if (!strcmp (s_wireless_sec->key_mgmt, "wpa-psk")) {
+				gtk_label_set_text (GTK_LABEL (label), _("WPA/WPA2"));
+			} else {
+				set_eap_info_label (label, s_wireless_sec);
+			}
+		} else {
+			gtk_label_set_text (GTK_LABEL (label), _("None"));
+		}
+
+		gtk_widget_show (label);
+		gtk_widget_show (label2);
+	} else {
+		gtk_widget_hide (label);
+		gtk_widget_hide (label2);
+	}
+
+	label = glade_xml_get_widget (xml, "label-speed");
 	if (speed) {
 		str = g_strdup_printf (_("%u Mb/s"), speed);
 		gtk_label_set_text (GTK_LABEL (label), str);
@@ -129,29 +207,29 @@
 		gtk_label_set_text (GTK_LABEL (label), _("Unknown"));
 
 	str = nm_device_get_driver (device);
-	label = info_dialog_get_label (dialog, xml, "label-driver");
+	label = glade_xml_get_widget (xml, "label-driver");
 	gtk_label_set_text (GTK_LABEL (label), str);
 	g_free (str);
 
-	label = info_dialog_get_label (dialog, xml, "label-ip-address");
+	label = glade_xml_get_widget (xml, "label-ip-address");
 	gtk_label_set_text (GTK_LABEL (label),
 					ip4_address_as_string (nm_ip4_config_get_address (cfg)));
 
-	label = info_dialog_get_label (dialog, xml, "label-broadcast-address");
+	label = glade_xml_get_widget (xml, "label-broadcast-address");
 	gtk_label_set_text (GTK_LABEL (label),
 					ip4_address_as_string (nm_ip4_config_get_broadcast (cfg)));
 
-	label = info_dialog_get_label (dialog, xml, "label-subnet-mask");
+	label = glade_xml_get_widget (xml, "label-subnet-mask");
 	gtk_label_set_text (GTK_LABEL (label),
 					ip4_address_as_string (nm_ip4_config_get_netmask (cfg)));
 
-	label = info_dialog_get_label (dialog, xml, "label-default-route");
+	label = glade_xml_get_widget (xml, "label-default-route");
 	gtk_label_set_text (GTK_LABEL (label),
 					ip4_address_as_string (nm_ip4_config_get_gateway (cfg)));
 
 	dns = nm_ip4_config_get_nameservers (cfg);
 	if (dns) {
-		label = info_dialog_get_label (dialog, xml, "label-primary-dns");
+		label = glade_xml_get_widget (xml, "label-primary-dns");
 		if (dns->len > 0) {
 			gtk_label_set_text (GTK_LABEL (label),
 							ip4_address_as_string (g_array_index (dns, guint32, 0)));
@@ -159,27 +237,20 @@
 			gtk_label_set_text (GTK_LABEL (label), "");
 		}
 
-		label = info_dialog_get_label (dialog, xml, "label-secondary-dns");
+		label = glade_xml_get_widget (xml, "label-secondary-dns");
+		label2 = glade_xml_get_widget (xml, "label-secondary-dns-label");
 		if (dns->len > 1) {
 			gtk_label_set_text (GTK_LABEL (label),
 							ip4_address_as_string (g_array_index (dns, guint32, 1)));
+			gtk_widget_show (label);
+			gtk_widget_show (label2);
 		} else {
-			gtk_label_set_text (GTK_LABEL (label), "");
+			gtk_widget_hide (label);
+			gtk_widget_hide (label2);
 		}
-
 		g_array_free (dns, TRUE);
 	}
 
-	str = NULL;
-	if (NM_IS_DEVICE_802_3_ETHERNET (device))
-		str = nm_device_802_3_ethernet_get_hw_address (NM_DEVICE_802_3_ETHERNET (device));
-	else if (NM_IS_DEVICE_802_11_WIRELESS (device))
-		str = g_strdup (nm_device_802_11_wireless_get_hw_address (NM_DEVICE_802_11_WIRELESS (device)));
-
-	label = info_dialog_get_label (dialog, xml, "label-hardware-address");
-	gtk_label_set_text (GTK_LABEL (label), str ? str : "");
-	g_free (str);
-
 	return dialog;
 }
 
@@ -188,14 +259,18 @@
 {
 	GtkWidget *dialog;
 	NMDevice *device;
+	NMConnection *connection;
 
 	device = applet_get_first_active_device (applet);
-	if (!device) {
+	if (device)
+		connection = applet_find_active_connection_for_device (device, applet);
+
+	if (!connection || !device) {
 		info_dialog_show_error (_("No active connections!"));
 		return;
 	}
 
-	dialog = info_dialog_update (applet->info_dialog_xml, device);
+	dialog = info_dialog_update (applet->info_dialog_xml, device, connection);
 	if (!dialog)
 		return;
 

Modified: trunk/src/applet.c
==============================================================================
--- trunk/src/applet.c	(original)
+++ trunk/src/applet.c	Thu Jan 24 19:11:30 2008
@@ -501,8 +501,8 @@
 	return 1;
 }
 
-static NMConnection *
-find_active_connection_for_device (NMDevice *device, NMApplet *applet)
+NMConnection *
+applet_find_active_connection_for_device (NMDevice *device, NMApplet *applet)
 {
 	NMConnection *connection = NULL;
 	GSList *iter;
@@ -580,7 +580,7 @@
 		else if (NM_IS_DEVICE_802_3_ETHERNET (device))
 			n_devices = n_wired_interfaces++;
 
-		active = find_active_connection_for_device (device, applet);
+		active = applet_find_active_connection_for_device (device, applet);
 
 		dclass = get_device_class (device, applet);
 		if (dclass)

Modified: trunk/src/applet.glade
==============================================================================
--- trunk/src/applet.glade	(original)
+++ trunk/src/applet.glade	Thu Jan 24 19:11:30 2008
@@ -578,6 +578,34 @@
 			<packing>
 			  <property name="left_attach">0</property>
 			  <property name="right_attach">1</property>
+			  <property name="top_attach">3</property>
+			  <property name="bottom_attach">4</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label-secondary-dns-label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Secondary DNS:</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</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="left_attach">0</property>
+			  <property name="right_attach">1</property>
 			  <property name="top_attach">13</property>
 			  <property name="bottom_attach">14</property>
 			  <property name="x_options">fill</property>
@@ -586,7 +614,7 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label-hardware-address">
+			<widget class="GtkLabel" id="label-secondary-dns">
 			  <property name="visible">True</property>
 			  <property name="can_focus">True</property>
 			  <property name="label" translatable="yes"></property>
@@ -615,9 +643,9 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label22">
+			<widget class="GtkLabel" id="label21">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Secondary DNS:</property>
+			  <property name="label" translatable="yes">Primary DNS:</property>
 			  <property name="use_underline">False</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -643,7 +671,7 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label-secondary-dns">
+			<widget class="GtkLabel" id="label-primary-dns">
 			  <property name="visible">True</property>
 			  <property name="can_focus">True</property>
 			  <property name="label" translatable="yes"></property>
@@ -672,9 +700,9 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label21">
+			<widget class="GtkLabel" id="label7">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Primary DNS:</property>
+			  <property name="label" translatable="yes">Default Route:</property>
 			  <property name="use_underline">False</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -700,7 +728,7 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label-primary-dns">
+			<widget class="GtkLabel" id="label-default-route">
 			  <property name="visible">True</property>
 			  <property name="can_focus">True</property>
 			  <property name="label" translatable="yes"></property>
@@ -729,9 +757,9 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label7">
+			<widget class="GtkLabel" id="label6">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Default Route:</property>
+			  <property name="label" translatable="yes">Subnet Mask:</property>
 			  <property name="use_underline">False</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -757,7 +785,7 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label-default-route">
+			<widget class="GtkLabel" id="label-subnet-mask">
 			  <property name="visible">True</property>
 			  <property name="can_focus">True</property>
 			  <property name="label" translatable="yes"></property>
@@ -786,9 +814,9 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label6">
+			<widget class="GtkLabel" id="label5">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Subnet Mask:</property>
+			  <property name="label" translatable="yes">Broadcast Address:</property>
 			  <property name="use_underline">False</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -814,7 +842,7 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label-subnet-mask">
+			<widget class="GtkLabel" id="label-broadcast-address">
 			  <property name="visible">True</property>
 			  <property name="can_focus">True</property>
 			  <property name="label" translatable="yes"></property>
@@ -843,16 +871,16 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label5">
+			<widget class="GtkLabel" id="label4">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Broadcast Address:</property>
+			  <property name="label" translatable="yes">IP Address:</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</property>
+			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
 			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
@@ -871,7 +899,7 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label-broadcast-address">
+			<widget class="GtkLabel" id="label-ip-address">
 			  <property name="visible">True</property>
 			  <property name="can_focus">True</property>
 			  <property name="label" translatable="yes"></property>
@@ -881,7 +909,7 @@
 			  <property name="wrap">False</property>
 			  <property name="selectable">True</property>
 			  <property name="xalign">0</property>
-			  <property name="yalign">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>
@@ -900,9 +928,9 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label4">
+			<widget class="GtkLabel" id="label29">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">IP Address:</property>
+			  <property name="label" translatable="yes">Speed:</property>
 			  <property name="use_underline">False</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -920,52 +948,24 @@
 			<packing>
 			  <property name="left_attach">0</property>
 			  <property name="right_attach">1</property>
-			  <property name="top_attach">7</property>
-			  <property name="bottom_attach">8</property>
+			  <property name="top_attach">5</property>
+			  <property name="bottom_attach">6</property>
 			  <property name="x_options">fill</property>
 			  <property name="y_options"></property>
 			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label-ip-address">
+			<widget class="GtkLabel" id="label28">
 			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes"></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">True</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="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">7</property>
-			  <property name="bottom_attach">8</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label-destination-address-label">
-			  <property name="label" translatable="yes">Destination Address:</property>
+			  <property name="label" translatable="yes">Driver:</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</property>
+			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
 			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
@@ -976,15 +976,16 @@
 			<packing>
 			  <property name="left_attach">0</property>
 			  <property name="right_attach">1</property>
-			  <property name="top_attach">6</property>
-			  <property name="bottom_attach">7</property>
+			  <property name="top_attach">4</property>
+			  <property name="bottom_attach">5</property>
 			  <property name="x_options">fill</property>
 			  <property name="y_options"></property>
 			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label-destination-address">
+			<widget class="GtkLabel" id="label-speed">
+			  <property name="visible">True</property>
 			  <property name="can_focus">True</property>
 			  <property name="label" translatable="yes"></property>
 			  <property name="use_underline">False</property>
@@ -993,7 +994,7 @@
 			  <property name="wrap">False</property>
 			  <property name="selectable">True</property>
 			  <property name="xalign">0</property>
-			  <property name="yalign">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>
@@ -1004,22 +1005,23 @@
 			<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="top_attach">5</property>
+			  <property name="bottom_attach">6</property>
 			  <property name="x_options">fill</property>
 			  <property name="y_options"></property>
 			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label15">
+			<widget class="GtkLabel" id="label-driver">
 			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
 			  <property name="label" translatable="yes"></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="selectable">True</property>
 			  <property name="xalign">0</property>
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
@@ -1030,24 +1032,25 @@
 			  <property name="angle">0</property>
 			</widget>
 			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">5</property>
-			  <property name="bottom_attach">6</property>
+			  <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">fill</property>
 			  <property name="y_options"></property>
 			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label16">
+			<widget class="GtkLabel" id="label-hardware-address">
 			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
 			  <property name="label" translatable="yes"></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="selectable">True</property>
 			  <property name="xalign">0</property>
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
@@ -1060,24 +1063,23 @@
 			<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="top_attach">3</property>
+			  <property name="bottom_attach">4</property>
 			  <property name="x_options">fill</property>
 			  <property name="y_options"></property>
 			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label28">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Driver:</property>
+			<widget class="GtkLabel" id="label-security-label">
+			  <property name="label" translatable="yes">Security:</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="selectable">True</property>
 			  <property name="xalign">0</property>
-			  <property name="yalign">0.5</property>
+			  <property name="yalign">0</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
 			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
@@ -1088,16 +1090,15 @@
 			<packing>
 			  <property name="left_attach">0</property>
 			  <property name="right_attach">1</property>
-			  <property name="top_attach">4</property>
-			  <property name="bottom_attach">5</property>
+			  <property name="top_attach">6</property>
+			  <property name="bottom_attach">7</property>
 			  <property name="x_options">fill</property>
 			  <property name="y_options"></property>
 			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label-driver">
-			  <property name="visible">True</property>
+			<widget class="GtkLabel" id="label-security">
 			  <property name="can_focus">True</property>
 			  <property name="label" translatable="yes"></property>
 			  <property name="use_underline">False</property>
@@ -1106,7 +1107,7 @@
 			  <property name="wrap">False</property>
 			  <property name="selectable">True</property>
 			  <property name="xalign">0</property>
-			  <property name="yalign">0.5</property>
+			  <property name="yalign">0</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
 			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
@@ -1117,17 +1118,17 @@
 			<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="top_attach">6</property>
+			  <property name="bottom_attach">7</property>
 			  <property name="x_options">fill</property>
 			  <property name="y_options"></property>
 			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label29">
+			<widget class="GtkLabel" id="label65">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Speed:</property>
+			  <property name="label" translatable="yes"></property>
 			  <property name="use_underline">False</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -1145,23 +1146,22 @@
 			<packing>
 			  <property name="left_attach">0</property>
 			  <property name="right_attach">1</property>
-			  <property name="top_attach">3</property>
-			  <property name="bottom_attach">4</property>
+			  <property name="top_attach">7</property>
+			  <property name="bottom_attach">8</property>
 			  <property name="x_options">fill</property>
 			  <property name="y_options"></property>
 			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label-speed">
+			<widget class="GtkLabel" id="label66">
 			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
 			  <property name="label" translatable="yes"></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">True</property>
+			  <property name="selectable">False</property>
 			  <property name="xalign">0</property>
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
@@ -1174,8 +1174,8 @@
 			<packing>
 			  <property name="left_attach">1</property>
 			  <property name="right_attach">2</property>
-			  <property name="top_attach">3</property>
-			  <property name="bottom_attach">4</property>
+			  <property name="top_attach">7</property>
+			  <property name="bottom_attach">8</property>
 			  <property name="x_options">fill</property>
 			  <property name="y_options"></property>
 			</packing>

Modified: trunk/src/applet.h
==============================================================================
--- trunk/src/applet.h	(original)
+++ trunk/src/applet.h	Thu Jan 24 19:11:30 2008
@@ -186,4 +186,6 @@
                        const char *message,
                        const char *icon);
 
+NMConnection * applet_find_active_connection_for_device (NMDevice *device, NMApplet *applet);
+
 #endif



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