network-manager-applet r857 - in branches/mbca/src: . connection-editor
- From: kaijanma svn gnome org
- To: svn-commits-list gnome org
- Subject: network-manager-applet r857 - in branches/mbca/src: . connection-editor
- Date: Mon, 18 Aug 2008 09:27:09 +0000 (UTC)
Author: kaijanma
Date: Mon Aug 18 09:27:09 2008
New Revision: 857
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=857&view=rev
Log:
polish some strings and use MBCA_DEVICE_PSEUDO in applet and connection editor
Modified:
branches/mbca/src/applet-device-gsm.c
branches/mbca/src/connection-editor/nm-connection-list.c
Modified: branches/mbca/src/applet-device-gsm.c
==============================================================================
--- branches/mbca/src/applet-device-gsm.c (original)
+++ branches/mbca/src/applet-device-gsm.c Mon Aug 18 09:27:09 2008
@@ -153,6 +153,7 @@
mbca_free_configuration (conf);
+ if (dns_servers)
g_array_free (dns_servers, TRUE);
exported = nma_gconf_settings_add_connection (applet->gconf_settings, connection);
@@ -165,6 +166,7 @@
applet_do_notify (applet, NOTIFY_URGENCY_LOW,
_("New Configuration Created"),
_("You can activate the connection by clicking this icon.\n"
+ "\n"
"Use connection editor to add new and to change settings if necessary"),
"nm-device-wwan", NULL, NULL, NULL, NULL);
@@ -223,14 +225,14 @@
G_CALLBACK (assistant_state_changed_cb), applet);
applet->mbca_assistants = g_slist_prepend (applet->mbca_assistants, ua);
mbca_assistant_run_for_device (ua->assistant,
- MBCA_DEVICE_HAL,
- ua->udi,
- utils_get_device_description (device));
+ MBCA_DEVICE_PSEUDO,
+ NULL, NULL);
}
- nm_warning ("There's a new GSM modem being configured and thus no "
- "configuration is yet available. You can safely ignore next "
- "warninig about missing default configuration.");
+ nm_warning ("There's a new GSM modem being configured and no "
+ "configuration is yet available. You can safely ignore the "
+ "next warninig, if any, about missing default configuration."
+ );
return NULL;
}
@@ -503,17 +505,25 @@
if (g_slist_length (connections) == 0)
{
+ gchar* summary;
NotifyConfigureNewDeviceCbData* d = g_malloc (sizeof (NotifyConfigureNewDeviceCbData));
d->device = device;
d->applet = applet;
+
+ summary = g_strdup_printf ("%s:\n - %s",
+ utils_get_device_description (device),
+ _("Click here to configure the device...")
+ );
+
applet_do_notify (applet, NOTIFY_URGENCY_LOW,
_("New Mobile Broadband Device Detected"),
- _("Click here to configure the device..."),
+ summary,
"nm-device-wwan",
"configure",
"Configure",
notify_configure_new_device_cb,
d);
+ g_free (summary);
}
}
Modified: branches/mbca/src/connection-editor/nm-connection-list.c
==============================================================================
--- branches/mbca/src/connection-editor/nm-connection-list.c (original)
+++ branches/mbca/src/connection-editor/nm-connection-list.c Mon Aug 18 09:27:09 2008
@@ -786,8 +786,8 @@
type_setting = nm_setting_gsm_new ();
s_gsm = NM_SETTING_GSM (type_setting);
- s_gsm->number = g_strdup ("*99#"); /* De-facto standard for GSM */
-
+ s_gsm->number = g_strdup ("*99***1#");
+
s_gsm->apn = g_strdup (conf->provider->gsm.apn);
s_gsm->username = g_strdup (conf->provider->username);
@@ -841,7 +841,8 @@
g_hash_table_remove (list->editors, connection);
mbca_free_configuration (conf);
- g_array_free (dns_servers, TRUE);
+ if (dns_servers)
+ g_array_free (dns_servers, TRUE);
/* FALLTHROUGH */
case MBCA_STATE_ABORTED:
@@ -861,7 +862,10 @@
NMSettingConnection *s_con;
NMSetting *type_setting = NULL;
GType mb_type;
-
+#ifdef WITH_MBCA
+ MBCAAssistant* assistant;
+#endif
+
ctype = nm_connection_lookup_setting_type (connection_type);
connection = nm_connection_new ();
@@ -888,16 +892,14 @@
#ifdef WITH_MBCA
- MBCAAssistant* assistant = mbca_assistant_new ();
+ assistant = mbca_assistant_new ();
g_signal_connect (G_OBJECT (assistant), "state-changed",
G_CALLBACK (mbca_assistant_state_changed_cb), list);
- mbca_assistant_run (assistant);
+ mbca_assistant_run_for_device (assistant, MBCA_DEVICE_PSEUDO,
+ NULL, NULL);
mb_type = NM_TYPE_SETTING_GSM; /* get rid of compiler warning about
* unused variable */
- g_warning ("You may safely ignore the next warning about failing to "
- " add new connection");
-
#else
/* Since GSM is a placeholder for both GSM and CDMA; ask the user which
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]