aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-account-editor.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-11-23 03:52:33 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-11-23 03:52:33 +0800
commit00e495279937c6495d6fab99fe7f89583859ecd1 (patch)
tree34b9779e6406e44a646bd8bf65a66dc55654f51a /mail/em-account-editor.c
parent0c83b9b25d967ce6d6793ef851e86bc272a2f129 (diff)
parentf3abed7ac2c6099dbf5fd3e7c2483b6d75a637b5 (diff)
downloadgsoc2013-evolution-00e495279937c6495d6fab99fe7f89583859ecd1.tar
gsoc2013-evolution-00e495279937c6495d6fab99fe7f89583859ecd1.tar.gz
gsoc2013-evolution-00e495279937c6495d6fab99fe7f89583859ecd1.tar.bz2
gsoc2013-evolution-00e495279937c6495d6fab99fe7f89583859ecd1.tar.lz
gsoc2013-evolution-00e495279937c6495d6fab99fe7f89583859ecd1.tar.xz
gsoc2013-evolution-00e495279937c6495d6fab99fe7f89583859ecd1.tar.zst
gsoc2013-evolution-00e495279937c6495d6fab99fe7f89583859ecd1.zip
Merge branch 'master' into wip/gsettings
Conflicts: mail/e-mail-paned-view.c
Diffstat (limited to 'mail/em-account-editor.c')
-rw-r--r--mail/em-account-editor.c46
1 files changed, 11 insertions, 35 deletions
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 6331044b16..cca18a8310 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -75,6 +75,10 @@
#include "smime/gui/e-cert-selector.h"
#endif
+#define EM_ACCOUNT_EDITOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), EM_TYPE_ACCOUNT_EDITOR, EMAccountEditorPrivate))
+
/* Option widgets whose sensitivity depends on another widget, such
* as a checkbox being active, are indented to the right slightly for
* better visual clarity. This specifies how far to the right. */
@@ -262,7 +266,7 @@ enum {
static void em_account_editor_construct (EMAccountEditor *emae, EMAccountEditorType type, const gchar *id);
static void emae_account_folder_changed (EMFolderSelectionButton *folder, EMAccountEditor *emae);
-static gpointer parent_class;
+G_DEFINE_TYPE (EMAccountEditor, em_account_editor, G_TYPE_OBJECT)
static void
emae_config_target_changed_cb (EMAccountEditor *emae)
@@ -843,7 +847,7 @@ emae_dispose (GObject *object)
{
EMAccountEditorPrivate *priv;
- priv = EM_ACCOUNT_EDITOR (object)->priv;
+ priv = EM_ACCOUNT_EDITOR_GET_PRIVATE (object);
if (priv->backend != NULL) {
g_object_unref (priv->backend);
@@ -880,7 +884,7 @@ emae_dispose (GObject *object)
}
/* Chain up to parent's dispose() method. */
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ G_OBJECT_CLASS (em_account_editor_parent_class)->dispose (object);
}
static void
@@ -901,15 +905,14 @@ emae_finalize (GObject *object)
g_list_free (priv->providers);
/* Chain up to parent's finalize() method. */
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (em_account_editor_parent_class)->finalize (object);
}
static void
-emae_class_init (GObjectClass *class)
+em_account_editor_class_init (EMAccountEditorClass *class)
{
GObjectClass *object_class;
- parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (EMAccountEditorPrivate));
object_class = G_OBJECT_CLASS (class);
@@ -1141,10 +1144,9 @@ emae_class_init (GObjectClass *class)
}
static void
-emae_init (EMAccountEditor *emae)
+em_account_editor_init (EMAccountEditor *emae)
{
- emae->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- emae, EM_TYPE_ACCOUNT_EDITOR, EMAccountEditorPrivate);
+ emae->priv = EM_ACCOUNT_EDITOR_GET_PRIVATE (emae);
emae->priv->selected_server = NULL;
emae->priv->source.emae = emae;
@@ -1159,32 +1161,6 @@ emae_init (EMAccountEditor *emae)
emae->priv->is_yahoo = FALSE;
}
-GType
-em_account_editor_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static const GTypeInfo type_info = {
- sizeof (EMAccountEditorClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) emae_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EMAccountEditor),
- 0, /* n_preallocs */
- (GInstanceInitFunc) emae_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- G_TYPE_OBJECT, "EMAccountEditor", &type_info, 0);
- }
-
- return type;
-}
-
/**
* em_account_editor_new:
* @account: