aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-theme-irc.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-theme-irc.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-theme-irc.c')
-rw-r--r--libempathy-gtk/empathy-theme-irc.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/libempathy-gtk/empathy-theme-irc.c b/libempathy-gtk/empathy-theme-irc.c
index 52ebb18fa..fd315b2b1 100644
--- a/libempathy-gtk/empathy-theme-irc.c
+++ b/libempathy-gtk/empathy-theme-irc.c
@@ -22,17 +22,15 @@
#include <glib/gi18n.h>
+#include <libempathy/empathy-utils.h>
#include "empathy-chat.h"
#include "empathy-ui-utils.h"
#include "empathy-theme-irc.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_THEME_IRC, EmpathyThemeIrcPriv))
-
-typedef struct _EmpathyThemeIrcPriv EmpathyThemeIrcPriv;
-
-struct _EmpathyThemeIrcPriv {
+#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyThemeIrc)
+typedef struct {
gint my_prop;
-};
+} EmpathyThemeIrcPriv;
static void theme_irc_finalize (GObject *object);
static void theme_irc_update_view (EmpathyTheme *theme,
@@ -80,11 +78,12 @@ empathy_theme_irc_class_init (EmpathyThemeIrcClass *class)
}
static void
-empathy_theme_irc_init (EmpathyThemeIrc *presence)
+empathy_theme_irc_init (EmpathyThemeIrc *theme)
{
- EmpathyThemeIrcPriv *priv;
+ EmpathyThemeIrcPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (theme,
+ EMPATHY_TYPE_THEME_IRC, EmpathyThemeIrcPriv);
- priv = GET_PRIV (presence);
+ theme->priv = priv;
}
static void
@@ -192,7 +191,7 @@ theme_irc_append_message (EmpathyTheme *theme,
contact = empathy_message_get_sender (message);
name = empathy_contact_get_name (contact);
- if (empathy_message_get_type (message) == EMPATHY_MESSAGE_TYPE_ACTION) {
+ if (empathy_message_get_tptype (message) == TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION) {
if (empathy_contact_is_user (contact)) {
body_tag = "irc-action-self";
} else {