network-manager-applet r931 - in trunk: . src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: network-manager-applet r931 - in trunk: . src
- Date: Mon, 6 Oct 2008 23:56:59 +0000 (UTC)
Author: dcbw
Date: Mon Oct 6 23:56:59 2008
New Revision: 931
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=931&view=rev
Log:
2008-10-06 Dan Williams <dcbw redhat com>
* src/applet-device-cdma.c
src/applet-device-gsm.c
src/applet.c
- Use "Mobile Broadband" everywhere instead of GSM or CDMA (bgo #551361)
Modified:
trunk/ChangeLog
trunk/src/applet-device-cdma.c
trunk/src/applet-device-gsm.c
trunk/src/applet.c
Modified: trunk/src/applet-device-cdma.c
==============================================================================
--- trunk/src/applet-device-cdma.c (original)
+++ trunk/src/applet-device-cdma.c Mon Oct 6 23:56:59 2008
@@ -52,7 +52,7 @@
g_slice_free (CdmaMenuItemInfo, data);
}
-#define DEFAULT_CDMA_NAME _("Auto CDMA network connection")
+#define DEFAULT_CDMA_NAME _("Auto Mobile Broadband (CDMA) connection")
static NMConnection *
cdma_new_auto_connection (NMDevice *device,
@@ -232,15 +232,9 @@
desc = (char *) nm_device_get_iface (device);
g_assert (desc);
- if (g_slist_length (connections) > 1)
- text = g_strdup_printf (_("CDMA Connections (%s)"), desc);
- else
- text = g_strdup_printf (_("CDMA Network (%s)"), desc);
+ text = g_strdup_printf (_("Mobile Broadband (%s)"), desc);
} else {
- if (g_slist_length (connections) > 1)
- text = g_strdup (_("CDMA Connections"));
- else
- text = g_strdup (_("CDMA Network"));
+ text = g_strdup (_("Mobile Broadband"));
}
item = gtk_menu_item_new_with_label (text);
@@ -315,7 +309,7 @@
switch (state) {
case NM_DEVICE_STATE_PREPARE:
- *tip = g_strdup_printf (_("Dialing CDMA device %s..."), iface);
+ *tip = g_strdup_printf (_("Dialing mobile broadband device %s..."), iface);
break;
case NM_DEVICE_STATE_CONFIG:
*tip = g_strdup_printf (_("Starting PPP on device %s..."), iface);
@@ -423,6 +417,8 @@
GtkBox *box;
char *dev_str;
NMCdmaInfo *info;
+ NMSettingConnection *s_con;
+ char *tmp;
info = g_new (NMCdmaInfo, 1);
info->context = context;
@@ -432,14 +428,18 @@
dialog = GTK_DIALOG (gtk_dialog_new ());
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gtk_window_set_title (GTK_WINDOW (dialog), _("CDMA Network Password"));
+ gtk_window_set_title (GTK_WINDOW (dialog), _("Mobile broadband network password"));
w = gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
w = gtk_dialog_add_button (dialog, GTK_STOCK_OK, GTK_RESPONSE_OK);
info->ok_button = w;
gtk_window_set_default (GTK_WINDOW (dialog), info->ok_button);
- w = gtk_label_new (_("A password is required to connect to the CDMA network."));
+ s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ g_assert (s_con->id);
+ tmp = g_strdup_printf (_("A password is required to connect to '%s'."), s_con->id);
+ w = gtk_label_new (tmp);
+ g_free (tmp);
gtk_box_pack_start (GTK_BOX (dialog->vbox), w, TRUE, TRUE, 0);
dev_str = g_strdup_printf ("<b>%s</b>", utils_get_device_description (device));
Modified: trunk/src/applet-device-gsm.c
==============================================================================
--- trunk/src/applet-device-gsm.c (original)
+++ trunk/src/applet-device-gsm.c Mon Oct 6 23:56:59 2008
@@ -53,7 +53,7 @@
g_slice_free (GSMMenuItemInfo, data);
}
-#define DEFAULT_GSM_NAME _("Auto GSM network connection")
+#define DEFAULT_GSM_NAME _("Auto Mobile Broadband (GSM) connection")
static NMConnection *
gsm_new_auto_connection (NMDevice *device,
@@ -233,15 +233,9 @@
desc = (char *) nm_device_get_iface (device);
g_assert (desc);
- if (g_slist_length (connections) > 1)
- text = g_strdup_printf (_("GSM Connections (%s)"), desc);
- else
- text = g_strdup_printf (_("GSM Network (%s)"), desc);
+ text = g_strdup_printf (_("Mobile Broadband (%s)"), desc);
} else {
- if (g_slist_length (connections) > 1)
- text = g_strdup (_("GSM Connections"));
- else
- text = g_strdup (_("GSM Network"));
+ text = g_strdup (_("Mobile Broadband"));
}
item = gtk_menu_item_new_with_label (text);
@@ -316,7 +310,7 @@
switch (state) {
case NM_DEVICE_STATE_PREPARE:
- *tip = g_strdup_printf (_("Dialing GSM device %s..."), iface);
+ *tip = g_strdup_printf (_("Dialing mobile broadband device %s..."), iface);
break;
case NM_DEVICE_STATE_CONFIG:
*tip = g_strdup_printf (_("Starting PPP on device %s..."), iface);
@@ -475,9 +469,9 @@
gtk_window_set_default (GTK_WINDOW (dialog), info->ok_button);
if (!strcmp (secret_name, NM_SETTING_GSM_PIN))
- w = gtk_label_new (_("PIN code is needed for the GSM device"));
+ w = gtk_label_new (_("PIN code is needed for the mobile broadband device"));
else if (!strcmp (secret_name, NM_SETTING_GSM_PUK))
- w = gtk_label_new (_("PUK code is needed for the GSM device"));
+ w = gtk_label_new (_("PUK code is needed for the mobile broadband device"));
gtk_box_pack_start (GTK_BOX (dialog->vbox), w, TRUE, TRUE, 0);
dev_str = g_strdup_printf ("<b>%s</b>", utils_get_device_description (device));
@@ -526,6 +520,8 @@
GtkBox *box;
char *dev_str;
NMGsmInfo *info;
+ NMSettingConnection *s_con;
+ char *tmp;
info = g_new (NMGsmInfo, 1);
info->context = context;
@@ -535,14 +531,18 @@
dialog = GTK_DIALOG (gtk_dialog_new ());
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gtk_window_set_title (GTK_WINDOW (dialog), _("GSM Network Password"));
+ gtk_window_set_title (GTK_WINDOW (dialog), _("Mobile broadband network password"));
w = gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
w = gtk_dialog_add_button (dialog, GTK_STOCK_OK, GTK_RESPONSE_OK);
info->ok_button = w;
gtk_window_set_default (GTK_WINDOW (dialog), info->ok_button);
- w = gtk_label_new (_("A password is required to connect to the GSM network."));
+ s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ g_assert (s_con->id);
+ tmp = g_strdup_printf (_("A password is required to connect to '%s'."), s_con->id);
+ w = gtk_label_new (tmp);
+ g_free (tmp);
gtk_box_pack_start (GTK_BOX (dialog->vbox), w, TRUE, TRUE, 0);
dev_str = g_strdup_printf ("<b>%s</b>", utils_get_device_description (device));
Modified: trunk/src/applet.c
==============================================================================
--- trunk/src/applet.c (original)
+++ trunk/src/applet.c Mon Oct 6 23:56:59 2008
@@ -906,8 +906,7 @@
gint n_wifi_devices = 0;
gint n_usable_wifi_devices = 0;
gint n_wired_devices = 0;
- gint n_cdma_devices = 0;
- gint n_gsm_devices = 0;
+ gint n_mb_devices = 0;
int i;
temp = nm_client_get_devices (applet->nm_client);
@@ -930,13 +929,11 @@
n_usable_wifi_devices++;
} else if (NM_IS_DEVICE_ETHERNET (device))
n_wired_devices++;
- else if (NM_IS_CDMA_DEVICE (device))
- n_cdma_devices++;
- else if (NM_IS_GSM_DEVICE (device))
- n_gsm_devices++;
+ else if (NM_IS_CDMA_DEVICE (device) || NM_IS_GSM_DEVICE (device))
+ n_mb_devices++;
}
- if (!n_wired_devices && !n_wifi_devices && !n_cdma_devices && !n_gsm_devices) {
+ if (!n_wired_devices && !n_wifi_devices && !n_mb_devices) {
nma_menu_add_text_item (menu, _("No network devices available"));
goto out;
}
@@ -956,10 +953,8 @@
n_devices = n_wifi_devices;
else if (NM_IS_DEVICE_ETHERNET (device))
n_devices = n_wired_devices;
- else if (NM_IS_CDMA_DEVICE (device))
- n_devices = n_cdma_devices;
- else if (NM_IS_GSM_DEVICE (device))
- n_devices = n_gsm_devices;
+ else if (NM_IS_CDMA_DEVICE (device) || NM_IS_GSM_DEVICE (device))
+ n_devices = n_mb_devices;
active = applet_find_active_connection_for_device (device, applet, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]