|
From: <ks...@us...> - 2002-06-12 16:12:33
|
Update of /cvsroot/aquachat/AquaChat
In directory usw-pr-cvs1:/tmp/cvs-serv20740
Modified Files:
ACController.h ACController.mm ACTextView.mm
Log Message:
Clicking on the dock icon reopons the window if it was closed.
The textview now can have rich text and is uneditable.
Index: ACController.h
===================================================================
RCS file: /cvsroot/aquachat/AquaChat/ACController.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ACController.h 11 Jun 2002 03:14:42 -0000 1.4
+++ ACController.h 12 Jun 2002 16:12:24 -0000 1.5
@@ -8,6 +8,7 @@
@interface ACController : NSObject
{
+ IBOutlet NSWindow *mainWindow;
IBOutlet ACTabView *tabView;
}
Index: ACController.mm
===================================================================
RCS file: /cvsroot/aquachat/AquaChat/ACController.mm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ACController.mm 11 Jun 2002 19:12:15 -0000 1.5
+++ ACController.mm 12 Jun 2002 16:12:24 -0000 1.6
@@ -34,6 +34,16 @@
- (void)awakeFromNib
{
sharedInstance = self; //Set our sharedInstance;
+ [mainWindow center];
+}
+
+- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag
+{
+ if (![mainWindow isVisible])
+ {
+ [mainWindow makeKeyAndOrderFront:nil];
+ }
+ return NO;
}
//Display the connection settings window
Index: ACTextView.mm
===================================================================
RCS file: /cvsroot/aquachat/AquaChat/ACTextView.mm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ACTextView.mm 7 Jun 2002 19:32:30 -0000 1.3
+++ ACTextView.mm 12 Jun 2002 16:12:24 -0000 1.4
@@ -3,4 +3,14 @@
@implementation ACTextView
+- (id)initWithFrame:(NSRect)rect
+{
+ if ( (self = [super initWithFrame:rect]) )
+ {
+ [self setEditable:NO]; //We don't want to be able to edit our text view
+ [self setRichText:YES]; //We do want to be able to have multiple types of fonts
+ }
+ return self;
+}
+
@end
|