[network-manager-applet/nma-0-9-6] libnm-gtk: bring back a shim NMAWirelessDialog (bgo 681752)



commit 0cb89e89f7b96f79b695597bfbc96777711ff0dd
Author: Dan Winship <danw gnome org>
Date:   Mon Aug 13 12:25:23 2012 -0400

    libnm-gtk: bring back a shim NMAWirelessDialog (bgo 681752)
    
    Create a shim NMAWirelessDialog that just wraps NMAWifiDialog, for
    backward compatibility.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681752

 src/libnm-gtk/Makefile.am          |    2 +
 src/libnm-gtk/nm-wireless-dialog.c |   85 ++++++++++++++++++++++++++++++++++
 src/libnm-gtk/nm-wireless-dialog.h |   89 ++++++++++++++++++++++++++++++++++++
 3 files changed, 176 insertions(+), 0 deletions(-)
---
diff --git a/src/libnm-gtk/Makefile.am b/src/libnm-gtk/Makefile.am
index ac7a561..abc1f8a 100644
--- a/src/libnm-gtk/Makefile.am
+++ b/src/libnm-gtk/Makefile.am
@@ -5,12 +5,14 @@ libnmgtkdir = $(includedir)/libnm-gtk
 
 libnmgtk_HEADERS = \
 	nm-wifi-dialog.h \
+	nm-wireless-dialog.h \
 	nm-mobile-wizard.h
 
 lib_LTLIBRARIES = libnm-gtk.la
 
 libnm_gtk_la_SOURCES = \
 	nm-wifi-dialog.c \
+	nm-wireless-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-wireless-dialog.c
new file mode 100644
index 0000000..dc96aa0
--- /dev/null
+++ b/src/libnm-gtk/nm-wireless-dialog.c
@@ -0,0 +1,85 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager Applet -- allow user control over networking
+ *
+ * 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <nm-client.h>
+
+#include "nm-wireless-dialog.h"
+#include "nm-wifi-dialog.h"
+
+GType
+nma_wireless_dialog_get_type (void)
+{
+	return nma_wifi_dialog_get_type ();
+}
+
+void
+nma_wireless_dialog_set_nag_ignored (NMAWirelessDialog *self, gboolean ignored)
+{
+	nma_wifi_dialog_set_nag_ignored ((NMAWifiDialog *)self, ignored);
+}
+
+gboolean
+nma_wireless_dialog_get_nag_ignored (NMAWirelessDialog *self)
+{
+	return nma_wifi_dialog_get_nag_ignored ((NMAWifiDialog *)self);
+}
+
+NMConnection *
+nma_wireless_dialog_get_connection (NMAWirelessDialog *self,
+                                    NMDevice **out_device,
+                                    NMAccessPoint **ap)
+{
+	return nma_wifi_dialog_get_connection ((NMAWifiDialog *)self, out_device, ap);
+}
+
+GtkWidget *
+nma_wireless_dialog_new (NMClient *client,
+                         NMRemoteSettings *settings,
+                         NMConnection *connection,
+                         NMDevice *device,
+                         NMAccessPoint *ap,
+                         gboolean secrets_only)
+{
+	return nma_wifi_dialog_new (client, settings, connection, device, ap, secrets_only);
+}
+
+GtkWidget *
+nma_wireless_dialog_new_for_other (NMClient *client, NMRemoteSettings *settings)
+{
+	return nma_wifi_dialog_new_for_other (client, settings);
+}
+
+GtkWidget *
+nma_wireless_dialog_new_for_create (NMClient *client, NMRemoteSettings *settings)
+{
+	return nma_wifi_dialog_new_for_create (client, settings);
+}
+
+GtkWidget *
+nma_wireless_dialog_nag_user (NMAWirelessDialog *self)
+{
+	return nma_wifi_dialog_nag_user ((NMAWifiDialog *)self);
+}
diff --git a/src/libnm-gtk/nm-wireless-dialog.h b/src/libnm-gtk/nm-wireless-dialog.h
new file mode 100644
index 0000000..4e487c4
--- /dev/null
+++ b/src/libnm-gtk/nm-wireless-dialog.h
@@ -0,0 +1,89 @@
+/* NetworkManager Applet -- allow user control over networking
+ *
+ * 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_WIRELESS_DIALOG_H
+#define NMA_WIRELESS_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>
+#include <nm-wireless-dialog.h>
+
+#define NMA_TYPE_WIRELESS_DIALOG            (nma_wireless_dialog_get_type ())
+#define NMA_WIRELESS_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMA_TYPE_WIRELESS_DIALOG, NMAWirelessDialog))
+#define NMA_WIRELESS_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NMA_TYPE_WIRELESS_DIALOG, NMAWirelessDialogClass))
+#define NMA_IS_WIRELESS_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMA_TYPE_WIRELESS_DIALOG))
+#define NMA_IS_WIRELESS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NMA_TYPE_WIRELESS_DIALOG))
+#define NMA_WIRELESS_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NMA_TYPE_WIRELESS_DIALOG, NMAWirelessDialogClass))
+
+typedef struct {
+	GObject parent;
+} NMAWirelessDialog;
+
+typedef struct {
+	GObjectClass parent;
+} NMAWirelessDialogClass;
+
+GLIB_DEPRECATED_FOR(nma_wifi_dialog_get_type)
+GType nma_wireless_dialog_get_type (void);
+
+GLIB_DEPRECATED_FOR(nma_wifi_dialog_new)
+GtkWidget *nma_wireless_dialog_new (NMClient *client,
+				    NMRemoteSettings *settings,
+                                    NMConnection *connection,
+                                    NMDevice *device,
+                                    NMAccessPoint *ap,
+                                    gboolean secrets_only);
+
+GLIB_DEPRECATED_FOR(nma_wifi_dialog_new_for_other)
+GtkWidget *nma_wireless_dialog_new_for_other (NMClient *client,
+					      NMRemoteSettings *settings);
+
+GLIB_DEPRECATED_FOR(nma_wifi_dialog_new_for_create)
+GtkWidget *nma_wireless_dialog_new_for_create (NMClient *client,
+					       NMRemoteSettings *settings);
+
+GLIB_DEPRECATED_FOR(nma_wifi_dialog_get_connection)
+NMConnection * nma_wireless_dialog_get_connection (NMAWirelessDialog *dialog,
+                                                   NMDevice **device,
+                                                   NMAccessPoint **ap);
+
+GLIB_DEPRECATED_FOR(nma_wifi_dialog_nag_user)
+GtkWidget * nma_wireless_dialog_nag_user (NMAWirelessDialog *dialog);
+
+GLIB_DEPRECATED_FOR(nma_wifi_dialog_set_nag_ignored)
+void nma_wireless_dialog_set_nag_ignored (NMAWirelessDialog *dialog, gboolean ignored);
+
+GLIB_DEPRECATED_FOR(nma_wifi_dialog_get_nag_ignored)
+gboolean nma_wireless_dialog_get_nag_ignored (NMAWirelessDialog *dialog);
+
+#endif	/* NMA_WIRELESS_DIALOG_H */
+



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