summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2012-07-03 13:55:07 +0200
committerJiří Klimeš <jklimes@redhat.com>2012-07-03 13:55:07 +0200
commit7e1c118eeeccbca0a5cb91224939d70ab5d83b09 (patch)
treedb824233d3bddb2281ef25e612147bd6ac66df9d
parentce266ab3d5c44e19a307694c92062be0102e95c9 (diff)
downloadnetwork-manager-applet-7e1c118eeeccbca0a5cb91224939d70ab5d83b09.tar.gz
libnm-gtk: fill CDMA providers' username/password in mobile wizard (bgo #671266)
-rw-r--r--src/libnm-gtk/nm-mobile-wizard.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libnm-gtk/nm-mobile-wizard.c b/src/libnm-gtk/nm-mobile-wizard.c
index c48caa02..2b91fa91 100644
--- a/src/libnm-gtk/nm-mobile-wizard.c
+++ b/src/libnm-gtk/nm-mobile-wizard.c
@@ -17,7 +17,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * (C) Copyright 2008 - 2011 Red Hat, Inc.
+ * (C) Copyright 2008 - 2012 Red Hat, Inc.
*/
#include "config.h"
@@ -141,8 +141,15 @@ assistant_closed (GtkButton *button, gpointer user_data)
wiz_method->username = method->username ? g_strdup (method->username) : NULL;
wiz_method->password = method->password ? g_strdup (method->password) : NULL;
} else {
- if (self->provider_only_cdma)
+ if (self->provider_only_cdma) {
method_type = NMN_MOBILE_ACCESS_METHOD_TYPE_CDMA;
+ /* Take username and password from the first (only) method for CDMA only provider */
+ if (provider->methods) {
+ method = provider->methods->data;
+ wiz_method->username = method->username ? g_strdup (method->username) : NULL;
+ wiz_method->password = method->password ? g_strdup (method->password) : NULL;
+ }
+ }
else {
method_type = NMN_MOBILE_ACCESS_METHOD_TYPE_GSM;
wiz_method->gsm_apn = g_strdup (gtk_entry_get_text (GTK_ENTRY (self->plan_unlisted_entry)));