libpurple/plugins/psychic.c

branch
soc.2013.gobjectification
changeset 34632
ebe6b2a60305
parent 34628
014583658b51
child 34670
9bd5bd903dc7
--- a/libpurple/plugins/psychic.c	Sun Jun 23 19:00:53 2013 +0530
+++ b/libpurple/plugins/psychic.c	Sun Jun 23 20:18:03 2013 +0530
@@ -33,7 +33,7 @@
 
 static void
 buddy_typing_cb(PurpleAccount *acct, const char *name, void *data) {
-  PurpleConversation *gconv;
+  PurpleIMConversation *im;
 
   if(purple_prefs_get_bool(PREF_STATUS) &&
      ! purple_status_is_available(purple_account_get_active_status(acct))) {
@@ -52,13 +52,13 @@
     return;
   }
 
-  gconv = purple_conversations_find_im_with_account(name, acct);
-  if(! gconv) {
+  im = purple_conversations_find_im_with_account(name, acct);
+  if(! im) {
     purple_debug_info("psychic", "no previous conversation exists\n");
-    gconv = purple_im_conversation_new(acct, name);
+    im = purple_im_conversation_new(acct, name);
 
     if(purple_prefs_get_bool(PREF_RAISE)) {
-      purple_conversation_present(gconv);
+      purple_conversation_present(PURPLE_CONVERSATION(im));
     }
 
     if(purple_prefs_get_bool(PREF_NOTICE)) {
@@ -67,14 +67,14 @@
 	 translate it literally.  If you can't find a fitting cultural
 	 reference in your language, consider translating something
 	 like this instead: "You feel a new message coming." */
-      purple_conversation_write(gconv, NULL,
+      purple_conversation_write(PURPLE_CONVERSATION(im), NULL,
 			      _("You feel a disturbance in the force..."),
 			      PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NO_LOG | PURPLE_MESSAGE_ACTIVE_ONLY,
 			      time(NULL));
     }
 
     /* Necessary because we may be creating a new conversation window. */
-    purple_im_conversation_set_typing_state(PURPLE_IM_CONVERSATION(gconv), PURPLE_IM_CONVERSATION_TYPING);
+    purple_im_conversation_set_typing_state(im, PURPLE_IM_CONVERSATION_TYPING);
   }
 }
 

mercurial