zephyrchat-cvs Mailing List for zChat
Status: Alpha
Brought to you by:
akosut
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(26) |
Apr
(34) |
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: <ak...@us...> - 2003-05-12 17:54:14
|
Update of /cvsroot/zephyrchat/zchat/zChat/English.lproj/PrefsWindow.nib In directory sc8-pr-cvs1:/tmp/cvs-serv32038/English.lproj/PrefsWindow.nib Modified Files: classes.nib info.nib objects.nib Log Message: Add auto-save of transcripts. Index: classes.nib =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/English.lproj/PrefsWindow.nib/classes.nib,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- classes.nib 29 Mar 2003 19:21:39 -0000 1.4 +++ classes.nib 12 May 2003 17:54:10 -0000 1.5 @@ -14,6 +14,8 @@ natAddress = id; realmAction = id; removeServer = id; + saveTranscripts = id; + setTranscriptFolder = id; useNAT = id; }; CLASS = ZChatPrefsController; @@ -25,7 +27,10 @@ "_myTextColor" = NSColorWell; "_natAddress" = NSTextField; "_natInUse" = NSButton; + "_openPanelAccessoryView" = NSView; "_realm" = NSComboBox; + "_saveCheckbox" = NSButton; + "_saveFolder" = NSTextField; "_senderColor" = NSColorWell; "_senderTextColor" = NSColorWell; "_serverTable" = NSTableView; Index: info.nib =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/English.lproj/PrefsWindow.nib/info.nib,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- info.nib 29 Mar 2003 19:21:39 -0000 1.6 +++ info.nib 12 May 2003 17:54:10 -0000 1.7 @@ -3,13 +3,13 @@ <plist version="1.0"> <dict> <key>IBDocumentLocation</key> - <string>78 130 356 240 0 0 1024 746 </string> + <string>70 128 356 240 0 0 1024 746 </string> <key>IBEditorPositions</key> <dict> <key>104</key> - <string>22 439 502 155 0 0 1024 746 </string> + <string>184 446 501 228 0 0 1024 746 </string> <key>65</key> - <string>261 335 501 359 0 0 1024 746 </string> + <string>261 334 501 359 0 0 1024 746 </string> </dict> <key>IBFramework Version</key> <string>291.0</string> @@ -17,13 +17,7 @@ <array> <integer>11</integer> </array> - <key>IBOpenObjects</key> - <array> - <integer>104</integer> - <integer>65</integer> - <integer>6</integer> - </array> <key>IBSystem Version</key> - <string>6I32</string> + <string>6L60</string> </dict> </plist> Index: objects.nib =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/English.lproj/PrefsWindow.nib/objects.nib,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 Binary files /tmp/cvsJslhbd and /tmp/cvsoABo5f differ |
From: <ak...@us...> - 2003-05-12 17:54:13
|
Update of /cvsroot/zephyrchat/zchat/zChat In directory sc8-pr-cvs1:/tmp/cvs-serv32038 Modified Files: ZCChatWindowController.mm ZChatPrefsController.h ZChatPrefsController.mm Log Message: Add auto-save of transcripts. Index: ZCChatWindowController.mm =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/ZCChatWindowController.mm,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- ZCChatWindowController.mm 11 Apr 2003 17:01:09 -0000 1.24 +++ ZCChatWindowController.mm 12 May 2003 17:54:09 -0000 1.25 @@ -138,6 +138,22 @@ [[self window] setTitle:signature != nil ? signature : sender]; } + /* Set up auto-save */ + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"AutoSaveChats"]) { + NSString *file = [[[NSUserDefaults standardUserDefaults] stringForKey:@"AutoSaveChatFolder"] + stringByAppendingPathComponent: + [NSString stringWithFormat: + [[NSDate date] descriptionWithCalendarFormat:NSLocalizedString(@"AUTO_SAVE_FORMAT", nil) + timeZone:nil locale:nil], [[self window] title]]]; + if ([[NSFileManager defaultManager] createFileAtPath:file contents:[NSData data] attributes:nil]) { + [[self window] setRepresentedFilename:file]; + } else { + NSBeginCriticalAlertSheet(NSLocalizedString(@"COULDNT_SAVE_TITLE", nil), + nil, nil, nil, [self window], nil, nil, nil, nil, + NSLocalizedString(@"COULDNT_SAVE_FMT", nil), file); + } + } + /* Get notified when there are changes to the input text */ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_updateFontButtons:) name:NSTextViewDidChangeSelectionNotification object:nil]; @@ -653,6 +669,17 @@ [text endEditing]; + /* Save changes if we are auto-saving*/ + NSString *filename = [[self window] representedFilename]; + if (filename != nil) { + if (![[_output RTFFromRange:NSMakeRange(0, [[_output textStorage] length])] writeToFile:filename + atomically:YES]) { + NSBeginCriticalAlertSheet(NSLocalizedString(@"COULDNT_SAVE_TITLE", nil), + nil, nil, nil, [self window], nil, nil, nil, nil, + NSLocalizedString(@"COULDNT_SAVE_FMT", nil), filename); + } + } + /* Scroll if necessary */ if (shouldScroll) { [_output scrollRangeToVisible:NSMakeRange([text length], 0)]; Index: ZChatPrefsController.h =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/ZChatPrefsController.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ZChatPrefsController.h 29 Mar 2003 19:21:38 -0000 1.4 +++ ZChatPrefsController.h 12 May 2003 17:54:10 -0000 1.5 @@ -18,11 +18,15 @@ IBOutlet NSButton *_natInUse; IBOutlet NSTextField *_natAddress; IBOutlet NSView *_appearanceView; + /* Appearance */ IBOutlet NSColorWell *_myColor; IBOutlet NSColorWell *_senderColor; IBOutlet NSColorWell *_myTextColor; IBOutlet NSColorWell *_senderTextColor; - + /* Transcripts */ + IBOutlet NSButton *_saveCheckbox; + IBOutlet NSTextField *_saveFolder; + NSUserDefaults *_defs; NSDictionary *_sites; } @@ -49,5 +53,9 @@ - (IBAction)changeSenderColor:(id)sender; - (IBAction)changeMyTextColor:(id)sender; - (IBAction)changeSenderTextColor:(id)sender; + +/* Save transcripts */ +- (IBAction)saveTranscripts:(id)sender; +- (IBAction)setTranscriptFolder:(id)sender; @end Index: ZChatPrefsController.mm =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/ZChatPrefsController.mm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ZChatPrefsController.mm 29 Mar 2003 19:21:38 -0000 1.8 +++ ZChatPrefsController.mm 12 May 2003 17:54:10 -0000 1.9 @@ -11,6 +11,10 @@ #import "NSWindowAdditions.h" +@interface NSOpenPanel (NSOpenPanelUndocumentedMethods) +- (void)_setIncludeNewFolderButton:(BOOL)flag; +@end + @implementation ZChatPrefsController - (id)init { @@ -119,6 +123,15 @@ [_myTextColor setColor:[ZChatApp textColorForMe]]; [_senderColor setColor:[ZChatApp colorFor:nil]]; [_senderTextColor setColor:[ZChatApp textColorFor:nil]]; + + /* Autosave */ + [_saveCheckbox setState:[_defs boolForKey:@"AutoSaveChats"] ? NSOnState : NSOffState]; + NSString *directory = [_defs stringForKey:@"AutoSaveChatFolder"]; + if (directory != nil) + [_saveFolder setStringValue:[[NSFileManager defaultManager] displayNameAtPath:directory]]; + else + [_saveFolder setStringValue:@""]; + [self switchToView:_appearanceView title:NSLocalizedString(@"PREFS_MESSAGES", nil)]; } @@ -235,5 +248,41 @@ [_defs setObject:[NSKeyedArchiver archivedDataWithRootObject:[sender color]] forKey:@"SenderTextColor"]; } +- (IBAction)saveTranscripts:(id)sender { + if ([sender state] == NSOnState) { + if ([_defs stringForKey:@"AutoSaveChatFolder"] == nil) { + [self setTranscriptFolder:nil]; + } + + if ([_defs stringForKey:@"AutoSaveChatFolder"] == nil) { + [sender setState:NSOffState]; + return; + } + } + + [_defs setBool:([sender state] == NSOnState) forKey:@"AutoSaveChats"]; +} + +- (IBAction)setTranscriptFolder:(id)sender { + NSOpenPanel *openPanel = [NSOpenPanel openPanel]; + + [openPanel setTitle:NSLocalizedString(@"Choose Transcript Folder", nil)]; + [openPanel setPrompt:NSLocalizedString(@"Choose", nil)]; + + // Undocumented goodness: + if ([openPanel respondsToSelector:@selector(_setIncludeNewFolderButton:)]) + [openPanel _setIncludeNewFolderButton:YES]; + + /* Pick directories only */ + [openPanel setCanChooseDirectories:YES]; + [openPanel setCanChooseFiles:NO]; + + if ([openPanel runModalForDirectory:[_defs stringForKey:@"AutoSaveChatFolder"] + file:nil types:nil] == NSOKButton) { + NSString *directory = [[openPanel filenames] objectAtIndex:0]; + [_defs setObject:directory forKey:@"AutoSaveChatFolder"]; + [_saveFolder setStringValue:[[NSFileManager defaultManager] displayNameAtPath:directory]]; + } +} @end |
From: <ak...@us...> - 2003-05-12 17:54:13
|
Update of /cvsroot/zephyrchat/zchat/zChat/English.lproj In directory sc8-pr-cvs1:/tmp/cvs-serv32038/English.lproj Modified Files: Localizable.strings Log Message: Add auto-save of transcripts. Index: Localizable.strings =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/English.lproj/Localizable.strings,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Localizable.strings 11 Apr 2003 17:01:10 -0000 1.21 +++ Localizable.strings 12 May 2003 17:54:10 -0000 1.22 @@ -51,6 +51,10 @@ "Close" = "Close"; "Join" = "Join"; +"Choose" = "Choose"; +"Choose Transcript Folder" = "Choose Transcript Folder"; +"AUTO_SAVE_FORMAT" = "%%@ (%m-%d-%Y %I.%M %p).rtf"; + /* Nameless AB entry */ "No name" = "No name"; |
From: <ak...@us...> - 2003-05-12 00:53:57
|
Update of /cvsroot/zephyrchat/site/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv4435 Modified Files: index.html Log Message: Oops. Meant icon 2, not 3. Index: index.html =================================================================== RCS file: /cvsroot/zephyrchat/site/htdocs/index.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- index.html 12 May 2003 00:53:24 -0000 1.3 +++ index.html 12 May 2003 00:53:54 -0000 1.4 @@ -20,7 +20,7 @@ <div id="banner" > <a href="http://sourceforge.net"> <img -src="http://sourceforge.net/sflogo.php?group_id=77081&type=3" +src="http://sourceforge.net/sflogo.php?group_id=77081&type=2" width="125" height="37" border="0" alt="SourceForge.net Logo" align="right" /></a> |
From: <ak...@us...> - 2003-05-12 00:53:27
|
Update of /cvsroot/zephyrchat/site/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv4295 Modified Files: index.html Log Message: Use smaller SF icon. Index: index.html =================================================================== RCS file: /cvsroot/zephyrchat/site/htdocs/index.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- index.html 12 May 2003 00:50:39 -0000 1.2 +++ index.html 12 May 2003 00:53:24 -0000 1.3 @@ -20,8 +20,8 @@ <div id="banner" > <a href="http://sourceforge.net"> <img -src="http://sourceforge.net/sflogo.php?group_id=77081&type=5" -width="210" height="62" border="0" alt="SourceForge.net Logo" +src="http://sourceforge.net/sflogo.php?group_id=77081&type=3" +width="125" height="37" border="0" alt="SourceForge.net Logo" align="right" /></a> <h1>zChat</h1> |
From: <ak...@us...> - 2003-05-12 00:52:22
|
Update of /cvsroot/zephyrchat/site/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv3928 Modified Files: .htaccess Log Message: Remove redirect Index: .htaccess =================================================================== RCS file: /cvsroot/zephyrchat/site/htdocs/.htaccess,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- .htaccess 21 Apr 2003 18:49:30 -0000 1.1 +++ .htaccess 12 May 2003 00:52:19 -0000 1.2 @@ -1 +0,0 @@ -RedirectMatch ^/$ http://sourceforge.net/projects/zephyrchat/ |
From: <ak...@us...> - 2003-05-12 00:50:42
|
Update of /cvsroot/zephyrchat/site/htdocs/img In directory sc8-pr-cvs1:/tmp/cvs-serv3421/img Added Files: zchat-icon.png Log Message: Add initial HTML. --- NEW FILE: zchat-icon.png --- (This appears to be a binary file; contents omitted.) |
From: <ak...@us...> - 2003-05-12 00:50:42
|
Update of /cvsroot/zephyrchat/site/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv3421 Modified Files: index.html Log Message: Add initial HTML. Index: index.html =================================================================== RCS file: /cvsroot/zephyrchat/site/htdocs/index.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- index.html 21 Apr 2003 18:49:30 -0000 1.1 +++ index.html 12 May 2003 00:50:39 -0000 1.2 @@ -1,13 +1,116 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" - "http://www.w3.org/TR/html4/strict.dtd"> -<html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/html4/loose.dtd"> +<html> <head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + +<title>zChat</title> + +<style type="text/css"><!-- +@import url("http://rescomp.stanford.edu/~akosut/style/site.css"); +@import url("http://rescomp.stanford.edu/~akosut/style/log.css"); +@import url("http://rescomp.stanford.edu/~akosut/style/software.css"); +--></style> + </head> <body> -</body> +<div id="banner" > +<a href="http://sourceforge.net"> <img +src="http://sourceforge.net/sflogo.php?group_id=77081&type=5" +width="210" height="62" border="0" alt="SourceForge.net Logo" +align="right" /></a> + +<h1>zChat</h1> +<span class="description">Zephyr client for Mac OS X</span> +<br clear="right" /> +</div> + +<div id="container"> + +<div class="main"> + +<h2>Description</h2> + +<div class="mainbody"> +<img src="img/zchat-icon.png" class="appicon" alt="" /> +<p> +zChat is a Mac OS X client for the Zephyr Notification Service. +Zephyr is a "notice transport and delivery system" used for messanging +at many major universities and other large institutions. The zChat +client puts a friendly Mac OS X face onto Zephyr. +</p> + +<h3>Screen shots</h3> +Coming soon... +<!-- <p><a href="http://rescomp.stanford.edu/~akosut/software/img/ncidpop-macosx.jpg">NCIDpop on Mac OS X</a> +<br /> +<a href="http://rescomp.stanford.edu/~akosut/software/img/ncidpop-winxp.png">NCIDpop on Windows XP</a> +--> +</p> + +</div> + +<h2 id="download">Download</h2> + +<div class="mainbody"> +<h3>Current release: 0.1</h3> +<p> +<a +href="http://sourceforge.net/project/showfiles.php?group_id=77081">Download +from the SourceForge project file list</a> +</p> + +</div> + +<h2>Documentation</h2> + +<div class="mainbody"> + +Coming soon... + +</div> + +<h2>More Information</h2> + +<div class="mainbody"> + +<p>For more information about zChat, including development information +and bug tracking, see the <a +href="http://www.sourceforge.net/projects/zephyrchat/">SourceForge +project page.</a></p> + +</div> + +<h2><a name="contact"></a>Contact the Author</h2> + +<div class="mainbody"> + +<p>File <a +href="http://sourceforge.net/tracker/?atid=549122&group_id=77081">bugs</a> +or <a href="http://sourceforge.net/tracker/?group_id=77081&atid=549125">feature requests</a> with the SourceForge <a +href="http://sourceforge.net/tracker/?group_id=77081">Tracker</a>.</p> + +<p>Please send any comments or suggestions to <a +href="http://rescomp.stanford.edu/~akosut/">Alexei Kosut</a> at <code><a +href="mailto:ak...@cs...">ak...@cs...</a></code>.</p> + +</div> + +</div> +</div> + +<div id="footer"> +<hr /> +<a href="http://rescomp.stanford.edu/~akosut/">Alexei</a> +··· <a href="http://rescomp.stanford.edu/~akosut/software/">Software</a> +··· <a href="http://rescomp.stanford.edu/~akosut/log/">Weblog</a> +</div> + + +</body> </html> |
From: <ak...@us...> - 2003-05-12 00:22:30
|
Update of /cvsroot/zephyrchat/site/htdocs/img In directory sc8-pr-cvs1:/tmp/cvs-serv29482/img Log Message: Directory /cvsroot/zephyrchat/site/htdocs/img added to the repository |
From: <ak...@us...> - 2003-04-30 19:29:36
|
Update of /cvsroot/zephyrchat/zchat/zChat In directory sc8-pr-cvs1:/tmp/cvs-serv6711 Modified Files: ZChatFriendViewController.mm Log Message: Correctly use existing window when double-clicking a friend in the friends list. Index: ZChatFriendViewController.mm =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/ZChatFriendViewController.mm,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- ZChatFriendViewController.mm 9 Apr 2003 15:51:39 -0000 1.22 +++ ZChatFriendViewController.mm 30 Apr 2003 19:29:32 -0000 1.23 @@ -223,12 +223,11 @@ if ([ZChatApp mgr] == NULL) return; ZQuad subscribe_to("message", "*", [ZChatApp mgr]->GetUserName(), [_user stlString]); - ZQuad chat_with("message", "*", [_user stlString], [ZChatApp mgr]->GetUserName()); ZCChatWindowController *controller = nil; NSEnumerator *e = [[ZCChatWindowController windowControllers] objectEnumerator]; while ((controller = [e nextObject]) != nil) { - if ([controller isAppropriateForChatWith:chat_with]) + if ([controller isAppropriateForChatWith:subscribe_to]) break; } |
From: <ak...@us...> - 2003-04-30 19:24:04
|
Update of /cvsroot/zephyrchat/zchat/ZephyrLib In directory sc8-pr-cvs1:/tmp/cvs-serv4116 Modified Files: ZGram.cpp ZGram.h Log Message: Add ZQuad::reverse() and operator<< for ZTriple and ZQuad. These are for debugging/future purposes; not currently used by ZephyrLib. Index: ZGram.cpp =================================================================== RCS file: /cvsroot/zephyrchat/zchat/ZephyrLib/ZGram.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ZGram.cpp 28 Feb 2003 22:16:34 -0000 1.6 +++ ZGram.cpp 30 Apr 2003 19:24:00 -0000 1.7 @@ -4,6 +4,8 @@ #include "ZGram.h" #include "ZephyrMgr.h" +using namespace zephyrlib; + const zephyrlib::ZQuad zephyrlib::ZQuad::Everything("*", "*", "*", "*"); @@ -89,6 +91,19 @@ return ZTriple(klass, instance, recipient); } + +ZQuad zephyrlib::ZQuad::reverse() const { + return ZQuad(dest.klass, dest.instance, sender, dest.recipient); +} + +std::ostream& operator<<(std::ostream &ostr, const ZTriple &triple) { + return (ostr << triple.klass << "/" << triple.instance << "/" << triple.recipient); +} + +std::ostream& operator<<(std::ostream &ostr, const ZQuad &quad) { + return (ostr << "destination: " << quad.dest << " sender: " << quad.sender); +} + /* ZWrite::GetSignature * ZWrite::GetMessage Index: ZGram.h =================================================================== RCS file: /cvsroot/zephyrchat/zchat/ZephyrLib/ZGram.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ZGram.h 28 Feb 2003 22:16:34 -0000 1.12 +++ ZGram.h 30 Apr 2003 19:24:01 -0000 1.13 @@ -112,11 +112,9 @@ return false; return dest.containsExactRecipient(b.dest); }; -}; - - - + ZQuad reverse() const; +}; // Outside world's interface to ZephyrPacket // Externally, ZGram never uses the realm. @@ -190,5 +188,8 @@ // A helper function or two } // namespace zephyrlib + +std::ostream& operator<<(std::ostream &ostr, const zephyrlib::ZTriple &triple); +std::ostream& operator<<(std::ostream &ostr, const zephyrlib::ZQuad &quad); #endif |
From: <ak...@us...> - 2003-04-21 18:49:34
|
Update of /cvsroot/zephyrchat/site/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv32204 Added Files: .htaccess index.html Log Message: Basic site file. --- NEW FILE: .htaccess --- RedirectMatch ^/$ http://sourceforge.net/projects/zephyrchat/ --- NEW FILE: index.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> </head> <body> </body> </html> |
From: <ak...@us...> - 2003-04-21 18:47:54
|
Update of /cvsroot/zephyrchat/site/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv30393/htdocs Log Message: Directory /cvsroot/zephyrchat/site/htdocs added to the repository |
From: <ak...@us...> - 2003-04-21 18:47:54
|
Update of /cvsroot/zephyrchat/site/cgi-bin In directory sc8-pr-cvs1:/tmp/cvs-serv30393/cgi-bin Log Message: Directory /cvsroot/zephyrchat/site/cgi-bin added to the repository |
From: <ak...@us...> - 2003-04-11 17:01:16
|
Update of /cvsroot/zephyrchat/zchat/zChat/English.lproj In directory sc8-pr-cvs1:/tmp/cvs-serv12534/English.lproj Modified Files: Localizable.strings Log Message: Display error if save failed. Index: Localizable.strings =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/English.lproj/Localizable.strings,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- Localizable.strings 9 Apr 2003 15:51:40 -0000 1.20 +++ Localizable.strings 11 Apr 2003 17:01:10 -0000 1.21 @@ -77,6 +77,9 @@ "SITE_MENU_CUSTOM" = "Custom"; +"COULDNT_SAVE_TITLE" = "Couldn't Save"; +"COULDNT_SAVE_FMT" = "Couldn't save transcript as %@."; + "PREFS_SETUP" = "Setup"; "PREFS_MESSAGES" = "Messages"; |
From: <ak...@us...> - 2003-04-11 17:01:16
|
Update of /cvsroot/zephyrchat/zchat/zChat In directory sc8-pr-cvs1:/tmp/cvs-serv12534 Modified Files: ZCChatWindowController.mm Log Message: Display error if save failed. Index: ZCChatWindowController.mm =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/ZCChatWindowController.mm,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- ZCChatWindowController.mm 3 Apr 2003 18:08:20 -0000 1.23 +++ ZCChatWindowController.mm 11 Apr 2003 17:01:09 -0000 1.24 @@ -250,11 +250,20 @@ - (void)savePanelDidEnd:(NSSavePanel *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo { if (returnCode == NSOKButton) { + bool success; + if ([[[sheet filename] pathExtension] isEqualToString:@"rtf"]) { - [[_output RTFFromRange:NSMakeRange(0, [[_output textStorage] length])] + success = [[_output RTFFromRange:NSMakeRange(0, [[_output textStorage] length])] writeToURL:[sheet URL] atomically:YES]; } else { - [[_output string] writeToURL:[sheet URL] atomically:YES]; + success = [[_output string] writeToURL:[sheet URL] atomically:YES]; + } + + if (!success) { + [sheet orderOut:nil]; + NSBeginCriticalAlertSheet(NSLocalizedString(@"COULDNT_SAVE_TITLE", nil), + nil, nil, nil, [self window], nil, nil, nil, nil, + NSLocalizedString(@"COULDNT_SAVE_FMT", nil), [sheet filename]); } } |
From: <ak...@us...> - 2003-04-10 20:58:15
|
Update of /cvsroot/zephyrchat/zchat/zChat/English.lproj/FriendView.nib In directory sc8-pr-cvs1:/tmp/cvs-serv14789/zChat/English.lproj/FriendView.nib Modified Files: info.nib objects.nib Log Message: Collapsed location text field should not try to wrap. Index: info.nib =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/English.lproj/FriendView.nib/info.nib,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- info.nib 29 Mar 2003 16:37:34 -0000 1.10 +++ info.nib 10 Apr 2003 20:58:11 -0000 1.11 @@ -7,11 +7,11 @@ <key>IBEditorPositions</key> <dict> <key>526</key> - <string>294 443 326 75 0 0 1024 746 </string> + <string>151 390 326 75 0 0 1024 746 </string> <key>527</key> - <string>165 509 324 90 0 0 1024 746 </string> + <string>350 469 324 90 0 0 1024 746 </string> <key>556</key> - <string>349 482 326 67 0 0 1024 746 </string> + <string>349 480 326 67 0 0 1024 746 </string> </dict> <key>IBFramework Version</key> <string>291.0</string> @@ -22,6 +22,6 @@ <integer>526</integer> </array> <key>IBSystem Version</key> - <string>6I32</string> + <string>6L29</string> </dict> </plist> Index: objects.nib =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/English.lproj/FriendView.nib/objects.nib,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 Binary files /tmp/cvsigGw6x and /tmp/cvsMlogYV differ |
From: <ak...@us...> - 2003-04-10 20:47:48
|
Update of /cvsroot/zephyrchat/zchat/zChat/English.lproj/MainMenu.nib In directory sc8-pr-cvs1:/tmp/cvs-serv7691/zChat/English.lproj/MainMenu.nib Modified Files: classes.nib info.nib objects.nib Log Message: Use combo box (with friends in menu) for chat-with-person entry. Index: classes.nib =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/English.lproj/MainMenu.nib/classes.nib,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- classes.nib 27 Mar 2003 15:51:33 -0000 1.9 +++ classes.nib 10 Apr 2003 20:47:43 -0000 1.10 @@ -13,7 +13,7 @@ showFriendsWindow = id; showPrefsPanel = id; zephyrHide = id; - zephyrShow = id; + zephyrUnhide = id; }; CLASS = ZChatAppController; LANGUAGE = ObjC; @@ -23,7 +23,7 @@ "_newChatInstance" = NSTextField; "_newChatOK" = NSButton; "_newChatPanel" = NSPanel; - "_newChatPerson" = NSTextField; + "_newChatPerson" = NSComboBox; "_newChatRecipient" = NSPopUpButton; "_newChatTabs" = NSTabView; "_newChatType" = NSPopUpButton; Index: info.nib =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/English.lproj/MainMenu.nib/info.nib,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- info.nib 31 Mar 2003 15:07:48 -0000 1.11 +++ info.nib 10 Apr 2003 20:47:43 -0000 1.12 @@ -13,9 +13,9 @@ <string>291.0</string> <key>IBOpenObjects</key> <array> - <integer>29</integer> <integer>425</integer> <integer>401</integer> + <integer>29</integer> </array> <key>IBSystem Version</key> <string>6I32</string> Index: objects.nib =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/English.lproj/MainMenu.nib/objects.nib,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 Binary files /tmp/cvso3umBD and /tmp/cvs0Chzb9 differ |
From: <ak...@us...> - 2003-04-10 20:47:48
|
Update of /cvsroot/zephyrchat/zchat/zChat In directory sc8-pr-cvs1:/tmp/cvs-serv7691/zChat Modified Files: ZChatAppController.h ZChatAppController.mm Log Message: Use combo box (with friends in menu) for chat-with-person entry. Index: ZChatAppController.h =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/ZChatAppController.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ZChatAppController.h 7 Apr 2003 21:01:52 -0000 1.16 +++ ZChatAppController.h 10 Apr 2003 20:47:42 -0000 1.17 @@ -23,7 +23,7 @@ IBOutlet NSButton *_newChatOK; IBOutlet NSPopUpButton *_newChatType; IBOutlet NSTabView *_newChatTabs; - IBOutlet NSTextField *_newChatPerson; + IBOutlet NSComboBox *_newChatPerson; IBOutlet NSTextField *_newChatChat; IBOutlet NSTextField *_newChatInstance; IBOutlet NSTextField *_newChatClass; Index: ZChatAppController.mm =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/ZChatAppController.mm,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- ZChatAppController.mm 7 Apr 2003 21:01:53 -0000 1.19 +++ ZChatAppController.mm 10 Apr 2003 20:47:43 -0000 1.20 @@ -251,12 +251,18 @@ [_newChatTabs takeSelectedTabViewItemFromSender:_newChatType]; [[_newChatRecipient itemAtIndex:0] setTitle:[NSString stringWithSTLString:recipient]]; + [_newChatPerson removeAllItems]; + NSArray *friendList = [[ZChatApp friendsWithFormat:NSLocalizedString(@"POPUP_USERNAME_FORMAT", nil) +] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; + [_newChatPerson addItemsWithObjectValues:friendList]; [_newChatPerson setStringValue:@""]; + [_newChatChat setStringValue:@""]; [_newChatClass setStringValue:@""]; [_newChatInstance setStringValue:@""]; [_newChatRecipient selectItemAtIndex:0]; - + + [_newChatOK setEnabled:NO]; if ([NSApp runModalForWindow:_newChatPanel] == NSOKButton) { @@ -265,10 +271,18 @@ NSAssert((unsigned)[_newChatType indexOfSelectedItem] < 3, @"Invalid chat type"); switch ([_newChatType indexOfSelectedItem]) { case 0: // Person + { sender = [[_newChatPerson stringValue] stlString]; class_ = "message"; instance = "*"; - break; + + // Use only the first word of the sender + string::size_type space_pos = sender.find(' '); + if (space_pos != string::npos) { + sender.resize(space_pos); + } + + } break; case 1: // Chat sender = "*"; @@ -289,7 +303,7 @@ recipient = [[_newChatRecipient titleOfSelectedItem] stlString]; break; } - + ZQuad subscribe_to(class_, instance, recipient, sender); ZCChatWindowController *controller = [ZCChatWindowController windowControllerWithQuad:subscribe_to start:YES]; @@ -363,6 +377,12 @@ [_newChatOK setEnabled:[[_newChatClass stringValue] length] && [[_newChatInstance stringValue] length]]; break; + } +} + +- (void)comboBoxWillDismiss:(NSNotification *)notification { + if ([notification object] == _newChatPerson) { + [self controlTextDidChange:nil]; } } |
From: <ak...@us...> - 2003-04-10 20:44:56
|
Update of /cvsroot/zephyrchat/zchat/zChat In directory sc8-pr-cvs1:/tmp/cvs-serv6135 Modified Files: ZChatFriendsController.mm Log Message: Reset status menu if custom status sheet is cancelled. Index: ZChatFriendsController.mm =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/ZChatFriendsController.mm,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- ZChatFriendsController.mm 9 Apr 2003 16:16:11 -0000 1.23 +++ ZChatFriendsController.mm 10 Apr 2003 20:44:50 -0000 1.24 @@ -254,6 +254,8 @@ [ZChatApp setTerminal:[NSString stringWithFormat:@"%c%@", away ? '-' : '+', status]]; } + + [self _updateStatusMenu]; } - (void)controlTextDidChange:(NSNotification *)notification { |
From: <ak...@us...> - 2003-04-09 16:16:14
|
Update of /cvsroot/zephyrchat/zchat/zChat In directory sc8-pr-cvs1:/tmp/cvs-serv4487 Modified Files: ZChatFriendsController.mm Log Message: Make sure friends window is set up before showing. Index: ZChatFriendsController.mm =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/ZChatFriendsController.mm,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- ZChatFriendsController.mm 8 Apr 2003 19:53:46 -0000 1.22 +++ ZChatFriendsController.mm 9 Apr 2003 16:16:11 -0000 1.23 @@ -99,12 +99,13 @@ [NSImage imageNamed:@"status-away"]]; [[_statusMenu itemAtIndex:[_statusMenu indexOfItemWithTag:22]] setImage: [NSImage imageNamed:@"status-away"]]; + + [_name setStringValue:[ZChatApp mySignature]]; + [self _updateStatusMenu]; } - (void)windowDidLoad { [self reloadFriendViews]; - [self _updateStatusMenu]; - [_name setStringValue:[ZChatApp mySignature]]; } /* This is a simplified and rewritten-from-scratch version of Camino's CHStackView, which is a simplified |
From: <ak...@us...> - 2003-04-09 15:51:48
|
Update of /cvsroot/zephyrchat/zchat/zChat/English.lproj/FriendsWindow.nib In directory sc8-pr-cvs1:/tmp/cvs-serv26261/zChat/English.lproj/FriendsWindow.nib Modified Files: info.nib objects.nib Log Message: Show status in collapsed location view. Index: info.nib =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/English.lproj/FriendsWindow.nib/info.nib,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- info.nib 7 Apr 2003 21:01:56 -0000 1.11 +++ info.nib 9 Apr 2003 15:51:41 -0000 1.12 @@ -8,8 +8,8 @@ <string>291.0</string> <key>IBOpenObjects</key> <array> - <integer>651</integer> <integer>373</integer> + <integer>651</integer> </array> <key>IBSystem Version</key> <string>6I32</string> Index: objects.nib =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/English.lproj/FriendsWindow.nib/objects.nib,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 Binary files /tmp/cvs9kyQ3f and /tmp/cvsqrnUOl differ |
From: <ak...@us...> - 2003-04-09 15:51:45
|
Update of /cvsroot/zephyrchat/zchat/zChat/English.lproj In directory sc8-pr-cvs1:/tmp/cvs-serv26261/zChat/English.lproj Modified Files: Localizable.strings Log Message: Show status in collapsed location view. Index: Localizable.strings =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/English.lproj/Localizable.strings,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Localizable.strings 7 Apr 2003 20:37:39 -0000 1.19 +++ Localizable.strings 9 Apr 2003 15:51:40 -0000 1.20 @@ -69,6 +69,8 @@ "DISPLAY_USERNAME_FORMAT" = "%2$@ <%1$@>"; "POPUP_USERNAME_FORMAT" = "%@ (%@)"; +"TERMINAL_SEPERATOR" = ", "; + "SAVE_FILE" = "Chat with %@"; "INFO_WINDOW_TITLE" = "Info for: %@"; |
From: <ak...@us...> - 2003-04-09 15:51:45
|
Update of /cvsroot/zephyrchat/zchat/zChat In directory sc8-pr-cvs1:/tmp/cvs-serv26261/zChat Modified Files: ZChatFriendViewController.mm Log Message: Show status in collapsed location view. Index: ZChatFriendViewController.mm =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/ZChatFriendViewController.mm,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- ZChatFriendViewController.mm 8 Apr 2003 19:53:43 -0000 1.21 +++ ZChatFriendViewController.mm 9 Apr 2003 15:51:39 -0000 1.22 @@ -12,6 +12,8 @@ #import "ZChatFriendsController.h"; #import "ZChatFriendInfoController.h"; +#import "NSAttributedStringAdditions.h" + using namespace zephyrlib; namespace { @@ -143,6 +145,9 @@ *_locations = locations; if (!_locations->empty()) { + /* Set the collapsed text */ + NSMutableAttributedString *statuses = [NSMutableAttributedString new]; + /* The first row in the matrix is the header */ [_locationMatrix renewRows:_locations->size() + 1 columns:3]; NSAssert([_locationMatrix numberOfRows] >= 2, @"Location matrix should always have at least two rows"); @@ -156,27 +161,42 @@ if (!location.terminal.empty() && (location.terminal[0] == '+' || location.terminal[0] == '-')) { NSColor *color = (location.terminal[0] != '-') ? ZChatAvailableColor : ZChatAwayColor; - + NSString *terminal = [[NSString stringWithSTLString:location.terminal] substringFromIndex:1]; + [[_locationMatrix cellAtRow:i + 1 column:1] setTextColor:color]; - [[_locationMatrix cellAtRow:i + 1 column:1] setObjectValue: - [[NSString stringWithSTLString:location.terminal] substringFromIndex:1]]; + [[_locationMatrix cellAtRow:i + 1 column:1] setObjectValue:terminal]; + + [statuses appendString:terminal attributes: + [NSDictionary dictionaryWithObject:color forKey:NSForegroundColorAttributeName]]; } else { + NSString *terminal = [NSString stringWithSTLString:location.terminal]; + [[_locationMatrix cellAtRow:i + 1 column:1] setTextColor:[NSColor textColor]]; - [[_locationMatrix cellAtRow:i + 1 column:1] setObjectValue: - [NSString stringWithSTLString:location.terminal]]; + [[_locationMatrix cellAtRow:i + 1 column:1] setObjectValue:terminal]; + + [statuses appendString:terminal attributes: + [NSDictionary dictionaryWithObject:[NSColor textColor] + forKey:NSForegroundColorAttributeName]]; + } + + if (i + 1 < _locations->size()) { + [statuses appendString:NSLocalizedString(@"TERMINAL_SEPERATOR", nil) attributes: + [NSDictionary dictionaryWithObject:[NSColor textColor] + forKey:NSForegroundColorAttributeName]]; } } [_locationMatrix sizeToCells]; + [_collapsedStatus setAttributedStringValue:statuses]; + [statuses release]; + /* We shouldn't have to hard-code 20. But I'm having a tough time fixing this one */ [_expandedView setFrameSize:NSMakeSize(NSWidth([_expandedView frame]), 20 + NSHeight([_locationMatrix frame]))]; [_expandedView setNeedsDisplay:YES]; } - // TODO - _busy = false; [[NSNotificationCenter defaultCenter] postNotificationName:ZChatFriendStatusNotification object:self]; |
From: <ak...@us...> - 2003-04-08 19:53:53
|
Update of /cvsroot/zephyrchat/zchat/zChat In directory sc8-pr-cvs1:/tmp/cvs-serv2214/zChat Modified Files: ZChatFriendViewController.mm ZChatFriendsController.mm status-available.tiff status-away.tiff Log Message: Custom status icons. Color status shown in expanded location list. Index: ZChatFriendViewController.mm =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/ZChatFriendViewController.mm,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- ZChatFriendViewController.mm 31 Mar 2003 15:07:45 -0000 1.20 +++ ZChatFriendViewController.mm 8 Apr 2003 19:53:43 -0000 1.21 @@ -14,6 +14,11 @@ using namespace zephyrlib; +namespace { + static const NSColor *ZChatAvailableColor; + static const NSColor *ZChatAwayColor; +} + class ZChatFriendViewLocateCallback : public ZephyrLocateCallback { public: ZChatFriendViewLocateCallback(ZChatFriendViewController *controller) : _self([controller retain]) {} @@ -30,6 +35,15 @@ @implementation ZChatFriendViewController ++ (void)initialize { + NSAutoreleasePool *pool = [NSAutoreleasePool new]; + + ZChatAvailableColor = [[NSColor colorWithCalibratedRed:0.0 green:0.5 blue:0.0 alpha:1.0] retain]; + ZChatAwayColor = [[NSColor colorWithCalibratedRed:0.75 green:0.0 blue:0.0 alpha:1.0] retain]; + + [pool release]; +} + - (id)initWithUser:(NSString *)user { if ((self = [super init]) != nil) { _user = [ZephyrUtils::RemoveRealm(user) retain]; @@ -137,10 +151,20 @@ ZephyrLocation &location = (*_locations)[i]; [[_locationMatrix cellAtRow:i + 1 column:0] setObjectValue: [NSString stringWithSTLString:location.machine_name]]; - [[_locationMatrix cellAtRow:i + 1 column:1] setObjectValue: - [NSString stringWithSTLString:location.terminal]]; [[_locationMatrix cellAtRow:i + 1 column:2] setObjectValue: [NSString stringWithSTLString:location.login_time]]; + + if (!location.terminal.empty() && (location.terminal[0] == '+' || location.terminal[0] == '-')) { + NSColor *color = (location.terminal[0] != '-') ? ZChatAvailableColor : ZChatAwayColor; + + [[_locationMatrix cellAtRow:i + 1 column:1] setTextColor:color]; + [[_locationMatrix cellAtRow:i + 1 column:1] setObjectValue: + [[NSString stringWithSTLString:location.terminal] substringFromIndex:1]]; + } else { + [[_locationMatrix cellAtRow:i + 1 column:1] setTextColor:[NSColor textColor]]; + [[_locationMatrix cellAtRow:i + 1 column:1] setObjectValue: + [NSString stringWithSTLString:location.terminal]]; + } } [_locationMatrix sizeToCells]; Index: ZChatFriendsController.mm =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/ZChatFriendsController.mm,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- ZChatFriendsController.mm 7 Apr 2003 21:01:55 -0000 1.21 +++ ZChatFriendsController.mm 8 Apr 2003 19:53:46 -0000 1.22 @@ -180,10 +180,14 @@ status = [status substringFromIndex:1]; } - // Check for existing title - id <NSMenuItem> item = [_statusMenu itemWithTitle:status]; - if (item != NULL) { - if (([item tag] == (away ? 2 : 1)) || ([item tag] == (away ? 222 : 111))) { + /* Check for existing title. + * We cannot use itemWithTitle because we only want to search items with the right tag. + */ + NSEnumerator *e = [[_statusMenu itemArray] objectEnumerator]; + id <NSMenuItem> item; + while ((item = [e nextObject]) != nil) { + if ((([item tag] == (away ? 2 : 1)) || ([item tag] == (away ? 222 : 111))) + && [status isEqualToString:[item title]]) { [_statusMenu selectItem:item]; return; } Index: status-available.tiff =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/status-available.tiff,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvshJWLxz and /tmp/cvsintvKY differ Index: status-away.tiff =================================================================== RCS file: /cvsroot/zephyrchat/zchat/zChat/status-away.tiff,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsKq1dNX and /tmp/cvsGiKCmL differ |