changeset 14915:ad7fa8b56e3e

[gaim-migrate @ 17687] closing feature request 1487779, bug 1465187, with patch 1540877. This is all related to the psychic plugin, so ignore as befitting. committer: Tailor Script <tailor@pidgin.im>
author Christopher O'Brien <siege@pidgin.im>
date Mon, 06 Nov 2006 23:01:44 +0000
parents 227b2f69bc92
children 0e53993f0da2
files COPYRIGHT libgaim/plugins/psychic.c
diffstat 2 files changed, 15 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Mon Nov 06 22:32:49 2006 +0000
+++ b/COPYRIGHT	Mon Nov 06 23:01:44 2006 +0000
@@ -149,6 +149,7 @@
 Kevin Hunter
 Rian Hunter
 Thomas Huriaux
+Scott Jackson
 Hans Petter Jansson
 Henry Jen
 Benjamin Kahn
--- a/libgaim/plugins/psychic.c	Mon Nov 06 22:32:49 2006 +0000
+++ b/libgaim/plugins/psychic.c	Mon Nov 06 23:01:44 2006 +0000
@@ -28,6 +28,7 @@
 #define PREF_BUDDIES  PREFS_BASE "/buddies_only"
 #define PREF_NOTICE   PREFS_BASE "/show_notice"
 #define PREF_STATUS   PREFS_BASE "/activate_online"
+#define PREF_RAISE    PREFS_BASE "/raise_conv"
 
 
 static void
@@ -50,16 +51,18 @@
   if(! gconv) {
     gaim_debug_info("psychic", "no previous conversation exists\n");
     gconv = gaim_conversation_new(GAIM_CONV_TYPE_IM, acct, name);
-    gaim_conversation_present(gconv);
+
+    if(gaim_prefs_get_bool(PREF_RAISE)) {
+      gaim_conversation_present(gconv);
+    }
 
     if(gaim_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,
-			      /* 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." */
 			      _("You feel a disturbance in the force..."),
 			      GAIM_MESSAGE_SYSTEM | GAIM_MESSAGE_NO_LOG | GAIM_MESSAGE_ACTIVE_ONLY,
 			      time(NULL));
@@ -92,6 +95,10 @@
 				     " conversations"));
   gaim_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);
+
   return frame;
 }