Changeset 23857
- Timestamp:
- 06/08/2008 07:26:53 PM (6 months ago)
- Files:
-
- trunk/Plugins/Purple Service/adiumPurpleSignals.m (modified) (2 diffs)
- trunk/Plugins/Purple Service/CBPurpleAccount.h (modified) (1 diff)
- trunk/Plugins/Purple Service/CBPurpleAccount.m (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Plugins/Purple Service/adiumPurpleSignals.m
r23856 r23857 16 16 17 17 #import "adiumPurpleSignals.h" 18 #import "AIDualWindowInterfacePlugin.h"19 18 #import <AIUtilities/AIObjectAdditions.h> 20 19 #import <AIUtilities/AIAttributedStringAdditions.h> 21 #import <Adium/AIPreferenceControllerProtocol.h>22 20 #import <Adium/AIChatControllerProtocol.h> 23 #import <Adium/AIInterfaceControllerProtocol.h>24 #import <Adium/AIContentControllerProtocol.h>25 21 #import <Adium/AIChat.h> 26 22 #import <Adium/AIListContact.h> … … 284 280 AIChat *chat = [[[AIObject sharedAdiumInstance] chatController] chatWithContact:contact]; 285 281 286 if ((typingState == AITyping) &&287 ([[[[AIObject sharedAdiumInstance] preferenceController] preferenceForKey:KEY_PSYCHIC288 group:PREF_GROUP_DUAL_WINDOW_INTERFACE] boolValue]) &&289 (![chat isOpen])) {290 291 [[[AIObject sharedAdiumInstance] interfaceController] openChat:chat];292 293 /*294 * Use the Libpurple "psychic" tagline. If this is found to be confusing, we should switch to your own version.295 * The upside of using theirs is that clever gimmicky translations already exist.296 */297 AIContentStatus *statusMessage = [AIContentStatus statusInChat:chat298 withSource:contact299 destination:account300 date:[NSDate date]301 message:[NSAttributedString stringWithString:[NSString stringWithUTF8String:_("You feel a disturbance in the force...")]]302 withType:@"psychic"];303 304 [[[AIObject sharedAdiumInstance] contentController] receiveContentObject:statusMessage];305 }306 307 282 [account typingUpdateForIMChat:chat typing:[NSNumber numberWithInt:typingState]]; 308 283 } trunk/Plugins/Purple Service/CBPurpleAccount.h
r23692 r23857 41 41 BOOL deletePurpleAccountAfterDisconnecting; 42 42 BOOL finishedConnectProcess; 43 BOOL openPsychicChats; 43 44 44 45 PurpleConnectionError lastDisconnectionReason; trunk/Plugins/Purple Service/CBPurpleAccount.m
r23742 r23857 42 42 #import <Adium/AIStatusControllerProtocol.h> 43 43 #import <Adium/AIPreferenceControllerProtocol.h> 44 #import <Adium/AIContentStatus.h> 44 45 #import <AIUtilities/AIAttributedStringAdditions.h> 45 46 #import <AIUtilities/AIDictionaryAdditions.h> … … 56 57 #import "AMPurpleTuneTooltip.h" 57 58 #import "adiumPurpleRequest.h" 59 #import "AIDualWindowInterfacePlugin.h" 58 60 59 61 #import "ESMSNService.h" //why oh why must the superclass know about MSN specific things!? … … 2688 2690 //Observe preferences changes 2689 2691 [[adium preferenceController] registerPreferenceObserver:self forGroup:PREF_GROUP_ALIASES]; 2692 [[adium preferenceController] registerPreferenceObserver:self forGroup:PREF_GROUP_DUAL_WINDOW_INTERFACE]; 2690 2693 } 2691 2694 … … 2862 2865 } 2863 2866 } 2867 2868 if ([group isEqualToString:PREF_GROUP_DUAL_WINDOW_INTERFACE]) { 2869 openPsychicChats = [[prefDict objectForKey:KEY_PSYCHIC] boolValue]; 2870 } 2864 2871 } 2865 2872 … … 2941 2948 AITypingState currentTypingState = [chat integerValueForProperty:KEY_TYPING]; 2942 2949 AITypingState newTypingState = [typingStateNumber intValue]; 2943 2950 2944 2951 if (currentTypingState != newTypingState) { 2952 if (newTypingState == AITyping && openPsychicChats && ![chat isOpen]) { 2953 [[adium interfaceController] openChat:chat]; 2954 2955 /* 2956 * Use the Libpurple "psychic" tagline. If this is found to be confusing, we should switch to your own version. 2957 * The upside of using theirs is that clever gimmicky translations already exist. 2958 */ 2959 AIContentStatus *statusMessage = [AIContentStatus statusInChat:chat 2960 withSource:[chat listObject] 2961 destination:self 2962 date:[NSDate date] 2963 message:[NSAttributedString stringWithString:[NSString stringWithUTF8String:_("You feel a disturbance in the force...")]] 2964 withType:@"psychic"]; 2965 2966 [[adium contentController] receiveContentObject:statusMessage]; 2967 } 2968 2945 2969 [chat setValue:(newTypingState ? typingStateNumber : nil) 2946 2970 forProperty:KEY_TYPING