[network-manager-applet/NETWORKMANAGER_APPLET_0_7] Add a "change APN" button to the connection editor



commit f72e4b39c5d8badb22da876d39eefd4a13ed3b3f
Author: Dan Williams <dcbw redhat com>
Date:   Thu Jun 4 12:12:30 2009 -0400

    Add a "change APN" button to the connection editor
---
 src/applet-device-cdma.c                   |    5 +-
 src/applet-device-gsm.c                    |    5 +-
 src/connection-editor/ce-page-mobile.glade |   43 ++++++++---
 src/connection-editor/page-mobile.c        |   99 ++++++++++++++++++++++--
 src/utils/mobile-wizard.c                  |  115 ++++++++++++++--------------
 src/utils/mobile-wizard.h                  |    4 +-
 src/utils/nmn-mobile-providers.h           |    4 +-
 7 files changed, 190 insertions(+), 85 deletions(-)

diff --git a/src/applet-device-cdma.c b/src/applet-device-cdma.c
index 91caf41..9e19f34 100644
--- a/src/applet-device-cdma.c
+++ b/src/applet-device-cdma.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 Red Hat, Inc.
+ * (C) Copyright 2008 - 2009 Red Hat, Inc.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -137,7 +137,8 @@ cdma_new_auto_connection (NMDevice *device,
 	info->callback = callback;
 	info->callback_data = callback_data;
 
-	wizard = mobile_wizard_new (NULL, device, mobile_wizard_done, info);
+	wizard = mobile_wizard_new (NULL, NULL, NM_DEVICE_TYPE_CDMA, FALSE,
+	                            mobile_wizard_done, info);
 	if (wizard) {
 		mobile_wizard_present (wizard);
 		return TRUE;
diff --git a/src/applet-device-gsm.c b/src/applet-device-gsm.c
index 8a93f49..6f0d3d7 100644
--- a/src/applet-device-gsm.c
+++ b/src/applet-device-gsm.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 Red Hat, Inc.
+ * (C) Copyright 2008 - 2009 Red Hat, Inc.
  * (C) Copyright 2008 Novell, Inc.
  */
 
@@ -139,7 +139,8 @@ gsm_new_auto_connection (NMDevice *device,
 	info->callback = callback;
 	info->callback_data = callback_data;
 
-	wizard = mobile_wizard_new (NULL, device, mobile_wizard_done, info);
+	wizard = mobile_wizard_new (NULL, NULL, NM_DEVICE_TYPE_GSM, FALSE,
+	                            mobile_wizard_done, info);
 	if (wizard) {
 		mobile_wizard_present (wizard);
 		return TRUE;
diff --git a/src/connection-editor/ce-page-mobile.glade b/src/connection-editor/ce-page-mobile.glade
index 227a632..92508b5 100644
--- a/src/connection-editor/ce-page-mobile.glade
+++ b/src/connection-editor/ce-page-mobile.glade
@@ -176,17 +176,6 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkEntry" id="mobile_apn">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
                       <widget class="GtkLabel" id="label30">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
@@ -331,6 +320,38 @@ Prefer 2G (GPRS/EDGE)</property>
                         <property name="y_options"></property>
                       </packing>
                     </child>
+                    <child>
+                      <widget class="GtkHBox" id="hbox2">
+                        <property name="visible">True</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <widget class="GtkEntry" id="mobile_apn">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="invisible_char">&#x25CF;</property>
+                          </widget>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkButton" id="mobile_apn_button">
+                            <property name="label" translatable="yes">Change...</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
                   </widget>
                 </child>
               </widget>
diff --git a/src/connection-editor/page-mobile.c b/src/connection-editor/page-mobile.c
index c4efaee..1789765 100644
--- a/src/connection-editor/page-mobile.c
+++ b/src/connection-editor/page-mobile.c
@@ -50,12 +50,16 @@ typedef struct {
 
 	/* GSM only */
 	GtkEntry *apn;
+	GtkButton *apn_button;
 	GtkEntry *network_id;
 	GtkComboBox *network_type;
 	GtkComboBox *band;
 	GtkEntry *pin;
 	GtkEntry *puk;
 
+	GtkWindowGroup *window_group;
+	gboolean window_added;
+
 	gboolean disposed;
 } CEPageMobilePrivate;
 
@@ -78,12 +82,15 @@ mobile_private_init (CEPageMobile *self)
 	priv->password = GTK_ENTRY (glade_xml_get_widget (xml, "mobile_password"));
 
 	priv->apn = GTK_ENTRY (glade_xml_get_widget (xml, "mobile_apn"));
+	priv->apn_button = GTK_BUTTON (glade_xml_get_widget (xml, "mobile_apn_button"));
 	priv->network_id = GTK_ENTRY (glade_xml_get_widget (xml, "mobile_network_id"));
 	priv->network_type = GTK_COMBO_BOX (glade_xml_get_widget (xml, "mobile_network_type"));
 	priv->band = GTK_COMBO_BOX (glade_xml_get_widget (xml, "mobile_band"));
 
 	priv->pin = GTK_ENTRY (glade_xml_get_widget (xml, "mobile_pin"));
 	priv->puk = GTK_ENTRY (glade_xml_get_widget (xml, "mobile_puk"));
+
+	priv->window_group = gtk_window_group_new ();
 }
 
 static GHashTable *
@@ -249,6 +256,65 @@ show_passwords (GtkToggleButton *button, gpointer user_data)
 }
 
 static void
+apn_button_mobile_wizard_done (MobileWizard *wizard,
+                               gboolean canceled,
+                               MobileWizardAccessMethod *method,
+                               gpointer user_data)
+{
+	CEPageMobile *self = CE_PAGE_MOBILE (user_data);
+	CEPageMobilePrivate *priv = CE_PAGE_MOBILE_GET_PRIVATE (self);
+
+	if (canceled || !method) {
+		mobile_wizard_destroy (wizard);
+		return;
+	}
+
+	if (!canceled && method) {
+		switch (method->devtype) {
+		case NM_DEVICE_TYPE_GSM:
+			gtk_entry_set_text (GTK_ENTRY (priv->username),
+			                    method->username ? method->username : "");
+			gtk_entry_set_text (GTK_ENTRY (priv->password),
+			                    method->password ? method->password : "");
+			gtk_entry_set_text (GTK_ENTRY (priv->apn),
+			                    method->gsm_apn ? method->gsm_apn : "");
+			break;
+		default:
+			g_assert_not_reached ();
+			break;
+		}
+	}
+
+	mobile_wizard_destroy (wizard);
+}
+
+static void
+apn_button_clicked (GtkButton *button, gpointer user_data)
+{
+	CEPageMobile *self = CE_PAGE_MOBILE (user_data);
+	CEPageMobilePrivate *priv = CE_PAGE_MOBILE_GET_PRIVATE (self);
+	MobileWizard *wizard;
+	GtkWidget *toplevel;
+
+	toplevel = gtk_widget_get_toplevel (CE_PAGE (self)->page);
+	g_return_if_fail (GTK_WIDGET_TOPLEVEL (toplevel));
+
+	if (!priv->window_added) {
+		gtk_window_group_add_window (priv->window_group, GTK_WINDOW (toplevel));
+		priv->window_added = TRUE;
+	}
+
+	wizard = mobile_wizard_new (GTK_WINDOW (toplevel),
+	                            priv->window_group,
+	                            NM_DEVICE_TYPE_GSM,
+	                            FALSE,
+	                            apn_button_mobile_wizard_done,
+	                            self);
+	if (wizard)
+		mobile_wizard_present (wizard);
+}
+
+static void
 finish_setup (CEPageMobile *self, gpointer unused, GError *error, gpointer user_data)
 {
 	CEPage *parent = CE_PAGE (self);
@@ -268,6 +334,7 @@ finish_setup (CEPageMobile *self, gpointer unused, GError *error, gpointer user_
 	g_signal_connect (priv->username, "changed", G_CALLBACK (stuff_changed), self);
 	g_signal_connect (priv->password, "changed", G_CALLBACK (stuff_changed), self);
 	g_signal_connect (priv->apn, "changed", G_CALLBACK (stuff_changed), self);
+	g_signal_connect (priv->apn_button, "clicked", G_CALLBACK (apn_button_clicked), self);
 	g_signal_connect (priv->network_id, "changed", G_CALLBACK (stuff_changed), self);
 	g_signal_connect (priv->network_type, "changed", G_CALLBACK (stuff_changed), self);
 	g_signal_connect (priv->pin, "changed", G_CALLBACK (stuff_changed), self);
@@ -419,6 +486,18 @@ validate (CEPage *page, NMConnection *connection, GError **error)
 }
 
 static void
+dispose (GObject *object)
+{
+	CEPageMobile *self = CE_PAGE_MOBILE (object);
+	CEPageMobilePrivate *priv = CE_PAGE_MOBILE_GET_PRIVATE (self);
+
+	if (priv->window_group)
+		g_object_unref (priv->window_group);
+
+	G_OBJECT_CLASS (ce_page_mobile_parent_class)->dispose (object);
+}
+
+static void
 ce_page_mobile_init (CEPageMobile *self)
 {
 }
@@ -433,6 +512,7 @@ ce_page_mobile_class_init (CEPageMobileClass *mobile_class)
 
 	/* virtual methods */
 	parent_class->validate = validate;
+	object_class->dispose = dispose;
 }
 
 static void
@@ -458,10 +538,10 @@ typedef struct {
 } WizardInfo;
 
 static void
-mobile_wizard_done (MobileWizard *wizard,
-                    gboolean canceled,
-                    MobileWizardAccessMethod *method,
-                    gpointer user_data)
+new_connection_mobile_wizard_done (MobileWizard *wizard,
+                                   gboolean canceled,
+                                   MobileWizardAccessMethod *method,
+                                   gpointer user_data)
 {
 	WizardInfo *info = user_data;
 	NMConnection *connection = NULL;
@@ -541,7 +621,8 @@ mobile_connection_new (GtkWindow *parent,
 	info->get_connections_func = get_connections_func;
 	info->user_data = user_data;
 
-	wizard = mobile_wizard_new (parent, NULL, mobile_wizard_done, info);
+	wizard = mobile_wizard_new (parent, NULL, NM_DEVICE_TYPE_UNKNOWN, FALSE,
+	                            new_connection_mobile_wizard_done, info);
 	if (wizard) {
 		mobile_wizard_present (wizard);
 		return;
@@ -603,9 +684,9 @@ mobile_connection_new (GtkWindow *parent,
 	}
 	gtk_widget_destroy (dialog);
 
-	mobile_wizard_done (NULL,
-	                    (response != GTK_RESPONSE_OK),
-	                    (response == GTK_RESPONSE_OK) ? &method : NULL,
-	                    info);
+	new_connection_mobile_wizard_done (NULL,
+	                                   (response != GTK_RESPONSE_OK),
+	                                   (response == GTK_RESPONSE_OK) ? &method : NULL,
+	                                   info);
 }
 
diff --git a/src/utils/mobile-wizard.c b/src/utils/mobile-wizard.c
index 2c416bb..0045283 100644
--- a/src/utils/mobile-wizard.c
+++ b/src/utils/mobile-wizard.c
@@ -44,7 +44,7 @@
 
 static char *get_selected_country (MobileWizard *self);
 static NmnMobileProvider *get_selected_provider (MobileWizard *self);
-static NmnMobileProviderType get_provider_unlisted_type (MobileWizard *self);
+static NmnMobileAccessMethodType get_provider_unlisted_type (MobileWizard *self);
 static NmnMobileAccessMethod *get_selected_method (MobileWizard *self, gboolean *manual);
 
 struct MobileWizard {
@@ -53,14 +53,14 @@ struct MobileWizard {
 	gpointer user_data;
 	GHashTable *providers;
 	GHashTable *country_codes;
-	NMDevice *device;
-	gboolean began_with_device;
+	NmnMobileAccessMethodType method_type;
+	gboolean initial_method_type;
+	gboolean will_connect_after;
 
 	/* Intro page */
-	guint32 intro_idx;
-	GtkWidget *intro_page;
 	GtkWidget *dev_combo;
 	GtkTreeStore *dev_store;
+	char *dev_desc;
 	NMClient *client;
 
 	/* Country page */
@@ -107,19 +107,6 @@ struct MobileWizard {
 	guint32 confirm_idx;
 };
 
-static NmnMobileProviderType
-get_devtype (NMDevice *device)
-{
-	if (device) {
-		if (NM_IS_GSM_DEVICE (device))
-			return NMN_MOBILE_ACCESS_METHOD_TYPE_GSM;
-		else if (NM_IS_CDMA_DEVICE (device))
-			return NMN_MOBILE_ACCESS_METHOD_TYPE_CDMA;
-	}
-
-	return NMN_MOBILE_ACCESS_METHOD_TYPE_UNKNOWN;
-}
-
 static void
 assistant_closed (GtkButton *button, gpointer user_data)
 {
@@ -127,7 +114,7 @@ assistant_closed (GtkButton *button, gpointer user_data)
 	NmnMobileProvider *provider;
 	NmnMobileAccessMethod *method;
 	MobileWizardAccessMethod *wiz_method;
-	NmnMobileProviderType method_type = get_devtype (self->device);
+	NmnMobileAccessMethodType method_type = self->method_type;
 
 	wiz_method = g_malloc0 (sizeof (MobileWizardAccessMethod));
 
@@ -254,7 +241,7 @@ confirm_setup (MobileWizard *self)
 	gtk_misc_set_padding (GTK_MISC (self->confirm_apn), 0, 6);
 	gtk_box_pack_start (GTK_BOX (pbox), self->confirm_apn, FALSE, FALSE, 0);
 
-	if (self->began_with_device) {
+	if (self->will_connect_after) {
 		alignment = gtk_alignment_new (0, 0.5, 1, 0);
 		label = gtk_label_new (_("A connection will now be made to your mobile broadband provider using the settings you selected.  If the connection fails or you cannot access network resources, double-check your settings.  To modify your mobile broadband connection settings, choose \"Network Connections\" from the System >> Preferences menu."));
 		gtk_widget_set_size_request (label, 500, -1);
@@ -306,10 +293,9 @@ confirm_prepare (MobileWizard *self)
 	gtk_label_set_text (GTK_LABEL (self->confirm_provider), str->str);
 	g_string_free (str, TRUE);
 
-	if (self->device) {
-		gtk_label_set_text (GTK_LABEL (self->confirm_device),
-		                    utils_get_device_description (self->device));
-	} else {
+	if (self->dev_desc)
+		gtk_label_set_text (GTK_LABEL (self->confirm_device), self->dev_desc);
+	else {
 		gtk_widget_hide (self->confirm_device_label);
 		gtk_widget_hide (self->confirm_device);
 	}
@@ -515,10 +501,9 @@ plan_prepare (MobileWizard *self)
 
 		for (iter = provider->methods; iter; iter = g_slist_next (iter)) {
 			NmnMobileAccessMethod *method = iter->data;
-			NmnMobileProviderType devtype = get_devtype (self->device);
 
-			if (   (devtype != NMN_MOBILE_ACCESS_METHOD_TYPE_UNKNOWN)
-			    && (method->type != devtype))
+			if (   (self->method_type != NMN_MOBILE_ACCESS_METHOD_TYPE_UNKNOWN)
+			    && (method->type != self->method_type))
 				continue;
 
 			gtk_tree_store_append (GTK_TREE_STORE (self->plan_store), &method_iter, NULL);
@@ -671,7 +656,7 @@ providers_radio_toggled (GtkToggleButton *button, gpointer user_data)
 	providers_update_complete (self);
 }
 
-static NmnMobileProviderType
+static NmnMobileAccessMethodType
 get_provider_unlisted_type (MobileWizard *self)
 {
 	switch (gtk_combo_box_get_active (GTK_COMBO_BOX (self->provider_unlisted_type_combo))) {
@@ -769,7 +754,7 @@ providers_setup (MobileWizard *self)
 	                  1, 2, 1, 2, 0, 0, 6, 6);
 
 	/* Only show the CDMA/GSM combo if we don't know the device type */
-	if (get_devtype (self->device) != NMN_MOBILE_ACCESS_METHOD_TYPE_UNKNOWN)
+	if (self->method_type != NMN_MOBILE_ACCESS_METHOD_TYPE_UNKNOWN)
 		gtk_widget_hide (self->provider_unlisted_type_combo);
 
 	self->providers_idx = gtk_assistant_append_page (GTK_ASSISTANT (self->assistant), vbox);
@@ -796,17 +781,16 @@ providers_prepare (MobileWizard *self)
 	for (piter = providers; piter; piter = g_slist_next (piter)) {
 		NmnMobileProvider *provider = piter->data;
 		GtkTreeIter provider_iter;
-		NmnMobileProviderType devtype = get_devtype (self->device);
 
 		/* Ignore providers that don't match the current device type */
-		if (devtype != NMN_MOBILE_ACCESS_METHOD_TYPE_UNKNOWN) {
+		if (self->method_type != NMN_MOBILE_ACCESS_METHOD_TYPE_UNKNOWN) {
 			GSList *miter;
 			guint32 count = 0;
 
 			for (miter = provider->methods; miter; miter = g_slist_next (miter)) {
 				NmnMobileAccessMethod *method = miter->data;
 
-				if (devtype == method->type)
+				if (self->method_type == method->type)
 					count++;
 			}
 
@@ -854,7 +838,7 @@ providers_prepare (MobileWizard *self)
 	providers_update_complete (self);
 
 	/* If there's already a selected device, hide the GSM/CDMA radios */
-	if (self->device)
+	if (self->method_type != NMN_MOBILE_ACCESS_METHOD_TYPE_UNKNOWN)
 		gtk_widget_hide (self->provider_unlisted_type_combo);
 	else
 		gtk_widget_show (self->provider_unlisted_type_combo);
@@ -1112,10 +1096,6 @@ intro_device_removed_cb (NMClient *client, NMDevice *device, MobileWizard *self)
 		if (candidate) {
 			if (candidate == device) {
 				gtk_tree_store_remove (GTK_TREE_STORE (self->dev_store), &iter);
-				if (self->device == candidate) {
-					g_object_unref (self->device);
-					self->device = NULL;
-				}
 				removed = TRUE;
 			}
 			g_object_unref (candidate);
@@ -1181,11 +1161,6 @@ intro_remove_all_devices (MobileWizard *self)
 {
 	gtk_tree_store_clear (self->dev_store);
 
-	if (self->device) {
-		g_object_unref (self->device);
-		self->device = NULL;
-	}
-
 	/* Select the "Any device" item */
 	gtk_combo_box_set_active (GTK_COMBO_BOX (self->dev_combo), 0);
 	gtk_widget_set_sensitive (self->dev_combo, FALSE);
@@ -1214,19 +1189,26 @@ intro_combo_changed (MobileWizard *self)
 	GtkTreeIter iter;
 	NMDevice *selected = NULL;
 
+	g_free (self->dev_desc);
+	self->dev_desc = NULL;
+
 	if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (self->dev_combo), &iter))
 		return;
 
 	gtk_tree_model_get (GTK_TREE_MODEL (self->dev_store), &iter,
 	                    INTRO_COL_DEVICE, &selected, -1);
 	if (selected) {
-		if (self->device)
-			g_object_unref (self->device);
-		self->device = selected;
-	} else {
-		if (self->device)
-			g_object_unref (self->device);
-		self->device = NULL;
+		self->dev_desc = g_strdup (utils_get_device_description (selected));
+		if (NM_IS_GSM_DEVICE (selected))
+			self->method_type = NMN_MOBILE_ACCESS_METHOD_TYPE_GSM;
+		else if (NM_IS_CDMA_DEVICE (selected))
+			self->method_type = NMN_MOBILE_ACCESS_METHOD_TYPE_CDMA;
+		else {
+			g_warning ("%s: unknown device type '%s'", __func__,
+			           G_OBJECT_TYPE_NAME (selected));
+		}
+
+		g_object_unref (selected);
 	}
 }
 
@@ -1275,7 +1257,7 @@ intro_setup (MobileWizard *self)
 	gtk_box_pack_start (GTK_BOX (info_vbox), label, FALSE, TRUE, 0);
 
 	/* Device combo; only built if the wizard's caller didn't pass one in */
-	if (!self->device) {
+	if (!self->initial_method_type) {
 		GtkTreeIter iter;
 
 		self->client = nm_client_new ();
@@ -1377,7 +1359,7 @@ forward_func (gint current_page, gpointer user_data)
 	MobileWizard *self = user_data;
 
 	if (current_page == self->providers_idx) {
-		NmnMobileProviderType method_type = get_devtype (self->device);
+		NmnMobileAccessMethodType method_type = self->method_type;
 
 		/* If the provider is unlisted, we can skip ahead of the user's
 		 * access technology is CDMA.
@@ -1451,7 +1433,9 @@ get_country_from_locale (void)
 
 MobileWizard *
 mobile_wizard_new (GtkWindow *parent,
-                   NMDevice *device,
+                   GtkWindowGroup *window_group,
+                   NMDeviceType devtype,
+                   gboolean will_connect_after,
                    MobileWizardCallback cb,
                    gpointer user_data)
 {
@@ -1472,11 +1456,24 @@ mobile_wizard_new (GtkWindow *parent,
 		self->country = g_hash_table_lookup (self->country_codes, cc);
 	g_free (cc);
 
+	self->will_connect_after = will_connect_after;
 	self->callback = cb;
 	self->user_data = user_data;
-	if (device) {
-		self->device = g_object_ref (device);
-		self->began_with_device = TRUE;
+	if (devtype != NM_DEVICE_TYPE_UNKNOWN)
+		self->initial_method_type = TRUE;
+	switch (devtype) {
+	case NM_DEVICE_TYPE_UNKNOWN:
+		break;
+	case NM_DEVICE_TYPE_GSM:
+		self->method_type = NMN_MOBILE_ACCESS_METHOD_TYPE_GSM;
+		break;
+	case NM_DEVICE_TYPE_CDMA:
+		self->method_type = NMN_MOBILE_ACCESS_METHOD_TYPE_CDMA;
+		break;
+	default:
+		g_warning ("%s: invalid device type %d", __func__, devtype);
+		mobile_wizard_destroy (self);
+		return NULL;
 	}
 
 	self->assistant = gtk_assistant_new ();
@@ -1502,6 +1499,9 @@ mobile_wizard_new (GtkWindow *parent,
 	gtk_window_set_skip_taskbar_hint (GTK_WINDOW (self->assistant), TRUE);
 	gtk_window_set_type_hint (GTK_WINDOW (self->assistant), GDK_WINDOW_TYPE_HINT_DIALOG);
 
+	if (window_group)
+		gtk_window_group_add_window (window_group, GTK_WINDOW (self->assistant));
+
 	return self;
 }
 
@@ -1519,14 +1519,13 @@ mobile_wizard_destroy (MobileWizard *self)
 {
 	g_return_if_fail (self != NULL);
 
+	g_free (self->dev_desc);
+
 	if (self->assistant) {
 		gtk_widget_hide (self->assistant);
 		gtk_widget_destroy (self->assistant);
 	}
 
-	if (self->device)
-		g_object_unref (self->device);
-
 	if (self->client)
 		g_object_unref (self->client);
 
diff --git a/src/utils/mobile-wizard.h b/src/utils/mobile-wizard.h
index dc4e868..d205953 100644
--- a/src/utils/mobile-wizard.h
+++ b/src/utils/mobile-wizard.h
@@ -44,7 +44,9 @@ typedef void (*MobileWizardCallback) (MobileWizard *self,
                                       gpointer user_data);
 
 MobileWizard *mobile_wizard_new (GtkWindow *parent,
-                                 NMDevice *device,
+                                 GtkWindowGroup *window_group,
+                                 NMDeviceType devtype,
+                                 gboolean will_connect_after,
                                  MobileWizardCallback cb,
                                  gpointer user_data);
 
diff --git a/src/utils/nmn-mobile-providers.h b/src/utils/nmn-mobile-providers.h
index dcd2e9a..d3ba215 100644
--- a/src/utils/nmn-mobile-providers.h
+++ b/src/utils/nmn-mobile-providers.h
@@ -34,7 +34,7 @@ typedef enum {
     NMN_MOBILE_ACCESS_METHOD_TYPE_UNKNOWN = 0,
     NMN_MOBILE_ACCESS_METHOD_TYPE_GSM,
     NMN_MOBILE_ACCESS_METHOD_TYPE_CDMA
-} NmnMobileProviderType;
+} NmnMobileAccessMethodType;
 
 typedef struct {
     char *mcc;
@@ -58,7 +58,7 @@ typedef struct {
     /* Only used with NMN_PROVIDER_TYPE_CDMA */
     GSList *cdma_sid; /* GSList of guint32 */
 
-    NmnMobileProviderType type;
+    NmnMobileAccessMethodType type;
 
     gint refs;
 } NmnMobileAccessMethod;



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