diff libpurple/plugins/psychic.c @ 15822:32c366eeeb99

sed -ie 's/gaim/purple/g'
author Sean Egan <seanegan@gmail.com>
date Mon, 19 Mar 2007 07:01:17 +0000
parents 5fe8042783c1
children 4999bbc52881
line wrap: on
line diff
--- a/libpurple/plugins/psychic.c	Mon Mar 19 06:11:46 2007 +0000
+++ b/libpurple/plugins/psychic.c	Mon Mar 19 07:01:17 2007 +0000
@@ -32,106 +32,106 @@
 
 
 static void
-buddy_typing_cb(GaimAccount *acct, const char *name, void *data) {
-  GaimConversation *gconv;
+buddy_typing_cb(PurpleAccount *acct, const char *name, void *data) {
+  PurpleConversation *gconv;
 
-  if(gaim_prefs_get_bool(PREF_STATUS) &&
-     ! gaim_status_is_available(gaim_account_get_active_status(acct))) {
-    gaim_debug_info("psychic", "not available, doing nothing\n");
+  if(purple_prefs_get_bool(PREF_STATUS) &&
+     ! purple_status_is_available(purple_account_get_active_status(acct))) {
+    purple_debug_info("psychic", "not available, doing nothing\n");
     return;
   }
 
-  if(gaim_prefs_get_bool(PREF_BUDDIES) &&
-     ! gaim_find_buddy(acct, name)) {
-    gaim_debug_info("psychic", "not in blist, doing nothing\n");
+  if(purple_prefs_get_bool(PREF_BUDDIES) &&
+     ! purple_find_buddy(acct, name)) {
+    purple_debug_info("psychic", "not in blist, doing nothing\n");
     return;
   }
 
-  gconv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, acct);
+  gconv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, name, acct);
   if(! gconv) {
-    gaim_debug_info("psychic", "no previous conversation exists\n");
-    gconv = gaim_conversation_new(GAIM_CONV_TYPE_IM, acct, name);
+    purple_debug_info("psychic", "no previous conversation exists\n");
+    gconv = purple_conversation_new(PURPLE_CONV_TYPE_IM, acct, name);
 
-    if(gaim_prefs_get_bool(PREF_RAISE)) {
-      gaim_conversation_present(gconv);
+    if(purple_prefs_get_bool(PREF_RAISE)) {
+      purple_conversation_present(gconv);
     }
 
-    if(gaim_prefs_get_bool(PREF_NOTICE)) {
+    if(purple_prefs_get_bool(PREF_NOTICE)) {
 
       /* This is a quote from Star Wars.  You should probably not
 	 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." */
-      gaim_conversation_write(gconv, NULL,
+      purple_conversation_write(gconv, NULL,
 			      _("You feel a disturbance in the force..."),
-			      GAIM_MESSAGE_SYSTEM | GAIM_MESSAGE_NO_LOG | GAIM_MESSAGE_ACTIVE_ONLY,
+			      PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NO_LOG | PURPLE_MESSAGE_ACTIVE_ONLY,
 			      time(NULL));
     }
 
-    gaim_conv_im_set_typing_state(GAIM_CONV_IM(gconv), GAIM_TYPING);
+    purple_conv_im_set_typing_state(PURPLE_CONV_IM(gconv), PURPLE_TYPING);
   }
 }
 
 
-static GaimPluginPrefFrame *
-get_plugin_pref_frame(GaimPlugin *plugin) {
+static PurplePluginPrefFrame *
+get_plugin_pref_frame(PurplePlugin *plugin) {
 
-  GaimPluginPrefFrame *frame;
-  GaimPluginPref *pref;
+  PurplePluginPrefFrame *frame;
+  PurplePluginPref *pref;
   
-  frame = gaim_plugin_pref_frame_new();
+  frame = purple_plugin_pref_frame_new();
   
-  pref = gaim_plugin_pref_new_with_name(PREF_BUDDIES);
-  gaim_plugin_pref_set_label(pref, _("Only enable for users on"
+  pref = purple_plugin_pref_new_with_name(PREF_BUDDIES);
+  purple_plugin_pref_set_label(pref, _("Only enable for users on"
 				     " the buddy list"));
-  gaim_plugin_pref_frame_add(frame, pref);
+  purple_plugin_pref_frame_add(frame, pref);
 
-  pref = gaim_plugin_pref_new_with_name(PREF_STATUS);
-  gaim_plugin_pref_set_label(pref, _("Disable when away"));
-  gaim_plugin_pref_frame_add(frame, pref);
+  pref = purple_plugin_pref_new_with_name(PREF_STATUS);
+  purple_plugin_pref_set_label(pref, _("Disable when away"));
+  purple_plugin_pref_frame_add(frame, pref);
 
-  pref = gaim_plugin_pref_new_with_name(PREF_NOTICE);
-  gaim_plugin_pref_set_label(pref, _("Display notification message in"
+  pref = purple_plugin_pref_new_with_name(PREF_NOTICE);
+  purple_plugin_pref_set_label(pref, _("Display notification message in"
 				     " conversations"));
-  gaim_plugin_pref_frame_add(frame, pref);
+  purple_plugin_pref_frame_add(frame, pref);
 
-  pref = gaim_plugin_pref_new_with_name(PREF_RAISE);
-  gaim_plugin_pref_set_label(pref, _("Raise psychic conversations"));
-  gaim_plugin_pref_frame_add(frame, pref);
+  pref = purple_plugin_pref_new_with_name(PREF_RAISE);
+  purple_plugin_pref_set_label(pref, _("Raise psychic conversations"));
+  purple_plugin_pref_frame_add(frame, pref);
 
   return frame;
 }
 
 
 static gboolean
-plugin_load(GaimPlugin *plugin) {
+plugin_load(PurplePlugin *plugin) {
 
   void *convs_handle;
-  convs_handle = gaim_conversations_get_handle();
+  convs_handle = purple_conversations_get_handle();
 
-  gaim_signal_connect(convs_handle, "buddy-typing", plugin,
-		      GAIM_CALLBACK(buddy_typing_cb), NULL);
+  purple_signal_connect(convs_handle, "buddy-typing", plugin,
+		      PURPLE_CALLBACK(buddy_typing_cb), NULL);
   
   return TRUE;
 }
 
 
-static GaimPluginUiInfo prefs_info = {
+static PurplePluginUiInfo prefs_info = {
   get_plugin_pref_frame,
   0,    /* page_num (Reserved) */
   NULL, /* frame (Reserved) */
 };
 
 
-static GaimPluginInfo info = {
-  GAIM_PLUGIN_MAGIC,
-  GAIM_MAJOR_VERSION,
-  GAIM_MINOR_VERSION,
-  GAIM_PLUGIN_STANDARD,   /**< type */
+static PurplePluginInfo info = {
+  PURPLE_PLUGIN_MAGIC,
+  PURPLE_MAJOR_VERSION,
+  PURPLE_MINOR_VERSION,
+  PURPLE_PLUGIN_STANDARD,   /**< type */
   NULL,                   /**< ui_requirement */
   0,                      /**< flags */
   NULL,                   /**< dependencies */
-  GAIM_PRIORITY_DEFAULT,  /**< priority */
+  PURPLE_PRIORITY_DEFAULT,  /**< priority */
   
   PLUGIN_ID,              /**< id */
   PLUGIN_NAME,            /**< name */
@@ -139,7 +139,7 @@
   PLUGIN_SUMMARY,         /**< summary */
   PLUGIN_DESC,            /**< description */
   PLUGIN_AUTHOR,          /**< author */
-  GAIM_WEBSITE,           /**< homepage */
+  PURPLE_WEBSITE,           /**< homepage */
   
   plugin_load,            /**< load */
   NULL,                   /**< unload */
@@ -153,12 +153,12 @@
 
 
 static void
-init_plugin(GaimPlugin *plugin) {
-  gaim_prefs_add_none(PREFS_BASE);
-  gaim_prefs_add_bool(PREF_BUDDIES, FALSE);
-  gaim_prefs_add_bool(PREF_NOTICE, TRUE);
-  gaim_prefs_add_bool(PREF_STATUS, TRUE);
+init_plugin(PurplePlugin *plugin) {
+  purple_prefs_add_none(PREFS_BASE);
+  purple_prefs_add_bool(PREF_BUDDIES, FALSE);
+  purple_prefs_add_bool(PREF_NOTICE, TRUE);
+  purple_prefs_add_bool(PREF_STATUS, TRUE);
 }
 
 
-GAIM_INIT_PLUGIN(psychic, init_plugin, info)
+PURPLE_INIT_PLUGIN(psychic, init_plugin, info)