Changeset 104

Show
Ignore:
Timestamp:
08/11/07 10:16:51 (1 year ago)
Author:
robert
Message:

Growl support

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/robert/Controller.m

    r99 r104  
    6060                        @"30", 
    6161                        @"0", 
     62                        @"NO", 
     63                        @"NO", 
    6264                        nil 
    6365                ] 
     
    7880                        CheckScreensaverIntervalString, 
    7981                        KeyTimeoutString, 
     82                        UseGrowlString, 
     83                        DisableDialogNotificationsWhenUsingGrowlString, 
    8084                        nil 
    8185                ] 
  • branches/robert/English.lproj/MainMenu.nib/classes.nib

    r18 r104  
    5050        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },  
    5151        { 
     52            CLASS = GrowlNotificationController;  
     53            LANGUAGE = ObjC;  
     54            OUTLETS = {};  
     55            SUPERCLASS = NSObject;  
     56        },  
     57        { 
     58            ACTIONS = {toggleTunnel = id; };  
    5259            CLASS = TunnelController;  
    5360            LANGUAGE = ObjC;  
    5461            OUTLETS = { 
    5562                dockMenuTunnelsItem = id;  
     63                growlNotificationController = id;  
    5664                mainMenuTunnelsItem = id;  
    5765                statusbarMenuTunnelsItem = id;  
  • branches/robert/English.lproj/MainMenu.nib/info.nib

    r18 r104  
    44<dict> 
    55        <key>IBDocumentLocation</key> 
    6         <string>17 395 582 332 0 0 1024 746 </string> 
     6        <string>193 265 613 333 0 0 1440 878 </string> 
    77        <key>IBEditorPositions</key> 
    88        <dict> 
     
    1515        </dict> 
    1616        <key>IBFramework Version</key> 
    17         <string>364.0</string> 
     17        <string>446.1</string> 
    1818        <key>IBSystem Version</key> 
    19         <string>7R28</string> 
     19        <string>8R2218</string> 
    2020</dict> 
    2121</plist> 
  • branches/robert/English.lproj/Preferences.nib/classes.nib

    r64 r104  
    2828            LANGUAGE = ObjC;  
    2929            OUTLETS = {checkForUpdatesOnStartup = id; socketPath = id; sshToolsPath = id; };  
     30            SUPERCLASS = PreferenceView;  
     31        },  
     32        { 
     33            CLASS = GrowlView;  
     34            LANGUAGE = ObjC;  
     35            OUTLETS = {disableDialogNotificationsWhenUsingGrowl = id; useGrowl = id; };  
    3036            SUPERCLASS = PreferenceView;  
    3137        },  
     
    6268                environmentController = PreferenceView;  
    6369                generalController = PreferenceView;  
     70                growlController = PreferenceView;  
    6471                keysController = PreferenceView;  
    6572                securityController = PreferenceView;  
  • branches/robert/English.lproj/Preferences.nib/info.nib

    r99 r104  
    44<dict> 
    55        <key>IBDocumentLocation</key> 
    6         <string>32 390 388 356 0 0 1024 746 </string> 
     6        <string>7 363 388 356 0 0 1440 878 </string> 
    77        <key>IBEditorPositions</key> 
    88        <dict> 
    99                <key>1065</key> 
    10                 <string>512 580 416 112 0 0 1440 938 </string> 
     10                <string>439 441 416 112 0 0 1440 878 </string> 
     11                <key>1144</key> 
     12                <string>510 529 416 112 0 0 1440 878 </string> 
    1113                <key>640</key> 
    12                 <string>472 473 495 343 0 0 1440 938 </string> 
     14                <string>470 413 495 343 0 0 1440 878 </string> 
    1315                <key>722</key> 
    1416                <string>446 468 495 234 0 0 1440 878 </string> 
    1517                <key>750</key> 
    16                 <string>487 500 412 169 0 0 1440 878 </string> 
     18                <string>512 500 412 169 0 0 1440 878 </string> 
    1719                <key>758</key> 
    18                 <string>494 534 399 102 0 0 1440 878 </string> 
     20                <string>518 534 399 102 0 0 1440 878 </string> 
    1921                <key>778</key> 
    20                 <string>479 448 429 274 0 0 1440 878 </string> 
     22                <string>503 448 429 274 0 0 1440 878 </string> 
    2123                <key>836</key> 
    22                 <string>494 537 398 96 0 0 1440 878 </string> 
     24                <string>554 438 398 96 0 0 1440 878 </string> 
    2325                <key>872</key> 
    24                 <string>446 478 495 214 0 0 1440 878 </string> 
     26                <string>470 478 495 214 0 0 1440 878 </string> 
    2527                <key>893</key> 
    26                 <string>446 468 495 234 0 0 1440 878 </string> 
     28                <string>470 468 495 234 0 0 1440 878 </string> 
    2729                <key>909</key> 
    28                 <string>472 519 495 234 0 0 1440 938 </string> 
     30                <string>470 468 495 234 0 0 1440 878 </string> 
    2931        </dict> 
    3032        <key>IBFramework Version</key> 
    31         <string>443.0</string> 
     33        <string>446.1</string> 
    3234        <key>IBOpenObjects</key> 
    3335        <array> 
    34                 <integer>1065</integer> 
    35                 <integer>909</integer> 
    36                 <integer>640</integer> 
     36                <integer>1144</integer> 
    3737        </array> 
    3838        <key>IBSystem Version</key> 
    39         <string>8P135</string> 
     39        <string>8R2218</string> 
    4040</dict> 
    4141</plist> 
  • branches/robert/Info.plist

    r103 r104  
    2525        <key>NSAppleScriptEnabled</key> 
    2626        <string>YES</string> 
     27        <key>OSAScriptingDefinition</key> 
     28    <string>SSHKeychain.sdef</string> 
    2729</dict> 
    2830</plist> 
  • branches/robert/PreferenceController.h

    r64 r104  
    2020extern NSString *KeyTimeoutString; 
    2121extern NSString *AddInteractivePasswordString; 
     22/* Growl support */ 
     23extern NSString *UseGrowlString; 
     24extern NSString *DisableDialogNotificationsWhenUsingGrowlString; 
    2225 
    2326@interface PreferenceController : NSObject  
     
    2932         
    3033        IBOutlet PreferenceView *generalController, *displayController, *keysController, *tunnelsController, *securityController, *environmentController; 
     34         
     35        /* Growl support */ 
     36        IBOutlet PreferenceView *growlController; 
    3137 
    3238        NSView *blankView; 
  • branches/robert/PreferenceController.m

    r99 r104  
    1717NSString *CheckScreensaverIntervalString = @"Check Screensaver Interval"; 
    1818NSString *KeyTimeoutString = @"Key Timeout"; 
     19/* Growl support */ 
     20NSString *UseGrowlString = @"Use Growl"; 
     21NSString *DisableDialogNotificationsWhenUsingGrowlString = @"Disable Dialog Notifications When Using Growl"; 
     22 
    1923 
    2024PreferenceController *sharedPreferenceController = nil; 
     
    7882                        [NSArray arrayWithObjects:@"preference_tunnels", tunnelsController, local(@"Tunnels"), nil], @"Tunnels", 
    7983                        [NSArray arrayWithObjects:@"preference_security", securityController, local(@"Security"), nil], @"Security", 
     84                        [NSArray arrayWithObjects:@"preference_growl", growlController, local(@"Growl"), nil], @"Growl", 
    8085                        nil] 
    8186                retain]; 
    8287 
    8388        /* Define the precedence of the sections. */ 
    84         preferenceItemsKeys = [[NSArray arrayWithObjects:@"General", @"Display", @"SSH Keys", @"Tunnels", @"Security", @"Environment", nil] retain]; 
     89        preferenceItemsKeys = [[NSArray arrayWithObjects:@"General", @"Display", @"SSH Keys", @"Tunnels", @"Security", @"Environment", @"Growl", nil] retain]; 
    8590 
    8691        toolbar = [[NSToolbar alloc] initWithIdentifier:@"preferenceToolbar"]; 
  • branches/robert/SSHKeychain.xcodeproj/project.pbxproj

    r99 r104  
    7474                CCE66DE406B15AEA002A5BEE /* TunnelsView.h in Headers */ = {isa = PBXBuildFile; fileRef = CCE66DE206B15AEA002A5BEE /* TunnelsView.h */; }; 
    7575                CCE66DE506B15AEA002A5BEE /* TunnelsView.m in Sources */ = {isa = PBXBuildFile; fileRef = CCE66DE306B15AEA002A5BEE /* TunnelsView.m */; }; 
     76                E1CF47F20C6C7F4E00B3F162 /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E1CF47F10C6C7F4E00B3F162 /* Growl.framework */; }; 
     77                E1CF47F70C6C7F7F00B3F162 /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = E1CF47F10C6C7F4E00B3F162 /* Growl.framework */; }; 
     78                E1CF48110C6D05DA00B3F162 /* GrowlNotificationController.m in Sources */ = {isa = PBXBuildFile; fileRef = E1CF480F0C6D05DA00B3F162 /* GrowlNotificationController.m */; }; 
     79                E1CF48120C6D05DA00B3F162 /* GrowlNotificationController.h in Headers */ = {isa = PBXBuildFile; fileRef = E1CF48100C6D05DA00B3F162 /* GrowlNotificationController.h */; }; 
     80                E1D38B2F0C6D1D3800C6F351 /* preference_growl.tiff in Resources */ = {isa = PBXBuildFile; fileRef = E1D38B2E0C6D1D3800C6F351 /* preference_growl.tiff */; }; 
     81                E1D38B4D0C6D1F5A00C6F351 /* GrowlView.h in Headers */ = {isa = PBXBuildFile; fileRef = E1D38B4B0C6D1F5A00C6F351 /* GrowlView.h */; }; 
     82                E1D38B4E0C6D1F5A00C6F351 /* GrowlView.m in Sources */ = {isa = PBXBuildFile; fileRef = E1D38B4C0C6D1F5A00C6F351 /* GrowlView.m */; }; 
     83                E1D38C390C6D33C500C6F351 /* SSHKeychain.sdef in Resources */ = {isa = PBXBuildFile; fileRef = E1D38C380C6D33C500C6F351 /* SSHKeychain.sdef */; }; 
    7684/* End PBXBuildFile section */ 
    77  
    78 /* Begin PBXBuildStyle section */ 
    79                 CCE37CF00C606DDA0073E776 /* Development */ = { 
    80                         isa = PBXBuildStyle; 
    81                         buildSettings = { 
    82                                 COPY_PHASE_STRIP = NO; 
    83                         }; 
    84                         name = Development; 
    85                 }; 
    86                 CCE37CF10C606DDA0073E776 /* Deployment */ = { 
    87                         isa = PBXBuildStyle; 
    88                         buildSettings = { 
    89                                 COPY_PHASE_STRIP = YES; 
    90                         }; 
    91                         name = Deployment; 
    92                 }; 
    93 /* End PBXBuildStyle section */ 
    9485 
    9586/* Begin PBXContainerItemProxy section */ 
     
    109100                }; 
    110101/* End PBXContainerItemProxy section */ 
     102 
     103/* Begin PBXCopyFilesBuildPhase section */ 
     104                E1CF47F50C6C7F6700B3F162 /* CopyFiles */ = { 
     105                        isa = PBXCopyFilesBuildPhase; 
     106                        buildActionMask = 2147483647; 
     107                        dstPath = ""; 
     108                        dstSubfolderSpec = 10; 
     109                        files = ( 
     110                                E1CF47F70C6C7F7F00B3F162 /* Growl.framework in CopyFiles */, 
     111                        ); 
     112                        runOnlyForDeploymentPostprocessing = 0; 
     113                }; 
     114/* End PBXCopyFilesBuildPhase section */ 
    111115 
    112116/* Begin PBXFileReference section */ 
     
    201205                CCE66DE206B15AEA002A5BEE /* TunnelsView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TunnelsView.h; path = PreferenceViews/TunnelsView.h; sourceTree = "<group>"; usesTabs = 1; }; 
    202206                CCE66DE306B15AEA002A5BEE /* TunnelsView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = TunnelsView.m; path = PreferenceViews/TunnelsView.m; sourceTree = "<group>"; usesTabs = 1; }; 
     207                E1CF47F10C6C7F4E00B3F162 /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Growl.framework; path = "../Growl SDK/Frameworks/Growl.framework"; sourceTree = SOURCE_ROOT; }; 
     208                E1CF480F0C6D05DA00B3F162 /* GrowlNotificationController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = GrowlNotificationController.m; sourceTree = "<group>"; }; 
     209                E1CF48100C6D05DA00B3F162 /* GrowlNotificationController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GrowlNotificationController.h; sourceTree = "<group>"; }; 
     210                E1D38B2E0C6D1D3800C6F351 /* preference_growl.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = preference_growl.tiff; sourceTree = "<group>"; }; 
     211                E1D38B4B0C6D1F5A00C6F351 /* GrowlView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GrowlView.h; sourceTree = "<group>"; }; 
     212                E1D38B4C0C6D1F5A00C6F351 /* GrowlView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = GrowlView.m; sourceTree = "<group>"; }; 
     213                E1D38C380C6D33C500C6F351 /* SSHKeychain.sdef */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.sdef; path = SSHKeychain.sdef; sourceTree = "<group>"; }; 
    203214/* End PBXFileReference section */ 
    204215 
     
    212223                                CCC9E42B06A6763F00422E9E /* Security.framework in Frameworks */, 
    213224                                0A7F549B07676F2400E1C1E4 /* Carbon.framework in Frameworks */, 
     225                                E1CF47F20C6C7F4E00B3F162 /* Growl.framework in Frameworks */, 
    214226                        ); 
    215227                        runOnlyForDeploymentPostprocessing = 0; 
     
    241253                                CCCDD4AB06A576CF00B68ED1 /* TunnelController.m */, 
    242254                                CC6C191407421C8700CB0A18 /* UpdateController.m */, 
     255                                E1CF480F0C6D05DA00B3F162 /* GrowlNotificationController.m */, 
     256                                E1CF48100C6D05DA00B3F162 /* GrowlNotificationController.h */, 
    243257                        ); 
    244258                        name = Classes; 
     
    308322                        isa = PBXGroup; 
    309323                        children = ( 
     324                                E1D38C380C6D33C500C6F351 /* SSHKeychain.sdef */, 
     325                                E1D38B2E0C6D1D3800C6F351 /* preference_growl.tiff */, 
    310326                                CC604C2306AE6B1700B9CEBB /* preference_tunnels.tiff */, 
    311327                                CC341D0B06AD012C00E32630 /* preference_environment.tiff */, 
     
    332348                        isa = PBXGroup; 
    333349                        children = ( 
     350                                E1CF47F10C6C7F4E00B3F162 /* Growl.framework */, 
    334351                                1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, 
    335352                                1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, 
     
    341358                        isa = PBXGroup; 
    342359                        children = ( 
     360                                E1D38B4B0C6D1F5A00C6F351 /* GrowlView.h */, 
     361                                E1D38B4C0C6D1F5A00C6F351 /* GrowlView.m */, 
    343362                                CC586C4F06C3D56A00D73261 /* SecurityView.h */, 
    344363                                CC586C5006C3D56A00D73261 /* SecurityView.m */, 
     
    403422                                0A7F549007676EB500E1C1E4 /* Utilities.h in Headers */, 
    404423                                0A7F555007677DCC00E1C1E4 /* NSMenu_Additions.h in Headers */, 
     424                                E1CF48120C6D05DA00B3F162 /* GrowlNotificationController.h in Headers */, 
     425                                E1D38B4D0C6D1F5A00C6F351 /* GrowlView.h in Headers */, 
    405426                        ); 
    406427                        runOnlyForDeploymentPostprocessing = 0; 
     
    432453                                8D11072E0486CEB800E47090 /* Frameworks */, 
    433454                                0A5AAA7E075F690B007668AB /* ShellScript */, 
     455                                E1CF47F50C6C7F6700B3F162 /* CopyFiles */, 
    434456                        ); 
    435457                        buildRules = ( 
     
    484506                        isa = PBXProject; 
    485507                        buildConfigurationList = CC39D6370921118A00FE3BC5 /* Build configuration list for PBXProject "SSHKeychain" */; 
    486                         buildSettings = { 
    487                         }; 
    488                         buildStyles = ( 
    489                                 CCE37CF00C606DDA0073E776 /* Development */, 
    490                                 CCE37CF10C606DDA0073E776 /* Deployment */, 
    491                         ); 
    492508                        hasScannedForEncodings = 1; 
    493509                        knownRegions = ( 
     
    535551                                0A33105A0830A54500A9B20E /* BUGS in Resources */, 
    536552                                0A3310660830A68B00A9B20E /* version.plist in Resources */, 
     553                                E1D38B2F0C6D1D3800C6F351 /* preference_growl.tiff in Resources */, 
     554                                E1D38C390C6D33C500C6F351 /* SSHKeychain.sdef in Resources */, 
    537555                        ); 
    538556                        runOnlyForDeploymentPostprocessing = 0; 
     
    581599                                0A7F549107676EB500E1C1E4 /* Utilities.m in Sources */, 
    582600                                0A7F555107677DCC00E1C1E4 /* NSMenu_Additions.m in Sources */, 
     601                                E1CF48110C6D05DA00B3F162 /* GrowlNotificationController.m in Sources */, 
     602                                E1D38B4E0C6D1F5A00C6F351 /* GrowlView.m in Sources */, 
    583603                        ); 
    584604                        runOnlyForDeploymentPostprocessing = 0; 
     
    828848                                COPY_PHASE_STRIP = NO; 
    829849                                DEBUGGING_SYMBOLS = YES; 
     850                                FRAMEWORK_SEARCH_PATHS = ( 
     851                                        "$(inherited)", 
     852                                        "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", 
     853                                ); 
     854                                FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../Growl SDK/Frameworks\""; 
    830855                                GCC_DYNAMIC_NO_PIC = NO; 
    831856                                GCC_ENABLE_FIX_AND_CONTINUE = YES; 
     
    861886                        buildSettings = { 
    862887                                COPY_PHASE_STRIP = YES; 
     888                                FRAMEWORK_SEARCH_PATHS = ( 
     889                                        "$(inherited)", 
     890                                        "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", 
     891                                ); 
     892                                FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../Growl SDK/Frameworks\""; 
    863893                                GCC_ENABLE_FIX_AND_CONTINUE = NO; 
    864894                                GCC_ENABLE_TRIGRAPHS = NO; 
     
    890920                        isa = XCBuildConfiguration; 
    891921                        buildSettings = { 
     922                                FRAMEWORK_SEARCH_PATHS = ( 
     923                                        "$(inherited)", 
     924                                        "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", 
     925                                ); 
     926                                FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../Growl SDK/Frameworks\""; 
    892927                                GCC_ENABLE_TRIGRAPHS = NO; 
    893928                                GCC_GENERATE_DEBUGGING_SYMBOLS = NO; 
  • branches/robert/TunnelController.h

    r29 r104  
    66        /* Tunnels Menu Item. */ 
    77        IBOutlet id mainMenuTunnelsItem, dockMenuTunnelsItem, statusbarMenuTunnelsItem; 
     8         
     9        /* Growl support */ 
     10        IBOutlet id growlNotificationController; 
    811         
    912        NSMutableArray *tunnels; 
  • branches/robert/TunnelController.m

    r99 r104  
    66#import "Utilities.h" 
    77#import "NSMenu_Additions.h" 
     8#import "GrowlNotificationController.h" 
    89 
    910#ifndef NSAppKitVersionNumber10_3 
     
    538539                 
    539540                [self setToolTipForActiveTunnels]; 
     541                 
     542                [growlNotificationController tunnelOpened]; 
    540543        } 
    541544        /* Either the dictionary has it, or it didn't work and we don't want it. */ 
     
    553556        [dict setObject:message forKey:(NSString *)kCFUserNotificationAlertMessageKey]; 
    554557         
    555         CFUserNotificationCreate(nil, 30, CFUserNotificationSecureTextField(0), nil, (CFDictionaryRef)dict); 
     558        /* Growl support */ 
     559        [growlNotificationController warningWithTitle:title andMessage:message]; 
     560 
     561        NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; 
     562        if ( 
     563                ([prefs boolForKey:UseGrowlString] == NO) 
     564                || ([prefs boolForKey:DisableDialogNotificationsWhenUsingGrowlString] == NO)) 
     565        { 
     566                CFUserNotificationCreate(nil, 30, CFUserNotificationSecureTextField(0), nil, (CFDictionaryRef)dict); 
     567        } 
    556568} 
    557569