Browse files

MSNPlus 1.1 Release

  • Loading branch information...
1 parent 493c8d7 commit fb096c249a0b80e0435a9306cd0331dae536fde1 @ivendor committed Jun 10, 2011
Showing with 39 additions and 21 deletions.
  1. +1 −0 .gitattributes
  2. +13 −0 .gitignore
  3. +2 −2 AIAddSmileyController.m
  4. +4 −4 AICustomEmoticonController.m
  5. +9 −9 AISmileyController.m
  6. +4 −0 Changelog.txt
  7. +2 −2 Info.plist
  8. +3 −3 MSNPlus - Adium 1.3-Info.plist
  9. +1 −1 MSNPlus.m
View
1 .gitattributes
@@ -0,0 +1 @@
+*.pbxproj -crlf -diff -merge
View
13 .gitignore
@@ -0,0 +1,13 @@
+# xcode noise
+build/*
+*.pbxuser
+*.mode1v3
+
+# osx noise
+.DS_Store
+profile
+._*
+
+Adium13
+Adium14
+Releases/*
View
4 AIAddSmileyController.m
@@ -36,7 +36,7 @@ - (PurpleSmiley*)findSmileyByChecksum: (const char*) checksum {
- (IBAction)ok:(id)sender {
NSString* shortcut=[textField stringValue];
- const char* shortcut_s=[shortcut cStringUsingEncoding:NSASCIIStringEncoding];
+ const char* shortcut_s=[shortcut cStringUsingEncoding:NSUTF8StringEncoding];
PurpleSmiley* ex_smile;
if((ex_smile=purple_smileys_find_by_shortcut(shortcut_s))!=NULL) {
NSAlert* alert=[NSAlert alertWithMessageText:AILocalizedString(@"Emoticon with this shortcut already exist. Do you want to overwrite it?",nil) defaultButton:AILocalizedString(@"No",nil) alternateButton:AILocalizedString(@"Yes",nil) otherButton:nil informativeTextWithFormat:@""];
@@ -73,7 +73,7 @@ - (IBAction)ok:(id)sender {
purple_smiley_delete(ex_smile);
}
g_free(checksum);
- purple_smiley_new_from_file(shortcut_s,[smileyPath cStringUsingEncoding:NSASCIIStringEncoding]);
+ purple_smiley_new_from_file(shortcut_s,[smileyPath cStringUsingEncoding:NSUTF8StringEncoding]);
smileyShortcut=[shortcut retain];
[self close];
}
View
8 AICustomEmoticonController.m
@@ -197,12 +197,12 @@ - (NSAttributedString *)filterAttributedString:(NSAttributedString *)inAttribute
NSMutableAttributedString *replacementMessage = nil;
- NSCharacterSet* customSet=nil;
+ if(![self _isCustomEmoticonApplicable:context])
+ return inAttributedString;
- if([self _isCustomEmoticonApplicable:context])
- customSet=[self customEmoticonHintCharacterSet];
+ NSCharacterSet* customSet=[self customEmoticonHintCharacterSet];
- if (customSet && [[inAttributedString string] rangeOfCharacterFromSet:customSet].location != NSNotFound )
+ if ([[inAttributedString string] rangeOfCharacterFromSet:customSet].location != NSNotFound )
replacementMessage = [self _convertEmoticonsInMessage:inAttributedString context:context];
return (replacementMessage ? replacementMessage : inAttributedString);
View
18 AISmileyController.m
@@ -84,9 +84,9 @@ + (NSArray*) getAllSmileys {
char* data=purple_smiley_get_full_path(smile);
const char* checksum=purple_smiley_get_checksum(smile);
if(data && shortcut && checksum) {
- NSString* my_shortcut=[NSString stringWithCString:shortcut encoding:NSASCIIStringEncoding];
- NSString* file=[NSString stringWithCString:data encoding:NSASCIIStringEncoding];
- NSString* my_checksum=[NSString stringWithCString:checksum encoding:NSASCIIStringEncoding];
+ NSString* my_shortcut=[NSString stringWithCString:shortcut encoding:NSUTF8StringEncoding];
+ NSString* file=[NSString stringWithCString:data encoding:NSUTF8StringEncoding];
+ NSString* my_checksum=[NSString stringWithCString:checksum encoding:NSUTF8StringEncoding];
PurpleCustomSmiley* pc=[[PurpleCustomSmiley alloc] initWithShortcut:my_shortcut andPath:[self _emoticonCachePathForCustomEmoticon:file checksum:my_checksum]];
[smileyArray addObject: pc];
[pc release];
@@ -147,15 +147,15 @@ - (void)tableView:(NSTableView *)mtableView setObjectValue:(id)object forTableCo
return;
PurpleSmiley* ex_smile;
- if((ex_smile=purple_smileys_find_by_shortcut([shortcut_new cStringUsingEncoding:NSASCIIStringEncoding]))!=NULL) {
+ if((ex_smile=purple_smileys_find_by_shortcut([shortcut_new cStringUsingEncoding:NSUTF8StringEncoding]))!=NULL) {
NSAlert* alert=[NSAlert alertWithMessageText:AILocalizedString(@"Emoticon with this shortcut already exist!",nil) defaultButton:AILocalizedString(@"OK",nil) alternateButton:nil otherButton:nil informativeTextWithFormat:@""];
[alert setAlertStyle:NSCriticalAlertStyle];
[alert runModal];
return;
}
- PurpleSmiley* smile=purple_smileys_find_by_shortcut([[smiley shortcut] cStringUsingEncoding:NSASCIIStringEncoding]);
- if(purple_smiley_set_shortcut(smile,[shortcut_new cStringUsingEncoding:NSASCIIStringEncoding])) {
+ PurpleSmiley* smile=purple_smileys_find_by_shortcut([[smiley shortcut] cStringUsingEncoding:NSUTF8StringEncoding]);
+ if(purple_smiley_set_shortcut(smile,[shortcut_new cStringUsingEncoding:NSUTF8StringEncoding])) {
[smiley setShortcut:shortcut_new];
[AISmileyController sendChangedNotification];
}
@@ -179,7 +179,7 @@ - (void)openPanelDidEnd:(NSOpenPanel *)panel returnCode:(int)returnCode context
[panel orderOut:self];
NSString* shortcut=[AIAddSmileyController runAddSmiley: [[panel filenames] objectAtIndex:0]];
if(shortcut) {
- PurpleSmiley* smile=purple_smileys_find_by_shortcut([shortcut cStringUsingEncoding:NSASCIIStringEncoding]);
+ PurpleSmiley* smile=purple_smileys_find_by_shortcut([shortcut cStringUsingEncoding:NSUTF8StringEncoding]);
if(smile) {
size_t size;
gconstpointer data=purple_smiley_get_data(smile, &size);
@@ -218,7 +218,7 @@ - (void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(voi
for (idx = [selection lastIndex]; idx != NSNotFound; idx = [selection indexLessThanIndex:idx]) {
PurpleCustomSmiley* smiley=[userArray objectAtIndex:idx];
- purple_smiley_delete(purple_smileys_find_by_shortcut([[smiley shortcut] cStringUsingEncoding:NSASCIIStringEncoding]));
+ purple_smiley_delete(purple_smileys_find_by_shortcut([[smiley shortcut] cStringUsingEncoding:NSUTF8StringEncoding]));
[userArray removeObject:smiley];
}
[tableView reloadData];
@@ -300,7 +300,7 @@ - (void)windowDidLoad {
size_t size;
gconstpointer data=purple_smiley_get_data(smile, &size);
if(data && shortcut) {
- NSString* my_shortcut=[NSString stringWithCString:shortcut encoding:NSASCIIStringEncoding];
+ NSString* my_shortcut=[NSString stringWithCString:shortcut encoding:NSUTF8StringEncoding];
NSData* my_data=[NSData dataWithBytes:data
length:size];
NSImage* image=[[NSImage alloc] initWithData:my_data];
View
4 Changelog.txt
@@ -1,5 +1,9 @@
Changelog:
+v1.1:
+
+- Added support for shortcut in utf-8 encoding
+
v1.01:
- Corrected a bug with MSN name filtering (hoping the last).
View
4 Info.plist
@@ -21,11 +21,11 @@
<key>CFBundleSignature</key>
<string>AdiM</string>
<key>CFBundleVersion</key>
- <string>1.01</string>
+ <string>1.1</string>
<key>LSMinimumSystemVersion</key>
<string>10.5.0</string>
<key>NSHumanReadableCopyright</key>
- <string2010 Tiziano Carotti</string>
+ <string2011 Tiziano Carotti</string>
<key>NSPrincipalClass</key>
<string>AIMSNPlus</string>
</dict>
View
6 MSNPlus - Adium 1.3-Info.plist
@@ -15,13 +15,13 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.01</string>
+ <string>1.1</string>
<key>CFBundleSignature</key>
<string>AdiM</string>
<key>CFBundleVersion</key>
- <string>1.01</string>
+ <string>1.1</string>
<key>NSHumanReadableCopyright</key>
- <string2010 Tiziano Carotti</string>
+ <string2011 Tiziano Carotti</string>
<key>NSPrincipalClass</key>
<string>AIMSNPlus</string>
</dict>
View
2 MSNPlus.m
@@ -153,7 +153,7 @@ - (NSString *)pluginAuthor {
}
- (NSString *)pluginVersion {
- return @"1.01";
+ return @"1.1";
}
- (NSString *)pluginDescription {

0 comments on commit fb096c2

Please sign in to comment.