[empathy: 37/99] Move to using ->priv pointer in the object instance



commit 5ba6968d314c8830ab7fb8b0be07b3fa6dc23d06
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Wed Feb 23 11:28:23 2011 +0000

    Move to using ->priv pointer in the object instance

 src/empathy-call-window.c |   12 +++++-------
 src/empathy-call-window.h |    2 ++
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index fc55689..6ddf66a 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -96,9 +96,6 @@ typedef enum {
   CAMERA_STATE_ON,
 } CameraState;
 
-/* private structure */
-typedef struct _EmpathyCallWindowPriv EmpathyCallWindowPriv;
-
 struct _EmpathyCallWindowPriv
 {
   gboolean dispose_has_run;
@@ -217,9 +214,7 @@ struct _EmpathyCallWindowPriv
   EmpathySoundManager *sound_mgr;
 };
 
-#define GET_PRIV(o) \
-  (G_TYPE_INSTANCE_GET_PRIVATE ((o), EMPATHY_TYPE_CALL_WINDOW, \
-    EmpathyCallWindowPriv))
+#define GET_PRIV(o) (EMPATHY_CALL_WINDOW (o)->priv)
 
 static void empathy_call_window_realized_cb (GtkWidget *widget,
   EmpathyCallWindow *window);
@@ -1020,7 +1015,7 @@ create_pipeline (EmpathyCallWindow *self)
 static void
 empathy_call_window_init (EmpathyCallWindow *self)
 {
-  EmpathyCallWindowPriv *priv = GET_PRIV (self);
+  EmpathyCallWindowPriv *priv;
   GtkBuilder *gui;
   GtkWidget *top_vbox;
   GtkWidget *h;
@@ -1028,6 +1023,9 @@ empathy_call_window_init (EmpathyCallWindow *self)
   GtkWidget *page;
   gchar *filename;
 
+  priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
+    EMPATHY_TYPE_CALL_WINDOW, EmpathyCallWindowPriv);
+
   filename = empathy_file_lookup ("empathy-call-window.ui", "src");
   gui = empathy_builder_get_file (filename,
     "call_window_vbox", &top_vbox,
diff --git a/src/empathy-call-window.h b/src/empathy-call-window.h
index d02b2ed..11237ff 100644
--- a/src/empathy-call-window.h
+++ b/src/empathy-call-window.h
@@ -29,6 +29,7 @@
 G_BEGIN_DECLS
 
 typedef struct _EmpathyCallWindow EmpathyCallWindow;
+typedef struct _EmpathyCallWindowPriv EmpathyCallWindowPriv;
 typedef struct _EmpathyCallWindowClass EmpathyCallWindowClass;
 
 struct _EmpathyCallWindowClass {
@@ -37,6 +38,7 @@ struct _EmpathyCallWindowClass {
 
 struct _EmpathyCallWindow {
     GtkWindow parent;
+    EmpathyCallWindowPriv *priv;
 };
 
 GType empathy_call_window_get_type (void);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]