[eog] EogDialog: Convert to G_DEFINE_TYPE_WITH_PRIVATE
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] EogDialog: Convert to G_DEFINE_TYPE_WITH_PRIVATE
- Date: Fri, 4 Oct 2013 13:28:06 +0000 (UTC)
commit 007273d7a945fba9bbf599019499bd38ecf263ff
Author: Felix Riemann <friemann gnome org>
Date: Fri Oct 4 14:23:09 2013 +0200
EogDialog: Convert to G_DEFINE_TYPE_WITH_PRIVATE
src/eog-dialog.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/src/eog-dialog.c b/src/eog-dialog.c
index 688161b..623c053 100644
--- a/src/eog-dialog.c
+++ b/src/eog-dialog.c
@@ -29,11 +29,6 @@
#include <glib-object.h>
#include <gtk/gtk.h>
-#define EOG_DIALOG_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), EOG_TYPE_DIALOG, EogDialogPrivate))
-
-G_DEFINE_TYPE (EogDialog, eog_dialog, G_TYPE_OBJECT);
-
enum {
PROP_0,
PROP_PARENT_WINDOW,
@@ -45,6 +40,8 @@ struct _EogDialogPrivate {
GtkWindow *parent;
};
+G_DEFINE_TYPE_WITH_PRIVATE (EogDialog, eog_dialog, G_TYPE_OBJECT)
+
static void
eog_dialog_construct_impl (EogDialog *dialog,
const gchar *ui_file,
@@ -171,14 +168,12 @@ eog_dialog_class_init (EogDialogClass *class)
G_PARAM_STATIC_NAME |
G_PARAM_STATIC_NICK |
G_PARAM_STATIC_BLURB));
-
- g_type_class_add_private (g_object_class, sizeof (EogDialogPrivate));
}
static void
eog_dialog_init (EogDialog *dialog)
{
- dialog->priv = EOG_DIALOG_GET_PRIVATE (dialog);
+ dialog->priv = eog_dialog_get_instance_private (dialog);
dialog->priv->dlg = NULL;
dialog->priv->xml = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]