network: Replace GObject boilerplate with modern macros
This commit is contained in:
parent
0106a4ab90
commit
d327e20a10
18 changed files with 240 additions and 422 deletions
|
@ -19,64 +19,15 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __NET_CONNECTION_EDITOR_H
|
||||
#define __NET_CONNECTION_EDITOR_H
|
||||
|
||||
#include <glib-object.h>
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <NetworkManager.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define NET_TYPE_CONNECTION_EDITOR (net_connection_editor_get_type ())
|
||||
#define NET_CONNECTION_EDITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NET_TYPE_CONNECTION_EDITOR, NetConnectionEditor))
|
||||
#define NET_CONNECTION_EDITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NET_TYPE_CONNECTION_EDITOR, NetConnectionEditorClass))
|
||||
#define NET_IS_CONNECTION_EDITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NET_TYPE_CONNECTION_EDITOR))
|
||||
#define NET_IS_CONNECTION_EDITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NET_TYPE_CONNECTION_EDITOR))
|
||||
#define NET_CONNECTION_EDITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NET_TYPE_CONNECTION_EDITOR, NetConnectionEditorClass))
|
||||
G_DECLARE_FINAL_TYPE (NetConnectionEditor, net_connection_editor, NET, CONNECTION_EDITOR, GtkDialog)
|
||||
|
||||
typedef struct _NetConnectionEditor NetConnectionEditor;
|
||||
typedef struct _NetConnectionEditorClass NetConnectionEditorClass;
|
||||
|
||||
struct _NetConnectionEditor
|
||||
{
|
||||
GtkDialog parent;
|
||||
|
||||
GtkWidget *parent_window;
|
||||
NMClient *client;
|
||||
NMDevice *device;
|
||||
|
||||
NMConnection *connection;
|
||||
NMConnection *orig_connection;
|
||||
gboolean is_new_connection;
|
||||
gboolean is_changed;
|
||||
NMAccessPoint *ap;
|
||||
|
||||
GtkButton *cancel_button;
|
||||
GtkButton *apply_button;
|
||||
GtkNotebook *notebook;
|
||||
GtkFrame *add_connection_frame;
|
||||
GtkNotebook *toplevel_notebook;
|
||||
|
||||
GSList *initializing_pages;
|
||||
GSList *pages;
|
||||
|
||||
guint permission_id;
|
||||
NMClientPermissionResult can_modify;
|
||||
|
||||
gboolean title_set;
|
||||
gboolean show_when_initialized;
|
||||
};
|
||||
|
||||
struct _NetConnectionEditorClass
|
||||
{
|
||||
GtkDialogClass parent_class;
|
||||
|
||||
void (*done) (NetConnectionEditor *details, gboolean success);
|
||||
};
|
||||
|
||||
GType net_connection_editor_get_type (void);
|
||||
NetConnectionEditor *net_connection_editor_new (GtkWindow *parent_window,
|
||||
NMConnection *connection,
|
||||
NMDevice *device,
|
||||
|
@ -90,5 +41,3 @@ void net_connection_editor_reset (NetConnectionEditor *edit
|
|||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __NET_CONNECTION_EDITOR_H */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue