[network-manager-applet/nma-0-9-6] applet: rename "wired" and "wireless" in files/classes/functions



commit 2eae4e75ced30c4354c25a43774f1157098cd01a
Author: Dan Winship <danw gnome org>
Date:   Wed Oct 24 12:51:46 2012 -0500

    applet: rename "wired" and "wireless" in files/classes/functions
    
    Update internal names to match the UI (except for the "wireless
    security" stuff, which is already a misnomer since it's used for both
    Wi-Fi and 802.1x, and can be revisited later.)

 po/POTFILES.in                                     |    2 +-
 src/applet-device-wifi.c                           |   46 +++---
 src/applet.c                                       |    2 +-
 src/libnm-gtk/Makefile.am                          |    4 +-
 .../{nm-wireless-dialog.c => nm-wifi-dialog.c}     |  142 ++++++++++----------
 src/libnm-gtk/nm-wifi-dialog.h                     |   80 +++++++++++
 src/libnm-gtk/nm-wireless-dialog.h                 |   80 -----------
 7 files changed, 178 insertions(+), 178 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1f13e35..56fd402 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -48,7 +48,7 @@ src/connection-editor/vpn-helpers.c
 src/gnome-bluetooth/bt-widget.c
 src/gnome-bluetooth/nma-bt-device.c
 src/libnm-gtk/nm-mobile-wizard.c
-src/libnm-gtk/nm-wireless-dialog.c
+src/libnm-gtk/nm-wifi-dialog.c
 [type: gettext/glade]src/libnm-gtk/wifi.ui
 src/main.c
 src/mb-menu-item.c
diff --git a/src/applet-device-wifi.c b/src/applet-device-wifi.c
index 7ec7e90..60e5f76 100644
--- a/src/applet-device-wifi.c
+++ b/src/applet-device-wifi.c
@@ -45,7 +45,7 @@
 #include "applet-device-wifi.h"
 #include "ap-menu-item.h"
 #include "utils.h"
-#include "nm-wireless-dialog.h"
+#include "nm-wifi-dialog.h"
 
 #define ACTIVE_AP_TAG "active-ap"
 
@@ -77,7 +77,7 @@ applet_wifi_connect_to_hidden_network (NMApplet *applet)
 {
 	GtkWidget *dialog;
 
-	dialog = nma_wireless_dialog_new_for_other (applet->nm_client, applet->settings);
+	dialog = nma_wifi_dialog_new_for_other (applet->nm_client, applet->settings);
 	if (dialog) {
 		g_signal_connect (dialog, "response",
 		                  G_CALLBACK (wireless_dialog_response_cb),
@@ -128,7 +128,7 @@ applet_wifi_create_wifi_network (NMApplet *applet)
 {
 	GtkWidget *dialog;
 
-	dialog = nma_wireless_dialog_new_for_create (applet->nm_client, applet->settings);
+	dialog = nma_wifi_dialog_new_for_create (applet->nm_client, applet->settings);
 	if (dialog) {
 		g_signal_connect (dialog, "response",
 		                  G_CALLBACK (wireless_dialog_response_cb),
@@ -345,7 +345,7 @@ more_info_wifi_dialog_response_cb (GtkDialog *foo,
                                    gint response,
                                    gpointer user_data)
 {
-	NMAWirelessDialog *dialog = NMA_WIRELESS_DIALOG (foo);
+	NMAWifiDialog *dialog = NMA_WIFI_DIALOG (foo);
 	MoreInfo *info = user_data;
 	NMConnection *connection = NULL;
 	NMDevice *device = NULL;
@@ -356,13 +356,13 @@ more_info_wifi_dialog_response_cb (GtkDialog *foo,
 		goto done;
 	}
 
-	if (!nma_wireless_dialog_get_nag_ignored (dialog)) {
+	if (!nma_wifi_dialog_get_nag_ignored (dialog)) {
 		GtkWidget *nag_dialog;
 
 		/* Nag the user about certificates or whatever.  Only destroy the dialog
 		 * if no nagging was done.
 		 */
-		nag_dialog = nma_wireless_dialog_nag_user (dialog);
+		nag_dialog = nma_wifi_dialog_nag_user (dialog);
 		if (nag_dialog) {
 			gtk_window_set_transient_for (GTK_WINDOW (nag_dialog), GTK_WINDOW (dialog));
 			g_signal_connect (nag_dialog, "response",
@@ -372,16 +372,16 @@ more_info_wifi_dialog_response_cb (GtkDialog *foo,
 		}
 	}
 
-	/* nma_wireless_dialog_get_connection() returns a connection with the
+	/* nma_wifi_dialog_get_connection() returns a connection with the
 	 * refcount incremented, so the caller must remember to unref it.
 	 */
-	connection = nma_wireless_dialog_get_connection (dialog, &device, &ap);
+	connection = nma_wifi_dialog_get_connection (dialog, &device, &ap);
 	g_assert (connection);
 	g_assert (device);
 
 	info->callback (connection, TRUE, FALSE, info->callback_data);
 
-	/* Balance nma_wireless_dialog_get_connection() */
+	/* Balance nma_wifi_dialog_get_connection() */
 	g_object_unref (connection);
 
 done:
@@ -469,7 +469,7 @@ _do_new_auto_connection (NMApplet *applet,
 		more_info->callback = callback;
 		more_info->callback_data = callback_data;
 
-		dialog = nma_wireless_dialog_new (applet->nm_client, applet->settings, connection, device, ap, FALSE);
+		dialog = nma_wifi_dialog_new (applet->nm_client, applet->settings, connection, device, ap, FALSE);
 		if (dialog) {
 			g_signal_connect (dialog, "response",
 				              G_CALLBACK (more_info_wifi_dialog_response_cb),
@@ -1357,10 +1357,10 @@ nag_dialog_response_cb (GtkDialog *nag_dialog,
                         gint response,
                         gpointer user_data)
 {
-	NMAWirelessDialog *wireless_dialog = NMA_WIRELESS_DIALOG (user_data);
+	NMAWifiDialog *wireless_dialog = NMA_WIFI_DIALOG (user_data);
 
 	if (response == GTK_RESPONSE_NO) {  /* user opted not to correct the warning */
-		nma_wireless_dialog_set_nag_ignored (wireless_dialog, TRUE);
+		nma_wifi_dialog_set_nag_ignored (wireless_dialog, TRUE);
 		g_idle_add (wireless_dialog_close, wireless_dialog);
 		g_object_weak_ref (G_OBJECT (wireless_dialog), wireless_dialog_destroyed, NULL);
 	}
@@ -1409,7 +1409,7 @@ wireless_dialog_response_cb (GtkDialog *foo,
                              gint response,
                              gpointer user_data)
 {
-	NMAWirelessDialog *dialog = NMA_WIRELESS_DIALOG (foo);
+	NMAWifiDialog *dialog = NMA_WIFI_DIALOG (foo);
 	NMApplet *applet = NM_APPLET (user_data);
 	NMConnection *connection = NULL, *fuzzy_match = NULL;
 	NMDevice *device = NULL;
@@ -1419,13 +1419,13 @@ wireless_dialog_response_cb (GtkDialog *foo,
 	if (response != GTK_RESPONSE_OK)
 		goto done;
 
-	if (!nma_wireless_dialog_get_nag_ignored (dialog)) {
+	if (!nma_wifi_dialog_get_nag_ignored (dialog)) {
 		GtkWidget *nag_dialog;
 
 		/* Nag the user about certificates or whatever.  Only destroy the dialog
 		 * if no nagging was done.
 		 */
-		nag_dialog = nma_wireless_dialog_nag_user (dialog);
+		nag_dialog = nma_wifi_dialog_nag_user (dialog);
 		if (nag_dialog) {
 			gtk_window_set_transient_for (GTK_WINDOW (nag_dialog), GTK_WINDOW (dialog));
 			g_signal_connect (nag_dialog, "response",
@@ -1435,10 +1435,10 @@ wireless_dialog_response_cb (GtkDialog *foo,
 		}
 	}
 
-	/* nma_wireless_dialog_get_connection() returns a connection with the
+	/* nma_wifi_dialog_get_connection() returns a connection with the
 	 * refcount incremented, so the caller must remember to unref it.
 	 */
-	connection = nma_wireless_dialog_get_connection (dialog, &device, &ap);
+	connection = nma_wifi_dialog_get_connection (dialog, &device, &ap);
 	g_assert (connection);
 	g_assert (device);
 
@@ -1489,7 +1489,7 @@ wireless_dialog_response_cb (GtkDialog *foo,
 		                                       applet);
 	}
 
-	/* Balance nma_wireless_dialog_get_connection() */
+	/* Balance nma_wifi_dialog_get_connection() */
 	g_object_unref (connection);
 
 done:
@@ -1550,7 +1550,7 @@ get_secrets_dialog_response_cb (GtkDialog *foo,
 {
 	SecretsRequest *req = user_data;
 	NMWifiInfo *info = (NMWifiInfo *) req;
-	NMAWirelessDialog *dialog = NMA_WIRELESS_DIALOG (info->dialog);
+	NMAWifiDialog *dialog = NMA_WIFI_DIALOG (info->dialog);
 	NMConnection *connection = NULL;
 	NMSettingWirelessSecurity *s_wireless_sec;
 	GHashTable *settings = NULL;
@@ -1560,13 +1560,13 @@ get_secrets_dialog_response_cb (GtkDialog *foo,
 	/* Handle the nag dialog specially; don't want to clear the NMActiveConnection
 	 * destroy handler yet if the main dialog isn't going away.
 	 */
-	if ((response == GTK_RESPONSE_OK) && !nma_wireless_dialog_get_nag_ignored (dialog)) {
+	if ((response == GTK_RESPONSE_OK) && !nma_wifi_dialog_get_nag_ignored (dialog)) {
 		GtkWidget *widget;
 
 		/* Nag the user about certificates or whatever.  Only destroy the dialog
 		 * if no nagging was done.
 		 */
-		widget = nma_wireless_dialog_nag_user (dialog);
+		widget = nma_wifi_dialog_nag_user (dialog);
 		if (widget) {
 			gtk_window_set_transient_for (GTK_WINDOW (widget), GTK_WINDOW (dialog));
 			g_signal_connect (widget, "response",
@@ -1585,7 +1585,7 @@ get_secrets_dialog_response_cb (GtkDialog *foo,
 		goto done;
 	}
 
-	connection = nma_wireless_dialog_get_connection (dialog, NULL, NULL);
+	connection = nma_wifi_dialog_get_connection (dialog, NULL, NULL);
 	if (!connection) {
 		g_set_error (&error,
 		             NM_SECRET_AGENT_ERROR,
@@ -1671,7 +1671,7 @@ wireless_get_secrets (SecretsRequest *req, GError **error)
 
 	applet_secrets_request_set_free_func (req, free_wifi_info);
 
-	info->dialog = nma_wireless_dialog_new (req->applet->nm_client, req->applet->settings, req->connection, NULL, NULL, TRUE);
+	info->dialog = nma_wifi_dialog_new (req->applet->nm_client, req->applet->settings, req->connection, NULL, NULL, TRUE);
 	if (info->dialog) {
 		g_signal_connect (info->dialog, "response",
 		                  G_CALLBACK (get_secrets_dialog_response_cb),
diff --git a/src/applet.c b/src/applet.c
index 16bb327..6770529 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -74,7 +74,7 @@
 #include "applet-device-bt.h"
 #include "applet-device-wimax.h"
 #include "applet-dialogs.h"
-#include "nm-wireless-dialog.h"
+#include "nm-wifi-dialog.h"
 #include "applet-vpn-request.h"
 #include "utils.h"
 #include "shell-watcher.h"
diff --git a/src/libnm-gtk/Makefile.am b/src/libnm-gtk/Makefile.am
index 89b643b..ac7a561 100644
--- a/src/libnm-gtk/Makefile.am
+++ b/src/libnm-gtk/Makefile.am
@@ -4,13 +4,13 @@ ui_DATA = wifi.ui
 libnmgtkdir = $(includedir)/libnm-gtk
 
 libnmgtk_HEADERS = \
-	nm-wireless-dialog.h \
+	nm-wifi-dialog.h \
 	nm-mobile-wizard.h
 
 lib_LTLIBRARIES = libnm-gtk.la
 
 libnm_gtk_la_SOURCES = \
-	nm-wireless-dialog.c \
+	nm-wifi-dialog.c \
 	nm-mobile-wizard.c
 
 libnm_gtk_la_CFLAGS = \
diff --git a/src/libnm-gtk/nm-wireless-dialog.c b/src/libnm-gtk/nm-wifi-dialog.c
similarity index 90%
rename from src/libnm-gtk/nm-wireless-dialog.c
rename to src/libnm-gtk/nm-wifi-dialog.c
index 5f34bcb..6a401c4 100644
--- a/src/libnm-gtk/nm-wireless-dialog.c
+++ b/src/libnm-gtk/nm-wifi-dialog.c
@@ -35,18 +35,18 @@
 #include <nm-setting-wireless.h>
 #include <nm-setting-ip4-config.h>
 
-#include "nm-wireless-dialog.h"
+#include "nm-wifi-dialog.h"
 #include "wireless-security.h"
 #include "utils.h"
 
-G_DEFINE_TYPE (NMAWirelessDialog, nma_wireless_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE (NMAWifiDialog, nma_wifi_dialog, GTK_TYPE_DIALOG)
 
-#define NMA_WIRELESS_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
-                                            NMA_TYPE_WIRELESS_DIALOG, \
-                                            NMAWirelessDialogPrivate))
+#define NMA_WIFI_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
+                                        NMA_TYPE_WIFI_DIALOG, \
+                                        NMAWifiDialogPrivate))
 
 typedef struct {
-	NMAWirelessDialog *self;
+	NMAWifiDialog *self;
 	NMConnection *connection;
 	gboolean canceled;
 } GetSecretsInfo;
@@ -77,7 +77,7 @@ typedef struct {
 	GetSecretsInfo *secrets_info;
 
 	gboolean disposed;
-} NMAWirelessDialogPrivate;
+} NMAWifiDialogPrivate;
 
 #define D_NAME_COLUMN		0
 #define D_DEV_COLUMN		1
@@ -90,23 +90,23 @@ typedef struct {
 #define C_SEP_COLUMN		2
 #define C_NEW_COLUMN		3
 
-static gboolean security_combo_init (NMAWirelessDialog *self, gboolean secrets_only);
+static gboolean security_combo_init (NMAWifiDialog *self, gboolean secrets_only);
 static void ssid_entry_changed (GtkWidget *entry, gpointer user_data);
 
 void
-nma_wireless_dialog_set_nag_ignored (NMAWirelessDialog *self, gboolean ignored)
+nma_wifi_dialog_set_nag_ignored (NMAWifiDialog *self, gboolean ignored)
 {
 	g_return_if_fail (self != NULL);
 
-	NMA_WIRELESS_DIALOG_GET_PRIVATE (self)->nag_ignored = ignored;
+	NMA_WIFI_DIALOG_GET_PRIVATE (self)->nag_ignored = ignored;
 }
 
 gboolean
-nma_wireless_dialog_get_nag_ignored (NMAWirelessDialog *self)
+nma_wifi_dialog_get_nag_ignored (NMAWifiDialog *self)
 {
 	g_return_val_if_fail (self != NULL, FALSE);
 
-	return NMA_WIRELESS_DIALOG_GET_PRIVATE (self)->nag_ignored;
+	return NMA_WIFI_DIALOG_GET_PRIVATE (self)->nag_ignored;
 }
 
 static void
@@ -165,8 +165,8 @@ static void
 security_combo_changed (GtkWidget *combo,
                         gpointer user_data)
 {
-	NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
-	NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	NMAWifiDialog *self = NMA_WIFI_DIALOG (user_data);
+	NMAWifiDialogPrivate *priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 	GtkWidget *vbox, *sec_widget, *def_widget;
 	GList *elt, *children;
 	GtkTreeIter iter;
@@ -227,8 +227,8 @@ static void
 security_combo_changed_manually (GtkWidget *combo,
                                  gpointer user_data)
 {
-	NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
-	NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	NMAWifiDialog *self = NMA_WIFI_DIALOG (user_data);
+	NMAWifiDialogPrivate *priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 
 	/* Flag that the combo was changed manually to allow focus to move
 	 * to the security method's default widget instead of the network name.
@@ -238,9 +238,9 @@ security_combo_changed_manually (GtkWidget *combo,
 }
 
 static GByteArray *
-validate_dialog_ssid (NMAWirelessDialog *self)
+validate_dialog_ssid (NMAWifiDialog *self)
 {
-	NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	NMAWifiDialogPrivate *priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 	GtkWidget *widget;
 	const char *ssid;
 	guint32 ssid_len;
@@ -262,8 +262,8 @@ validate_dialog_ssid (NMAWirelessDialog *self)
 static void
 stuff_changed_cb (WirelessSecurity *sec, gpointer user_data)
 {
-	NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
-	NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	NMAWifiDialog *self = NMA_WIFI_DIALOG (user_data);
+	NMAWifiDialogPrivate *priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 	GByteArray *ssid = NULL;
 	gboolean free_ssid = TRUE;
 	gboolean valid = FALSE;
@@ -297,8 +297,8 @@ stuff_changed_cb (WirelessSecurity *sec, gpointer user_data)
 static void
 ssid_entry_changed (GtkWidget *entry, gpointer user_data)
 {
-	NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
-	NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	NMAWifiDialog *self = NMA_WIFI_DIALOG (user_data);
+	NMAWifiDialogPrivate *priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 	GtkTreeIter iter;
 	WirelessSecurity *sec = NULL;
 	GtkTreeModel *model;
@@ -340,8 +340,8 @@ static void
 connection_combo_changed (GtkWidget *combo,
                           gpointer user_data)
 {
-	NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
-	NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	NMAWifiDialog *self = NMA_WIFI_DIALOG (user_data);
+	NMAWifiDialogPrivate *priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 	GtkTreeIter iter;
 	GtkTreeModel *model;
 	gboolean is_new = FALSE;
@@ -411,9 +411,9 @@ alphabetize_connections (NMConnection *a, NMConnection *b)
 }
 
 static gboolean
-connection_combo_init (NMAWirelessDialog *self, NMConnection *connection)
+connection_combo_init (NMAWifiDialog *self, NMConnection *connection)
 {
-	NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	NMAWifiDialogPrivate *priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 	GtkListStore *store;
 	int num_added = 0;
 	GtkTreeIter tree_iter;
@@ -563,8 +563,8 @@ static void
 device_combo_changed (GtkWidget *combo,
                       gpointer user_data)
 {
-	NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
-	NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	NMAWifiDialog *self = NMA_WIFI_DIALOG (user_data);
+	NMAWifiDialogPrivate *priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 	GtkTreeIter iter;
 	GtkTreeModel *model;
 
@@ -622,9 +622,9 @@ can_use_device (NMDevice *device)
 }
 
 static gboolean
-device_combo_init (NMAWirelessDialog *self, NMDevice *device)
+device_combo_init (NMAWifiDialog *self, NMDevice *device)
 {
-	NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	NMAWifiDialogPrivate *priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 	const GPtrArray *devices;
 	GtkListStore *store;
 	int i, num_added = 0;
@@ -735,7 +735,7 @@ get_default_type_for_security (NMSettingWirelessSecurity *sec,
 }
 
 static void
-add_security_item (NMAWirelessDialog *self,
+add_security_item (NMAWifiDialog *self,
                    WirelessSecurity *sec,
                    GtkListStore *model,
                    GtkTreeIter *iter,
@@ -754,7 +754,7 @@ get_secrets_cb (NMRemoteConnection *connection,
                 gpointer user_data)
 {
 	GetSecretsInfo *info = user_data;
-	NMAWirelessDialogPrivate *priv;
+	NMAWifiDialogPrivate *priv;
 	GHashTableIter hash_iter;
 	gpointer key, value;
 	GtkTreeModel *model;
@@ -763,7 +763,7 @@ get_secrets_cb (NMRemoteConnection *connection,
 	if (info->canceled)
 		goto out;
 
-	priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (info->self);
+	priv = NMA_WIFI_DIALOG_GET_PRIVATE (info->self);
 	if (priv->secrets_info == info) {
 		priv->secrets_info = NULL;
 
@@ -830,9 +830,9 @@ out:
 }
 
 static gboolean
-security_combo_init (NMAWirelessDialog *self, gboolean secrets_only)
+security_combo_init (NMAWifiDialog *self, gboolean secrets_only)
 {
-	NMAWirelessDialogPrivate *priv;
+	NMAWifiDialogPrivate *priv;
 	GtkListStore *sec_model;
 	GtkTreeIter iter;
 	guint32 ap_flags = 0;
@@ -850,7 +850,7 @@ security_combo_init (NMAWirelessDialog *self, gboolean secrets_only)
 
 	g_return_val_if_fail (self != NULL, FALSE);
 
-	priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 	g_return_val_if_fail (priv->device != NULL, FALSE);
 	g_return_val_if_fail (priv->sec_combo != NULL, FALSE);
 
@@ -1026,8 +1026,8 @@ security_combo_init (NMAWirelessDialog *self, gboolean secrets_only)
 static gboolean
 revalidate (gpointer user_data)
 {
-	NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
-	NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	NMAWifiDialog *self = NMA_WIFI_DIALOG (user_data);
+	NMAWifiDialogPrivate *priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 
 	priv->revalidate_id = 0;
 	security_combo_changed (priv->sec_combo, self);
@@ -1035,13 +1035,13 @@ revalidate (gpointer user_data)
 }
 
 static gboolean
-internal_init (NMAWirelessDialog *self,
+internal_init (NMAWifiDialog *self,
                NMConnection *specific_connection,
                NMDevice *specific_device,
                gboolean secrets_only,
                gboolean create)
 {
-	NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	NMAWifiDialogPrivate *priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 	GtkWidget *widget;
 	char *label, *icon_name = "network-wireless";
 	gboolean security_combo_focus = FALSE;
@@ -1188,11 +1188,11 @@ internal_init (NMAWirelessDialog *self,
 }
 
 NMConnection *
-nma_wireless_dialog_get_connection (NMAWirelessDialog *self,
-                                    NMDevice **out_device,
-                                    NMAccessPoint **ap)
+nma_wifi_dialog_get_connection (NMAWifiDialog *self,
+                                NMDevice **out_device,
+                                NMAccessPoint **ap)
 {
-	NMAWirelessDialogPrivate *priv;
+	NMAWifiDialogPrivate *priv;
 	GtkWidget *combo;
 	GtkTreeModel *model;
 	WirelessSecurity *sec = NULL;
@@ -1202,7 +1202,7 @@ nma_wireless_dialog_get_connection (NMAWirelessDialog *self,
 
 	g_return_val_if_fail (self != NULL, NULL);
 
-	priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 
 	if (!priv->connection) {
 		NMSettingConnection *s_con;
@@ -1266,15 +1266,15 @@ nma_wireless_dialog_get_connection (NMAWirelessDialog *self,
 }
 
 GtkWidget *
-nma_wireless_dialog_new (NMClient *client,
-                         NMRemoteSettings *settings,
-                         NMConnection *connection,
-                         NMDevice *device,
-                         NMAccessPoint *ap,
-                         gboolean secrets_only)
+nma_wifi_dialog_new (NMClient *client,
+                     NMRemoteSettings *settings,
+                     NMConnection *connection,
+                     NMDevice *device,
+                     NMAccessPoint *ap,
+                     gboolean secrets_only)
 {
-	NMAWirelessDialog *self;
-	NMAWirelessDialogPrivate *priv;
+	NMAWifiDialog *self;
+	NMAWifiDialogPrivate *priv;
 	guint32 dev_caps;
 
 	g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
@@ -1288,9 +1288,9 @@ nma_wireless_dialog_new (NMClient *client,
 		g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), NULL);
 	}
 
-	self = NMA_WIRELESS_DIALOG (g_object_new (NMA_TYPE_WIRELESS_DIALOG, NULL));
+	self = NMA_WIFI_DIALOG (g_object_new (NMA_TYPE_WIFI_DIALOG, NULL));
 	if (self) {
-		priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+		priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 
 		priv->client = g_object_ref (client);
 		priv->settings = g_object_ref (settings);
@@ -1313,17 +1313,17 @@ nma_wireless_dialog_new (NMClient *client,
 static GtkWidget *
 internal_new_other (NMClient *client, NMRemoteSettings *settings, gboolean create)
 {
-	NMAWirelessDialog *self;
-	NMAWirelessDialogPrivate *priv;
+	NMAWifiDialog *self;
+	NMAWifiDialogPrivate *priv;
 
 	g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
 	g_return_val_if_fail (NM_IS_REMOTE_SETTINGS (settings), NULL);
 
-	self = NMA_WIRELESS_DIALOG (g_object_new (NMA_TYPE_WIRELESS_DIALOG, NULL));
+	self = NMA_WIFI_DIALOG (g_object_new (NMA_TYPE_WIFI_DIALOG, NULL));
 	if (!self)
 		return NULL;
 
-	priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 
 	priv->client = g_object_ref (client);
 	priv->settings = g_object_ref (settings);
@@ -1341,21 +1341,21 @@ internal_new_other (NMClient *client, NMRemoteSettings *settings, gboolean creat
 }
 
 GtkWidget *
-nma_wireless_dialog_new_for_other (NMClient *client, NMRemoteSettings *settings)
+nma_wifi_dialog_new_for_other (NMClient *client, NMRemoteSettings *settings)
 {
 	return internal_new_other (client, settings, FALSE);
 }
 
 GtkWidget *
-nma_wireless_dialog_new_for_create (NMClient *client, NMRemoteSettings *settings)
+nma_wifi_dialog_new_for_create (NMClient *client, NMRemoteSettings *settings)
 {
 	return internal_new_other (client, settings, TRUE);
 }
 
 GtkWidget *
-nma_wireless_dialog_nag_user (NMAWirelessDialog *self)
+nma_wifi_dialog_nag_user (NMAWifiDialog *self)
 {
-	NMAWirelessDialogPrivate *priv;
+	NMAWifiDialogPrivate *priv;
 	GtkWidget *combo;
 	GtkTreeModel *model;
 	GtkTreeIter iter;
@@ -1363,7 +1363,7 @@ nma_wireless_dialog_nag_user (NMAWirelessDialog *self)
 
 	g_return_val_if_fail (self != NULL, NULL);
 
-	priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 
 	combo = GTK_WIDGET (gtk_builder_get_object (priv->builder, "security_combo"));
 	g_return_val_if_fail (combo != NULL, NULL);
@@ -1383,9 +1383,9 @@ nma_wireless_dialog_nag_user (NMAWirelessDialog *self)
 }
 
 static void
-nma_wireless_dialog_init (NMAWirelessDialog *self)
+nma_wifi_dialog_init (NMAWifiDialog *self)
 {
-	NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+	NMAWifiDialogPrivate *priv = NMA_WIFI_DIALOG_GET_PRIVATE (self);
 	GError *error = NULL;
 
 	priv->builder = gtk_builder_new ();
@@ -1399,10 +1399,10 @@ nma_wireless_dialog_init (NMAWirelessDialog *self)
 static void
 dispose (GObject *object)
 {
-	NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (object);
+	NMAWifiDialogPrivate *priv = NMA_WIFI_DIALOG_GET_PRIVATE (object);
 
 	if (priv->disposed) {
-		G_OBJECT_CLASS (nma_wireless_dialog_parent_class)->dispose (object);
+		G_OBJECT_CLASS (nma_wifi_dialog_parent_class)->dispose (object);
 		return;
 	}
 
@@ -1433,15 +1433,15 @@ dispose (GObject *object)
 	if (priv->revalidate_id)
 		g_source_remove (priv->revalidate_id);
 
-	G_OBJECT_CLASS (nma_wireless_dialog_parent_class)->dispose (object);
+	G_OBJECT_CLASS (nma_wifi_dialog_parent_class)->dispose (object);
 }
 
 static void
-nma_wireless_dialog_class_init (NMAWirelessDialogClass *nmad_class)
+nma_wifi_dialog_class_init (NMAWifiDialogClass *nmad_class)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (nmad_class);
 
-	g_type_class_add_private (nmad_class, sizeof (NMAWirelessDialogPrivate));
+	g_type_class_add_private (nmad_class, sizeof (NMAWifiDialogPrivate));
 
 	/* virtual methods */
 	object_class->dispose = dispose;
diff --git a/src/libnm-gtk/nm-wifi-dialog.h b/src/libnm-gtk/nm-wifi-dialog.h
new file mode 100644
index 0000000..47ecf94
--- /dev/null
+++ b/src/libnm-gtk/nm-wifi-dialog.h
@@ -0,0 +1,80 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2012 Red Hat, Inc.
+ */
+
+
+/* WARNING: this file is private API between nm-applet and various GNOME
+ * bits; it may change without notice and is not guaranteed to be stable.
+ */
+
+#ifndef NMA_WIFI_DIALOG_H
+#define NMA_WIFI_DIALOG_H
+
+#include <gtk/gtk.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include <nm-connection.h>
+#include <nm-device.h>
+#include <nm-access-point.h>
+#include <nm-remote-settings.h>
+
+#define NMA_TYPE_WIFI_DIALOG            (nma_wifi_dialog_get_type ())
+#define NMA_WIFI_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMA_TYPE_WIFI_DIALOG, NMAWifiDialog))
+#define NMA_WIFI_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NMA_TYPE_WIFI_DIALOG, NMAWifiDialogClass))
+#define NMA_IS_WIFI_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMA_TYPE_WIFI_DIALOG))
+#define NMA_IS_WIFI_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NMA_TYPE_WIFI_DIALOG))
+#define NMA_WIFI_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NMA_TYPE_WIFI_DIALOG, NMAWifiDialogClass))
+
+typedef struct {
+	GtkDialog parent;
+} NMAWifiDialog;
+
+typedef struct {
+	GtkDialogClass parent;
+} NMAWifiDialogClass;
+
+GType nma_wifi_dialog_get_type (void);
+
+GtkWidget *nma_wifi_dialog_new (NMClient *client,
+				NMRemoteSettings *settings,
+                                NMConnection *connection,
+                                NMDevice *device,
+                                NMAccessPoint *ap,
+                                gboolean secrets_only);
+
+GtkWidget *nma_wifi_dialog_new_for_other (NMClient *client,
+					  NMRemoteSettings *settings);
+
+GtkWidget *nma_wifi_dialog_new_for_create (NMClient *client,
+					   NMRemoteSettings *settings);
+
+NMConnection * nma_wifi_dialog_get_connection (NMAWifiDialog *dialog,
+                                               NMDevice **device,
+                                               NMAccessPoint **ap);
+
+GtkWidget * nma_wifi_dialog_nag_user (NMAWifiDialog *dialog);
+
+void nma_wifi_dialog_set_nag_ignored (NMAWifiDialog *dialog, gboolean ignored);
+
+gboolean nma_wifi_dialog_get_nag_ignored (NMAWifiDialog *dialog);
+
+#endif	/* NMA_WIFI_DIALOG_H */
+



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