Skip to content

Commit

Permalink
Move to Adium 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
duxet committed Dec 7, 2015
1 parent 8b8ab0a commit 6189ef2
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 40 deletions.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "adium"]
path = adium
url = https://github.com/adium/adium.git
branch=adium-1.5.11
61 changes: 24 additions & 37 deletions FacebookService.m
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
#import "FacebookService.h"
#import "FacebookAccount.h"
//#import <Adium/AISharedAdium.h>
//#import <Adium/AIStatusControllerProtocol.h>
//#import <AIUtilities/AIStringUtilities.h>
//#import <AIUtilities/AIImageAdditions.h>
#import <Adium/AISharedAdium.h>
#import <Adium/AIStatusControllerProtocol.h>
#import <AIUtilities/AIStringUtilities.h>
#import <AIUtilities/AIImageAdditions.h>

@implementation FacebookService

- (Class) accountClass {
return [FacebookAccount class];
}

- (NSString *) serviceCodeUniqueID {
return @"libpurple-facebook";
}
- (NSString *) serviceID{
return @"Facebook";
}
- (NSString *) serviceClass {
return @"Facebook";
}
- (NSString *) shortDescription {
return @"Facebook";
}
- (NSString *) longDescription {
return @"Facebook IM protocol";
}
- (AIServiceImportance) serviceImportance { return AIServicePrimary; }
- (NSString *) serviceCodeUniqueID { return @"libpurple-facebook"; }
- (NSString *) serviceID { return @"Facebook"; }
- (NSString *) serviceClass { return @"Facebook"; }
- (NSString *) shortDescription { return @"Facebook"; }
- (NSString *) longDescription { return @"Facebook IM protocol"; }
- (BOOL) requiresPassword { return YES; }
- (BOOL) supportsPassword { return YES; }
- (BOOL) caseSensitive { return NO; }
- (BOOL) canRegisterNewAccounts { return NO; }

/*
- (NSCharacterSet *) allowedCharacters {
NSMutableCharacterSet *allowed = [NSMutableCharacterSet alphanumericCharacterSet];
[allowed formUnionWithCharacterSet:[NSCharacterSet punctuationCharacterSet]];
Expand All @@ -39,22 +34,15 @@ - (NSUInteger) allowedLength {
return 129;
}

- (BOOL) caseSensitive {
return NO;
}
- (AIServiceImportance) serviceImportance {
return AIServicePrimary;
}
- (NSString *) userNameLabel {
return AILocalizedString(@"Account Name", nil); // Sign-in name
}

- (void) registerStatuses {
#define ADDSTATUS(name, type) \
[adium.statusController registerStatus:name \
withDescription:[adium.statusController localizedDescriptionForCoreStatusName:name] \
ofType:type forService:self]
#define ADDSTATUS(name, type) \
[adium.statusController registerStatus:name \
withDescription:[adium.statusController localizedDescriptionForCoreStatusName:name] \
ofType:type forService:self]

ADDSTATUS(STATUS_NAME_AVAILABLE, AIAvailableStatusType);
ADDSTATUS(STATUS_NAME_BUSY, AIAvailableStatusType);
Expand All @@ -66,20 +54,19 @@ - (void) registerStatuses {
- (NSImage *) defaultServiceIconOfType:(AIServiceIconType)iconType
{
if ((iconType == AIServiceIconSmall) || (iconType == AIServiceIconList)) {
return [NSImage imageNamed:@"toxicon_small" forClass:[self class] loadLazily:YES];
return [NSImage imageNamed:@"facebook-small" forClass:[self class] loadLazily:YES];
} else {
return [NSImage imageNamed:@"toxicon" forClass:[self class] loadLazily:YES];
return [NSImage imageNamed:@"facebook" forClass:[self class] loadLazily:YES];
}

}

- (NSString *) pathForDefaultServiceIconOfType:(AIServiceIconType)iconType
{
if ((iconType == AIServiceIconSmall) || (iconType == AIServiceIconList)) {
return [[NSBundle bundleForClass:[self class]] pathForImageResource:@"toxicon_small"];
return [[NSBundle bundleForClass:[self class]] pathForImageResource:@"facebook-small"];
}
return [[NSBundle bundleForClass:[self class]] pathForImageResource:@"toxicon"];
return [[NSBundle bundleForClass:[self class]] pathForImageResource:@"facebook"];
}

*/

@end
2 changes: 1 addition & 1 deletion adium
Submodule adium updated from 70d532 to 68438e
8 changes: 8 additions & 0 deletions adium-facebook.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
EEBF7F1F1C13DB10007F3B62 /* libpurple.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEBF7F1E1C13DB10007F3B62 /* libpurple.framework */; };
EEBF7F261C13E138007F3B62 /* http.c in Sources */ = {isa = PBXBuildFile; fileRef = EEBF7F241C13E138007F3B62 /* http.c */; };
EEBF7F2A1C14696B007F3B62 /* purple-socket.c in Sources */ = {isa = PBXBuildFile; fileRef = EEBF7F281C14696B007F3B62 /* purple-socket.c */; };
EEBF7F2D1C147ED6007F3B62 /* facebook-small.png in Resources */ = {isa = PBXBuildFile; fileRef = EEBF7F2B1C147ED6007F3B62 /* facebook-small.png */; };
EEBF7F2E1C147ED6007F3B62 /* facebook.png in Resources */ = {isa = PBXBuildFile; fileRef = EEBF7F2C1C147ED6007F3B62 /* facebook.png */; };
EEC9227C1BC476B700F3241A /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEC9227B1BC476B700F3241A /* AppKit.framework */; };
EEC922831BC47D4A00F3241A /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEC922821BC47D4A00F3241A /* CoreData.framework */; };
EEC922871BC47DC900F3241A /* Adium.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEC922841BC47DC900F3241A /* Adium.framework */; };
Expand Down Expand Up @@ -76,6 +78,8 @@
EEBF7F271C13E1F2007F3B62 /* purple-compat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "purple-compat.h"; sourceTree = "<group>"; };
EEBF7F281C14696B007F3B62 /* purple-socket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "purple-socket.c"; path = "pidgin/libpurple/purple-socket.c"; sourceTree = "<group>"; };
EEBF7F291C14696B007F3B62 /* purple-socket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "purple-socket.h"; path = "pidgin/libpurple/purple-socket.h"; sourceTree = "<group>"; };
EEBF7F2B1C147ED6007F3B62 /* facebook-small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "facebook-small.png"; path = "adium/Resources/Service Icons/Aqua.AdiumServiceIcons/facebook-small.png"; sourceTree = "<group>"; };
EEBF7F2C1C147ED6007F3B62 /* facebook.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = facebook.png; path = "adium/Resources/Service Icons/Aqua.AdiumServiceIcons/facebook.png"; sourceTree = "<group>"; };
EEC9227B1BC476B700F3241A /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
EEC922821BC47D4A00F3241A /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
EEC922841BC47DC900F3241A /* Adium.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Adium.framework; sourceTree = "<group>"; };
Expand Down Expand Up @@ -127,6 +131,8 @@
EE97843B1B758FF5003AC838 = {
isa = PBXGroup;
children = (
EEBF7F2B1C147ED6007F3B62 /* facebook-small.png */,
EEBF7F2C1C147ED6007F3B62 /* facebook.png */,
EEBF7EC11C13CE01007F3B62 /* FacebookAccount.h */,
EEBF7EBF1C13CDF6007F3B62 /* FacebookAccount.m */,
EEBF7EBD1C13CD56007F3B62 /* FacebookService.m */,
Expand Down Expand Up @@ -283,9 +289,11 @@
buildActionMask = 2147483647;
files = (
EEBF7F181C13D7BC007F3B62 /* marshaller.list in Resources */,
EEBF7F2E1C147ED6007F3B62 /* facebook.png in Resources */,
EEBF7F161C13D7BC007F3B62 /* Makefile.mingw in Resources */,
EEBF7F151C13D7BC007F3B62 /* Makefile.in in Resources */,
EEBF7F141C13D7BC007F3B62 /* Makefile.am in Resources */,
EEBF7F2D1C147ED6007F3B62 /* facebook-small.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Binary file not shown.
6 changes: 4 additions & 2 deletions adium-facebook/AdiumFacebook.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
#import "facebook.h"
#import "plugin.h"

//extern void purple_init_plugin();
#import <Adium/ESDebugAILog.h>

@implementation AdiumFacebook

- (void) installPlugin
{
AILog(@"Installing Facebook plugin v. %s",[[self pluginVersion] UTF8String]);

PurplePlugin *plugin = purple_plugin_new(TRUE, NULL);
purple_init_plugin(plugin);
[FacebookService registerService];
Expand All @@ -34,7 +36,7 @@ - (void)installLibpurplePlugin

- (void)loadLibpurplePlugin
{

AILog(@"Loading Facebook plugin v. %s",[[self pluginVersion] UTF8String]);
}

- (NSString *) pluginAuthor
Expand Down

0 comments on commit 6189ef2

Please sign in to comment.