Improved startup assistant

1 view
Skip to first unread message

J. Nicholas Jitkoff

unread,
Nov 28, 2007, 12:35:40 AM11/28/07
to statz-d...@googlegroups.com
Index: StartUpAccountsController.h
===================================================================
--- StartUpAccountsController.h (revision 0)
+++ StartUpAccountsController.h (revision 0)
@@ -0,0 +1,29 @@
+//
+// StartUpAccountsController.h
+// Statz
+//
+// Created by dmaclach on 6/23/07.
+//
+// Copyright 2007 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
you may not
+// use this file except in compliance with the License. You may
obtain a copy
+// of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the
+// License for the specific language governing permissions and
limitations under
+// the License.
+//
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface StartUpAccountsController : NSObject {
+ IBOutlet NSTableView *accountsTable_;
+ IBOutlet NSArrayController *accountsController_;
+}
+@end
Index: StartUpAccountsController.m
===================================================================
--- StartUpAccountsController.m (revision 0)
+++ StartUpAccountsController.m (revision 0)
@@ -0,0 +1,42 @@
+//
+// StartUpAccountsController.m
+// Statz
+//
+// Created by dmaclach on 6/23/07.
+//
+// Copyright 2007 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
you may not
+// use this file except in compliance with the License. You may
obtain a copy
+// of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the
+// License for the specific language governing permissions and
limitations under
+// the License.
+//
+
+#import "StartUpAccountsController.h"
+
+#import "StatzPlugin.h"
+
+
+@implementation StartUpAccountsController
+- (void)awakeFromNib {
+ [accountsTable_ setIntercellSpacing:NSMakeSize(4.0, 8.0)];
+}
+
+
+- (void)tableView:(NSTableView *)aTableView setObjectValue:
(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:
(int)rowIndex {
+ if ([[aTableColumn identifier] isEqualToString:@"enabled"] &&
[anObject boolValue]) {
+ if (rowIndex < (int)[[accountsController_ arrangedObjects] count]
&& rowIndex >= 0) {
+ StatzPlugin *selection = [[accountsController_ arrangedObjects]
objectAtIndex:rowIndex];
+ if ([selection hasPreferences])
+ [selection showAccountPreferences];
+ }
+ }
+}
+@end
Index: StartUpWindowController.m
===================================================================
--- StartUpWindowController.m (revision 38)
+++ StartUpWindowController.m (working copy)
@@ -20,6 +20,7 @@
//

#import "StartUpWindowController.h"
+#import "AppDelegate.h"

@implementation StartUpWindowController
- (id)initWithDelegate:(id)inDelegate {
@@ -37,6 +38,7 @@
return window;
}

+
- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:
(NSTabViewItem *)tabViewItem {
BOOL firstTab = [[tabViewItem identifier] isEqualToString:@"Intro"];
BOOL lastTab = [[tabViewItem identifier] isEqualToString:@"Done"];
@@ -53,6 +55,7 @@
BOOL lastTab = [[[tabView selectedTabViewItem] identifier]
isEqualToString:@"Done"];
if (lastTab) {
[self close];
+ [(AppDelegate *)[NSApp delegate] showSettings:nil];
} else {
[tabView selectNextTabViewItem:sender];
}
Index: Statz.xcodeproj/project.pbxproj
===================================================================
--- Statz.xcodeproj/project.pbxproj (revision 38)
+++ Statz.xcodeproj/project.pbxproj (working copy)
@@ -35,6 +35,7 @@
7F77B3190CEA85B4001E26DE /* Skype.framework in Frameworks */ =
{isa = PBXBuildFile; fileRef = 8B11B83C0C2F481E00C6A6F7 /*
Skype.framework */; };
7F77B32C0CEA8604001E26DE /* Skype.framework in Copy Skype API */ =
{isa = PBXBuildFile; fileRef = 8B11B83C0C2F481E00C6A6F7 /*
Skype.framework */; };
7F77B3640CEA8AAB001E26DE /* Skype.framework in CopyFiles */ = {isa
= PBXBuildFile; fileRef = 8B11B83C0C2F481E00C6A6F7 /* Skype.framework
*/; };
+ 7FC2DC960CFD2EE4007C00C7 /* StartUpAccountsController.m in Sources
*/ = {isa = PBXBuildFile; fileRef = 7FC2DC940CFD2EE4007C00C7 /*
StartUpAccountsController.m */; };
7FEE28D00CF2094F0033698B /* facebook-icon.png in Resources */ =
{isa = PBXBuildFile; fileRef = 7FEE28CF0CF2094F0033698B /* facebook-
icon.png */; };
7FFF16FF0CF285C000DEFF90 /* StatzSettingsWindow.m in Sources */ =
{isa = PBXBuildFile; fileRef = 7FFF16FE0CF285C000DEFF90 /*
StatzSettingsWindow.m */; };
8B1987F20C7D0CB4002E4E3F /* UserStatusSource.m in Sources */ =
{isa = PBXBuildFile; fileRef = 8B1987F10C7D0CB3002E4E3F /*
UserStatusSource.m */; };
@@ -204,6 +205,8 @@
7F53DF200CF3B4400021DDE8 /* StatzRadioButtonCell.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.h; path = StatzRadioButtonCell.h; sourceTree =
"<group>"; };
7F66DA030CEE49EC0033C03D /* AttributedTextFieldCell.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.h; path = AttributedTextFieldCell.h; sourceTree =
"<group>"; };
7F66DA040CEE49EC0033C03D /* AttributedTextFieldCell.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.objc; path = AttributedTextFieldCell.m; sourceTree =
"<group>"; };
+ 7FC2DC940CFD2EE4007C00C7 /* StartUpAccountsController.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.objc; path = StartUpAccountsController.m; sourceTree =
"<group>"; };
+ 7FC2DC950CFD2EE4007C00C7 /* StartUpAccountsController.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.h; path = StartUpAccountsController.h; sourceTree =
"<group>"; };
7FEE28CF0CF2094F0033698B /* facebook-icon.png */ = {isa =
PBXFileReference; lastKnownFileType = image.png; path = "facebook-
icon.png"; sourceTree = "<group>"; };
7FFF16FD0CF285C000DEFF90 /* StatzSettingsWindow.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.h; path = StatzSettingsWindow.h; sourceTree = "<group>"; };
7FFF16FE0CF285C000DEFF90 /* StatzSettingsWindow.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.objc; path = StatzSettingsWindow.m; sourceTree =
"<group>"; };
@@ -523,6 +526,8 @@
8B99F3600C62AA820054F1DF /* Startup Stuff */ = {
isa = PBXGroup;
children = (
+ 7FC2DC940CFD2EE4007C00C7 /* StartUpAccountsController.m */,
+ 7FC2DC950CFD2EE4007C00C7 /* StartUpAccountsController.h */,
8B653B920C2D77BF00B86AF5 /* DropSheet.h */,
8B653B930C2D77BF00B86AF5 /* DropSheet.m */,
8B653B9F0C2DDA1600B86AF5 /* StartUpWindowController.h */,
@@ -933,6 +938,7 @@
7F53DF1A0CF3B2A40021DDE8 /* StatzRadioButtonCell.m in Sources */,
8BBDCAA40CF79F33008E6EC2 /* StatzApplication.m in Sources */,
8BBD92D60CFCA7E600738434 /* StatusChangedAnimation.m in Sources
*/,
+ 7FC2DC960CFD2EE4007C00C7 /* StartUpAccountsController.m in
Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Index: English.lproj/Startup.nib/info.nib
===================================================================
--- English.lproj/Startup.nib/info.nib (revision 38)
+++ English.lproj/Startup.nib/info.nib (working copy)
@@ -10,7 +10,7 @@
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
- <integer>14</integer>
+ <integer>20</integer>
</array>
<key>IBSystem Version</key>
<string>9B18</string>
Index: English.lproj/Startup.nib/keyedobjects.nib
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: English.lproj/Startup.nib/classes.nib
===================================================================
--- English.lproj/Startup.nib/classes.nib (revision 38)
+++ English.lproj/Startup.nib/classes.nib (working copy)
@@ -50,6 +50,21 @@
<key>LANGUAGE</key>
<string>ObjC</string>
</dict>
+ <dict>
+ <key>CLASS</key>
+ <string>StartUpAccountsController</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>accountsController_</key>
+ <string>NSArrayController</string>
+ <key>accountsTable_</key>
+ <string>NSTableView</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
</array>
<key>IBVersion</key>
<string>1</string>

Reply all
Reply to author
Forward
0 new messages