aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat-view.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-05-06 04:34:41 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-05-06 04:34:41 +0800
commit1557095113a3c0f5baadcfb1e953d73762e5263e (patch)
tree6af706fb1f4f673120981e033768a09169544c11 /libempathy-gtk/empathy-chat-view.c
parent62828fac680bd53e0047d9ae2a281c864075c809 (diff)
downloadgsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar
gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.gz
gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.bz2
gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.lz
gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.xz
gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.zst
gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.zip
Keep a priv pointer in the object struct instead of using G_TYPE_INSTANCE_GET_PRIVATE all the time.
svn path=/trunk/; revision=1082
Diffstat (limited to 'libempathy-gtk/empathy-chat-view.c')
-rw-r--r--libempathy-gtk/empathy-chat-view.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/libempathy-gtk/empathy-chat-view.c b/libempathy-gtk/empathy-chat-view.c
index 491de2269..2131cecb4 100644
--- a/libempathy-gtk/empathy-chat-view.c
+++ b/libempathy-gtk/empathy-chat-view.c
@@ -61,9 +61,8 @@
#define MAX_SCROLL_TIME 0.4 /* seconds */
#define SCROLL_DELAY 33 /* milliseconds */
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CHAT_VIEW, EmpathyChatViewPriv))
-
-struct _EmpathyChatViewPriv {
+#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyChatView)
+typedef struct {
GtkTextBuffer *buffer;
EmpathyTheme *theme;
@@ -86,10 +85,8 @@ struct _EmpathyChatViewPriv {
guint notify_system_fonts_id;
guint notify_show_avatars_id;
-};
+} EmpathyChatViewPriv;
-static void empathy_chat_view_class_init (EmpathyChatViewClass *klass);
-static void empathy_chat_view_init (EmpathyChatView *view);
static void chat_view_finalize (GObject *object);
static gboolean chat_view_drag_motion (GtkWidget *widget,
GdkDragContext *context,
@@ -148,11 +145,11 @@ empathy_chat_view_class_init (EmpathyChatViewClass *klass)
static void
empathy_chat_view_init (EmpathyChatView *view)
{
- EmpathyChatViewPriv *priv;
- gboolean show_avatars;
-
- priv = GET_PRIV (view);
+ gboolean show_avatars;
+ EmpathyChatViewPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (view,
+ EMPATHY_TYPE_CHAT_VIEW, EmpathyChatViewPriv);
+ view->priv = priv;
priv->buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
priv->last_timestamp = 0;
priv->allow_scrolling = TRUE;