Commit 007273d7 authored by Felix Riemann's avatar Felix Riemann
Browse files

EogDialog: Convert to G_DEFINE_TYPE_WITH_PRIVATE

parent 77be951c
...@@ -29,11 +29,6 @@ ...@@ -29,11 +29,6 @@
#include <glib-object.h> #include <glib-object.h>
#include <gtk/gtk.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 { enum {
PROP_0, PROP_0,
PROP_PARENT_WINDOW, PROP_PARENT_WINDOW,
...@@ -45,6 +40,8 @@ struct _EogDialogPrivate { ...@@ -45,6 +40,8 @@ struct _EogDialogPrivate {
GtkWindow *parent; GtkWindow *parent;
}; };
G_DEFINE_TYPE_WITH_PRIVATE (EogDialog, eog_dialog, G_TYPE_OBJECT)
static void static void
eog_dialog_construct_impl (EogDialog *dialog, eog_dialog_construct_impl (EogDialog *dialog,
const gchar *ui_file, const gchar *ui_file,
...@@ -171,14 +168,12 @@ eog_dialog_class_init (EogDialogClass *class) ...@@ -171,14 +168,12 @@ eog_dialog_class_init (EogDialogClass *class)
G_PARAM_STATIC_NAME | G_PARAM_STATIC_NAME |
G_PARAM_STATIC_NICK | G_PARAM_STATIC_NICK |
G_PARAM_STATIC_BLURB)); G_PARAM_STATIC_BLURB));
g_type_class_add_private (g_object_class, sizeof (EogDialogPrivate));
} }
static void static void
eog_dialog_init (EogDialog *dialog) 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->dlg = NULL;
dialog->priv->xml = NULL; dialog->priv->xml = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment