[eog] EogApplication: Convert to G_DEFINE_TYPE_WITH_PRIVATE
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] EogApplication: Convert to G_DEFINE_TYPE_WITH_PRIVATE
- Date: Fri, 4 Oct 2013 13:28:21 +0000 (UTC)
commit 1222978be073377f6a0b32559868a9d3a47770e9
Author: Felix Riemann <friemann gnome org>
Date: Fri Oct 4 14:23:58 2013 +0200
EogApplication: Convert to G_DEFINE_TYPE_WITH_PRIVATE
src/eog-application.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/eog-application.c b/src/eog-application.c
index a77157a..6c5bc88 100644
--- a/src/eog-application.c
+++ b/src/eog-application.c
@@ -47,10 +47,7 @@
static void eog_application_load_accelerators (void);
static void eog_application_save_accelerators (void);
-#define EOG_APPLICATION_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), EOG_TYPE_APPLICATION, EogApplicationPrivate))
-
-G_DEFINE_TYPE (EogApplication, eog_application, GTK_TYPE_APPLICATION);
+G_DEFINE_TYPE_WITH_PRIVATE (EogApplication, eog_application, GTK_TYPE_APPLICATION);
static EogWindow*
get_focus_window (GtkApplication *application)
@@ -323,9 +320,6 @@ eog_application_class_init (EogApplicationClass *eog_application_class)
GApplicationClass *application_class;
GObjectClass *object_class;
- g_type_class_add_private (eog_application_class,
- sizeof (EogApplicationPrivate));
-
application_class = (GApplicationClass *) eog_application_class;
object_class = (GObjectClass *) eog_application_class;
@@ -364,7 +358,7 @@ eog_application_init (EogApplication *eog_application)
eog_session_init (eog_application);
- eog_application->priv = EOG_APPLICATION_GET_PRIVATE (eog_application);
+ eog_application->priv = eog_application_get_instance_private (eog_application);
priv = eog_application->priv;
priv->toolbars_model = egg_toolbars_model_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]