aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat-view.c
diff options
context:
space:
mode:
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;