├── .gitignore ├── LICENSE ├── README.md ├── Recent Menu.xcworkspace └── contents.xcworkspacedata ├── Recent Menu ├── .svn │ ├── entries │ ├── format │ ├── pristine │ │ ├── 13 │ │ │ └── 13a5e5086a1ebfdef8072dd61cf023e145ca93d6.svn-base │ │ ├── 14 │ │ │ ├── 144e456a6a673e59e4b5837fc1a7a90a87318e3e.svn-base │ │ │ └── 14a7806886e6299b4dc3bce4a15fa4e6697f6381.svn-base │ │ ├── 19 │ │ │ └── 1956d447d9b1a990cec5b1bd3800d16496c80ac8.svn-base │ │ ├── 43 │ │ │ └── 43b073ae7b1c7f330d8e456057ca99d9a4136d6e.svn-base │ │ ├── 45 │ │ │ └── 45d91c3f92d063fbfc01c07eaabb9882f8cf91fd.svn-base │ │ ├── 48 │ │ │ └── 484a876cbb6b4425d14715f0a4e88295b18e83ac.svn-base │ │ ├── 51 │ │ │ └── 51c5d2d3eb758854d650326bed6a8a9a14788263.svn-base │ │ ├── 52 │ │ │ └── 5243d28eaf205bedcdd468e61f0f005404e0c523.svn-base │ │ ├── 53 │ │ │ └── 537f0695964e3fcf728b44091f39d23ee2968ccd.svn-base │ │ ├── 56 │ │ │ └── 568daef7a3f1b74f49d8e3e0f2dcf02aa43556ba.svn-base │ │ ├── 57 │ │ │ └── 5756fbff8192a57fb5eae010d1b3eda93a8d2369.svn-base │ │ ├── 68 │ │ │ └── 68eb492cfdd4822a33781751132a12e58691d035.svn-base │ │ ├── 91 │ │ │ └── 91eecf7faa6203bdbb2b37eb5f1085b292cf896a.svn-base │ │ ├── 93 │ │ │ └── 938c9425da55f4b18820d604fa2127f60340ab68.svn-base │ │ ├── 95 │ │ │ └── 952af0b9ceb272255518be9a2b50f23a5d900117.svn-base │ │ ├── 04 │ │ │ └── 04b2e9a99d63594e97f6844a517bc49918d7703e.svn-base │ │ ├── 05 │ │ │ └── 052ab641d2684a5f251652755d87f0caab64bc69.svn-base │ │ ├── 07 │ │ │ └── 079030df07eb3afb843027f2175bfdceeba5ce07.svn-base │ │ ├── 0a │ │ │ ├── 0a2700d4b4c0a6047b8cdb033650a8b71766f80a.svn-base │ │ │ └── 0a8e7987b23dbbaa21e5c048da021792369cea64.svn-base │ │ ├── 0f │ │ │ └── 0f5633bb67031db6769b75acd080680ee1cdf724.svn-base │ │ ├── 1b │ │ │ └── 1b48f4275258b512c14fd72c6c9dabfbc6bd648d.svn-base │ │ ├── 2e │ │ │ └── 2e0da50b5d3c8f2f7872b81d30f688f5bb06c440.svn-base │ │ ├── 3d │ │ │ └── 3d2365739aab5c4565f68d34e0fcd154f0954c07.svn-base │ │ ├── 4b │ │ │ └── 4b770657d276e76b58fd4124e2297bc989bf0091.svn-base │ │ ├── 4e │ │ │ └── 4ef94bcea955cfaa174f1ac0f9bbd72b316e9b95.svn-base │ │ ├── 5f │ │ │ └── 5fe50895435f5caa14e97b498b358c958ad34bef.svn-base │ │ ├── 7a │ │ │ └── 7a8b7daf35278c7343c155c9cbba01d1446755fa.svn-base │ │ ├── 7c │ │ │ └── 7c7097c85ec0f0f8d7349cc32d8c561729fa0d7e.svn-base │ │ ├── 7d │ │ │ └── 7d2d9c88d2d20aee9f7d1ffb4c7e6c6b9bd43527.svn-base │ │ ├── 7e │ │ │ └── 7e2d1165c54ed95576af87db72111fc4d3df8caf.svn-base │ │ ├── 7f │ │ │ └── 7f5e5590a09cf1876d0ad08c3c4986a0e9a3869c.svn-base │ │ ├── 8e │ │ │ └── 8ef083d360c5ec2cc4776eacd2802ca86b581cda.svn-base │ │ ├── 8f │ │ │ └── 8faaa0faa6cd692b602eb74340c754c739d5eaa3.svn-base │ │ ├── 9a │ │ │ └── 9a002f07cdbcd2668e897d99a4a36dfc69b7f869.svn-base │ │ ├── 9b │ │ │ └── 9bde24701b04d2cad1bfbbff53e5c3d616d2fe85.svn-base │ │ ├── 9c │ │ │ ├── 9c2b98dc68f53ee08735bb7b9c294a28c3229b45.svn-base │ │ │ └── 9cdf95205b278071ada3b5cad06dbae1593f3089.svn-base │ │ ├── 9e │ │ │ └── 9ef13e14a4a3bf7f205610af0059158471448b41.svn-base │ │ ├── a6 │ │ │ └── a6d391d409b19abefb2d41339dea84709c699621.svn-base │ │ ├── a8 │ │ │ ├── a8577e448eaa315d98797ae059f068cc18e69bf1.svn-base │ │ │ └── a89d9e3ca791615ee4841d9594194f34fa3908e4.svn-base │ │ ├── aa │ │ │ └── aa99b87349d4c5718c43f92ab4255d73d72c66b6.svn-base │ │ ├── b8 │ │ │ └── b875572964c04a22fce807df0e6577f40c5f4ed2.svn-base │ │ ├── be │ │ │ └── be28a30b4b7353982cb7fc23fdbe32994d8bb3e7.svn-base │ │ ├── d2 │ │ │ ├── d2577447ff01076e7021d9505f58cc425f64bf65.svn-base │ │ │ └── d2d6a05395cd8ffdbc52ba675fa65d735e31f18b.svn-base │ │ ├── d7 │ │ │ └── d76986541f929835c6f0cbdffe0a50e0b6436f0f.svn-base │ │ ├── df │ │ │ └── dfceb6a3062d6b431fd07bc6d2ec8680823e67d8.svn-base │ │ ├── e2 │ │ │ └── e2f12d6ad6ffbb5c84d84ff3f8ed2f05445ffd24.svn-base │ │ ├── e4 │ │ │ └── e428311f70b0d97f8b95e9b3b086544ab08d99e7.svn-base │ │ ├── e6 │ │ │ └── e6af51a2ec13013d49b9aa6ae7a7fe99f7bd5ec4.svn-base │ │ ├── e7 │ │ │ └── e73ed90f8101db27f5bbf5c347f4849d0969d106.svn-base │ │ ├── ea │ │ │ └── ea0998ac3aa6f07025c4811b0d2976967cae1872.svn-base │ │ ├── ef │ │ │ └── ef741cde67d9b9bff5708a828cf12d00213a006e.svn-base │ │ ├── f0 │ │ │ └── f0740ed5e56a96777b7b486451d0d6b071c66621.svn-base │ │ ├── f1 │ │ │ └── f1be1e999d78787626a82e21a64bd63a47547f5e.svn-base │ │ ├── f4 │ │ │ └── f4fabab2694c0ee6bb23ef4b0af8c6f34942af57.svn-base │ │ ├── f6 │ │ │ └── f6a855c941490d052e0f24352108e37363b47d1c.svn-base │ │ ├── f9 │ │ │ ├── f96b5d339677cbc38708596499345a269b06bcd8.svn-base │ │ │ └── f9e47b6ea68b19066fe2a5a35da9dc4dd3052f66.svn-base │ │ ├── fa │ │ │ └── fade255f088221f4ba9bde1df0220a28b2b77f53.svn-base │ │ └── fd │ │ │ └── fdcd03e5ffc5a4f0d26529be2935ab9df0ea6043.svn-base │ ├── tmp │ │ ├── svn-8VOZ0c │ │ ├── svn-C8UlWG │ │ ├── svn-jjv7Hu │ │ └── tempfile.tmp │ └── wc.db ├── DDHotKeyCenter.h ├── DDHotKeyCenter.m ├── General.png ├── InfoPlist.strings ├── MainMenu.xib ├── NSDictionary+RMAdditions.h ├── NSDictionary+RMAdditions.m ├── NSString+RMAdditions.h ├── NSString+RMAdditions.m ├── Preferences.xib ├── Queries.png ├── RMAppDelegate+Menu.h ├── RMAppDelegate+Menu.m ├── RMAppDelegate+MetadataQuery.h ├── RMAppDelegate+MetadataQuery.m ├── RMAppDelegate+UserDefaults.h ├── RMAppDelegate+UserDefaults.m ├── RMAppDelegate.h ├── RMAppDelegate.m ├── RMConstants.h ├── RMFilterFormatter.h ├── RMFilterFormatter.m ├── RMHotkeyController.h ├── RMHotkeyController.m ├── RMLaunchAtLoginController.h ├── RMLaunchAtLoginController.m ├── RMLocalizePreferencesController.h ├── RMLocalizePreferencesController.m ├── RMPrefsWindowController.h ├── RMPrefsWindowController.m ├── RMSecurityScopedBookmarkController.h ├── RMSecurityScopedBookmarkController.m ├── Recent Menu.entitlements ├── Recent Menu.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── RecentMenu.help │ └── Contents │ │ ├── Info.plist │ │ ├── RM Help.helpindex │ │ └── Resources │ │ ├── Shared │ │ ├── icon13.png │ │ ├── icon16.png │ │ ├── icon32.png │ │ ├── minus.png │ │ ├── plus.png │ │ ├── settings.png │ │ └── styles.css │ │ ├── de.lproj │ │ ├── Changelog.html │ │ ├── InfoPlist.strings │ │ ├── Intro.html │ │ ├── RecentMenuHelp.html │ │ ├── Settings.html │ │ ├── Support.html │ │ ├── Tasten1.png │ │ ├── Tasten2.png │ │ ├── de.lproj.helpindex │ │ ├── img01.png │ │ ├── prefs_filter_ger.png │ │ ├── prefs_general_ger.png │ │ └── prefs_search_ger.png │ │ └── en.lproj │ │ ├── Changelog.html │ │ ├── InfoPlist.strings │ │ ├── Intro.html │ │ ├── RecentMenuHelp.html │ │ ├── Settings.html │ │ ├── Support.html │ │ ├── en.lproj.helpindex │ │ ├── img01.png │ │ ├── key1.png │ │ ├── key2.png │ │ ├── prefs_filter_eng.png │ │ ├── prefs_general_eng.png │ │ └── prefs_search_eng.png ├── Recent_Menu-Info.plist ├── Recent_Menu_Prefix.pch ├── SRCommon.h ├── SRCommon.m ├── SRKeyCodeTransformer.h ├── SRKeyCodeTransformer.m ├── SRRecorderCell.h ├── SRRecorderCell.m ├── SRRecorderControl.h ├── SRRecorderControl.m ├── SRValidator.h ├── SRValidator.m ├── Search.png ├── action.png ├── de.lproj │ ├── Credits.rtf │ ├── Localizable.strings │ └── ShortcutRecorder.strings ├── defaultfilters.plist ├── en.lproj │ ├── Credits.rtf │ ├── Localizable.strings │ └── ShortcutRecorder.strings ├── main.m ├── menuitem.png ├── menuitem@2x.png └── rmicon.icns ├── RecentMenu-Helper ├── RecentMenu-Helper.xcodeproj │ └── project.pbxproj └── RecentMenu-Helper │ ├── RecentMenu-Helper-Info.plist │ ├── RecentMenu-Helper-Prefix.pch │ ├── RecentMenu-Helper.entitlements │ ├── TSAppDelegate.h │ ├── TSAppDelegate.m │ ├── en.lproj │ ├── Credits.rtf │ ├── InfoPlist.strings │ └── MainMenu.xib │ └── main.m └── recentmenu-screenshot.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | */build/* 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | *.xccheckout 19 | 20 | #CocoaPods 21 | Pods 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Tim Schröder 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Recent Menu 2 | 3 | Recent Menu is a shiny little menu item, sitting around in you menu bar and showing files and folders recently accessed on your computer. Define which types of recently accessed items to show by creating custom filters for file types or filenames. Click on a menu entry to open an item, press the command key and click to show it in Finder. 4 | 5 | Updates in Recent Menu 1.2.4: 6 | 7 | * Fixed some compiler warnings 8 | * Introduced Retina menu bar icon 9 | * Fixed dark mode menu bar bug on OS X 10.10 10 | 11 | ## Features 12 | 13 | ### File Access Monitoring 14 | 15 | The Recent Menu menu bar menu shows your recently accessed files and folders, grouped by filter categories and sorted by access time with the most recently accessed items at the top. Decide where to search and for many past hours Recent Menu should monitor recently accessed files. 16 | 17 | ### Action! 18 | 19 | Click on any item in the menu to open it with its default application. Press the command key and click on any item in the menu to show it in Finder. 20 | 21 | ### Filtering 22 | 23 | Group recently accessed files and folders by using one of the built-in filters (for documents, source code, PDF files, movie files, images, folders and applications), or create your own filters by filtering for filenames (e.g. *.pdf) or file types (UTI types) and use multiple filter criteria. 24 | 25 | ### For Your Convenience 26 | 27 | Use the built-in system-wide hotkey to activate Recent Menu, no matter where you are. 28 | 29 | ## Screenshot 30 | 31 | ![Recent Menu Screenshot](recentmenu-screenshot.png) -------------------------------------------------------------------------------- /Recent Menu.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Recent Menu/.svn/entries: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /Recent Menu/.svn/format: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/04/04b2e9a99d63594e97f6844a517bc49918d7703e.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/pristine/04/04b2e9a99d63594e97f6844a517bc49918d7703e.svn-base -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/05/052ab641d2684a5f251652755d87f0caab64bc69.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // TrialConstants.h 3 | // 4 | // Created by Tim Schröder on 10.04.11. 5 | // 6 | 7 | 8 | // Constant Values for Trial Category on AppDelegate 9 | 10 | #define TRIAL_FACTOR 1000 11 | 12 | #define APPSTORE_IDENTIFIER @"com.timschroeder.recentmenu" 13 | #define APPSTORE_NAME @"Recent Menu" 14 | #define APPSTORE_EXIST_MESSAGE NSLocalizedString (@"APPSTORE_EXIST_MESSAGE" ,) 15 | #define APPSTORE_DIALOG_CAPTION NSLocalizedString (@"APPSTORE_DIAGLOG_CAPTION", ) 16 | #define APPSTORE_QUIT_BUTTON NSLocalizedString (@"APPSTORE_QUIT_BUTTON", ) 17 | #define APPSTORE_IGNORE_BUTTON NSLocalizedString (@"APPSTORE_IGNORE_BUTTON", ) 18 | #define DEFAULTS_TRIALINTERVAL @"Runtime Version" // fake key to store trial period 19 | #define DEFAULTS_VERSION @"Bundle Version" 20 | #define TRIAL_MESSAGE NSLocalizedString (@"TRIAL_MESSAGE", ) 21 | #define TRIAL_DIALOG_CAPTION NSLocalizedString (@"TRIAL_DIALOG_CAPTION", ) 22 | #define TRIAL_LAUNCH_BUTTON NSLocalizedString (@"TRIAL_LAUNCH_BUTTON", ) 23 | #define TRIAL_OK_BUTTON @"OK" 24 | #define APPSTORE_URL NSLocalizedString (@"APPSTORE_URL", ) 25 | #define TRIAL_EXPIRED_MESSAGE NSLocalizedString (@"TRIAL_EXPIRED_MESSAGE", ) 26 | #define TRIAL_CLOSE_BUTTON NSLocalizedString (@"TRIAL_CLOSE_BUTTON", ) 27 | #define TRIAL_EXPIRED_CAPTION NSLocalizedString (@"TRIAL_EXPIRED_CAPTION", ) 28 | #define TRIAL_PERIOD 28 // trial period in days 29 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/0a/0a2700d4b4c0a6047b8cdb033650a8b71766f80a.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/pristine/0a/0a2700d4b4c0a6047b8cdb033650a8b71766f80a.svn-base -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/0a/0a8e7987b23dbbaa21e5c048da021792369cea64.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMFilterFormatter.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 28.04.11. 6 | // Copyright 2011 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import "RMFilterFormatter.h" 10 | 11 | 12 | @implementation RMFilterFormatter 13 | 14 | - (BOOL)getObjectValue:(id *)obj forString:(NSString *)string 15 | errorDescription:(NSString **)error 16 | { 17 | *obj = [NSString stringWithString:string]; 18 | return YES; 19 | } 20 | 21 | - (NSString *)stringForObjectValue:(id)anObject 22 | { 23 | if([anObject isKindOfClass:[NSString class]]) 24 | { 25 | return [NSString stringWithString:anObject]; 26 | } 27 | else 28 | { 29 | return (@""); 30 | } 31 | } 32 | 33 | - (BOOL)isPartialStringValid:(NSString *)partialString 34 | newEditingString:(NSString **)newString errorDescription:(NSString 35 | **)error 36 | { 37 | NSRange range = [partialString rangeOfString:@"'"]; 38 | if (range.location == NSNotFound) return YES; 39 | NSBeep(); 40 | return NO; 41 | 42 | } 43 | 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/0f/0f5633bb67031db6769b75acd080680ee1cdf724.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMAppDelegate.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 09.02.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import "RMAppDelegate.h" 10 | #import "RMPrefsWindowController.h" 11 | #import "RMConstants.h" 12 | #import "RMAppDelegate+Menu.h" 13 | #import "RMAppDelegate+MetadataQuery.h" 14 | #import "RMAppDelegate+UserDefaults.h" 15 | #import "RMLaunchAtLoginController.h" 16 | #import "RMSecurityScopedBookmarkController.h" 17 | #import "RMHotkeyController.h" 18 | 19 | @implementation RMAppDelegate 20 | 21 | 22 | @synthesize statusView = _statusView, sandboxAccess; 23 | 24 | #pragma mark - 25 | #pragma mark Overriden Methods 26 | 27 | - (id)init 28 | { 29 | self = [super init]; 30 | if (self) { 31 | queryArray = [[NSMutableArray arrayWithCapacity:0] retain]; 32 | allQueriesFinished = NO; 33 | } 34 | return self; 35 | } 36 | 37 | 38 | -(void)awakeFromNib 39 | { 40 | // Menu initialisieren 41 | [self activateStatusMenu]; 42 | 43 | // Hotkey initialisieren 44 | [[RMHotkeyController sharedController] setDelegate:self]; 45 | [[RMHotkeyController sharedController] loadHotkeyPreferences]; 46 | 47 | [spinningWheel setUsesThreadedAnimation:YES]; 48 | 49 | // Testen, ob App zum ersten Mal in Sandbox läuft, wenn ja: LaunchAtLogin anpassen 50 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 51 | if (![defaults objectForKey:DEFAULTS_SANDBOX]) { 52 | [defaults setObject:[NSNumber numberWithBool:YES] forKey:DEFAULTS_SANDBOX]; 53 | [defaults synchronize]; 54 | if ([[RMLaunchAtLoginController sharedController] launchAtLogin]) [[RMLaunchAtLoginController sharedController] turnOnLaunchAtLogin]; 55 | } 56 | 57 | // Für Security-Scoped Bookmarks Notifications registrieren 58 | __block id self_ = self; 59 | [[[NSNotificationCenter defaultCenter] 60 | addObserverForName: NOTIFICATION_ACCESS_GRANTED 61 | object: nil 62 | queue: [NSOperationQueue mainQueue] 63 | usingBlock: ^(NSNotification * notification) { 64 | [[RMPrefsWindowController sharedPrefsWindowController] setAccessButtonTitleToRevoke]; 65 | [self_ startAllQueries]; 66 | self.sandboxAccess = YES; 67 | }] retain]; 68 | 69 | [[[NSNotificationCenter defaultCenter] 70 | addObserverForName: NOTIFICATION_ACCESS_REMOVED 71 | object: nil 72 | queue: [NSOperationQueue mainQueue] 73 | usingBlock: ^(NSNotification * notification) { 74 | [self_ showSandboxMenu]; 75 | self.sandboxAccess = NO; 76 | }] retain]; 77 | 78 | // Testen, ob Security-Scoped Bookmark vorhanden ist 79 | if (![[RMSecurityScopedBookmarkController sharedController] hasBookmark]) { 80 | [self showSandboxMenu]; 81 | self.sandboxAccess = NO; 82 | [NSApp activateIgnoringOtherApps:YES]; 83 | [[RMPrefsWindowController sharedPrefsWindowController] showGeneralPrefsPane]; 84 | [[RMPrefsWindowController sharedPrefsWindowController] setAccessButtonTitleToGrant]; 85 | 86 | // Hinweis zeigen, dass Rechte benötigt werden 87 | [[RMPrefsWindowController sharedPrefsWindowController] showNeedsAccessRightsAlert]; 88 | } else { 89 | [[RMSecurityScopedBookmarkController sharedController] startAccessingSecurityScopedBookmark]; 90 | self.sandboxAccess = YES; 91 | 92 | // Queries starten 93 | [self startAllQueries]; 94 | } 95 | } 96 | 97 | -(void)applicationWillTerminate:(NSNotification *)notification 98 | { 99 | [[RMSecurityScopedBookmarkController sharedController] stopAccessingSecurityScopedBookmark]; 100 | } 101 | 102 | -(void)dealloc 103 | { 104 | [statusItem release]; 105 | [recentItemsMenu release]; 106 | [mainMenu release]; 107 | [queryArray release]; 108 | [super dealloc]; 109 | } 110 | 111 | #pragma mark - 112 | #pragma mark User Actions 113 | 114 | -(IBAction) showPreferences:(id)sender 115 | { 116 | [NSApp activateIgnoringOtherApps:YES]; 117 | [[RMPrefsWindowController sharedPrefsWindowController] showWindow:self]; 118 | } 119 | 120 | -(IBAction) showHelp:(id)sender 121 | { 122 | [NSApp activateIgnoringOtherApps:YES]; 123 | } 124 | 125 | -(IBAction) showAbout:(id)sender 126 | { 127 | [NSApp activateIgnoringOtherApps:YES]; 128 | [NSApp orderFrontStandardAboutPanel:self]; 129 | } 130 | 131 | -(void) hotkeyPressed:(NSEvent*)hotKeyEvent 132 | { 133 | [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; 134 | [statusItem popUpStatusItemMenu:mainMenu]; 135 | } 136 | 137 | 138 | @end 139 | 140 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/13/13a5e5086a1ebfdef8072dd61cf023e145ca93d6.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMHotkeyController.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 20.07.12. 6 | // Copyright (c) 2012 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RMHotkeyController : NSObject 12 | 13 | + (RMHotkeyController *)sharedController; 14 | 15 | -(NSDictionary*)loadHotkeyPreferences; 16 | -(void)saveHotkeyPreferencesWithKeyCode:(NSInteger)keyCode andFlags:(NSUInteger)flags; 17 | -(void)updateHotkeyWithKeyCode:(NSInteger)keyCode andFlags:(NSUInteger)flags; 18 | 19 | @property (assign) id delegate; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/14/144e456a6a673e59e4b5837fc1a7a90a87318e3e.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+RMAdditions.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 25.01.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface NSDictionary (RMAdditions) 13 | 14 | +(NSDictionary*) createFilter:(NSString *)title 15 | withType:(NSString *)type 16 | withValue:(NSString*)value 17 | isEditable:(BOOL)editable 18 | isEnabled:(BOOL)enabled 19 | withTag:(NSNumber *)tag; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/14/14a7806886e6299b4dc3bce4a15fa4e6697f6381.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 09.02.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char **) argv); 14 | } 15 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/19/1956d447d9b1a990cec5b1bd3800d16496c80ac8.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMHotkeyController.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 20.07.12. 6 | // Copyright (c) 2012 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import "RMHotkeyController.h" 10 | #import "RMConstants.h" 11 | #import "DDHotKeyCenter.h" 12 | #import 13 | 14 | @implementation RMHotkeyController 15 | 16 | @synthesize delegate = _delegate; 17 | 18 | static RMHotkeyController *_sharedController = nil; 19 | 20 | #pragma mark - 21 | #pragma mark Singleton Methods 22 | 23 | + (RMHotkeyController *)sharedController 24 | { 25 | if (!_sharedController) { 26 | _sharedController = [[super allocWithZone:NULL] init]; 27 | } 28 | return _sharedController; 29 | } 30 | 31 | + (id)allocWithZone:(NSZone *)zone 32 | { 33 | return [self sharedController]; 34 | } 35 | 36 | - (id)copyWithZone:(NSZone *)zone 37 | { 38 | return self; 39 | } 40 | 41 | 42 | #pragma mark - 43 | #pragma mark Hotkey methods 44 | 45 | -(NSDictionary*)loadHotkeyPreferences 46 | { 47 | NSInteger keyCode=-1; 48 | NSUInteger flags; 49 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 50 | NSNumber *numKeyCode = [defaults objectForKey:DEFAULTS_KEYCODE]; 51 | NSNumber *numFlags = [defaults objectForKey:DEFAULTS_KEYFLAGS]; 52 | 53 | if (numKeyCode != nil) { 54 | keyCode = [numKeyCode integerValue]; 55 | flags = [[defaults objectForKey:DEFAULTS_KEYFLAGS] unsignedIntegerValue]; 56 | [self updateHotkeyWithKeyCode:keyCode andFlags:flags]; 57 | NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:numKeyCode, @"keyCode", numFlags, @"modifierFlags" , nil]; 58 | return dict; 59 | } 60 | return nil; 61 | } 62 | 63 | -(void)saveHotkeyPreferencesWithKeyCode:(NSInteger)keyCode andFlags:(NSUInteger)flags 64 | { 65 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 66 | NSNumber *numKeyCode = [NSNumber numberWithInt:keyCode]; 67 | NSNumber *numFlags = [NSNumber numberWithUnsignedInt:flags]; 68 | [defaults setObject:numKeyCode forKey:DEFAULTS_KEYCODE]; 69 | [defaults setObject:numFlags forKey:DEFAULTS_KEYFLAGS]; 70 | [defaults synchronize]; 71 | } 72 | 73 | // Hotkey ein- oder ausschalten 74 | -(void)updateHotkeyWithKeyCode:(NSInteger)keyCode andFlags:(NSUInteger)flags 75 | { 76 | 77 | DDHotKeyCenter *hotKeyCenter = [[DDHotKeyCenter alloc] init]; 78 | [hotKeyCenter unregisterHotKeysWithTarget:self.delegate]; 79 | if (keyCode!=-1) { 80 | [hotKeyCenter registerHotKeyWithKeyCode:keyCode 81 | modifierFlags:flags 82 | target:self.delegate 83 | action:@selector(hotkeyPressed:) 84 | object:nil]; 85 | 86 | } else { 87 | [hotKeyCenter unregisterHotKeysWithTarget:self]; 88 | } 89 | [hotKeyCenter release]; 90 | 91 | } 92 | 93 | 94 | @end 95 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/1b/1b48f4275258b512c14fd72c6c9dabfbc6bd648d.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.files.bookmarks.app-scope 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/3d/3d2365739aab5c4565f68d34e0fcd154f0954c07.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMLocalizePreferencesController.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 22.01.11. 6 | // Copyright 2011 Tentacle Forge. All rights reserved. 7 | // 8 | 9 | #import "RMConstants.h" 10 | #import "RMLocalizePreferencesController.h" 11 | #import "NSString+RMAdditions.h" 12 | 13 | 14 | @implementation RMLocalizePreferencesController 15 | 16 | -(void)awakeFromNib 17 | { 18 | [startup setStringValue:PREFWINDOW_STARTUP]; 19 | 20 | [searchTime setStringValue:PREFWINDOW_SEARCHTIME]; 21 | 22 | NSString *prefix = PREFWINDOW_SEARCHTIMEPREFIX; 23 | [searchTimePrefix setStringValue:prefix]; 24 | float prefixWidth = [prefix calculateStringWidth:(NSControl*)searchTimePrefix]; 25 | NSRect inputRect = [searchTimeInput frame]; 26 | NSRect prefixRect = [searchTimePrefix frame]; 27 | prefixRect.size.width = prefixWidth + 5; 28 | [searchTimePrefix setFrame:prefixRect]; 29 | inputRect.origin.x = prefixRect.origin.x + prefixWidth + 10; 30 | [searchTimeInput setFrame:inputRect]; 31 | NSRect suffixRect = [searchTimeSuffix frame]; 32 | suffixRect.origin.x = inputRect.origin.x + inputRect.size.width + 5; 33 | [searchTimeSuffix setFrame:suffixRect]; 34 | // Position von searchTimeInput festlegen, je nach Stringlänge 35 | // Position von searchTimeSuffix festlegen, je nach Stringlänge 36 | [searchTimeSuffix setStringValue:PREFWINDOW_SEARCHTIMESUFFIX]; 37 | 38 | [searchLocation setStringValue:PREFWINDOW_SEARCHLOCATION]; 39 | [searchLocationSmall setTitle:PREFWINDOW_SEARCHLOCATIONSMALL]; 40 | [searchLocationBig setTitle:PREFWINDOW_SEARCHLOCATIONBIG]; 41 | 42 | [queryTitle setStringValue:PREFWINDOW_QUERYTITLE]; 43 | [queryEnabledCheckBox setTitle:PREFWINDOW_QUERYENABLEDCHECKBOX]; 44 | [queryEnabledTitle setStringValue:PREFWINDOW_QUERYENABLEDTITLE]; 45 | [queryCountTitle setStringValue:PREFWINDOW_QUERYCOUNTTITLE]; 46 | 47 | [queryIsCaption setStringValue:PREFWINDOW_QUERYISCAPTION]; 48 | [queryCriterionTitle setStringValue:PREFWINDOW_QUERYCRITERIONTITLE]; 49 | [wildCard setStringValue:PREFWINDOW_WILDCARD]; 50 | 51 | [resetCaption setTitle:PREFWINDOW_RESETCAPTION]; 52 | 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/45/45d91c3f92d063fbfc01c07eaabb9882f8cf91fd.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/pristine/45/45d91c3f92d063fbfc01c07eaabb9882f8cf91fd.svn-base -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/4b/4b770657d276e76b58fd4124e2297bc989bf0091.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMSecurityScopedBookmarkController.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 19.07.12. 6 | // Copyright (c) 2012 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import "RMSecurityScopedBookmarkController.h" 10 | #import "RMConstants.h" 11 | 12 | #define DEFAULTS_BOOKMARK @"SecurityBookmark" 13 | #define PREFWINDOW_ACCESSERRORCAPTION NSLocalizedString (@"PREFWINDOW_ACCESSERRORCAPTION", ) 14 | #define PREFWINDOW_ACCESSERRORINFO NSLocalizedString (@"PREFWINDOW_ACCESSERRORINFO", ) 15 | #define GRANT_ACCESS_BUTTON NSLocalizedString (@"PREFWINDOW_GRANTBUTTON", ) 16 | 17 | @implementation RMSecurityScopedBookmarkController 18 | 19 | @synthesize bookmarkURL = _bookmarkURL; 20 | 21 | static RMSecurityScopedBookmarkController *_sharedController = nil; 22 | 23 | 24 | #pragma mark - 25 | #pragma mark Singleton Methods 26 | 27 | + (RMSecurityScopedBookmarkController *)sharedController 28 | { 29 | if (!_sharedController) { 30 | _sharedController = [[super allocWithZone:NULL] init]; 31 | } 32 | return _sharedController; 33 | } 34 | 35 | + (id)allocWithZone:(NSZone *)zone 36 | { 37 | return [self sharedController]; 38 | } 39 | 40 | - (id)copyWithZone:(NSZone *)zone 41 | { 42 | return self; 43 | } 44 | 45 | 46 | #pragma mark - 47 | #pragma mark Internal Methods 48 | 49 | -(void)showOutputSelectionError 50 | { 51 | NSAlert *alert = [NSAlert alertWithMessageText:PREFWINDOW_ACCESSERRORCAPTION defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithFormat:PREFWINDOW_ACCESSERRORINFO]; 52 | [alert runModal]; 53 | } 54 | 55 | #pragma mark - 56 | #pragma mark User Defaults Methods 57 | 58 | -(NSData*)loadBookmark 59 | { 60 | return ([[NSUserDefaults standardUserDefaults] dataForKey:DEFAULTS_BOOKMARK]); 61 | } 62 | 63 | -(void)saveBookmark:(NSData*)bookmarkData 64 | { 65 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 66 | [defaults setObject:bookmarkData forKey:DEFAULTS_BOOKMARK]; 67 | [defaults synchronize]; 68 | } 69 | 70 | -(void)deleteBookmark 71 | { 72 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 73 | [defaults removeObjectForKey:DEFAULTS_BOOKMARK]; 74 | [defaults synchronize]; 75 | } 76 | 77 | 78 | #pragma mark - 79 | #pragma mark Public Methods 80 | 81 | -(BOOL) hasBookmark 82 | { 83 | BOOL result = NO; 84 | NSData *bookmarkData = [self loadBookmark]; 85 | if (bookmarkData) result = YES; 86 | return result; 87 | } 88 | 89 | -(void) startAccessingSecurityScopedBookmark 90 | { 91 | // URL des Bookmark-Files erzeugen 92 | NSData *data; 93 | data = [self loadBookmark]; 94 | if (!data) { 95 | NSLog (@"error loading Bookmark"); 96 | return; 97 | } 98 | 99 | NSError *error = nil; 100 | BOOL isStale; 101 | self.bookmarkURL = [NSURL URLByResolvingBookmarkData:data 102 | options:NSURLBookmarkResolutionWithSecurityScope 103 | relativeToURL:nil 104 | bookmarkDataIsStale:&isStale 105 | error:&error]; 106 | if (error) NSLog (@"error retrieving security-scoped bookmark"); 107 | 108 | [self.bookmarkURL startAccessingSecurityScopedResource]; 109 | } 110 | 111 | -(void) stopAccessingSecurityScopedBookmark 112 | { 113 | if (!self.bookmarkURL) return; 114 | [self.bookmarkURL stopAccessingSecurityScopedResource]; 115 | } 116 | 117 | -(void)grantBookmarkAccessForWindow:(NSWindow*)win 118 | { 119 | NSString *path = @"/"; 120 | NSURL *urlPath = [NSURL URLWithString:path]; 121 | 122 | // Prepare Open Panel 123 | NSOpenPanel *openPanel = [NSOpenPanel openPanel]; 124 | [openPanel setCanChooseFiles:NO]; 125 | [openPanel setCanChooseDirectories:YES]; 126 | [openPanel setAllowsMultipleSelection:NO]; 127 | [openPanel setPrompt:GRANT_ACCESS_BUTTON]; 128 | [openPanel setDirectoryURL:urlPath]; 129 | [openPanel setCanCreateDirectories:YES]; 130 | 131 | // Show Open Panel 132 | [openPanel beginSheetModalForWindow:win completionHandler:^(NSInteger returnCode){ 133 | 134 | if( returnCode == NSFileHandlingPanelCancelButton ) { 135 | return; 136 | } 137 | 138 | NSArray *urls = [openPanel URLs]; 139 | if( urls != nil && [urls count] == 1 ) { 140 | NSURL *url = [urls objectAtIndex:0]; 141 | 142 | // Fehler ausgeben, wenn Benutzer Folder außerhalb des Home-Folders ausgewählt hat 143 | BOOL allowedInput = NO; 144 | if ([[url absoluteString] isEqualToString:@"file://localhost/"]) allowedInput = YES; 145 | if ([[url absoluteString] isEqualToString:@"file:///"]) allowedInput = YES; // Bug Fix for OS X 10.9 146 | if (!allowedInput) { 147 | [self showOutputSelectionError]; 148 | return; 149 | } 150 | 151 | // Wenn OK, Bookmark speichern 152 | NSData *bookmark = nil; 153 | NSError *error = nil; 154 | bookmark = [url bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope 155 | includingResourceValuesForKeys:nil 156 | relativeToURL:nil // Make it app-scoped 157 | error:&error]; 158 | if (error) { 159 | NSLog(@"Error creating security-scoped bookmark for URL (%@): %@", url, error); 160 | [NSApp presentError:error]; 161 | } 162 | 163 | // Security-Scoped Bookmark speichern und aktivieren 164 | [self saveBookmark:bookmark]; 165 | [self startAccessingSecurityScopedBookmark]; 166 | 167 | // Wenn OK, UI modifizieren 168 | [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFICATION_ACCESS_GRANTED object:self]; 169 | } else { 170 | [self showOutputSelectionError]; // Fehler, wenn Benutzer im Open-Dialog etwas angeklickt hat 171 | } 172 | }]; 173 | } 174 | 175 | 176 | @end 177 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/4e/4ef94bcea955cfaa174f1ac0f9bbd72b316e9b95.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RMAdditions.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 28.12.10. 6 | // Copyright 2010 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface NSString (RMAdditions) 13 | 14 | -(float)calculateStringWidth:(NSControl*)control; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/51/51c5d2d3eb758854d650326bed6a8a9a14788263.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | title 7 | All 8 | type 9 | Filename 10 | value 11 | 12 | hidden 13 | NO 14 | enabled 15 | YES 16 | editable 17 | NO 18 | showcount 19 | 10 20 | tag 21 | 0 22 | 23 | 24 | title 25 | iWork Files 26 | type 27 | UTI 28 | value 29 | com.apple.iwork.* 30 | hidden 31 | NO 32 | enabled 33 | NO 34 | editable 35 | YES 36 | showcount 37 | 10 38 | tag 39 | 1 40 | 41 | 42 | title 43 | Source Code 44 | type 45 | UTI 46 | value 47 | public.source-code 48 | hidden 49 | NO 50 | enabled 51 | NO 52 | editable 53 | YES 54 | showcount 55 | 10 56 | tag 57 | 2 58 | 59 | 60 | title 61 | Documents 62 | type 63 | UTI 64 | value 65 | public.content 66 | hidden 67 | NO 68 | enabled 69 | NO 70 | editable 71 | YES 72 | showcount 73 | 10 74 | tag 75 | 3 76 | 77 | 78 | title 79 | PDF 80 | type 81 | UTI 82 | value 83 | com.adobe.pdf 84 | hidden 85 | NO 86 | enabled 87 | NO 88 | editable 89 | YES 90 | showcount 91 | 10 92 | tag 93 | 4 94 | 95 | 96 | title 97 | Movies 98 | type 99 | UTI 100 | value 101 | public.movie 102 | hidden 103 | NO 104 | enabled 105 | NO 106 | editable 107 | YES 108 | showcount 109 | 10 110 | tag 111 | 5 112 | 113 | 114 | title 115 | Images 116 | type 117 | UTI 118 | value 119 | public.image 120 | hidden 121 | NO 122 | enabled 123 | NO 124 | editable 125 | YES 126 | showcount 127 | 10 128 | tag 129 | 6 130 | 131 | 132 | title 133 | Folders 134 | type 135 | UTI 136 | value 137 | public.folder 138 | hidden 139 | NO 140 | enabled 141 | YES 142 | editable 143 | YES 144 | showcount 145 | 10 146 | tag 147 | 7 148 | 149 | 150 | title 151 | Apps 152 | type 153 | UTI 154 | value 155 | com.apple.application-bundle 156 | hidden 157 | NO 158 | enabled 159 | YES 160 | editable 161 | YES 162 | showcount 163 | 10 164 | tag 165 | 8 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/52/5243d28eaf205bedcdd468e61f0f005404e0c523.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+RMAdditions.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 25.01.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+RMAdditions.h" 10 | #import "RMConstants.h" 11 | 12 | @implementation NSDictionary (RMAdditions) 13 | 14 | +(NSDictionary*) createFilter:(NSString *)title 15 | withType:(NSString *)type 16 | withValue:(NSString*)value 17 | isEditable:(BOOL)editable 18 | isEnabled:(BOOL)enabled 19 | withTag:(NSNumber *)tag 20 | { 21 | NSString *editableString; 22 | if (editable) { 23 | editableString = @"YES"; 24 | } else { 25 | editableString = @"NO"; 26 | } 27 | NSString *enabledString; 28 | if (enabled) { 29 | enabledString = @"YES"; 30 | } else { 31 | enabledString = @"NO"; 32 | } 33 | NSDictionary *dict = [[[NSDictionary alloc] initWithObjectsAndKeys: 34 | title, SCOPE_DICT_TITLE, 35 | type, SCOPE_DICT_TYPE, 36 | value, SCOPE_DICT_VALUE, 37 | @"NO", SCOPE_DICT_HIDDEN, 38 | enabledString, SCOPE_DICT_ENABLED, 39 | editableString, SCOPE_DICT_EDITABLE, 40 | @"10", SCOPE_DICT_SHOWCOUNT, 41 | tag, SCOPE_DICT_TAG, 42 | nil] autorelease]; 43 | return dict; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/53/537f0695964e3fcf728b44091f39d23ee2968ccd.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate+Trial.m 3 | // 4 | // Created by Tim Schröder on 04.04.11. 5 | // 6 | 7 | #import "RMAppDelegate+Trial.h" 8 | #import "TrialConstants.h" 9 | 10 | @implementation RMAppDelegate (Trial) 11 | 12 | // Check if paid application version is present on system 13 | -(BOOL)checkIfAppStoreVersionIsInstalled 14 | { 15 | NSWorkspace *workspace = [NSWorkspace sharedWorkspace]; 16 | NSString *pathToAppStoreVersion = [workspace absolutePathForAppBundleWithIdentifier:APPSTORE_IDENTIFIER]; 17 | if (pathToAppStoreVersion) { 18 | NSInteger result = [[NSAlert alertWithMessageText:APPSTORE_DIALOG_CAPTION 19 | defaultButton:APPSTORE_QUIT_BUTTON 20 | alternateButton:APPSTORE_IGNORE_BUTTON 21 | otherButton:nil 22 | informativeTextWithFormat:APPSTORE_EXIST_MESSAGE, APPSTORE_NAME, [pathToAppStoreVersion stringByDeletingLastPathComponent]] runModal]; 23 | if (result == NSAlertDefaultReturn) { 24 | [workspace selectFile:[[NSBundle mainBundle] bundlePath] inFileViewerRootedAtPath:nil]; 25 | exit(0); 26 | } 27 | return YES; 28 | } else { 29 | return NO; 30 | } 31 | } 32 | 33 | 34 | // Registriert Trial-Daten in UserDefaults 35 | -(void)registerTrialData 36 | { 37 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 38 | NSTimeInterval registerInterval = [[NSDate date] timeIntervalSince1970]; 39 | [defaults setInteger:(int)(registerInterval/TRIAL_FACTOR) forKey:DEFAULTS_TRIALINTERVAL]; 40 | 41 | NSString *temp = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"CFBundleVersion"]; 42 | NSInteger bundleVersion = [temp integerValue]; 43 | [defaults setInteger:bundleVersion forKey:DEFAULTS_VERSION]; 44 | [defaults synchronize]; 45 | } 46 | 47 | // Check if trial period has expired or not 48 | -(BOOL)checkIfExpired 49 | { 50 | BOOL expired = NO; 51 | 52 | // Versionskontrolle (Trial fängt bei neuer Version neu an zu laufen) 53 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 54 | NSInteger defaultsVersion = [defaults integerForKey:DEFAULTS_VERSION]; 55 | NSString *temp = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"CFBundleVersion"]; 56 | NSInteger bundleVersion = [temp integerValue]; 57 | 58 | if (bundleVersion > defaultsVersion) { 59 | // Trial zurücksetzen 60 | [self registerTrialData]; 61 | } else { 62 | if ([self remainingTrialPeriod] == 0) expired = YES; 63 | } 64 | 65 | return expired; 66 | } 67 | 68 | // Calculate remaining trial period 69 | -(int)remainingTrialPeriod 70 | { 71 | int daysRemaining; 72 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 73 | NSTimeInterval defaultsInterval = (double)[defaults integerForKey:DEFAULTS_TRIALINTERVAL]*TRIAL_FACTOR; 74 | if (defaultsInterval!=0) { 75 | // trial key already present in preferences, calculate remaining trial period 76 | NSTimeInterval nowInterval = [[NSDate date] timeIntervalSince1970]; 77 | double diff = nowInterval - defaultsInterval; 78 | double rest = (60*60*24*TRIAL_PERIOD)-diff; 79 | if (diff > (60*60*24*TRIAL_PERIOD)) { 80 | daysRemaining = 0; 81 | } else { 82 | daysRemaining = (int)(rest/(60*60*24)); 83 | daysRemaining++; 84 | } 85 | } else { 86 | // trial key not present in preferences, register it with present date 87 | [self registerTrialData]; 88 | daysRemaining = 28; 89 | } 90 | return daysRemaining; 91 | } 92 | 93 | // Show message window that trial period has expired, then quit the application 94 | -(void)showExpiredMessage 95 | { 96 | NSString *caption = [NSString stringWithFormat:TRIAL_EXPIRED_CAPTION, APPSTORE_NAME]; 97 | NSString *launch = [NSString stringWithFormat:TRIAL_LAUNCH_BUTTON, APPSTORE_NAME]; 98 | NSInteger result = [[NSAlert alertWithMessageText:caption 99 | defaultButton:TRIAL_CLOSE_BUTTON 100 | alternateButton:launch 101 | otherButton:nil 102 | informativeTextWithFormat:TRIAL_EXPIRED_MESSAGE, APPSTORE_NAME] runModal]; 103 | if (result == NSAlertAlternateReturn) [self openAppStore]; 104 | 105 | exit(0); 106 | } 107 | 108 | // Show message window with info on remaining trial period 109 | -(void)showRemainingTrialMessage 110 | { 111 | NSString *caption = [NSString stringWithFormat:TRIAL_DIALOG_CAPTION, APPSTORE_NAME]; 112 | NSString *launch = [NSString stringWithFormat:TRIAL_LAUNCH_BUTTON, APPSTORE_NAME]; 113 | NSInteger result = [[NSAlert alertWithMessageText:caption 114 | defaultButton:TRIAL_OK_BUTTON 115 | alternateButton:launch 116 | otherButton:nil 117 | informativeTextWithFormat:TRIAL_MESSAGE, APPSTORE_NAME, [self remainingTrialPeriod]] runModal]; 118 | if (result == NSAlertAlternateReturn) [self openAppStore]; 119 | } 120 | 121 | // Launch Mac App Store to show application 122 | -(void)openAppStore 123 | { 124 | [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:APPSTORE_URL]]; 125 | } 126 | 127 | @end 128 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/56/568daef7a3f1b74f49d8e3e0f2dcf02aa43556ba.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMFilterFormatter.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 28.04.11. 6 | // Copyright 2011 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface RMFilterFormatter : NSFormatter { 13 | 14 | NSTextField *textField; 15 | 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/57/5756fbff8192a57fb5eae010d1b3eda93a8d2369.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMAppDelegate+Menu.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 10.02.11. 6 | // Copyright 2011 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RMAppDelegate.h" 11 | 12 | 13 | @interface RMAppDelegate (Menu) 14 | 15 | -(void)togglePopover; 16 | -(void)showEntriesMenu; 17 | -(void)showQueryMenu; 18 | -(void)showSandboxMenu; 19 | -(void)activateStatusMenu; 20 | -(void)populateRecentMenu; 21 | 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/5f/5fe50895435f5caa14e97b498b358c958ad34bef.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // MRLocalizePreferencesController.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 22.01.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface RMLocalizePreferencesController : NSObject { 13 | 14 | IBOutlet NSTextField *startup; 15 | IBOutlet NSButton *startupCheck; 16 | 17 | IBOutlet NSTextField *searchTime; 18 | IBOutlet NSTextField *searchTimePrefix; 19 | IBOutlet NSTextField *searchTimeInput; 20 | IBOutlet NSTextField *searchTimeSuffix; 21 | IBOutlet NSTextField *searchLocation; 22 | IBOutlet NSButtonCell *searchLocationSmall; 23 | IBOutlet NSButtonCell *searchLocationBig; 24 | 25 | IBOutlet NSTextField *queryTitle; 26 | IBOutlet NSTextField *queryEnabledTitle; 27 | IBOutlet NSButton *queryEnabledCheckBox; 28 | IBOutlet NSTextField *queryCountTitle; 29 | IBOutlet NSTextField *queryCriterionTitle; 30 | IBOutlet NSTextField *queryIsCaption; 31 | IBOutlet NSTextField *wildCard; 32 | 33 | IBOutlet NSMenuItem *resetCaption; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/7c/7c7097c85ec0f0f8d7349cc32d8c561729fa0d7e.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMSecurityScopedBookmarkController.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 19.07.12. 6 | // Copyright (c) 2012 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RMSecurityScopedBookmarkController : NSObject 12 | 13 | + (RMSecurityScopedBookmarkController *)sharedController; 14 | 15 | -(NSData*)loadBookmark; 16 | -(void)saveBookmark:(NSData*)bookmarkData; 17 | -(void)deleteBookmark; 18 | 19 | -(BOOL)hasBookmark; 20 | -(void)startAccessingSecurityScopedBookmark; 21 | -(void)stopAccessingSecurityScopedBookmark; 22 | -(void)grantBookmarkAccessForWindow:(NSWindow*)win; 23 | 24 | @property (strong) NSURL *bookmarkURL; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/7e/7e2d1165c54ed95576af87db72111fc4d3df8caf.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate+Trial.h 3 | // 4 | // Created by Tim Schröder on 04.04.11. 5 | // 6 | 7 | #import "RMAppDelegate.h" 8 | 9 | @interface RMAppDelegate (Trial) 10 | 11 | -(BOOL)checkIfAppStoreVersionIsInstalled; 12 | -(BOOL)checkIfExpired; 13 | -(int)remainingTrialPeriod; 14 | -(void)showExpiredMessage; 15 | -(void)showRemainingTrialMessage; 16 | -(void)openAppStore; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/7f/7f5e5590a09cf1876d0ad08c3c4986a0e9a3869c.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/pristine/7f/7f5e5590a09cf1876d0ad08c3c4986a0e9a3869c.svn-base -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/8e/8ef083d360c5ec2cc4776eacd2802ca86b581cda.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/pristine/8e/8ef083d360c5ec2cc4776eacd2802ca86b581cda.svn-base -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/8f/8faaa0faa6cd692b602eb74340c754c739d5eaa3.svn-base: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/93/938c9425da55f4b18820d604fa2127f60340ab68.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | DDHotKey -- DDHotKeyCenter.h 3 | 4 | Copyright (c) 2010, Dave DeLong 5 | 6 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 7 | 8 | The software is provided "as is", without warranty of any kind, including all implied warranties of merchantability and fitness. In no event shall the author(s) or copyright holder(s) be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software. 9 | */ 10 | 11 | #import 12 | 13 | #if NS_BLOCKS_AVAILABLE 14 | //a convenient typedef for the required signature of a hotkey block callback 15 | typedef void (^DDHotKeyTask)(NSEvent*); 16 | #endif 17 | 18 | @interface DDHotKey : NSObject 19 | 20 | @property (nonatomic, readonly, retain) id target; 21 | @property (nonatomic, readonly) SEL action; 22 | @property (nonatomic, readonly, retain) id object; 23 | #if NS_BLOCKS_AVAILABLE 24 | @property (nonatomic, readonly, copy) DDHotKeyTask task; 25 | #endif 26 | 27 | @property (nonatomic, readonly) unsigned short keyCode; 28 | @property (nonatomic, readonly) NSUInteger modifierFlags; 29 | 30 | @end 31 | 32 | #pragma mark - 33 | 34 | @interface DDHotKeyCenter : NSObject { 35 | 36 | } 37 | 38 | /** 39 | Register a target/action hotkey. 40 | The modifierFlags must be a bitwise OR of NSCommandKeyMask, NSAlternateKeyMask, NSControlKeyMask, or NSShiftKeyMask; 41 | Returns YES if the hotkey was registered; NO otherwise. 42 | */ 43 | - (BOOL) registerHotKeyWithKeyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags target:(id)target action:(SEL)action object:(id)object; 44 | 45 | #if NS_BLOCKS_AVAILABLE 46 | /** 47 | Register a block callback hotkey. 48 | The modifierFlags must be a bitwise OR of NSCommandKeyMask, NSAlternateKeyMask, NSControlKeyMask, or NSShiftKeyMask; 49 | Returns YES if the hotkey was registered; NO otherwise. 50 | */ 51 | - (BOOL) registerHotKeyWithKeyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags task:(DDHotKeyTask)task; 52 | #endif 53 | 54 | /** 55 | See if a hotkey exists with the specified keycode and modifier flags. 56 | NOTE: this will only check among hotkeys you have explicitly registered with DDHotKeyCenter. This does not check all globally registered hotkeys. 57 | */ 58 | - (BOOL) hasRegisteredHotKeyWithKeyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags; 59 | 60 | /** 61 | Unregister a specific hotkey 62 | */ 63 | - (void) unregisterHotKey:(DDHotKey *)hotKey; 64 | 65 | /** 66 | Unregister all hotkeys with a specific target 67 | */ 68 | - (void) unregisterHotKeysWithTarget:(id)target; 69 | 70 | /** 71 | Unregister all hotkeys with a specific target and action 72 | */ 73 | - (void) unregisterHotKeysWithTarget:(id)target action:(SEL)action; 74 | 75 | /** 76 | Unregister a hotkey with a specific keycode and modifier flags 77 | */ 78 | - (void) unregisterHotKeyWithKeyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags; 79 | 80 | /** 81 | Returns a set of currently registered hotkeys 82 | **/ 83 | - (NSSet *) registeredHotKeys; 84 | 85 | @end 86 | 87 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/95/952af0b9ceb272255518be9a2b50f23a5d900117.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // SRKeyCodeTransformer.h 3 | // ShortcutRecorder 4 | // 5 | // Copyright 2006-2007 Contributors. All rights reserved. 6 | // 7 | // License: BSD 8 | // 9 | // Contributors: 10 | // David Dauer 11 | // Jesper 12 | // Jamie Kirkpatrick 13 | 14 | #import 15 | 16 | @interface SRKeyCodeTransformer : NSValueTransformer {} @end 17 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/9a/9a002f07cdbcd2668e897d99a4a36dfc69b7f869.svn-base: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1265 2 | {\fonttbl\f0\fnil\fcharset0 LucidaGrande;} 3 | {\colortbl;\red255\green255\blue255;\red0\green0\blue153;} 4 | \paperw12240\paperh15840\viewkind0 5 | \deftab720 6 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\pardirnatural\qc 7 | 8 | \f0\b\fs20 \cf0 \expnd0\expndtw0\kerning0 9 | \ 10 | 11 | \b0 \expnd0\expndtw0\kerning0 12 | Version 1.2.3 (Februar 2014)\ 13 | \ 14 | von Tim Schr\'f6der\ 15 | \cf2 \expnd0\expndtw0\kerning0 16 | \ul \ulc2 \ 17 | {\field{\*\fldinst{HYPERLINK "http://www.timschroeder.net"}}{\fldrslt \expnd0\expndtw0\kerning0 18 | http://www.timschroeder.net}}\ 19 | \pard\pardeftab720 20 | \cf0 \kerning1\expnd0\expndtw0 \ulnone \ 21 | \ 22 | \pard\pardeftab720\qc 23 | \cf0 Recent Menu verwendet Code folgender Open-Source-Projekte:\ 24 | \ 25 | \ 26 | 27 | \b DBPrefsWindowController 28 | \b0 \ 29 | \pard\pardeftab720 30 | \cf0 \ 31 | \pard\pardeftab720\qc 32 | \cf0 Copyright 2007 Dave Barton. Some rights reserved. \ 33 | http://www.Mere-Mortal-Software.com/blog/\ 34 | \ 35 | \pard\tx560\pardeftab560\pardirnatural 36 | \cf0 \ 37 | \pard\tx560\pardeftab560\pardirnatural\qc 38 | 39 | \b \cf0 DDHotKey 40 | \b0 \ 41 | \ 42 | Copyright (c) 2010, Dave DeLong \ 43 | \ 44 | License Text:\ 45 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. The software is provided "as is", without warranty of any kind, including all implied warranties of merchantability and fitness. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.\ 46 | \ 47 | \ 48 | 49 | \b ShortcutRecorder 50 | \b0 \ 51 | \ 52 | Copyright (c) 2006, contributors to ShortcutRecorder.\ 53 | http://code.google.com/p/shortcutrecorder/\ 54 | \ 55 | All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\ 56 | \ 57 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\ 58 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\ 59 | * The name of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission.\ 60 | \ 61 | THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\ 62 | \ 63 | \ 64 | ***} -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/9b/9bde24701b04d2cad1bfbbff53e5c3d616d2fe85.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // SRCommon.h 3 | // ShortcutRecorder 4 | // 5 | // Copyright 2006-2007 Contributors. All rights reserved. 6 | // 7 | // License: BSD 8 | // 9 | // Contributors: 10 | // David Dauer 11 | // Jesper 12 | // Jamie Kirkpatrick 13 | 14 | #import 15 | #import 16 | #import 17 | 18 | #pragma mark Dummy class 19 | 20 | @interface SRDummyClass : NSObject {} @end 21 | 22 | #pragma mark - 23 | #pragma mark Typedefs 24 | 25 | typedef struct _KeyCombo { 26 | NSUInteger flags; // 0 for no flags 27 | NSInteger code; // -1 for no code 28 | } KeyCombo; 29 | 30 | #pragma mark - 31 | #pragma mark Enums 32 | 33 | // Unicode values of some keyboard glyphs 34 | enum { 35 | KeyboardTabRightGlyph = 0x21E5, 36 | KeyboardTabLeftGlyph = 0x21E4, 37 | KeyboardCommandGlyph = kCommandUnicode, 38 | KeyboardOptionGlyph = kOptionUnicode, 39 | KeyboardShiftGlyph = kShiftUnicode, 40 | KeyboardControlGlyph = kControlUnicode, 41 | KeyboardReturnGlyph = 0x2305, 42 | KeyboardReturnR2LGlyph = 0x21A9, 43 | KeyboardDeleteLeftGlyph = 0x232B, 44 | KeyboardDeleteRightGlyph = 0x2326, 45 | KeyboardPadClearGlyph = 0x2327, 46 | KeyboardLeftArrowGlyph = 0x2190, 47 | KeyboardRightArrowGlyph = 0x2192, 48 | KeyboardUpArrowGlyph = 0x2191, 49 | KeyboardDownArrowGlyph = 0x2193, 50 | KeyboardPageDownGlyph = 0x21DF, 51 | KeyboardPageUpGlyph = 0x21DE, 52 | KeyboardNorthwestArrowGlyph = 0x2196, 53 | KeyboardSoutheastArrowGlyph = 0x2198, 54 | KeyboardEscapeGlyph = 0x238B, 55 | KeyboardHelpGlyph = 0x003F, 56 | KeyboardUpArrowheadGlyph = 0x2303, 57 | }; 58 | 59 | // Special keys 60 | enum { 61 | kSRKeysF1 = 122, 62 | kSRKeysF2 = 120, 63 | kSRKeysF3 = 99, 64 | kSRKeysF4 = 118, 65 | kSRKeysF5 = 96, 66 | kSRKeysF6 = 97, 67 | kSRKeysF7 = 98, 68 | kSRKeysF8 = 100, 69 | kSRKeysF9 = 101, 70 | kSRKeysF10 = 109, 71 | kSRKeysF11 = 103, 72 | kSRKeysF12 = 111, 73 | kSRKeysF13 = 105, 74 | kSRKeysF14 = 107, 75 | kSRKeysF15 = 113, 76 | kSRKeysF16 = 106, 77 | kSRKeysF17 = 64, 78 | kSRKeysF18 = 79, 79 | kSRKeysF19 = 80, 80 | kSRKeysSpace = 49, 81 | kSRKeysDeleteLeft = 51, 82 | kSRKeysDeleteRight = 117, 83 | kSRKeysPadClear = 71, 84 | kSRKeysLeftArrow = 123, 85 | kSRKeysRightArrow = 124, 86 | kSRKeysUpArrow = 126, 87 | kSRKeysDownArrow = 125, 88 | kSRKeysSoutheastArrow = 119, 89 | kSRKeysNorthwestArrow = 115, 90 | kSRKeysEscape = 53, 91 | kSRKeysPageDown = 121, 92 | kSRKeysPageUp = 116, 93 | kSRKeysReturnR2L = 36, 94 | kSRKeysReturn = 76, 95 | kSRKeysTabRight = 48, 96 | kSRKeysHelp = 114 97 | }; 98 | 99 | #pragma mark - 100 | #pragma mark Macros 101 | 102 | // Localization macros, for use in any bundle 103 | #define SRLoc(key) SRLocalizedString(key, nil) 104 | #define SRLocalizedString(key, comment) NSLocalizedStringFromTableInBundle(key, @"ShortcutRecorder", [NSBundle bundleForClass: [SRDummyClass class]], comment) 105 | 106 | // Image macros, for use in any bundle 107 | //#define SRImage(name) [[[NSImage alloc] initWithContentsOfFile: [[NSBundle bundleForClass: [self class]] pathForImageResource: name]] autorelease] 108 | #define SRResIndImage(name) [SRSharedImageProvider supportingImageWithName:name] 109 | #define SRImage(name) SRResIndImage(name) 110 | 111 | //#define SRCommonWriteDebugImagery 112 | 113 | // Macros for glyps 114 | #define SRInt(x) [NSNumber numberWithInteger:x] 115 | #define SRChar(x) [NSString stringWithFormat: @"%C", (unichar)x] 116 | 117 | // Some default values 118 | #define ShortcutRecorderEmptyFlags 0 119 | #define ShortcutRecorderAllFlags ShortcutRecorderEmptyFlags | (NSCommandKeyMask | NSAlternateKeyMask | NSControlKeyMask | NSShiftKeyMask | NSFunctionKeyMask) 120 | #define ShortcutRecorderEmptyCode -1 121 | 122 | // These keys will cancel the recoding mode if not pressed with any modifier 123 | #define ShortcutRecorderEscapeKey 53 124 | #define ShortcutRecorderBackspaceKey 51 125 | #define ShortcutRecorderDeleteKey 117 126 | 127 | #pragma mark - 128 | #pragma mark Getting a string of the key combination 129 | 130 | // 131 | // ################### +- Returns string from keyCode like NSEvent's -characters 132 | // # EXPLANATORY # | +- Returns string from keyCode like NSEvent's -charactersUsingModifiers 133 | // # CHART # | | +- Returns fully readable and localized name of modifier (if modifier given) 134 | // ################### | | | +- Returns glyph of modifier (if modifier given) 135 | // SRString... X - - X 136 | // SRReadableString... X - X - 137 | // SRCharacter... - X - - 138 | // 139 | NSString * SRStringForKeyCode( NSInteger keyCode ); 140 | NSString * SRStringForCarbonModifierFlags( NSUInteger flags ); 141 | NSString * SRStringForCarbonModifierFlagsAndKeyCode( NSUInteger flags, NSInteger keyCode ); 142 | NSString * SRStringForCocoaModifierFlags( NSUInteger flags ); 143 | NSString * SRStringForCocoaModifierFlagsAndKeyCode( NSUInteger flags, NSInteger keyCode ); 144 | NSString * SRReadableStringForCarbonModifierFlagsAndKeyCode( NSUInteger flags, NSInteger keyCode ); 145 | NSString * SRReadableStringForCocoaModifierFlagsAndKeyCode( NSUInteger flags, NSInteger keyCode ); 146 | NSString *SRCharacterForKeyCodeAndCarbonFlags(NSInteger keyCode, NSUInteger carbonFlags); 147 | NSString *SRCharacterForKeyCodeAndCocoaFlags(NSInteger keyCode, NSUInteger cocoaFlags); 148 | 149 | #pragma mark Converting between Cocoa and Carbon modifier flags 150 | 151 | NSUInteger SRCarbonToCocoaFlags( NSUInteger carbonFlags ); 152 | NSUInteger SRCocoaToCarbonFlags( NSUInteger cocoaFlags ); 153 | 154 | #pragma mark - 155 | #pragma mark Animation pace function 156 | 157 | CGFloat SRAnimationEaseInOut(CGFloat t); 158 | 159 | #pragma mark - 160 | #pragma mark Inlines 161 | 162 | FOUNDATION_STATIC_INLINE KeyCombo SRMakeKeyCombo(NSInteger code, NSUInteger flags) { 163 | KeyCombo kc; 164 | kc.code = code; 165 | kc.flags = flags; 166 | return kc; 167 | } 168 | 169 | FOUNDATION_STATIC_INLINE BOOL SRIsSpecialKey(NSInteger keyCode) { 170 | return (keyCode == kSRKeysF1 || keyCode == kSRKeysF2 || keyCode == kSRKeysF3 || keyCode == kSRKeysF4 || keyCode == kSRKeysF5 || keyCode == kSRKeysF6 || keyCode == kSRKeysF7 || keyCode == kSRKeysF8 || keyCode == kSRKeysF9 || keyCode == kSRKeysF10 || keyCode == kSRKeysF11 || keyCode == kSRKeysF12 || keyCode == kSRKeysF13 || keyCode == kSRKeysF14 || keyCode == kSRKeysF15 || keyCode == kSRKeysF16 || keyCode == kSRKeysSpace || keyCode == kSRKeysDeleteLeft || keyCode == kSRKeysDeleteRight || keyCode == kSRKeysPadClear || keyCode == kSRKeysLeftArrow || keyCode == kSRKeysRightArrow || keyCode == kSRKeysUpArrow || keyCode == kSRKeysDownArrow || keyCode == kSRKeysSoutheastArrow || keyCode == kSRKeysNorthwestArrow || keyCode == kSRKeysEscape || keyCode == kSRKeysPageDown || keyCode == kSRKeysPageUp || keyCode == kSRKeysReturnR2L || keyCode == kSRKeysReturn || keyCode == kSRKeysTabRight || keyCode == kSRKeysHelp); 171 | } 172 | 173 | #pragma mark - 174 | #pragma mark Additions 175 | 176 | @interface NSAlert( SRAdditions ) 177 | + (NSAlert *) alertWithNonRecoverableError:(NSError *)error; 178 | @end 179 | 180 | #pragma mark - 181 | #pragma mark Image provider 182 | 183 | @interface SRSharedImageProvider : NSObject 184 | + (NSImage *)supportingImageWithName:(NSString *)name; 185 | @end 186 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/9c/9c2b98dc68f53ee08735bb7b9c294a28c3229b45.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMAppDelegate.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 09.02.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RMImageView, RMPopoverController; 12 | 13 | @interface RMAppDelegate : NSObject { 14 | 15 | NSStatusItem *statusItem; 16 | NSMenu *mainMenu; 17 | NSMenu *recentItemsMenu; 18 | NSMutableArray *queryArray; 19 | BOOL allQueriesFinished; 20 | IBOutlet NSView *menuView; 21 | IBOutlet NSProgressIndicator *spinningWheel; 22 | IBOutlet NSTextField *waitText; 23 | RMPopoverController *popoverController; 24 | } 25 | 26 | @property (strong) RMImageView *statusView; 27 | @property (assign) BOOL sandboxAccess; 28 | 29 | -(void) hotkeyPressed:(NSEvent*)hotKeyEvent; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/9c/9cdf95205b278071ada3b5cad06dbae1593f3089.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/pristine/9c/9cdf95205b278071ada3b5cad06dbae1593f3089.svn-base -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/a6/a6d391d409b19abefb2d41339dea84709c699621.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/pristine/a6/a6d391d409b19abefb2d41339dea84709c699621.svn-base -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/a8/a89d9e3ca791615ee4841d9594194f34fa3908e4.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleHelpBookFolder 10 | RecentMenu.help 11 | CFBundleHelpBookName 12 | com.timschroeder.recentmenu.help 13 | CFBundleIconFile 14 | rmicon.icns 15 | CFBundleIdentifier 16 | com.timschroeder.recentmenu 17 | CFBundleInfoDictionaryVersion 18 | 6.0 19 | CFBundleName 20 | ${PRODUCT_NAME} 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | 1.2.3 25 | CFBundleSignature 26 | ???? 27 | CFBundleVersion 28 | 7 29 | LSApplicationCategoryType 30 | public.app-category.utilities 31 | LSMinimumSystemVersion 32 | 10.9 33 | LSUIElement 34 | 35 | NSHumanReadableCopyright 36 | Copyright © 2011-2014 Tim Schröder 37 | NSMainNibFile 38 | MainMenu 39 | NSPrincipalClass 40 | NSApplication 41 | 42 | 43 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/aa/aa99b87349d4c5718c43f92ab4255d73d72c66b6.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMConstants.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 09.02.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | 10 | // Menü-Konstanten 11 | 12 | #define numberOfGlobalItems 4 13 | 14 | #define MENU_RECENTITEMS NSLocalizedString (@"MENU_RECENTITEMS", ) 15 | #define MENU_RECENTITEMS_EMPTY NSLocalizedString (@"MENU_RECENTITEMS_EMPTY", ) 16 | #define MENU_RECENTITEMS_TAG 999 17 | #define MENU_QUIT NSLocalizedString (@"MENU_QUIT", ) 18 | #define MENU_ABOUT NSLocalizedString (@"MENU_ABOUT", ) 19 | #define MENU_PREFERENCES NSLocalizedString (@"MENU_PREFERENCES", ) 20 | #define MENU_HELP NSLocalizedString (@"MENU_HELP", ) 21 | #define MENU_SHOWINFINDER NSLocalizedString (@"MENU_SHOWINFINDER", ) 22 | #define MENU_WAITNOTICE NSLocalizedString (@"MENU_WAITNOTICE", ) 23 | #define MENU_SANDBOXNOTICE NSLocalizedString (@"MENU_SANDBOXNOTICE", ) 24 | 25 | 26 | // Lokalisierungs-Konstanten 27 | 28 | #define PREFWINDOW_TITLE NSLocalizedString (@"PREFWINDOW_TITLE", ) 29 | #define PREFWINDOW_GENERALPANE NSLocalizedString (@"PREFWINDOW_GENERALPANE", ) 30 | #define PREFWINDOW_SEARCHPANE NSLocalizedString (@"PREFWINDOW_SEARCHPANE", ) 31 | #define PREFWINDOW_QUERIESPANE NSLocalizedString (@"PREFWINDOW_QUERIESPANE", ) 32 | 33 | #define PREFWINDOW_STARTUP NSLocalizedString (@"PREFWINDOW_STARTUP", ) 34 | #define PREFWINDOW_GRANTBUTTON NSLocalizedString (@"PREFWINDOW_GRANTBUTTON", ) 35 | #define PREFWINDOW_REVOKEBUTTON NSLocalizedString (@"PREFWINDOW_REVOKEBUTTON", ) 36 | 37 | #define PREFWINDOW_SEARCHTIME NSLocalizedString (@"PREFWINDOW_SEARCHTIME", ) 38 | #define PREFWINDOW_SEARCHTIMEPREFIX NSLocalizedString (@"PREFWINDOW_SEARCHTIMEPREFIX", ) 39 | #define PREFWINDOW_SEARCHTIMESUFFIX NSLocalizedString (@"PREFWINDOW_SEARCHTIMESUFFIX", ) 40 | 41 | #define PREFWINDOW_SEARCHSCOPE NSLocalizedString (@"PREFWINDOW_SEARCHSCOPE", ) 42 | #define PREFWINDOW_SEARCHSCOPESMALL NSLocalizedString (@"PREFWINDOW_SEARCHSCOPESMALL", ) 43 | #define PREFWINDOW_SEARCHSCOPEBIG NSLocalizedString (@"PREFWINDOW_SEARCHSCOPEBIG", ) 44 | 45 | #define PREFWINDOW_SEARCHLOCATION NSLocalizedString (@"PREFWINDOW_SEARCHLOCATION", ) 46 | #define PREFWINDOW_SEARCHLOCATIONSMALL NSLocalizedString (@"PREFWINDOW_SEARCHLOCATIONSMALL", ) 47 | #define PREFWINDOW_SEARCHLOCATIONBIG NSLocalizedString (@"PREFWINDOW_SEARCHLOCATIONBIG", ) 48 | 49 | #define PREFWINDOW_QUERYTITLE NSLocalizedString (@"PREFWINDOW_QUERYTITLE", ) 50 | #define PREFWINDOW_QUERYENABLEDCHECKBOX NSLocalizedString (@"PREFWINDOW_QUERYENABLEDCHECKBOX", ) 51 | #define PREFWINDOW_QUERYENABLEDTITLE NSLocalizedString (@"PREFWINDOW_QUERYENABLEDTITLE", ) 52 | #define PREFWINDOW_QUERYCOUNTTITLE NSLocalizedString (@"PREFWINDOW_QUERYCOUNTTITLE", ) 53 | #define PREFWINDOW_QUERYISCAPTION NSLocalizedString (@"PREFWINDOW_QUERYISCAPTION", ) 54 | #define PREFWINDOW_QUERYCRITERIONTITLE NSLocalizedString (@"PREFWINDOW_QUERYCRITERIONTITLE", ) 55 | #define PREFWINDOW_WILDCARD NSLocalizedString (@"PREFWINDOW_WILDCARD", ) 56 | 57 | #define PREFWINDOW_RESETCAPTION NSLocalizedString (@"PREFWINDOW_RESETCAPTION", ) 58 | 59 | #define PREFWINDOW_ACCESSLABEL NSLocalizedString (@"PREFWINDOW_ACCESSLABEL", ) 60 | #define PREFWINDOW_NEEDACCESSMESSAGE NSLocalizedString (@"PREFWINDOW_NEEDACCESSMESSAGE", ) 61 | #define PREFWINDOW_ACCESSERRORCAPTION NSLocalizedString (@"PREFWINDOW_ACCESSERRORCAPTION", ) 62 | #define PREFWINDOW_ACCESSERRORINFO NSLocalizedString (@"PREFWINDOW_ACCESSERRORINFO", ) 63 | 64 | 65 | // Defaults-Konstanten 66 | 67 | #define DEFAULTS_SCOPEFILTER @"ScopeFilter" 68 | #define DEFAULTS_SEARCHINTERVAL @"SearchInterval" 69 | #define DEFAULTS_SEARCHINTERVAL_PRESET @"72" 70 | 71 | #define DEFAULTS_SEARCHLOCATION @"SearchLocation" 72 | #define DEFAULTS_SEARCHLOCATION_PRESET @"0" 73 | 74 | #define DEFAULTS_STARTUP @"RunAtStartup" 75 | #define DEFAULTS_STARTUP_PRESET @"0" 76 | 77 | #define DEFAULTS_KEYCODE @"Hotkey Key Code" 78 | #define DEFAULTS_KEYFLAGS @"Hotkey Key Flags" 79 | 80 | #define DEFAULTS_SANDBOX @"Sandbox" 81 | 82 | // Filter-Dictionary-Konstanten 83 | 84 | #define SCOPE_DICT_TITLE @"title" 85 | #define SCOPE_DICT_TYPE @"type" 86 | #define SCOPE_DICT_VALUE @"value" 87 | #define SCOPE_DICT_HIDDEN @"hidden" 88 | #define SCOPE_DICT_ENABLED @"enabled" 89 | #define SCOPE_DICT_EDITABLE @"editable" 90 | #define SCOPE_DICT_SHOWCOUNT @"showcount" 91 | #define SCOPE_DICT_TAG @"tag" 92 | 93 | 94 | // Query-Dictionary-Konstanten 95 | 96 | #define QUERY_DICT_QUERY @"query" 97 | #define QUERY_DICT_COUNT @"count" 98 | #define QUERY_DICT_TAG @"tag" 99 | #define QUERY_DICT_TITLE @"title" 100 | 101 | // Konstanten für Spotlight 102 | 103 | #define SPOTLIGHT_PATH_PREFPANE @"PreferencePanes/Spotlight.prefPane" 104 | #define SPOTLIGHT_ERROR_TITLE NSLocalizedString (@"SPOTLIGHT_ERROR_TITLE", ) 105 | #define SPOTLIGHT_ERROR_NOTICE NSLocalizedString (@"SPOTLIGHT_ERROR_NOTICE", ) 106 | #define SPOTLIGHT_ERROR_BUTTON_PREFS NSLocalizedString (@"SPOTLIGHT_ERROR_BUTTON_PREFS", ) 107 | #define SPOTLIGHT_ERROR_BUTTON_IGN NSLocalizedString (@"SPOTLIGHT_ERROR_BUTTON_IGN", ) 108 | 109 | // Sandbox-Konstanten 110 | 111 | #define DEFAULTS_BOOKMARK @"SecurityBookmark" 112 | 113 | // Sonstige Konstanten 114 | 115 | #define FIRSTRESPONDERKEY @"firstResponder" 116 | 117 | #define QUERY_DEFAULTTITLE NSLocalizedString (@"QUERY_DEFAULTTITLE", ) 118 | #define QUERY_DEFAULTPREDICATE @"kMDItemContentTypeTree = \"\"" 119 | #define QUERY_DEFAULTTYPE @"Filename" 120 | #define QUERY_DEFAULTVALUE @"" 121 | 122 | #define QUERY_UTI_SHORT @"UTI" 123 | #define QUERY_UTI @"kMDItemContentTypeTree LIKE '" 124 | #define QUERY_NOT_UTI @"NOT kMDItemContentTypeTree LIKE '" 125 | #define QUERY_FILENAME @"kMDItemFSName LIKE '" 126 | #define QUERY_NOT_FILENAME @"NOT kMDItemFSName LIKE '" 127 | 128 | #define SEARCH_KEY_1 @"kMDItemLastUsedDate" 129 | 130 | #define MDI_PATH @"kMDItemPath" 131 | #define MDI_DISPLAYTITLE @"kMDItemDisplayName" 132 | #define MDI_CONTENTTYPETREE @"kMDItemContentTypeTree" 133 | 134 | #define PATH_MAINAPPDIR @"/Applications" 135 | #define PATH_DEVELOPAPPDIR @"/Developer/Applications" 136 | 137 | #define NOTIFICATION_ACCESS_REMOVED @"RMAccessRemoved" 138 | #define NOTIFICATION_ACCESS_GRANTED @"RMAccessGranted" 139 | 140 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/b8/b875572964c04a22fce807df0e6577f40c5f4ed2.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMAppDelegate+UserDefaults.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 09.02.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import "RMAppDelegate+UserDefaults.h" 10 | #import "NSDictionary+RMAdditions.h" 11 | #import "RMConstants.h" 12 | 13 | 14 | @implementation RMAppDelegate (UserDefaults) 15 | 16 | 17 | #pragma mark - 18 | #pragma Internal Helper Methods 19 | 20 | +(NSArray*)standardFilters 21 | { 22 | NSString *path = [[NSBundle mainBundle] pathForResource:@"defaultfilters" ofType:@"plist"]; 23 | NSData *xmlData = [NSData dataWithContentsOfFile:path]; 24 | NSArray *standardFilters = [NSPropertyListSerialization propertyListWithData:xmlData 25 | options:NSPropertyListImmutable 26 | format:NULL 27 | error:nil]; 28 | return standardFilters; 29 | 30 | } 31 | 32 | 33 | #pragma mark - 34 | #pragma mark Overriden Methods 35 | 36 | // Registering User Defaults - Preferences 37 | 38 | + (void)initialize 39 | { 40 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 41 | 42 | // Alles registrieren 43 | NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: 44 | [self standardFilters], DEFAULTS_SCOPEFILTER, 45 | DEFAULTS_SEARCHINTERVAL_PRESET, DEFAULTS_SEARCHINTERVAL, 46 | DEFAULTS_SEARCHLOCATION_PRESET, DEFAULTS_SEARCHLOCATION, 47 | nil]; 48 | [defaults registerDefaults:appDefaults]; 49 | } 50 | 51 | 52 | #pragma mark - 53 | #pragma mark Hilfsfunktionen 54 | 55 | -(NSArray*)filterArray 56 | { 57 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 58 | return ([defaults valueForKey:DEFAULTS_SCOPEFILTER]); 59 | } 60 | 61 | -(NSString*)searchInterval 62 | { 63 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 64 | NSString *interval = [defaults objectForKey:DEFAULTS_SEARCHINTERVAL]; 65 | return interval; 66 | } 67 | 68 | -(NSString*)searchLocation 69 | { 70 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 71 | NSString *location = [defaults objectForKey:DEFAULTS_SEARCHLOCATION]; 72 | return location; 73 | } 74 | 75 | -(void)resetQueries 76 | { 77 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 78 | //[defaults setObject:[RMAppDelegate standardFilters] forKey:DEFAULTS_SCOPEFILTER]; 79 | [defaults synchronize]; 80 | } 81 | 82 | 83 | 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/be/be28a30b4b7353982cb7fc23fdbe32994d8bb3e7.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMLaunchAtLoginController.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 12.07.12. 6 | // Copyright (c) 2012 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface RMLaunchAtLoginController : NSObject 14 | 15 | + (RMLaunchAtLoginController *)sharedController; 16 | 17 | -(BOOL)launchAtLogin; 18 | -(void)turnOnLaunchAtLogin; 19 | -(void)turnOffLaunchAtLogin; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/d2/d2577447ff01076e7021d9505f58cc425f64bf65.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/pristine/d2/d2577447ff01076e7021d9505f58cc425f64bf65.svn-base -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/d2/d2d6a05395cd8ffdbc52ba675fa65d735e31f18b.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RMAdditions.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 28.12.10. 6 | // Copyright 2010 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import "RMConstants.h" 10 | #import "NSString+RMAdditions.h" 11 | 12 | 13 | @implementation NSString (RMAdditions) 14 | 15 | 16 | // Wird von Localization Controller aufgerufen, um Länge eines Strings zu berechnen 17 | -(float)calculateStringWidth:(NSControl*)control 18 | { 19 | NSMutableParagraphStyle *primaryStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease]; 20 | NSDictionary *textAttributes = [NSDictionary dictionaryWithObjectsAndKeys: 21 | [control font], NSFontAttributeName, 22 | primaryStyle, NSParagraphStyleAttributeName, 23 | nil]; 24 | NSSize stringSize = [self sizeWithAttributes:textAttributes]; 25 | return roundf (stringSize.width); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/d7/d76986541f929835c6f0cbdffe0a50e0b6436f0f.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/pristine/d7/d76986541f929835c6f0cbdffe0a50e0b6436f0f.svn-base -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/df/dfceb6a3062d6b431fd07bc6d2ec8680823e67d8.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMAppDelegate+UserDefaults.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 09.02.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RMAppDelegate.h" 11 | 12 | @interface RMAppDelegate (UserDefaults) 13 | 14 | + (void)initialize; 15 | 16 | -(NSString*)searchInterval; 17 | -(NSString*)searchLocation; 18 | -(NSArray*)filterArray; 19 | -(void)resetQueries; 20 | 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/e2/e2f12d6ad6ffbb5c84d84ff3f8ed2f05445ffd24.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // SRValidator.h 3 | // ShortcutRecorder 4 | // 5 | // Copyright 2006-2007 Contributors. All rights reserved. 6 | // 7 | // License: BSD 8 | // 9 | // Contributors: 10 | // David Dauer 11 | // Jesper 12 | // Jamie Kirkpatrick 13 | 14 | #import 15 | 16 | @interface SRValidator : NSObject { 17 | id delegate; 18 | } 19 | 20 | - (id) initWithDelegate:(id)theDelegate; 21 | 22 | - (BOOL) isKeyCode:(NSInteger)keyCode andFlagsTaken:(NSUInteger)flags error:(NSError **)error; 23 | - (BOOL) isKeyCode:(NSInteger)keyCode andFlags:(NSUInteger)flags takenInMenu:(NSMenu *)menu error:(NSError **)error; 24 | 25 | - (id) delegate; 26 | - (void) setDelegate: (id) theDelegate; 27 | 28 | @end 29 | 30 | #pragma mark - 31 | 32 | @interface NSObject( SRValidation ) 33 | - (BOOL) shortcutValidator:(SRValidator *)validator isKeyCode:(NSInteger)keyCode andFlagsTaken:(NSUInteger)flags reason:(NSString **)aReason; 34 | @end 35 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/e4/e428311f70b0d97f8b95e9b3b086544ab08d99e7.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMLaunchAtLoginController.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 12.07.12. 6 | // Copyright (c) 2012 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import "RMLaunchAtLoginController.h" 10 | #import "RMConstants.h" 11 | #import 12 | 13 | @implementation RMLaunchAtLoginController 14 | 15 | static RMLaunchAtLoginController *_sharedController = nil; 16 | 17 | #pragma mark - 18 | #pragma mark Singleton Methods 19 | 20 | + (RMLaunchAtLoginController *)sharedController 21 | { 22 | if (!_sharedController) { 23 | _sharedController = [[super allocWithZone:NULL] init]; 24 | } 25 | return _sharedController; 26 | } 27 | 28 | + (id)allocWithZone:(NSZone *)zone 29 | { 30 | return [self sharedController]; 31 | } 32 | 33 | - (id)copyWithZone:(NSZone *)zone 34 | { 35 | return self; 36 | } 37 | 38 | + (void)initialize 39 | { 40 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 41 | 42 | // Default-Werte registrieren 43 | NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: 44 | DEFAULTS_STARTUP_PRESET, DEFAULTS_STARTUP, 45 | nil]; 46 | [defaults registerDefaults:appDefaults]; 47 | } 48 | 49 | 50 | #pragma mark - 51 | #pragma mark Internal Helper Methods 52 | 53 | -(void)setLaunchAtLogin:(BOOL)flag 54 | { 55 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 56 | NSNumber *num = [NSNumber numberWithBool:flag]; 57 | [defaults setObject:num forKey:DEFAULTS_STARTUP]; 58 | [defaults synchronize]; 59 | } 60 | 61 | 62 | #pragma mark - 63 | #pragma mark Status Item Action Methods 64 | 65 | -(BOOL)launchAtLogin 66 | { 67 | BOOL result = NO; 68 | NSNumber *num = [[NSUserDefaults standardUserDefaults] objectForKey:DEFAULTS_STARTUP]; 69 | if (num) result = [num boolValue]; 70 | return (result); 71 | } 72 | 73 | 74 | -(void)turnOnLaunchAtLogin 75 | { 76 | if (!SMLoginItemSetEnabled ((CFStringRef)@"com.timschroeder.RecentMenu-Helper", YES)) { 77 | NSAlert *alert = [NSAlert alertWithMessageText:@"An error ocurred" defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithFormat:@"Couldn't add Recent Menu to launch at login item list."]; 78 | [alert runModal]; 79 | } else { 80 | [self setLaunchAtLogin:YES]; 81 | } 82 | } 83 | 84 | -(void)turnOffLaunchAtLogin 85 | { 86 | if (!SMLoginItemSetEnabled ((CFStringRef)@"com.timschroeder.RecentMenu-Helper", NO)) { 87 | NSAlert *alert = [NSAlert alertWithMessageText:@"An error ocurred" defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithFormat:@"Couldn't remove Recent Menu from launch at login item list."]; 88 | [alert runModal]; 89 | } else { 90 | [self setLaunchAtLogin:NO]; 91 | } 92 | } 93 | 94 | @end 95 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/e6/e6af51a2ec13013d49b9aa6ae7a7fe99f7bd5ec4.svn-base: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1265 2 | {\fonttbl\f0\fnil\fcharset0 LucidaGrande;} 3 | {\colortbl;\red255\green255\blue255;\red0\green0\blue153;} 4 | \paperw12240\paperh15840\viewkind0 5 | \deftab720 6 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\pardirnatural\qc 7 | 8 | \f0\b\fs20 \cf0 \expnd0\expndtw0\kerning0 9 | \ 10 | 11 | \b0 \expnd0\expndtw0\kerning0 12 | Version 1.2.3 (February 2014)\ 13 | \ 14 | by Tim Schr\'f6der\ 15 | \cf2 \expnd0\expndtw0\kerning0 16 | \ul \ulc2 \ 17 | {\field{\*\fldinst{HYPERLINK "http://www.timschroeder.net"}}{\fldrslt \expnd0\expndtw0\kerning0 18 | http://www.timschroeder.net}}\ 19 | \pard\pardeftab720 20 | \cf0 \kerning1\expnd0\expndtw0 \ulnone \ 21 | \ 22 | \pard\pardeftab720\qc 23 | \cf0 Recent Menu uses code from several open source projects which is acknowledged hereby:\ 24 | \ 25 | \ 26 | 27 | \b DBPrefsWindowController 28 | \b0 \ 29 | \pard\pardeftab720 30 | \cf0 \ 31 | \pard\pardeftab720\qc 32 | \cf0 Copyright 2007 Dave Barton. Some rights reserved. \ 33 | http://www.Mere-Mortal-Software.com/blog/\ 34 | \pard\tx560\pardeftab560\pardirnatural\qc 35 | \cf0 \ 36 | \ 37 | 38 | \b DDHotKey 39 | \b0 \ 40 | \ 41 | Copyright (c) 2010, Dave DeLong \ 42 | \ 43 | License Text:\ 44 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. The software is provided "as is", without warranty of any kind, including all implied warranties of merchantability and fitness. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.\ 45 | \ 46 | \ 47 | 48 | \b ShortcutRecorder 49 | \b0 \ 50 | \ 51 | Copyright (c) 2006, contributors to ShortcutRecorder.\ 52 | http://code.google.com/p/shortcutrecorder/\ 53 | \ 54 | All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\ 55 | \ 56 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\ 57 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\ 58 | * The name of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission.\ 59 | \ 60 | THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\ 61 | \ 62 | \ 63 | ***} -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/ea/ea0998ac3aa6f07025c4811b0d2976967cae1872.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Recent Menu' target in the 'Recent Menu' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/ef/ef741cde67d9b9bff5708a828cf12d00213a006e.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMAppDelegate+MetadataQuery.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 11.02.11. 6 | // Copyright 2011 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RMAppDelegate.h" 11 | 12 | 13 | @interface RMAppDelegate (MetadataQuery) 14 | 15 | -(void)startAllQueries; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/f0/f0740ed5e56a96777b7b486451d0d6b071c66621.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // SRRecorderCell.h 3 | // ShortcutRecorder 4 | // 5 | // Copyright 2006-2007 Contributors. All rights reserved. 6 | // 7 | // License: BSD 8 | // 9 | // Contributors: 10 | // David Dauer 11 | // Jesper 12 | // Jamie Kirkpatrick 13 | 14 | #import 15 | #import "SRCommon.h" 16 | 17 | #define SRMinWidth 50 18 | #define SRMaxHeight 22 19 | 20 | #define SRTransitionFPS 30.0f 21 | #define SRTransitionDuration 0.35f 22 | //#define SRTransitionDuration 2.35 23 | #define SRTransitionFrames (SRTransitionFPS*SRTransitionDuration) 24 | #define SRAnimationAxisIsY YES 25 | #define ShortcutRecorderNewStyleDrawing 26 | 27 | #define SRAnimationOffsetRect(X,Y) (SRAnimationAxisIsY ? NSOffsetRect(X,0.0f,-NSHeight(Y)) : NSOffsetRect(X,NSWidth(Y),0.0f)) 28 | 29 | @class SRRecorderControl, SRValidator; 30 | 31 | enum SRRecorderStyle { 32 | SRGradientBorderStyle = 0, 33 | SRGreyStyle = 1 34 | }; 35 | typedef enum SRRecorderStyle SRRecorderStyle; 36 | 37 | @interface SRRecorderCell : NSActionCell 38 | { 39 | NSGradient *recordingGradient; 40 | NSString *autosaveName; 41 | 42 | BOOL isRecording; 43 | BOOL mouseInsideTrackingArea; 44 | BOOL mouseDown; 45 | 46 | SRRecorderStyle style; 47 | 48 | BOOL isAnimating; 49 | CGFloat transitionProgress; 50 | BOOL isAnimatingNow; 51 | BOOL isAnimatingTowardsRecording; 52 | BOOL comboJustChanged; 53 | 54 | NSTrackingRectTag removeTrackingRectTag; 55 | NSTrackingRectTag snapbackTrackingRectTag; 56 | 57 | KeyCombo keyCombo; 58 | BOOL hasKeyChars; 59 | NSString *keyChars; 60 | NSString *keyCharsIgnoringModifiers; 61 | 62 | NSUInteger allowedFlags; 63 | NSUInteger requiredFlags; 64 | NSUInteger recordingFlags; 65 | 66 | BOOL allowsKeyOnly; 67 | BOOL escapeKeysRecord; 68 | 69 | NSSet *cancelCharacterSet; 70 | 71 | SRValidator *validator; 72 | 73 | IBOutlet id delegate; 74 | BOOL globalHotKeys; 75 | void *hotKeyModeToken; 76 | } 77 | 78 | - (void)resetTrackingRects; 79 | 80 | #pragma mark *** Aesthetics *** 81 | 82 | + (BOOL)styleSupportsAnimation:(SRRecorderStyle)style; 83 | 84 | - (BOOL)animates; 85 | - (void)setAnimates:(BOOL)an; 86 | - (SRRecorderStyle)style; 87 | - (void)setStyle:(SRRecorderStyle)nStyle; 88 | 89 | #pragma mark *** Delegate *** 90 | 91 | - (id)delegate; 92 | - (void)setDelegate:(id)aDelegate; 93 | 94 | #pragma mark *** Responder Control *** 95 | 96 | - (BOOL)becomeFirstResponder; 97 | - (BOOL)resignFirstResponder; 98 | 99 | #pragma mark *** Key Combination Control *** 100 | 101 | - (BOOL)performKeyEquivalent:(NSEvent *)theEvent; 102 | - (void)flagsChanged:(NSEvent *)theEvent; 103 | 104 | - (NSUInteger)allowedFlags; 105 | - (void)setAllowedFlags:(NSUInteger)flags; 106 | 107 | - (NSUInteger)requiredFlags; 108 | - (void)setRequiredFlags:(NSUInteger)flags; 109 | 110 | - (BOOL)allowsKeyOnly; 111 | - (void)setAllowsKeyOnly:(BOOL)nAllowsKeyOnly; 112 | - (void)setAllowsKeyOnly:(BOOL)nAllowsKeyOnly escapeKeysRecord:(BOOL)nEscapeKeysRecord; 113 | - (BOOL)escapeKeysRecord; 114 | - (void)setEscapeKeysRecord:(BOOL)nEscapeKeysRecord; 115 | 116 | - (BOOL)canCaptureGlobalHotKeys; 117 | - (void)setCanCaptureGlobalHotKeys:(BOOL)inState; 118 | 119 | - (KeyCombo)keyCombo; 120 | - (void)setKeyCombo:(KeyCombo)aKeyCombo; 121 | 122 | #pragma mark *** Autosave Control *** 123 | 124 | - (NSString *)autosaveName; 125 | - (void)setAutosaveName:(NSString *)aName; 126 | 127 | // Returns the displayed key combination if set 128 | - (NSString *)keyComboString; 129 | 130 | - (NSString *)keyChars; 131 | - (NSString *)keyCharsIgnoringModifiers; 132 | 133 | @end 134 | 135 | // Delegate Methods 136 | @interface NSObject (SRRecorderCellDelegate) 137 | - (BOOL)shortcutRecorderCell:(SRRecorderCell *)aRecorderCell isKeyCode:(NSInteger)keyCode andFlagsTaken:(NSUInteger)flags reason:(NSString **)aReason; 138 | - (void)shortcutRecorderCell:(SRRecorderCell *)aRecorderCell keyComboDidChange:(KeyCombo)newCombo; 139 | @end 140 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/f4/f4fabab2694c0ee6bb23ef4b0af8c6f34942af57.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/pristine/f4/f4fabab2694c0ee6bb23ef4b0af8c6f34942af57.svn-base -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/f9/f96b5d339677cbc38708596499345a269b06bcd8.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/pristine/f9/f96b5d339677cbc38708596499345a269b06bcd8.svn-base -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/fa/fade255f088221f4ba9bde1df0220a28b2b77f53.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // RMPrefsWindowController.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 09.02.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SRRecorderControl.h" 11 | #import "RMFilterFormatter.h" 12 | 13 | 14 | @interface RMPrefsWindowController : NSWindowController { 15 | NSMutableArray *toolbarIdentifiers; 16 | NSMutableDictionary *toolbarViews; 17 | NSMutableDictionary *toolbarItems; 18 | 19 | IBOutlet NSView *generalPrefsView; 20 | IBOutlet NSView *advancedPrefsView; 21 | IBOutlet NSView *queryPrefsView; 22 | IBOutlet NSArrayController *queryArrayController; 23 | IBOutlet NSTableView *queryTable; 24 | IBOutlet SRRecorderControl *recorderControl; 25 | IBOutlet NSButton *accessButton; 26 | IBOutlet NSSegmentedControl *launchAtLoginButton; 27 | IBOutlet NSTextField *accessLabel; 28 | 29 | IBOutlet NSPopover *popover; 30 | IBOutlet NSTextField *popoverMessageField; 31 | 32 | NSView *contentSubview; 33 | NSViewAnimation *viewAnimation; 34 | 35 | // IBOutlet NSTextField *filterTextField; 36 | } 37 | 38 | + (RMPrefsWindowController *)sharedPrefsWindowController; 39 | 40 | - (void)setupToolbar; 41 | - (void)addView:(NSView *)view label:(NSString *)label image:(NSImage *)image; 42 | 43 | - (IBAction) showWindow:(id)sender; 44 | - (IBAction) addQuery:(id)sender; 45 | - (IBAction) removeQuery:(id)sender; 46 | 47 | -(void)showGeneralPrefsPane; 48 | -(NSWindow*)prefsWindow; 49 | -(void)setAccessButtonTitleToRevoke; 50 | -(void)setAccessButtonTitleToGrant; 51 | -(IBAction)toggleAccess:(id)sender; 52 | -(IBAction)toggleLaunchAtLogin:(id)sender; 53 | -(void)showNeedsAccessRightsAlert; 54 | 55 | - (void)displayViewForIdentifier:(NSString *)identifier animate:(BOOL)animate; 56 | - (void)crossFadeView:(NSView *)oldView withView:(NSView *)newView; 57 | - (NSRect)frameForView:(NSView *)view; 58 | 59 | - (BOOL)shortcutRecorder:(SRRecorderControl *)aRecorder isKeyCode:(NSInteger)keyCode andFlagsTaken:(NSUInteger)flags reason:(NSString **)aReason; 60 | - (void)shortcutRecorder:(SRRecorderControl *)aRecorder keyComboDidChange:(KeyCombo)newKeyCombo; 61 | 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /Recent Menu/.svn/pristine/fd/fdcd03e5ffc5a4f0d26529be2935ab9df0ea6043.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // SRRecorderControl.h 3 | // ShortcutRecorder 4 | // 5 | // Copyright 2006-2007 Contributors. All rights reserved. 6 | // 7 | // License: BSD 8 | // 9 | // Contributors: 10 | // David Dauer 11 | // Jesper 12 | // Jamie Kirkpatrick 13 | 14 | #import 15 | #import "SRRecorderCell.h" 16 | 17 | @interface SRRecorderControl : NSControl 18 | { 19 | IBOutlet id delegate; 20 | } 21 | 22 | #pragma mark *** Aesthetics *** 23 | - (BOOL)animates; 24 | - (void)setAnimates:(BOOL)an; 25 | - (SRRecorderStyle)style; 26 | - (void)setStyle:(SRRecorderStyle)nStyle; 27 | 28 | #pragma mark *** Delegate *** 29 | - (id)delegate; 30 | - (void)setDelegate:(id)aDelegate; 31 | 32 | #pragma mark *** Key Combination Control *** 33 | 34 | - (NSUInteger)allowedFlags; 35 | - (void)setAllowedFlags:(NSUInteger)flags; 36 | 37 | - (BOOL)allowsKeyOnly; 38 | - (void)setAllowsKeyOnly:(BOOL)nAllowsKeyOnly escapeKeysRecord:(BOOL)nEscapeKeysRecord; 39 | - (BOOL)escapeKeysRecord; 40 | 41 | - (BOOL)canCaptureGlobalHotKeys; 42 | - (void)setCanCaptureGlobalHotKeys:(BOOL)inState; 43 | 44 | - (NSUInteger)requiredFlags; 45 | - (void)setRequiredFlags:(NSUInteger)flags; 46 | 47 | - (KeyCombo)keyCombo; 48 | - (void)setKeyCombo:(KeyCombo)aKeyCombo; 49 | 50 | - (NSString *)keyChars; 51 | - (NSString *)keyCharsIgnoringModifiers; 52 | 53 | #pragma mark *** Autosave Control *** 54 | 55 | - (NSString *)autosaveName; 56 | - (void)setAutosaveName:(NSString *)aName; 57 | 58 | #pragma mark - 59 | 60 | // Returns the displayed key combination if set 61 | - (NSString *)keyComboString; 62 | 63 | #pragma mark *** Conversion Methods *** 64 | 65 | - (NSUInteger)cocoaToCarbonFlags:(NSUInteger)cocoaFlags; 66 | - (NSUInteger)carbonToCocoaFlags:(NSUInteger)carbonFlags; 67 | 68 | #pragma mark *** Binding Methods *** 69 | 70 | - (NSDictionary *)objectValue; 71 | - (void)setObjectValue:(NSDictionary *)shortcut; 72 | 73 | @end 74 | 75 | // Delegate Methods 76 | @interface NSObject (SRRecorderDelegate) 77 | - (BOOL)shortcutRecorder:(SRRecorderControl *)aRecorder isKeyCode:(NSInteger)keyCode andFlagsTaken:(NSUInteger)flags reason:(NSString **)aReason; 78 | - (void)shortcutRecorder:(SRRecorderControl *)aRecorder keyComboDidChange:(KeyCombo)newKeyCombo; 79 | @end 80 | -------------------------------------------------------------------------------- /Recent Menu/.svn/tmp/svn-8VOZ0c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/tmp/svn-8VOZ0c -------------------------------------------------------------------------------- /Recent Menu/.svn/tmp/svn-C8UlWG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/tmp/svn-C8UlWG -------------------------------------------------------------------------------- /Recent Menu/.svn/tmp/svn-jjv7Hu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/tmp/svn-jjv7Hu -------------------------------------------------------------------------------- /Recent Menu/.svn/tmp/tempfile.tmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/tmp/tempfile.tmp -------------------------------------------------------------------------------- /Recent Menu/.svn/wc.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/.svn/wc.db -------------------------------------------------------------------------------- /Recent Menu/DDHotKeyCenter.h: -------------------------------------------------------------------------------- 1 | /* 2 | DDHotKey -- DDHotKeyCenter.h 3 | 4 | Copyright (c) 2010, Dave DeLong 5 | 6 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 7 | 8 | The software is provided "as is", without warranty of any kind, including all implied warranties of merchantability and fitness. In no event shall the author(s) or copyright holder(s) be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software. 9 | */ 10 | 11 | #import 12 | 13 | #if NS_BLOCKS_AVAILABLE 14 | //a convenient typedef for the required signature of a hotkey block callback 15 | typedef void (^DDHotKeyTask)(NSEvent*); 16 | #endif 17 | 18 | @interface DDHotKey : NSObject 19 | 20 | @property (nonatomic, readonly, retain) id target; 21 | @property (nonatomic, readonly) SEL action; 22 | @property (nonatomic, readonly, retain) id object; 23 | #if NS_BLOCKS_AVAILABLE 24 | @property (nonatomic, readonly, copy) DDHotKeyTask task; 25 | #endif 26 | 27 | @property (nonatomic, readonly) unsigned short keyCode; 28 | @property (nonatomic, readonly) NSUInteger modifierFlags; 29 | 30 | @end 31 | 32 | #pragma mark - 33 | 34 | @interface DDHotKeyCenter : NSObject { 35 | 36 | } 37 | 38 | /** 39 | Register a target/action hotkey. 40 | The modifierFlags must be a bitwise OR of NSCommandKeyMask, NSAlternateKeyMask, NSControlKeyMask, or NSShiftKeyMask; 41 | Returns YES if the hotkey was registered; NO otherwise. 42 | */ 43 | - (BOOL) registerHotKeyWithKeyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags target:(id)target action:(SEL)action object:(id)object; 44 | 45 | #if NS_BLOCKS_AVAILABLE 46 | /** 47 | Register a block callback hotkey. 48 | The modifierFlags must be a bitwise OR of NSCommandKeyMask, NSAlternateKeyMask, NSControlKeyMask, or NSShiftKeyMask; 49 | Returns YES if the hotkey was registered; NO otherwise. 50 | */ 51 | - (BOOL) registerHotKeyWithKeyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags task:(DDHotKeyTask)task; 52 | #endif 53 | 54 | /** 55 | See if a hotkey exists with the specified keycode and modifier flags. 56 | NOTE: this will only check among hotkeys you have explicitly registered with DDHotKeyCenter. This does not check all globally registered hotkeys. 57 | */ 58 | - (BOOL) hasRegisteredHotKeyWithKeyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags; 59 | 60 | /** 61 | Unregister a specific hotkey 62 | */ 63 | - (void) unregisterHotKey:(DDHotKey *)hotKey; 64 | 65 | /** 66 | Unregister all hotkeys with a specific target 67 | */ 68 | - (void) unregisterHotKeysWithTarget:(id)target; 69 | 70 | /** 71 | Unregister all hotkeys with a specific target and action 72 | */ 73 | - (void) unregisterHotKeysWithTarget:(id)target action:(SEL)action; 74 | 75 | /** 76 | Unregister a hotkey with a specific keycode and modifier flags 77 | */ 78 | - (void) unregisterHotKeyWithKeyCode:(unsigned short)keyCode modifierFlags:(NSUInteger)flags; 79 | 80 | /** 81 | Returns a set of currently registered hotkeys 82 | **/ 83 | - (NSSet *) registeredHotKeys; 84 | 85 | @end 86 | 87 | -------------------------------------------------------------------------------- /Recent Menu/General.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/General.png -------------------------------------------------------------------------------- /Recent Menu/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Recent Menu/NSDictionary+RMAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+RMAdditions.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 25.01.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface NSDictionary (RMAdditions) 13 | 14 | +(NSDictionary*) createFilter:(NSString *)title 15 | withType:(NSString *)type 16 | withValue:(NSString*)value 17 | isEditable:(BOOL)editable 18 | isEnabled:(BOOL)enabled 19 | withTag:(NSNumber *)tag; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Recent Menu/NSDictionary+RMAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+RMAdditions.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 25.01.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+RMAdditions.h" 10 | #import "RMConstants.h" 11 | 12 | @implementation NSDictionary (RMAdditions) 13 | 14 | +(NSDictionary*) createFilter:(NSString *)title 15 | withType:(NSString *)type 16 | withValue:(NSString*)value 17 | isEditable:(BOOL)editable 18 | isEnabled:(BOOL)enabled 19 | withTag:(NSNumber *)tag 20 | { 21 | NSString *editableString; 22 | if (editable) { 23 | editableString = @"YES"; 24 | } else { 25 | editableString = @"NO"; 26 | } 27 | NSString *enabledString; 28 | if (enabled) { 29 | enabledString = @"YES"; 30 | } else { 31 | enabledString = @"NO"; 32 | } 33 | NSDictionary *dict = [[[NSDictionary alloc] initWithObjectsAndKeys: 34 | title, SCOPE_DICT_TITLE, 35 | type, SCOPE_DICT_TYPE, 36 | value, SCOPE_DICT_VALUE, 37 | @"NO", SCOPE_DICT_HIDDEN, 38 | enabledString, SCOPE_DICT_ENABLED, 39 | editableString, SCOPE_DICT_EDITABLE, 40 | @"10", SCOPE_DICT_SHOWCOUNT, 41 | tag, SCOPE_DICT_TAG, 42 | nil] autorelease]; 43 | return dict; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Recent Menu/NSString+RMAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RMAdditions.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 28.12.10. 6 | // Copyright 2010 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface NSString (RMAdditions) 13 | 14 | -(float)calculateStringWidth:(NSControl*)control; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Recent Menu/NSString+RMAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+RMAdditions.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 28.12.10. 6 | // Copyright 2010 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import "RMConstants.h" 10 | #import "NSString+RMAdditions.h" 11 | 12 | 13 | @implementation NSString (RMAdditions) 14 | 15 | 16 | // Called by Localization Controller to calculate length of a string 17 | -(float)calculateStringWidth:(NSControl*)control 18 | { 19 | NSMutableParagraphStyle *primaryStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease]; 20 | NSDictionary *textAttributes = [NSDictionary dictionaryWithObjectsAndKeys: 21 | [control font], NSFontAttributeName, 22 | primaryStyle, NSParagraphStyleAttributeName, 23 | nil]; 24 | NSSize stringSize = [self sizeWithAttributes:textAttributes]; 25 | return roundf (stringSize.width); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Recent Menu/Queries.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/Queries.png -------------------------------------------------------------------------------- /Recent Menu/RMAppDelegate+Menu.h: -------------------------------------------------------------------------------- 1 | // 2 | // RMAppDelegate+Menu.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 10.02.11. 6 | // Copyright 2011 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RMAppDelegate.h" 11 | 12 | 13 | @interface RMAppDelegate (Menu) 14 | 15 | -(void)showEntriesMenu; 16 | -(void)showQueryMenu; 17 | -(void)showSandboxMenu; 18 | -(void)activateStatusMenu; 19 | -(void)populateRecentMenu; 20 | 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Recent Menu/RMAppDelegate+MetadataQuery.h: -------------------------------------------------------------------------------- 1 | // 2 | // RMAppDelegate+MetadataQuery.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 11.02.11. 6 | // Copyright 2011 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RMAppDelegate.h" 11 | 12 | 13 | @interface RMAppDelegate (MetadataQuery) 14 | 15 | -(void)startAllQueries; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Recent Menu/RMAppDelegate+UserDefaults.h: -------------------------------------------------------------------------------- 1 | // 2 | // RMAppDelegate+UserDefaults.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 09.02.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "RMAppDelegate.h" 11 | 12 | @interface RMAppDelegate (UserDefaults) 13 | 14 | + (void)initialize; 15 | 16 | -(NSString*)searchInterval; 17 | -(NSString*)searchLocation; 18 | -(NSArray*)filterArray; 19 | -(void)resetQueries; 20 | 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Recent Menu/RMAppDelegate+UserDefaults.m: -------------------------------------------------------------------------------- 1 | // 2 | // RMAppDelegate+UserDefaults.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 09.02.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import "RMAppDelegate+UserDefaults.h" 10 | #import "NSDictionary+RMAdditions.h" 11 | #import "RMConstants.h" 12 | 13 | 14 | @implementation RMAppDelegate (UserDefaults) 15 | 16 | 17 | #pragma mark - 18 | #pragma Internal Helper Methods 19 | 20 | +(NSArray*)standardFilters 21 | { 22 | NSString *path = [[NSBundle mainBundle] pathForResource:@"defaultfilters" ofType:@"plist"]; 23 | NSData *xmlData = [NSData dataWithContentsOfFile:path]; 24 | NSArray *standardFilters = [NSPropertyListSerialization propertyListWithData:xmlData 25 | options:NSPropertyListImmutable 26 | format:NULL 27 | error:nil]; 28 | return standardFilters; 29 | 30 | } 31 | 32 | 33 | #pragma mark - 34 | #pragma mark Overriden Methods 35 | 36 | // Registering User Defaults - Preferences 37 | 38 | + (void)initialize 39 | { 40 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 41 | 42 | NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: 43 | [self standardFilters], DEFAULTS_SCOPEFILTER, 44 | DEFAULTS_SEARCHINTERVAL_PRESET, DEFAULTS_SEARCHINTERVAL, 45 | DEFAULTS_SEARCHLOCATION_PRESET, DEFAULTS_SEARCHLOCATION, 46 | nil]; 47 | [defaults registerDefaults:appDefaults]; 48 | } 49 | 50 | 51 | #pragma mark - 52 | #pragma mark Hilfsfunktionen 53 | 54 | -(NSArray*)filterArray 55 | { 56 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 57 | return ([defaults valueForKey:DEFAULTS_SCOPEFILTER]); 58 | } 59 | 60 | -(NSString*)searchInterval 61 | { 62 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 63 | NSString *interval = [defaults objectForKey:DEFAULTS_SEARCHINTERVAL]; 64 | return interval; 65 | } 66 | 67 | -(NSString*)searchLocation 68 | { 69 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 70 | NSString *location = [defaults objectForKey:DEFAULTS_SEARCHLOCATION]; 71 | return location; 72 | } 73 | 74 | -(void)resetQueries 75 | { 76 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 77 | [defaults synchronize]; 78 | } 79 | 80 | 81 | 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /Recent Menu/RMAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // RMAppDelegate.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 09.02.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class RMImageView, RMPopoverController; 12 | 13 | @interface RMAppDelegate : NSObject { 14 | 15 | NSStatusItem *statusItem; 16 | NSMenu *mainMenu; 17 | NSMenu *recentItemsMenu; 18 | NSMutableArray *queryArray; 19 | BOOL allQueriesFinished; 20 | IBOutlet NSView *menuView; 21 | IBOutlet NSProgressIndicator *spinningWheel; 22 | IBOutlet NSTextField *waitText; 23 | RMPopoverController *popoverController; 24 | } 25 | 26 | @property (strong) RMImageView *statusView; 27 | @property (assign) BOOL sandboxAccess; 28 | 29 | -(void) hotkeyPressed:(NSEvent*)hotKeyEvent; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Recent Menu/RMAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // RMAppDelegate.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 09.02.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import "RMAppDelegate.h" 10 | #import "RMPrefsWindowController.h" 11 | #import "RMConstants.h" 12 | #import "RMAppDelegate+Menu.h" 13 | #import "RMAppDelegate+MetadataQuery.h" 14 | #import "RMAppDelegate+UserDefaults.h" 15 | #import "RMLaunchAtLoginController.h" 16 | #import "RMSecurityScopedBookmarkController.h" 17 | #import "RMHotkeyController.h" 18 | 19 | @implementation RMAppDelegate 20 | 21 | 22 | @synthesize statusView = _statusView, sandboxAccess; 23 | 24 | #pragma mark - 25 | #pragma mark Overriden Methods 26 | 27 | - (id)init 28 | { 29 | self = [super init]; 30 | if (self) { 31 | queryArray = [[NSMutableArray arrayWithCapacity:0] retain]; 32 | allQueriesFinished = NO; 33 | } 34 | return self; 35 | } 36 | 37 | 38 | -(void)awakeFromNib 39 | { 40 | // Init menu 41 | [self activateStatusMenu]; 42 | 43 | // Init hotkeys 44 | [[RMHotkeyController sharedController] setDelegate:self]; 45 | [[RMHotkeyController sharedController] loadHotkeyPreferences]; 46 | 47 | [spinningWheel setUsesThreadedAnimation:YES]; 48 | 49 | // Test if app is runnning sandboxed for the first time 50 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 51 | if (![defaults objectForKey:DEFAULTS_SANDBOX]) { 52 | [defaults setObject:[NSNumber numberWithBool:YES] forKey:DEFAULTS_SANDBOX]; 53 | [defaults synchronize]; 54 | if ([[RMLaunchAtLoginController sharedController] launchAtLogin]) [[RMLaunchAtLoginController sharedController] turnOnLaunchAtLogin]; 55 | } 56 | 57 | // Register for security-scoped bookmark notifications 58 | __block id self_ = self; 59 | [[[NSNotificationCenter defaultCenter] 60 | addObserverForName: NOTIFICATION_ACCESS_GRANTED 61 | object: nil 62 | queue: [NSOperationQueue mainQueue] 63 | usingBlock: ^(NSNotification * notification) { 64 | [[RMPrefsWindowController sharedPrefsWindowController] setAccessButtonTitleToRevoke]; 65 | [self_ startAllQueries]; 66 | self.sandboxAccess = YES; 67 | }] retain]; 68 | 69 | [[[NSNotificationCenter defaultCenter] 70 | addObserverForName: NOTIFICATION_ACCESS_REMOVED 71 | object: nil 72 | queue: [NSOperationQueue mainQueue] 73 | usingBlock: ^(NSNotification * notification) { 74 | [self_ showSandboxMenu]; 75 | self.sandboxAccess = NO; 76 | }] retain]; 77 | 78 | // Test if we have a security-scoped bookmark 79 | if (![[RMSecurityScopedBookmarkController sharedController] hasBookmark]) { 80 | [self showSandboxMenu]; 81 | self.sandboxAccess = NO; 82 | [NSApp activateIgnoringOtherApps:YES]; 83 | [[RMPrefsWindowController sharedPrefsWindowController] showGeneralPrefsPane]; 84 | [[RMPrefsWindowController sharedPrefsWindowController] setAccessButtonTitleToGrant]; 85 | 86 | // No, show info that we would need that 87 | [[RMPrefsWindowController sharedPrefsWindowController] showNeedsAccessRightsAlert]; 88 | } else { 89 | [[RMSecurityScopedBookmarkController sharedController] startAccessingSecurityScopedBookmark]; 90 | self.sandboxAccess = YES; 91 | 92 | // Start Queries 93 | [self startAllQueries]; 94 | } 95 | } 96 | 97 | -(void)applicationWillTerminate:(NSNotification *)notification 98 | { 99 | [[RMSecurityScopedBookmarkController sharedController] stopAccessingSecurityScopedBookmark]; 100 | } 101 | 102 | -(void)dealloc 103 | { 104 | [statusItem release]; 105 | [recentItemsMenu release]; 106 | [mainMenu release]; 107 | [queryArray release]; 108 | [super dealloc]; 109 | } 110 | 111 | #pragma mark - 112 | #pragma mark User Actions 113 | 114 | -(IBAction) showPreferences:(id)sender 115 | { 116 | [NSApp activateIgnoringOtherApps:YES]; 117 | [[RMPrefsWindowController sharedPrefsWindowController] showWindow:self]; 118 | } 119 | 120 | -(IBAction) showHelp:(id)sender 121 | { 122 | [NSApp activateIgnoringOtherApps:YES]; 123 | } 124 | 125 | -(IBAction) showAbout:(id)sender 126 | { 127 | [NSApp activateIgnoringOtherApps:YES]; 128 | [NSApp orderFrontStandardAboutPanel:self]; 129 | } 130 | 131 | -(void) hotkeyPressed:(NSEvent*)hotKeyEvent 132 | { 133 | [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; 134 | [statusItem popUpStatusItemMenu:mainMenu]; 135 | } 136 | 137 | 138 | @end 139 | 140 | -------------------------------------------------------------------------------- /Recent Menu/RMConstants.h: -------------------------------------------------------------------------------- 1 | // 2 | // RMConstants.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 09.02.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | 10 | // Menü-Konstanten 11 | 12 | #define numberOfGlobalItems 4 13 | 14 | #define MENU_RECENTITEMS NSLocalizedString (@"MENU_RECENTITEMS", ) 15 | #define MENU_RECENTITEMS_EMPTY NSLocalizedString (@"MENU_RECENTITEMS_EMPTY", ) 16 | #define MENU_RECENTITEMS_TAG 999 17 | #define MENU_QUIT NSLocalizedString (@"MENU_QUIT", ) 18 | #define MENU_ABOUT NSLocalizedString (@"MENU_ABOUT", ) 19 | #define MENU_PREFERENCES NSLocalizedString (@"MENU_PREFERENCES", ) 20 | #define MENU_HELP NSLocalizedString (@"MENU_HELP", ) 21 | #define MENU_SHOWINFINDER NSLocalizedString (@"MENU_SHOWINFINDER", ) 22 | #define MENU_WAITNOTICE NSLocalizedString (@"MENU_WAITNOTICE", ) 23 | #define MENU_SANDBOXNOTICE NSLocalizedString (@"MENU_SANDBOXNOTICE", ) 24 | 25 | 26 | // Lokalisierungs-Konstanten 27 | 28 | #define PREFWINDOW_TITLE NSLocalizedString (@"PREFWINDOW_TITLE", ) 29 | #define PREFWINDOW_GENERALPANE NSLocalizedString (@"PREFWINDOW_GENERALPANE", ) 30 | #define PREFWINDOW_SEARCHPANE NSLocalizedString (@"PREFWINDOW_SEARCHPANE", ) 31 | #define PREFWINDOW_QUERIESPANE NSLocalizedString (@"PREFWINDOW_QUERIESPANE", ) 32 | 33 | #define PREFWINDOW_STARTUP NSLocalizedString (@"PREFWINDOW_STARTUP", ) 34 | #define PREFWINDOW_GRANTBUTTON NSLocalizedString (@"PREFWINDOW_GRANTBUTTON", ) 35 | #define PREFWINDOW_REVOKEBUTTON NSLocalizedString (@"PREFWINDOW_REVOKEBUTTON", ) 36 | 37 | #define PREFWINDOW_SEARCHTIME NSLocalizedString (@"PREFWINDOW_SEARCHTIME", ) 38 | #define PREFWINDOW_SEARCHTIMEPREFIX NSLocalizedString (@"PREFWINDOW_SEARCHTIMEPREFIX", ) 39 | #define PREFWINDOW_SEARCHTIMESUFFIX NSLocalizedString (@"PREFWINDOW_SEARCHTIMESUFFIX", ) 40 | 41 | #define PREFWINDOW_SEARCHSCOPE NSLocalizedString (@"PREFWINDOW_SEARCHSCOPE", ) 42 | #define PREFWINDOW_SEARCHSCOPESMALL NSLocalizedString (@"PREFWINDOW_SEARCHSCOPESMALL", ) 43 | #define PREFWINDOW_SEARCHSCOPEBIG NSLocalizedString (@"PREFWINDOW_SEARCHSCOPEBIG", ) 44 | 45 | #define PREFWINDOW_SEARCHLOCATION NSLocalizedString (@"PREFWINDOW_SEARCHLOCATION", ) 46 | #define PREFWINDOW_SEARCHLOCATIONSMALL NSLocalizedString (@"PREFWINDOW_SEARCHLOCATIONSMALL", ) 47 | #define PREFWINDOW_SEARCHLOCATIONBIG NSLocalizedString (@"PREFWINDOW_SEARCHLOCATIONBIG", ) 48 | 49 | #define PREFWINDOW_QUERYTITLE NSLocalizedString (@"PREFWINDOW_QUERYTITLE", ) 50 | #define PREFWINDOW_QUERYENABLEDCHECKBOX NSLocalizedString (@"PREFWINDOW_QUERYENABLEDCHECKBOX", ) 51 | #define PREFWINDOW_QUERYENABLEDTITLE NSLocalizedString (@"PREFWINDOW_QUERYENABLEDTITLE", ) 52 | #define PREFWINDOW_QUERYCOUNTTITLE NSLocalizedString (@"PREFWINDOW_QUERYCOUNTTITLE", ) 53 | #define PREFWINDOW_QUERYISCAPTION NSLocalizedString (@"PREFWINDOW_QUERYISCAPTION", ) 54 | #define PREFWINDOW_QUERYCRITERIONTITLE NSLocalizedString (@"PREFWINDOW_QUERYCRITERIONTITLE", ) 55 | #define PREFWINDOW_WILDCARD NSLocalizedString (@"PREFWINDOW_WILDCARD", ) 56 | 57 | #define PREFWINDOW_RESETCAPTION NSLocalizedString (@"PREFWINDOW_RESETCAPTION", ) 58 | 59 | #define PREFWINDOW_ACCESSLABEL NSLocalizedString (@"PREFWINDOW_ACCESSLABEL", ) 60 | #define PREFWINDOW_NEEDACCESSMESSAGE NSLocalizedString (@"PREFWINDOW_NEEDACCESSMESSAGE", ) 61 | #define PREFWINDOW_ACCESSERRORCAPTION NSLocalizedString (@"PREFWINDOW_ACCESSERRORCAPTION", ) 62 | #define PREFWINDOW_ACCESSERRORINFO NSLocalizedString (@"PREFWINDOW_ACCESSERRORINFO", ) 63 | 64 | 65 | // Defaults-Konstanten 66 | 67 | #define DEFAULTS_SCOPEFILTER @"ScopeFilter" 68 | #define DEFAULTS_SEARCHINTERVAL @"SearchInterval" 69 | #define DEFAULTS_SEARCHINTERVAL_PRESET @"72" 70 | 71 | #define DEFAULTS_SEARCHLOCATION @"SearchLocation" 72 | #define DEFAULTS_SEARCHLOCATION_PRESET @"0" 73 | 74 | #define DEFAULTS_STARTUP @"RunAtStartup" 75 | #define DEFAULTS_STARTUP_PRESET @"0" 76 | 77 | #define DEFAULTS_KEYCODE @"Hotkey Key Code" 78 | #define DEFAULTS_KEYFLAGS @"Hotkey Key Flags" 79 | 80 | #define DEFAULTS_SANDBOX @"Sandbox" 81 | 82 | // Filter-Dictionary-Konstanten 83 | 84 | #define SCOPE_DICT_TITLE @"title" 85 | #define SCOPE_DICT_TYPE @"type" 86 | #define SCOPE_DICT_VALUE @"value" 87 | #define SCOPE_DICT_HIDDEN @"hidden" 88 | #define SCOPE_DICT_ENABLED @"enabled" 89 | #define SCOPE_DICT_EDITABLE @"editable" 90 | #define SCOPE_DICT_SHOWCOUNT @"showcount" 91 | #define SCOPE_DICT_TAG @"tag" 92 | 93 | 94 | // Query-Dictionary-Konstanten 95 | 96 | #define QUERY_DICT_QUERY @"query" 97 | #define QUERY_DICT_COUNT @"count" 98 | #define QUERY_DICT_TAG @"tag" 99 | #define QUERY_DICT_TITLE @"title" 100 | 101 | // Konstanten für Spotlight 102 | 103 | #define SPOTLIGHT_PATH_PREFPANE @"PreferencePanes/Spotlight.prefPane" 104 | #define SPOTLIGHT_ERROR_TITLE NSLocalizedString (@"SPOTLIGHT_ERROR_TITLE", ) 105 | #define SPOTLIGHT_ERROR_NOTICE NSLocalizedString (@"SPOTLIGHT_ERROR_NOTICE", ) 106 | #define SPOTLIGHT_ERROR_BUTTON_PREFS NSLocalizedString (@"SPOTLIGHT_ERROR_BUTTON_PREFS", ) 107 | #define SPOTLIGHT_ERROR_BUTTON_IGN NSLocalizedString (@"SPOTLIGHT_ERROR_BUTTON_IGN", ) 108 | 109 | // Sandbox-Konstanten 110 | 111 | #define DEFAULTS_BOOKMARK @"SecurityBookmark" 112 | 113 | // Sonstige Konstanten 114 | 115 | #define FIRSTRESPONDERKEY @"firstResponder" 116 | 117 | #define QUERY_DEFAULTTITLE NSLocalizedString (@"QUERY_DEFAULTTITLE", ) 118 | #define QUERY_DEFAULTPREDICATE @"kMDItemContentTypeTree = \"\"" 119 | #define QUERY_DEFAULTTYPE @"Filename" 120 | #define QUERY_DEFAULTVALUE @"" 121 | 122 | #define QUERY_UTI_SHORT @"UTI" 123 | #define QUERY_UTI @"kMDItemContentTypeTree LIKE '" 124 | #define QUERY_NOT_UTI @"NOT kMDItemContentTypeTree LIKE '" 125 | #define QUERY_FILENAME @"kMDItemFSName LIKE '" 126 | #define QUERY_NOT_FILENAME @"NOT kMDItemFSName LIKE '" 127 | 128 | #define SEARCH_KEY_1 @"kMDItemLastUsedDate" 129 | 130 | #define MDI_PATH @"kMDItemPath" 131 | #define MDI_DISPLAYTITLE @"kMDItemDisplayName" 132 | #define MDI_CONTENTTYPETREE @"kMDItemContentTypeTree" 133 | 134 | #define PATH_MAINAPPDIR @"/Applications" 135 | #define PATH_DEVELOPAPPDIR @"/Developer/Applications" 136 | 137 | #define NOTIFICATION_ACCESS_REMOVED @"RMAccessRemoved" 138 | #define NOTIFICATION_ACCESS_GRANTED @"RMAccessGranted" 139 | 140 | -------------------------------------------------------------------------------- /Recent Menu/RMFilterFormatter.h: -------------------------------------------------------------------------------- 1 | // 2 | // RMFilterFormatter.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 28.04.11. 6 | // Copyright 2011 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface RMFilterFormatter : NSFormatter { 13 | 14 | NSTextField *textField; 15 | 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Recent Menu/RMFilterFormatter.m: -------------------------------------------------------------------------------- 1 | // 2 | // RMFilterFormatter.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 28.04.11. 6 | // Copyright 2011 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import "RMFilterFormatter.h" 10 | 11 | 12 | @implementation RMFilterFormatter 13 | 14 | - (BOOL)getObjectValue:(id *)obj forString:(NSString *)string 15 | errorDescription:(NSString **)error 16 | { 17 | *obj = [NSString stringWithString:string]; 18 | return YES; 19 | } 20 | 21 | - (NSString *)stringForObjectValue:(id)anObject 22 | { 23 | if([anObject isKindOfClass:[NSString class]]) 24 | { 25 | return [NSString stringWithString:anObject]; 26 | } 27 | else 28 | { 29 | return (@""); 30 | } 31 | } 32 | 33 | - (BOOL)isPartialStringValid:(NSString *)partialString 34 | newEditingString:(NSString **)newString errorDescription:(NSString 35 | **)error 36 | { 37 | NSRange range = [partialString rangeOfString:@"'"]; 38 | if (range.location == NSNotFound) return YES; 39 | NSBeep(); 40 | return NO; 41 | 42 | } 43 | 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Recent Menu/RMHotkeyController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RMHotkeyController.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 20.07.12. 6 | // Copyright (c) 2012 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RMHotkeyController : NSObject 12 | 13 | + (RMHotkeyController *)sharedController; 14 | 15 | -(NSDictionary*)loadHotkeyPreferences; 16 | -(void)saveHotkeyPreferencesWithKeyCode:(NSInteger)keyCode andFlags:(NSUInteger)flags; 17 | -(void)updateHotkeyWithKeyCode:(NSInteger)keyCode andFlags:(NSUInteger)flags; 18 | 19 | @property (assign) id delegate; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Recent Menu/RMHotkeyController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RMHotkeyController.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 20.07.12. 6 | // Copyright (c) 2012 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import "RMHotkeyController.h" 10 | #import "RMConstants.h" 11 | #import "DDHotKeyCenter.h" 12 | #import 13 | 14 | @implementation RMHotkeyController 15 | 16 | @synthesize delegate = _delegate; 17 | 18 | static RMHotkeyController *_sharedController = nil; 19 | 20 | #pragma mark - 21 | #pragma mark Singleton Methods 22 | 23 | + (RMHotkeyController *)sharedController 24 | { 25 | if (!_sharedController) { 26 | _sharedController = [[super allocWithZone:NULL] init]; 27 | } 28 | return _sharedController; 29 | } 30 | 31 | + (id)allocWithZone:(NSZone *)zone 32 | { 33 | return [self sharedController]; 34 | } 35 | 36 | - (id)copyWithZone:(NSZone *)zone 37 | { 38 | return self; 39 | } 40 | 41 | 42 | #pragma mark - 43 | #pragma mark Hotkey methods 44 | 45 | -(NSDictionary*)loadHotkeyPreferences 46 | { 47 | NSInteger keyCode=-1; 48 | NSUInteger flags; 49 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 50 | NSNumber *numKeyCode = [defaults objectForKey:DEFAULTS_KEYCODE]; 51 | NSNumber *numFlags = [defaults objectForKey:DEFAULTS_KEYFLAGS]; 52 | 53 | if (numKeyCode != nil) { 54 | keyCode = [numKeyCode integerValue]; 55 | flags = [[defaults objectForKey:DEFAULTS_KEYFLAGS] unsignedIntegerValue]; 56 | [self updateHotkeyWithKeyCode:keyCode andFlags:flags]; 57 | NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:numKeyCode, @"keyCode", numFlags, @"modifierFlags" , nil]; 58 | return dict; 59 | } 60 | return nil; 61 | } 62 | 63 | -(void)saveHotkeyPreferencesWithKeyCode:(NSInteger)keyCode andFlags:(NSUInteger)flags 64 | { 65 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 66 | NSNumber *numKeyCode = [NSNumber numberWithInt:keyCode]; 67 | NSNumber *numFlags = [NSNumber numberWithUnsignedInt:flags]; 68 | [defaults setObject:numKeyCode forKey:DEFAULTS_KEYCODE]; 69 | [defaults setObject:numFlags forKey:DEFAULTS_KEYFLAGS]; 70 | [defaults synchronize]; 71 | } 72 | 73 | // Hotkey ein- oder ausschalten 74 | -(void)updateHotkeyWithKeyCode:(NSInteger)keyCode andFlags:(NSUInteger)flags 75 | { 76 | 77 | DDHotKeyCenter *hotKeyCenter = [[DDHotKeyCenter alloc] init]; 78 | [hotKeyCenter unregisterHotKeysWithTarget:self.delegate]; 79 | if (keyCode!=-1) { 80 | [hotKeyCenter registerHotKeyWithKeyCode:keyCode 81 | modifierFlags:flags 82 | target:self.delegate 83 | action:@selector(hotkeyPressed:) 84 | object:nil]; 85 | 86 | } else { 87 | [hotKeyCenter unregisterHotKeysWithTarget:self]; 88 | } 89 | [hotKeyCenter release]; 90 | 91 | } 92 | 93 | 94 | @end 95 | -------------------------------------------------------------------------------- /Recent Menu/RMLaunchAtLoginController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RMLaunchAtLoginController.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 12.07.12. 6 | // Copyright (c) 2012 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface RMLaunchAtLoginController : NSObject 14 | 15 | + (RMLaunchAtLoginController *)sharedController; 16 | 17 | -(BOOL)launchAtLogin; 18 | -(void)turnOnLaunchAtLogin; 19 | -(void)turnOffLaunchAtLogin; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Recent Menu/RMLaunchAtLoginController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RMLaunchAtLoginController.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 12.07.12. 6 | // Copyright (c) 2012 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import "RMLaunchAtLoginController.h" 10 | #import "RMConstants.h" 11 | #import 12 | 13 | @implementation RMLaunchAtLoginController 14 | 15 | static RMLaunchAtLoginController *_sharedController = nil; 16 | 17 | #pragma mark - 18 | #pragma mark Singleton Methods 19 | 20 | + (RMLaunchAtLoginController *)sharedController 21 | { 22 | if (!_sharedController) { 23 | _sharedController = [[super allocWithZone:NULL] init]; 24 | } 25 | return _sharedController; 26 | } 27 | 28 | + (id)allocWithZone:(NSZone *)zone 29 | { 30 | return [self sharedController]; 31 | } 32 | 33 | - (id)copyWithZone:(NSZone *)zone 34 | { 35 | return self; 36 | } 37 | 38 | + (void)initialize 39 | { 40 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 41 | 42 | // Register default values 43 | NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: 44 | DEFAULTS_STARTUP_PRESET, DEFAULTS_STARTUP, 45 | nil]; 46 | [defaults registerDefaults:appDefaults]; 47 | } 48 | 49 | 50 | #pragma mark - 51 | #pragma mark Internal Helper Methods 52 | 53 | -(void)setLaunchAtLogin:(BOOL)flag 54 | { 55 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 56 | NSNumber *num = [NSNumber numberWithBool:flag]; 57 | [defaults setObject:num forKey:DEFAULTS_STARTUP]; 58 | [defaults synchronize]; 59 | } 60 | 61 | 62 | #pragma mark - 63 | #pragma mark Status Item Action Methods 64 | 65 | -(BOOL)launchAtLogin 66 | { 67 | BOOL result = NO; 68 | NSNumber *num = [[NSUserDefaults standardUserDefaults] objectForKey:DEFAULTS_STARTUP]; 69 | if (num) result = [num boolValue]; 70 | return (result); 71 | } 72 | 73 | 74 | -(void)turnOnLaunchAtLogin 75 | { 76 | if (!SMLoginItemSetEnabled ((CFStringRef)@"com.timschroeder.RecentMenu-Helper", YES)) { 77 | NSAlert *alert = [NSAlert alertWithMessageText:@"An error ocurred" defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithFormat:@"Couldn't add Recent Menu to launch at login item list."]; 78 | [alert runModal]; 79 | } else { 80 | [self setLaunchAtLogin:YES]; 81 | } 82 | } 83 | 84 | -(void)turnOffLaunchAtLogin 85 | { 86 | if (!SMLoginItemSetEnabled ((CFStringRef)@"com.timschroeder.RecentMenu-Helper", NO)) { 87 | NSAlert *alert = [NSAlert alertWithMessageText:@"An error ocurred" defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithFormat:@"Couldn't remove Recent Menu from launch at login item list."]; 88 | [alert runModal]; 89 | } else { 90 | [self setLaunchAtLogin:NO]; 91 | } 92 | } 93 | 94 | @end 95 | -------------------------------------------------------------------------------- /Recent Menu/RMLocalizePreferencesController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MRLocalizePreferencesController.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 22.01.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface RMLocalizePreferencesController : NSObject { 13 | 14 | IBOutlet NSTextField *startup; 15 | IBOutlet NSButton *startupCheck; 16 | 17 | IBOutlet NSTextField *searchTime; 18 | IBOutlet NSTextField *searchTimePrefix; 19 | IBOutlet NSTextField *searchTimeInput; 20 | IBOutlet NSTextField *searchTimeSuffix; 21 | IBOutlet NSTextField *searchLocation; 22 | IBOutlet NSButtonCell *searchLocationSmall; 23 | IBOutlet NSButtonCell *searchLocationBig; 24 | 25 | IBOutlet NSTextField *queryTitle; 26 | IBOutlet NSTextField *queryEnabledTitle; 27 | IBOutlet NSButton *queryEnabledCheckBox; 28 | IBOutlet NSTextField *queryCountTitle; 29 | IBOutlet NSTextField *queryCriterionTitle; 30 | IBOutlet NSTextField *queryIsCaption; 31 | IBOutlet NSTextField *wildCard; 32 | 33 | IBOutlet NSMenuItem *resetCaption; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Recent Menu/RMLocalizePreferencesController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RMLocalizePreferencesController.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 22.01.11. 6 | // Copyright 2011 Tentacle Forge. All rights reserved. 7 | // 8 | 9 | #import "RMConstants.h" 10 | #import "RMLocalizePreferencesController.h" 11 | #import "NSString+RMAdditions.h" 12 | 13 | 14 | @implementation RMLocalizePreferencesController 15 | 16 | -(void)awakeFromNib 17 | { 18 | [startup setStringValue:PREFWINDOW_STARTUP]; 19 | 20 | [searchTime setStringValue:PREFWINDOW_SEARCHTIME]; 21 | 22 | NSString *prefix = PREFWINDOW_SEARCHTIMEPREFIX; 23 | [searchTimePrefix setStringValue:prefix]; 24 | float prefixWidth = [prefix calculateStringWidth:(NSControl*)searchTimePrefix]; 25 | NSRect inputRect = [searchTimeInput frame]; 26 | NSRect prefixRect = [searchTimePrefix frame]; 27 | prefixRect.size.width = prefixWidth + 5; 28 | [searchTimePrefix setFrame:prefixRect]; 29 | inputRect.origin.x = prefixRect.origin.x + prefixWidth + 10; 30 | [searchTimeInput setFrame:inputRect]; 31 | NSRect suffixRect = [searchTimeSuffix frame]; 32 | suffixRect.origin.x = inputRect.origin.x + inputRect.size.width + 5; 33 | [searchTimeSuffix setFrame:suffixRect]; 34 | // Set serachTimeInput position 35 | // Set searchTimeSuffix 36 | [searchTimeSuffix setStringValue:PREFWINDOW_SEARCHTIMESUFFIX]; 37 | 38 | [searchLocation setStringValue:PREFWINDOW_SEARCHLOCATION]; 39 | [searchLocationSmall setTitle:PREFWINDOW_SEARCHLOCATIONSMALL]; 40 | [searchLocationBig setTitle:PREFWINDOW_SEARCHLOCATIONBIG]; 41 | 42 | [queryTitle setStringValue:PREFWINDOW_QUERYTITLE]; 43 | [queryEnabledCheckBox setTitle:PREFWINDOW_QUERYENABLEDCHECKBOX]; 44 | [queryEnabledTitle setStringValue:PREFWINDOW_QUERYENABLEDTITLE]; 45 | [queryCountTitle setStringValue:PREFWINDOW_QUERYCOUNTTITLE]; 46 | 47 | [queryIsCaption setStringValue:PREFWINDOW_QUERYISCAPTION]; 48 | [queryCriterionTitle setStringValue:PREFWINDOW_QUERYCRITERIONTITLE]; 49 | [wildCard setStringValue:PREFWINDOW_WILDCARD]; 50 | 51 | [resetCaption setTitle:PREFWINDOW_RESETCAPTION]; 52 | 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Recent Menu/RMPrefsWindowController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RMPrefsWindowController.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 09.02.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | // This class is partly based on Dave Batton's DBPrefsWindowController 9 | // http://www.mere-mortal-software.com/blog/details.php?d=2007-03-11 10 | 11 | #import 12 | #import "SRRecorderControl.h" 13 | #import "RMFilterFormatter.h" 14 | 15 | 16 | @interface RMPrefsWindowController : NSWindowController { 17 | NSMutableArray *toolbarIdentifiers; 18 | NSMutableDictionary *toolbarViews; 19 | NSMutableDictionary *toolbarItems; 20 | 21 | IBOutlet NSView *generalPrefsView; 22 | IBOutlet NSView *advancedPrefsView; 23 | IBOutlet NSView *queryPrefsView; 24 | IBOutlet NSArrayController *queryArrayController; 25 | IBOutlet NSTableView *queryTable; 26 | IBOutlet SRRecorderControl *recorderControl; 27 | IBOutlet NSButton *accessButton; 28 | IBOutlet NSSegmentedControl *launchAtLoginButton; 29 | IBOutlet NSTextField *accessLabel; 30 | 31 | IBOutlet NSPopover *popover; 32 | IBOutlet NSTextField *popoverMessageField; 33 | 34 | NSView *contentSubview; 35 | NSViewAnimation *viewAnimation; 36 | 37 | // IBOutlet NSTextField *filterTextField; 38 | } 39 | 40 | + (RMPrefsWindowController *)sharedPrefsWindowController; 41 | 42 | - (void)setupToolbar; 43 | - (void)addView:(NSView *)view label:(NSString *)label image:(NSImage *)image; 44 | 45 | - (IBAction) showWindow:(id)sender; 46 | - (IBAction) addQuery:(id)sender; 47 | - (IBAction) removeQuery:(id)sender; 48 | 49 | -(void)showGeneralPrefsPane; 50 | -(NSWindow*)prefsWindow; 51 | -(void)setAccessButtonTitleToRevoke; 52 | -(void)setAccessButtonTitleToGrant; 53 | -(IBAction)toggleAccess:(id)sender; 54 | -(IBAction)toggleLaunchAtLogin:(id)sender; 55 | -(void)showNeedsAccessRightsAlert; 56 | 57 | - (void)displayViewForIdentifier:(NSString *)identifier animate:(BOOL)animate; 58 | - (void)crossFadeView:(NSView *)oldView withView:(NSView *)newView; 59 | - (NSRect)frameForView:(NSView *)view; 60 | 61 | - (BOOL)shortcutRecorder:(SRRecorderControl *)aRecorder isKeyCode:(NSInteger)keyCode andFlagsTaken:(NSUInteger)flags reason:(NSString **)aReason; 62 | - (void)shortcutRecorder:(SRRecorderControl *)aRecorder keyComboDidChange:(KeyCombo)newKeyCombo; 63 | 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /Recent Menu/RMSecurityScopedBookmarkController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RMSecurityScopedBookmarkController.h 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 19.07.12. 6 | // Copyright (c) 2012 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RMSecurityScopedBookmarkController : NSObject 12 | 13 | + (RMSecurityScopedBookmarkController *)sharedController; 14 | 15 | -(NSData*)loadBookmark; 16 | -(void)saveBookmark:(NSData*)bookmarkData; 17 | -(void)deleteBookmark; 18 | 19 | -(BOOL)hasBookmark; 20 | -(void)startAccessingSecurityScopedBookmark; 21 | -(void)stopAccessingSecurityScopedBookmark; 22 | -(void)grantBookmarkAccessForWindow:(NSWindow*)win; 23 | 24 | @property (strong) NSURL *bookmarkURL; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Recent Menu/RMSecurityScopedBookmarkController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RMSecurityScopedBookmarkController.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 19.07.12. 6 | // Copyright (c) 2012 Tim Schroeder. All rights reserved. 7 | // 8 | 9 | #import "RMSecurityScopedBookmarkController.h" 10 | #import "RMConstants.h" 11 | 12 | #define DEFAULTS_BOOKMARK @"SecurityBookmark" 13 | #define PREFWINDOW_ACCESSERRORCAPTION NSLocalizedString (@"PREFWINDOW_ACCESSERRORCAPTION", ) 14 | #define PREFWINDOW_ACCESSERRORINFO NSLocalizedString (@"PREFWINDOW_ACCESSERRORINFO", ) 15 | #define GRANT_ACCESS_BUTTON NSLocalizedString (@"PREFWINDOW_GRANTBUTTON", ) 16 | 17 | @implementation RMSecurityScopedBookmarkController 18 | 19 | @synthesize bookmarkURL = _bookmarkURL; 20 | 21 | static RMSecurityScopedBookmarkController *_sharedController = nil; 22 | 23 | 24 | #pragma mark - 25 | #pragma mark Singleton Methods 26 | 27 | + (RMSecurityScopedBookmarkController *)sharedController 28 | { 29 | if (!_sharedController) { 30 | _sharedController = [[super allocWithZone:NULL] init]; 31 | } 32 | return _sharedController; 33 | } 34 | 35 | + (id)allocWithZone:(NSZone *)zone 36 | { 37 | return [self sharedController]; 38 | } 39 | 40 | - (id)copyWithZone:(NSZone *)zone 41 | { 42 | return self; 43 | } 44 | 45 | 46 | #pragma mark - 47 | #pragma mark Internal Methods 48 | 49 | -(void)showOutputSelectionError 50 | { 51 | NSAlert *alert = [NSAlert alertWithMessageText:PREFWINDOW_ACCESSERRORCAPTION defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithFormat:PREFWINDOW_ACCESSERRORINFO]; 52 | [alert runModal]; 53 | } 54 | 55 | #pragma mark - 56 | #pragma mark User Defaults Methods 57 | 58 | -(NSData*)loadBookmark 59 | { 60 | return ([[NSUserDefaults standardUserDefaults] dataForKey:DEFAULTS_BOOKMARK]); 61 | } 62 | 63 | -(void)saveBookmark:(NSData*)bookmarkData 64 | { 65 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 66 | [defaults setObject:bookmarkData forKey:DEFAULTS_BOOKMARK]; 67 | [defaults synchronize]; 68 | } 69 | 70 | -(void)deleteBookmark 71 | { 72 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 73 | [defaults removeObjectForKey:DEFAULTS_BOOKMARK]; 74 | [defaults synchronize]; 75 | } 76 | 77 | 78 | #pragma mark - 79 | #pragma mark Public Methods 80 | 81 | -(BOOL) hasBookmark 82 | { 83 | BOOL result = NO; 84 | NSData *bookmarkData = [self loadBookmark]; 85 | if (bookmarkData) result = YES; 86 | return result; 87 | } 88 | 89 | -(void) startAccessingSecurityScopedBookmark 90 | { 91 | // Create URL of bookmark file 92 | NSData *data; 93 | data = [self loadBookmark]; 94 | if (!data) { 95 | NSLog (@"error loading Bookmark"); 96 | return; 97 | } 98 | 99 | NSError *error = nil; 100 | BOOL isStale; 101 | self.bookmarkURL = [NSURL URLByResolvingBookmarkData:data 102 | options:NSURLBookmarkResolutionWithSecurityScope 103 | relativeToURL:nil 104 | bookmarkDataIsStale:&isStale 105 | error:&error]; 106 | if (error) NSLog (@"error retrieving security-scoped bookmark"); 107 | 108 | [self.bookmarkURL startAccessingSecurityScopedResource]; 109 | } 110 | 111 | -(void) stopAccessingSecurityScopedBookmark 112 | { 113 | if (!self.bookmarkURL) return; 114 | [self.bookmarkURL stopAccessingSecurityScopedResource]; 115 | } 116 | 117 | -(void)grantBookmarkAccessForWindow:(NSWindow*)win 118 | { 119 | NSString *path = @"/"; 120 | NSURL *urlPath = [NSURL URLWithString:path]; 121 | 122 | // Prepare Open Panel 123 | NSOpenPanel *openPanel = [NSOpenPanel openPanel]; 124 | [openPanel setCanChooseFiles:NO]; 125 | [openPanel setCanChooseDirectories:YES]; 126 | [openPanel setAllowsMultipleSelection:NO]; 127 | [openPanel setPrompt:GRANT_ACCESS_BUTTON]; 128 | [openPanel setDirectoryURL:urlPath]; 129 | [openPanel setCanCreateDirectories:YES]; 130 | 131 | // Show Open Panel 132 | [openPanel beginSheetModalForWindow:win completionHandler:^(NSInteger returnCode){ 133 | 134 | if( returnCode == NSFileHandlingPanelCancelButton ) { 135 | return; 136 | } 137 | 138 | NSArray *urls = [openPanel URLs]; 139 | if( urls != nil && [urls count] == 1 ) { 140 | NSURL *url = [urls objectAtIndex:0]; 141 | 142 | // Present error message if user has chosen a custom folder 143 | BOOL allowedInput = NO; 144 | if ([[url absoluteString] isEqualToString:@"file://localhost/"]) allowedInput = YES; 145 | if ([[url absoluteString] isEqualToString:@"file:///"]) allowedInput = YES; // Bug Fix for OS X 10.9 146 | if (!allowedInput) { 147 | [self showOutputSelectionError]; 148 | return; 149 | } 150 | 151 | // OK, store bookmark 152 | NSData *bookmark = nil; 153 | NSError *error = nil; 154 | bookmark = [url bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope 155 | includingResourceValuesForKeys:nil 156 | relativeToURL:nil // Make it app-scoped 157 | error:&error]; 158 | if (error) { 159 | NSLog(@"Error creating security-scoped bookmark for URL (%@): %@", url, error); 160 | [NSApp presentError:error]; 161 | } 162 | 163 | // save and access security scoped bookmark 164 | [self saveBookmark:bookmark]; 165 | [self startAccessingSecurityScopedBookmark]; 166 | 167 | // OK, update UI 168 | [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFICATION_ACCESS_GRANTED object:self]; 169 | } else { 170 | [self showOutputSelectionError]; 171 | } 172 | }]; 173 | } 174 | 175 | 176 | @end 177 | -------------------------------------------------------------------------------- /Recent Menu/Recent Menu.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.files.bookmarks.app-scope 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Recent Menu/Recent Menu.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en-US 7 | CFBundleIdentifier 8 | com.timschroeder.recentmenu.help 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | RecentMenuHelp 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1 17 | CFBundleSignature 18 | hbwr 19 | CFBundleVersion 20 | 1 21 | HPDBookAccessPath 22 | RecentMenuHelp.html 23 | HPDBookIconPath 24 | Shared/icon16.png 25 | HPDBookIndexPath 26 | RecentMenu.helpindex 27 | HPDBookKBProduct 28 | recentmenu 29 | HPDBookTitle 30 | Recent Menu Help 31 | HPDBookType 32 | 3 33 | 34 | 35 | -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/RM Help.helpindex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/RM Help.helpindex -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/Shared/icon13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/Shared/icon13.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/Shared/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/Shared/icon16.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/Shared/icon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/Shared/icon32.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/Shared/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/Shared/minus.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/Shared/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/Shared/plus.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/Shared/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/Shared/settings.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/Shared/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin:0px; 3 | padding:0px; 4 | line-height:1.3em; 5 | font-family:helvetica, arial, sans-serif; 6 | font-size:14px; 7 | } 8 | 9 | .image { 10 | margin: 20px 20px 5px 20px; 11 | padding: 10px; 12 | border:1px solid #d7d7d7; 13 | } 14 | 15 | .image2 { 16 | } 17 | 18 | h1 { 19 | color:#010000; 20 | font-size:20px; 21 | margin-left:20px; 22 | margin-bottom:25px; 23 | } 24 | 25 | h2 { 26 | color:#010000; 27 | font-size:17px; 28 | margin-top:0px; 29 | margin-left:20px; 30 | margin-bottom:20px; 31 | margin-right:20px; 32 | font-weight:bold; 33 | padding-bottom:4px; 34 | border-bottom:1px solid #777; 35 | } 36 | 37 | h3 { 38 | color:#010000; 39 | font-size:16px; 40 | margin-top:30px; 41 | margin-left:20px; 42 | margin-bottom:10px; 43 | margin-right:20px; 44 | font-weight:bold; 45 | } 46 | 47 | h4 { 48 | color:#032588; 49 | font-size:15px; 50 | margin-top:25px; 51 | margin-left:20px; 52 | margin-bottom:6px; 53 | margin-right:20px; 54 | } 55 | 56 | h5 { 57 | color:#010000; 58 | font-size:14px; 59 | margin-top:15px; 60 | margin-left:20px; 61 | margin-bottom:6px; 62 | margin-right:20px; 63 | } 64 | 65 | h6 { 66 | color:#010000; 67 | font-size:14px; 68 | margin-top:15px; 69 | margin-left:20px; 70 | margin-bottom:6px; 71 | margin-right:20px; 72 | } 73 | 74 | hr { 75 | border:0; 76 | margin-top:50px; 77 | margin-bottom:20px; 78 | margin-left:20px; 79 | margin-right:20px; 80 | border-top: 1px solid #dddddd; 81 | height: 0; 82 | } 83 | 84 | a { 85 | color:#032588; 86 | text-decoration: none; 87 | } 88 | 89 | a:hover { 90 | text-decoration: underline; 91 | } 92 | 93 | p { 94 | margin-left:20px; 95 | margin-top: 3px; 96 | margin-bottom: 0; 97 | margin-right: 20px; 98 | } 99 | 100 | li { 101 | margin-top:5px; 102 | margin-left:20px; 103 | margin-right:20px; 104 | } 105 | 106 | #headerbox { 107 | clear: both; 108 | margin-top: 40px; 109 | margin-bottom: 28px; 110 | } 111 | 112 | .border { 113 | width: 100%; 114 | top: 0px; 115 | padding: 4px 0 4px 0; 116 | background-color: #eee; 117 | text-align: left; 118 | border-bottom: 1px solid #cccccc; 119 | font-size: 9pt; 120 | font-family:helvetica, arial, sans-serif; 121 | position:fixed; 122 | z-index:99; 123 | } 124 | 125 | .contentframe { 126 | padding:15px; 127 | margin: 0 20px 25px 20px; 128 | text-align: left; 129 | } 130 | 131 | .note { 132 | padding:15px; 133 | padding-left:20px; 134 | margin: 25px 20px 25px 20px; 135 | text-align: left; 136 | background-color: #FF9; 137 | border: 1px solid #d7d7d7; 138 | } 139 | 140 | .imagecaption { 141 | font-size:10px; 142 | text-align:center; 143 | margin-bottom:20px; 144 | font-style:italic; 145 | } -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/Changelog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Changelog 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    Start   |   Einführung   |   Einstellungen   |   Support   |   Was ist Neu?
14 | 15 |

Recent Menu Icon Recent-Menu-Hilfe

16 | 17 |

Was ist neu?

18 |

Neu in Version 1.2.2 (Dezember 2012):

19 |
    20 |
  • Die Liste der zuletzt verwendeten Dateien und Ordner wird jetzt im Hauptmenü von Recent Menu angezeigt.
  • 21 |
22 |

Neu in Version 1.2.1 (Juli 2012):

23 |
    24 |
  • Recent Menu läuft jetzt in einer Sandbox
  • 25 |
26 |

Neu in Version 1.2 (Mai 2012):

27 |
  • Filter können Ausschluss-Filterkriterien enthalten
28 |

Neu in Version 1.1 (August 2011):

29 |
  • Filter können mehrere durch Komma getrennte Filterkriterien enthalten
  • 30 |
  • Möglichkeit zur Wiederherstellung der Standard-Filter eingebaut
  • 31 |
  • Hotkey ist jetzt frei konfigurierbar
  • 32 |
  • Bei Email-Dateien wird die Betreff-Zeile statt des Filenamen angezeigt
  • 33 |
  • Nur in der Trial-Version: Trial-Periode fängt bei neuer Programm-Version neu an zu laufen
  • 34 |
  • Hilfe-Texte überarbeitet und ausgebaut
  • 35 |
  • Mehrere kleinere Fehler beseitigt
36 | -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/Intro.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Einführung 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    Start   |   Einführung   |   Einstellungen   |   Support   |   Was ist Neu?
14 | 15 |

Recent Menu Icon Recent-Menu-Hilfe

16 | 17 |

Einführung

18 |
Was Recent Menu tut
19 |

Recent Menu zeigt Dateien und Ordner an, die kürzlich verwendet, d.h. geöffnet, wurden. Recent Menu findet alle kürzlich verwendeten Dateien und Ordner auf dem lokalen System und ermöglicht so einen schnellen Zugriff auf solche Dateien und Ordner. Es ähnelt einem File-Browser (wie dem Finder), nur dass Recent Menu Dateien und Ordner nicht in ihrer hierarchischen Struktur darstellt, sondern nach dem Zeitpunkt des letzten Zugriffs ordnet. Recent Menu ermöglicht es, Filter für Dateitypen anzulegen, um nur bestimmte kürzlich verwendete Dateien anzuzeigen, und geht von der Idee aus, dass Dateien oder Ordner, die vor kurzer Zeit verwendet wurden, häufig rasch wieder benötigt werden: Der schnelle Zugriff auf diese Dateien und Ordner wird durch Recent Menu erleichtert.

20 |

Nach dem Start von Recent Menu befindet sich das Programmsymbol in der Menüleiste. Klicken Sie auf dieses Symbol, um das Menü von Recent Menu aufzurufen, das die Liste der kürzlich verwendeten Dateien und Ordner enthält:

21 |
22 |
Liste kürzlich verwendeter Dateien und Ordner
23 |

Die Liste kürzlich verwendeter Objekte enthält die zuletzt verwendeten Dateien und Ordner auf Ihrem Rechner, gefiltert nach den in den Filter-Einstellungen definierten Filtern. Innerhalb der angezeigten Gruppen sind die Einträge chronologisch sortiert, wobei die zuletzt verwendeten Dateien und Ordner (d.h. Objekte) am Anfang der Liste erscheinen. Um ein in der Liste angezeigtes Objekt mit seiner Standardanwendung zu öffnen, klicken Sie auf das Objekt. Um stattdessen den Speicherort des Objekts im Finder anzuzeigen, halten Sie die "Command"-Taste ⌘ gedrückt und klicken Sie dann auf das Objekt.

24 | 25 |
Hinweis: Bitte beachten Sie, dass Recent Menu beim Programmstart und nach Änderungen der Filter-Einstellungen einen Moment benötigt, um die Liste kürzlich verwendeter Objekte zu aktualisieren; während dieser Zeit wird ein Warte-Hinweis angezeigt.
26 |
Wie Recent Menu funktioniert
27 |

Recent Menu wertet Daten des OS-X-System-Dienstes Spotlight aus, die als Metadaten den Zugriff auf alle auf einem lokalen System vorhandenen Dateien und Ordner protokollieren. Recent Menu verknüpft diese Daten mit den vom Benutzer definierten Filterkriterien, um so eine Liste der zuletzt verwendeten Dateien und Ordner zu erzeugen.

28 |
Hinweis: Recent Menu kann derzeit die Verwendung von Dateien und Ordner, die sich nicht auf dem lokalen System befinden, sondern auf Netzwerk- oder Internet-Speichermedien, nicht feststellen und anzeigen.
29 | -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/RecentMenuHelp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Recent-Menu-Hilfe 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    Start   |   Einführung   |   Einstellungen   |   Support   |   Was ist Neu?
14 | 15 |

Recent Menu Icon Recent-Menu-Hilfe

16 | 17 |
18 |

Inhaltsübersicht

19 |

Einführung

20 |

Was Recent Menu tut - Wie Recent Menu funktioniert

21 |

Einstellungen

22 |

Allgemeine Einstellungen - Sucheinstellungen - Filter konfigurieren

23 |

Support

24 |

Unterstützung vom Entwickler erhalten

25 |

Was ist neu?

26 |

Übersicht über neue Funktionen und Fehlerbeseitigungen

27 |
28 | -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/Settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Einstellungen 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    Start   |   Einführung   |   Einstellungen   |   Support   |   Was ist Neu?
14 | 15 |

Recent Menu Icon Recent-Menu-Hilfe

16 | 17 |

Einstellungen

18 |

Die Einstellungsmöglichkeiten von Recent Menu sind über drei Einstellungs-Fenster zugänglich, die Sie über das Hauptmenü aufrufen können.

19 |
Allgemeine Einstellungen
20 |

21 |
Starten beim Login
22 |

In den allgemeinen Einstellungen können Sie festlegen, ob Recent Menu beim Anmelden eines Benutzers am Computer automatisch gestartet werden soll oder nicht. In der Voreinstellung ist dies nicht der Fall.

23 |
Hotkey
24 |

Sie können außerdem festlegen, ob Sie Recent Menu mit einer Tastenkombination (Hotkey) aufrufen wollen. In der Voreinstellung ist dies nicht der Fall. Wenn Sie eine Hotkey festlegen wollen, klicken Sie auf das Eingabefeld: und drücken Sie dann die Tastenkombination, mit der Sie Recent Menu aufrufen wollen. Sie müssen eine Kombination aus Buchstaben- oder Zifferntaste und einer Sondertaste (Shift, Alt, Control, Command) verwenden. Wenn Sie eine Tastenkombination erfolgreich eingegeben haben, wird diese angezeigt: (in diesem Beispiel: Alt+F). Die Hotkey ist damit eingeschaltet. Um die Tastenkombination wieder zu löschen und die Hotkey auszuschalten, klicken Sie auf das Kreuz am rechten Rand dieses Feldes.

25 |
Zugriff auf Dateisystem
26 |

Seit Version 1.2.1 läuft Recent Menu in einer Sandbox. Das bedeutet, dass das Programm im Prinzip keinen Zugriff auf Ihr Dateisystem hat, was der Sicherheit Ihres Systems dient. Allerdings benötigt Recent Menu einen Lesezugriff für Ihr Dateisystem, um ermitteln zu können, auf welche Dateien und Ordner Sie zugegriffen haben. Sie müssen daher auf den Zugriff-Gewähren-Button klicken und bestätigen, dass Sie Recent Menu diese Zugriffsrechte einräumen. Sie müssen dies nur einmal tun, ohne Zugriffsrechte funktioniert Recent Menu allerdings nicht.

27 |
Sucheinstellungen
28 |

29 |

In den Such-Einstellungen können Sie festlegen, für wie viele Stunden Recent Menu den Zugriff auf kürzlich verwendete Dateien und Ordner verfolgen soll. Dateien und Ordner, auf die vor längerer Zeit zugegriffen wurde, als hier festgelegt ist, werden von Recent Menu nicht mehr angezeigt.

30 |

Sie können außerdem einstellen, ob Recent Menu nur in den Benutzer- und Programmordnern oder in allen lokalen Ordnern suchen soll. Die Suche in allen lokalen Ordnern bringt mehr Ergebnisse und kann je nach Dateityp erforderlich sein, um alle benutzten Dateien anzuzeigen.

31 |
Hinweis: Bitte beachten Sie, dass Recent Menu den Zugriff auf Dateien und Ordner, die sich nicht auf Ihrem Computer befinden (sondern etwa im Internet oder in einem Netzwerk-Speicherplatz), nicht feststellen kann.
32 |
Filter konfigurieren
33 |

34 |

Die Filter-Einstellungen erlauben Ihnen, benutzerdefinierte Filter zu erstellen und zu bearbeiten und so die Gruppen der in der Liste benutzter Objekte angezeigten Einträge zu ändern. In der Liste benutzter Objekte werden die Gruppen (die den Filtern entsprechen) in der gleichen Reihenfolge wie in der Tabelle im Einstellungsfenster angezeigt. Um die Reihenfolge der Filter zu ändern, können Sie die Filter in der Tabelle mit Drag-und-Drop verschieben. Sie können durch Klick auf den -Button einen neuen Filter hinzufügen und durch Klick auf den -Button existierende Filter löschen.

35 |
Hinweis: Bitte beachten Sie, dass Sie den "Alles"-Filter nicht löschen können.
36 |

Durch Klick auf den -Button und dann auf den Befehl "Filter zurücksetzen" können Sie alle Filter auf ihre Voreinstellungen zurücksetzen.

37 |
Hinweis: Wenn Sie die Filter auf ihre Voreinstellungen zurücksetzen, werden alle von Ihnen angelegten benutzerdefinierten Filter gelöscht!
38 |

Auf der rechten Seite des Einstellungs-Fensters können Sie den Titel der Filter bearbeiten, festlegen, wie viele Einträge pro Filter angezeigt werden und Filter aktivieren oder deaktivieren. Deaktivierte Filter werden in der Liste der benutzten Objekte nicht angezeigt. Für die Festlegung des jeweiligen Filterkriteriums gilt Folgendes:

39 |
    40 |
  • Sie können als Filterkriterium den Namen von Dateien oder Ordnern verwenden. Recent Menu zeigt dann alle kürzlich verwendeten Dateien und Ordner an, deren Name (oder Teil des Namens) mit dem Filterkriterium übereinstimmt. Dabei können Sie das Zeichen "*" als Wildcard benutzen, um beliebige Zeichenfolgen in das Filterkriterium einzubauen. Wenn Sie etwa alle kürzlich verwendeten PDF-Dateien anzeigen lassen möchten, geben Sie als Filterkriterium "*pdf" ein.
  • 41 |
  • Sie können als Filterkriterium den Uniform Type Identifier von Dateien und Ordnern verwenden. So können Sie zum Beispiel, um alle kürzlich verwendeten PDF-Dateien anzuzeigen, als Filterkriterium "com.adobe.pdf" eingeben. Für weitere Informationen über "Uniform Type Identifier" besuchen Sie bitte die Support-Seite (s.u.).
  • 42 |
  • Sie können mehrere durch ein Komma getrennte Filterkriterien gemeinsam verwenden. Recent Menu zeigt dann alle Dateien und Ordner an, die mit mindestens einem der Kriterien übereinstimmen. Wenn Sie etwa für einen Filter "*pdf, *png" eingeben, werden für diesen Filter alle Dateien angezeigt, die entweder PDF-Dateien oder PNG-Dateien sind.
  • 43 |
  • Sie können bestimmte Dateien und Ordner von den Suchergebnissen ausschließen, indem Sie dem Filterkriterium ein Ausrufezeichen (!) voranstellen. Dies funktioniert sowohl mit Uniform Type Identifiern als auch mit dem Namen von Dateien und Ordnern. Um etwa Emails von den Suchergebnissen auszuschließen, verwenden Sie als Filterkriterium "!public.message", um alle Dateien auszuschließen, deren Namen die Zeichenfolge "credit" enthalten, verwenden Sie das Filterkriterium "!*credit*".
  • 44 |
45 | -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/Support.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Support 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    Start   |   Einführung   |   Einstellungen   |   Support   |   Was ist Neu?
14 | 15 |

Recent Menu Icon Recent-Menu-Hilfe

16 | 17 |

Support

18 |

Wenn Sie Unterstützung benötigen, Schwierigkeiten mit Recent Menu haben oder gerne weitere Funktionen verwirklicht wissen wollen, besuchen Sie bitte die Support-Seite auf der Recent-Menu-Website. Sie können den Entwickler von Recent Menu auch gerne per Email unter support@timschroeder.net kontaktieren.

19 | -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/Tasten1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/Tasten1.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/Tasten2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/Tasten2.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/de.lproj.helpindex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/de.lproj.helpindex -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/img01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/img01.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/prefs_filter_ger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/prefs_filter_ger.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/prefs_general_ger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/prefs_general_ger.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/prefs_search_ger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/de.lproj/prefs_search_ger.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/Changelog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Changelog 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    Home   |   Overview   |   Settings   |   Support   |   What's new?
14 | 15 |

Recent Menu Icon Recent Menu Help

16 | 17 |

What's new?

18 |

New in version 1.2.2 (December 2012):

19 |
    20 |
  • The recent items list now shows in the main menu of Recent Menu.
  • 21 |
22 |

New in version 1.2.1 (July 2012):

23 |
    24 |
  • Recent Menu now runs in a sandbox
  • 25 |
26 |

New in version 1.2 (May 2012):

27 |
    28 |
  • Custom filters can have exclusion arguments
  • 29 |
30 |

New in version 1.1 (August 2011):

31 |
    32 |
  • Custom filters can consist of several comma-separated filter arguments
  • 33 |
  • Pre-defined filters can be restored
  • 34 |
  • Hotkey is configurable
  • 35 |
  • Shows subject line instead of file name for email files
  • 36 |
  • Only in trial version: Trial period is reset in each new app version
  • 37 |
  • Help was enhanced
  • 38 |
  • Fixes for several small bugs
39 | 40 | -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/Intro.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Overview 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    Home   |   Overview   |   Settings   |   Support   |   What's new?
14 | 15 |

Recent Menu Icon Recent Menu Help

16 | 17 |

Overview

18 |
What Recent Menu does
19 |

Recent Menu is a small tool living in your menu bar. It gives you access to a configurable list of recently accessed items (i.e., files and folders) on your computer. It finds accessed items even if it wasn't running at the time the items were accessed. Recent Menu is similar to Apple's Finder app. However, it doesn't show files and folders in their hierarchical order but sorted by the time they were accessed. While this is quite similar to a built-in functionality of OS X, in addition Recent Menu gives you the possibility to define custom filters for file types or file names. The idea behind Recent Menu is that files and folders you have recently used are likely to be used again soon and that Recent Menu can thereby facilitate finding these items.

20 |

 

21 |

When you launch Recent Menu, there is normally no application icon in the dock menu (unless you decide to keep Recent Menu in the dock after installing it from the Mac App Store). Instead, you will notice a new icon resembling the app icon () in the menu bar at the upper right corner of your screen. Click on this icon to access the features of Recent Menu. The main menu appearing gives you access to the configurable recent items list:

22 |
23 |
List of recently used files and folders
24 |

The list of recently used items shows files and folders you have accessed on your computer, grouped by the custom filters you have defined in the filter settings. The entry of every group are sorted chronologically with those items which have been accessed most recently are at the top of the group. To open a file shown in the list with its standard application, just click on it. To show its location in Finder, hold the command key ⌘ and then click on it.

25 | 26 |
Note: After Recent Menu has been started and after filter preferences have been updated, Recent Menu needs a moment to update the list of recently used items. Until that is done, Recent Menu will show a waiting notice.
27 |
How Recent Menu Works
28 |

Recent Menu uses data provided by Spotlight, a OS X system service. Inter alia, Spotlight logs access to (almost) every file and folder on your local computer. Recent Menu links these data with the filter settings to create the list of recently accessed items.

29 |
Note: Recent Menu cannot monitor items that are not located on your local computer but which are stored in an internet or network location.
30 | -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/RecentMenuHelp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Recent Menu Help 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    Home   |   Overview   |   Settings   |   Support   |   What's new?
14 | 15 |

Recent Menu Icon Recent Menu Help

16 | 17 |
18 |

Contents

19 |

Overview

20 |

What Recent Menu does - How Recent Menu works

21 |

Settings

22 |

General Preferences - Search Preferences - Filter Preferences

23 |

Support

24 |

Get Developer Support

25 |

What's new?

26 |

Overview of New Functions and Bug Fixes

27 |
28 | -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/Settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Settings 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    Home   |   Overview   |   Settings   |   Support   |   What's new?
14 | 15 |

Recent Menu Icon Recent Menu Help

16 | 17 |

Settings

18 |

You can configure Recent Menu in three preferences panes wich are accessible from the menu bar menu.

19 |
General Preferences
20 |

21 |
Launch At Login
22 |

In the general preferences pane you can set Recent Menu to start automatically when you login. By default this is option is not enabled.

23 |
Hotkey
24 |

You can also set a customizable hotkey to access Recent Menu (after it has been started and is visible in the system menu bar). By default, this option is not enabled as no hotkey is defined. To turn on this option, just define a hotkey. To achieve this, klick on the hotkey input field: and press the combination of keys you would like to use as hotkey. You have to use a combination between a normal key and a modifier key (Shift, Alt, Control, Command). Once you have successfully entered a combination of keys, this combination is shown in the hotkey input field: (in this example: Alt+F). This also enables the hotkey. To disable the hotke function, just lick on the cross at the right side of the hotkey input field.

25 |
File System Access
26 |

Starting with Version 1.2.1, Recent Menu runs in a sandbox. This means that it has basically no access to your file system, which is good for security. However, in order to work, it needs to have read access, as otherwhise it couldn't monitor which files and folders you've recently accessed. You have therefore to grant Recent Menu these access rights by clicking on the Grant Access button and by confirming the selection in the file dialog. You have to do this only once, but without these access rights Recent Menu won't work.

27 |
Search Preferences
28 |

29 |

Search preferences allow you to adjust for which period of time ("Search Period") Recent Menu will monitor file and folder access. A higher value here means that Recent Menu will show more items. Typical values would be anything between a couple of hours and a couple of days (measured in hours). Files and folders which have been accessed before a longer time than it is defined here won't be shown by Recent Menu.

30 |

You may also adjust the locations in which Recent Menu will look for recently accessed items ("Search Location"). If you decide to let Recent Menu only monitor user and application folders this will show not everything typicalle accessed on your computer, though it will cover more or less any files and folders you have created. If you decide to let Recent Menu monitor all local folders you will get more results, depending on your filter settings.

31 |
Note: Recent Menu cannot monitor items that are not located on your local computer but which are stored in an internet or network location.
32 |
Filter Preferences
33 |

34 |

The filter preferences pane allows you to define and edit custom filters and to change the order in which the filters are shown in the recent items list. Filters which are enabled will be shown in the recent items list in the same order in which they appear in the source view. To change the order of filters, just drag and drop filters inside the source view. To enable or disable filters, click on the "Show in Menu" button. Add a new filter by clicking on the button and delete a filter by clicking on the button.

35 |
Note: You cannot delete the "Everything" filter.
36 |

By clicking on the button and then on the "reset filters" command you can reset all filters to its built-in settings.

37 |
Note: If you reset the filters, all of your user-defined filters will be deleted!
38 |

On the right side of the filter settings pane you can edit the titles of filters, set the number of entries shown for each filter and activate or deactivate each filter. Filters which are deactivated won't be shown in the list of recent items. To define the filter criteria, please follow these rules:

39 |
    40 |
  • You may use the name of recently accessed files or folders as search criterion. If you want Recent Menu to look for recently accessed items which share a common element in their file name (like the file extension), select this option and enter the term to search for. You may use the "*" wildcard. For example, to find all PDF files recently accessed, you could enter "*pdf" as search term.
  • 41 |
  • You may use the Uniform Type Identifier (UTI) of recently accessed files or folders as search criterion. For example, you can use the search term "com.adobe.pdf" to define a filter of recently accessed PDF files. For more information on UTI's please visit the support page (see below).
  • 42 |
  • You may use more than on filter criterion in a used-defined filter by comma-separating the criteria. Recent Menu will then show all items matching at least one of the criteria. For example, if you define a filter string as "*pdf, *png", Recent Menu will show PDF files as well as PNG files for this filter.
  • 43 |
  • You can exlude specific files or folders from being shown in the results list by using an exclamation mark (!) before a search criterion identifying the files or folders you want to exclude. This works with UTI search terms as well as with name search terms. For example, to exclude all email messages from being shown, use "!public.message" as search term, to exluce all files whose file name contains the characters "credit", use "!*credit*" as search term.
  • 44 |
45 | -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/Support.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Support 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    Home   |   Overview   |   Settings   |   Support   |   What's new?
14 | 15 |

Recent Menu Icon Recent Menu Help

16 | 17 |

Support

18 |

If you need support, experience any trouble with Recent Menu or would like to see additional features implemented, please consult the Support Page on the Recent Menu website. You may also drop a line to the developer at support@timschroeder.net.

19 | -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/en.lproj.helpindex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/en.lproj.helpindex -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/img01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/img01.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/key1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/key1.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/key2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/key2.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/prefs_filter_eng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/prefs_filter_eng.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/prefs_general_eng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/prefs_general_eng.png -------------------------------------------------------------------------------- /Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/prefs_search_eng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/RecentMenu.help/Contents/Resources/en.lproj/prefs_search_eng.png -------------------------------------------------------------------------------- /Recent Menu/Recent_Menu-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleHelpBookFolder 10 | RecentMenu.help 11 | CFBundleHelpBookName 12 | com.timschroeder.recentmenu.help 13 | CFBundleIconFile 14 | rmicon.icns 15 | CFBundleIdentifier 16 | com.timschroeder.recentmenu 17 | CFBundleInfoDictionaryVersion 18 | 6.0 19 | CFBundleName 20 | ${PRODUCT_NAME} 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | 1.2.4 25 | CFBundleSignature 26 | ???? 27 | CFBundleVersion 28 | 9 29 | LSApplicationCategoryType 30 | public.app-category.utilities 31 | LSMinimumSystemVersion 32 | 10.9 33 | LSUIElement 34 | 35 | NSHumanReadableCopyright 36 | Copyright © 2011-2014 Tim Schröder 37 | NSMainNibFile 38 | MainMenu 39 | NSPrincipalClass 40 | NSApplication 41 | 42 | 43 | -------------------------------------------------------------------------------- /Recent Menu/Recent_Menu_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Recent Menu' target in the 'Recent Menu' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Recent Menu/SRCommon.h: -------------------------------------------------------------------------------- 1 | // 2 | // SRCommon.h 3 | // ShortcutRecorder 4 | // 5 | // Copyright 2006-2007 Contributors. All rights reserved. 6 | // 7 | // License: BSD 8 | // 9 | // Contributors: 10 | // David Dauer 11 | // Jesper 12 | // Jamie Kirkpatrick 13 | 14 | #import 15 | #import 16 | #import 17 | 18 | #pragma mark Dummy class 19 | 20 | @interface SRDummyClass : NSObject {} @end 21 | 22 | #pragma mark - 23 | #pragma mark Typedefs 24 | 25 | typedef struct _KeyCombo { 26 | NSUInteger flags; // 0 for no flags 27 | NSInteger code; // -1 for no code 28 | } KeyCombo; 29 | 30 | #pragma mark - 31 | #pragma mark Enums 32 | 33 | // Unicode values of some keyboard glyphs 34 | enum { 35 | KeyboardTabRightGlyph = 0x21E5, 36 | KeyboardTabLeftGlyph = 0x21E4, 37 | KeyboardCommandGlyph = kCommandUnicode, 38 | KeyboardOptionGlyph = kOptionUnicode, 39 | KeyboardShiftGlyph = kShiftUnicode, 40 | KeyboardControlGlyph = kControlUnicode, 41 | KeyboardReturnGlyph = 0x2305, 42 | KeyboardReturnR2LGlyph = 0x21A9, 43 | KeyboardDeleteLeftGlyph = 0x232B, 44 | KeyboardDeleteRightGlyph = 0x2326, 45 | KeyboardPadClearGlyph = 0x2327, 46 | KeyboardLeftArrowGlyph = 0x2190, 47 | KeyboardRightArrowGlyph = 0x2192, 48 | KeyboardUpArrowGlyph = 0x2191, 49 | KeyboardDownArrowGlyph = 0x2193, 50 | KeyboardPageDownGlyph = 0x21DF, 51 | KeyboardPageUpGlyph = 0x21DE, 52 | KeyboardNorthwestArrowGlyph = 0x2196, 53 | KeyboardSoutheastArrowGlyph = 0x2198, 54 | KeyboardEscapeGlyph = 0x238B, 55 | KeyboardHelpGlyph = 0x003F, 56 | KeyboardUpArrowheadGlyph = 0x2303, 57 | }; 58 | 59 | // Special keys 60 | enum { 61 | kSRKeysF1 = 122, 62 | kSRKeysF2 = 120, 63 | kSRKeysF3 = 99, 64 | kSRKeysF4 = 118, 65 | kSRKeysF5 = 96, 66 | kSRKeysF6 = 97, 67 | kSRKeysF7 = 98, 68 | kSRKeysF8 = 100, 69 | kSRKeysF9 = 101, 70 | kSRKeysF10 = 109, 71 | kSRKeysF11 = 103, 72 | kSRKeysF12 = 111, 73 | kSRKeysF13 = 105, 74 | kSRKeysF14 = 107, 75 | kSRKeysF15 = 113, 76 | kSRKeysF16 = 106, 77 | kSRKeysF17 = 64, 78 | kSRKeysF18 = 79, 79 | kSRKeysF19 = 80, 80 | kSRKeysSpace = 49, 81 | kSRKeysDeleteLeft = 51, 82 | kSRKeysDeleteRight = 117, 83 | kSRKeysPadClear = 71, 84 | kSRKeysLeftArrow = 123, 85 | kSRKeysRightArrow = 124, 86 | kSRKeysUpArrow = 126, 87 | kSRKeysDownArrow = 125, 88 | kSRKeysSoutheastArrow = 119, 89 | kSRKeysNorthwestArrow = 115, 90 | kSRKeysEscape = 53, 91 | kSRKeysPageDown = 121, 92 | kSRKeysPageUp = 116, 93 | kSRKeysReturnR2L = 36, 94 | kSRKeysReturn = 76, 95 | kSRKeysTabRight = 48, 96 | kSRKeysHelp = 114 97 | }; 98 | 99 | #pragma mark - 100 | #pragma mark Macros 101 | 102 | // Localization macros, for use in any bundle 103 | #define SRLoc(key) SRLocalizedString(key, nil) 104 | #define SRLocalizedString(key, comment) NSLocalizedStringFromTableInBundle(key, @"ShortcutRecorder", [NSBundle bundleForClass: [SRDummyClass class]], comment) 105 | 106 | // Image macros, for use in any bundle 107 | //#define SRImage(name) [[[NSImage alloc] initWithContentsOfFile: [[NSBundle bundleForClass: [self class]] pathForImageResource: name]] autorelease] 108 | #define SRResIndImage(name) [SRSharedImageProvider supportingImageWithName:name] 109 | #define SRImage(name) SRResIndImage(name) 110 | 111 | //#define SRCommonWriteDebugImagery 112 | 113 | // Macros for glyps 114 | #define SRInt(x) [NSNumber numberWithInteger:x] 115 | #define SRChar(x) [NSString stringWithFormat: @"%C", (unichar)x] 116 | 117 | // Some default values 118 | #define ShortcutRecorderEmptyFlags 0 119 | #define ShortcutRecorderAllFlags ShortcutRecorderEmptyFlags | (NSCommandKeyMask | NSAlternateKeyMask | NSControlKeyMask | NSShiftKeyMask | NSFunctionKeyMask) 120 | #define ShortcutRecorderEmptyCode -1 121 | 122 | // These keys will cancel the recoding mode if not pressed with any modifier 123 | #define ShortcutRecorderEscapeKey 53 124 | #define ShortcutRecorderBackspaceKey 51 125 | #define ShortcutRecorderDeleteKey 117 126 | 127 | #pragma mark - 128 | #pragma mark Getting a string of the key combination 129 | 130 | // 131 | // ################### +- Returns string from keyCode like NSEvent's -characters 132 | // # EXPLANATORY # | +- Returns string from keyCode like NSEvent's -charactersUsingModifiers 133 | // # CHART # | | +- Returns fully readable and localized name of modifier (if modifier given) 134 | // ################### | | | +- Returns glyph of modifier (if modifier given) 135 | // SRString... X - - X 136 | // SRReadableString... X - X - 137 | // SRCharacter... - X - - 138 | // 139 | NSString * SRStringForKeyCode( NSInteger keyCode ); 140 | NSString * SRStringForCarbonModifierFlags( NSUInteger flags ); 141 | NSString * SRStringForCarbonModifierFlagsAndKeyCode( NSUInteger flags, NSInteger keyCode ); 142 | NSString * SRStringForCocoaModifierFlags( NSUInteger flags ); 143 | NSString * SRStringForCocoaModifierFlagsAndKeyCode( NSUInteger flags, NSInteger keyCode ); 144 | NSString * SRReadableStringForCarbonModifierFlagsAndKeyCode( NSUInteger flags, NSInteger keyCode ); 145 | NSString * SRReadableStringForCocoaModifierFlagsAndKeyCode( NSUInteger flags, NSInteger keyCode ); 146 | NSString *SRCharacterForKeyCodeAndCarbonFlags(NSInteger keyCode, NSUInteger carbonFlags); 147 | NSString *SRCharacterForKeyCodeAndCocoaFlags(NSInteger keyCode, NSUInteger cocoaFlags); 148 | 149 | #pragma mark Converting between Cocoa and Carbon modifier flags 150 | 151 | NSUInteger SRCarbonToCocoaFlags( NSUInteger carbonFlags ); 152 | NSUInteger SRCocoaToCarbonFlags( NSUInteger cocoaFlags ); 153 | 154 | #pragma mark - 155 | #pragma mark Animation pace function 156 | 157 | CGFloat SRAnimationEaseInOut(CGFloat t); 158 | 159 | #pragma mark - 160 | #pragma mark Inlines 161 | 162 | FOUNDATION_STATIC_INLINE KeyCombo SRMakeKeyCombo(NSInteger code, NSUInteger flags) { 163 | KeyCombo kc; 164 | kc.code = code; 165 | kc.flags = flags; 166 | return kc; 167 | } 168 | 169 | FOUNDATION_STATIC_INLINE BOOL SRIsSpecialKey(NSInteger keyCode) { 170 | return (keyCode == kSRKeysF1 || keyCode == kSRKeysF2 || keyCode == kSRKeysF3 || keyCode == kSRKeysF4 || keyCode == kSRKeysF5 || keyCode == kSRKeysF6 || keyCode == kSRKeysF7 || keyCode == kSRKeysF8 || keyCode == kSRKeysF9 || keyCode == kSRKeysF10 || keyCode == kSRKeysF11 || keyCode == kSRKeysF12 || keyCode == kSRKeysF13 || keyCode == kSRKeysF14 || keyCode == kSRKeysF15 || keyCode == kSRKeysF16 || keyCode == kSRKeysSpace || keyCode == kSRKeysDeleteLeft || keyCode == kSRKeysDeleteRight || keyCode == kSRKeysPadClear || keyCode == kSRKeysLeftArrow || keyCode == kSRKeysRightArrow || keyCode == kSRKeysUpArrow || keyCode == kSRKeysDownArrow || keyCode == kSRKeysSoutheastArrow || keyCode == kSRKeysNorthwestArrow || keyCode == kSRKeysEscape || keyCode == kSRKeysPageDown || keyCode == kSRKeysPageUp || keyCode == kSRKeysReturnR2L || keyCode == kSRKeysReturn || keyCode == kSRKeysTabRight || keyCode == kSRKeysHelp); 171 | } 172 | 173 | #pragma mark - 174 | #pragma mark Additions 175 | 176 | @interface NSAlert( SRAdditions ) 177 | + (NSAlert *) alertWithNonRecoverableError:(NSError *)error; 178 | @end 179 | 180 | #pragma mark - 181 | #pragma mark Image provider 182 | 183 | @interface SRSharedImageProvider : NSObject 184 | + (NSImage *)supportingImageWithName:(NSString *)name; 185 | @end 186 | -------------------------------------------------------------------------------- /Recent Menu/SRKeyCodeTransformer.h: -------------------------------------------------------------------------------- 1 | // 2 | // SRKeyCodeTransformer.h 3 | // ShortcutRecorder 4 | // 5 | // Copyright 2006-2007 Contributors. All rights reserved. 6 | // 7 | // License: BSD 8 | // 9 | // Contributors: 10 | // David Dauer 11 | // Jesper 12 | // Jamie Kirkpatrick 13 | 14 | #import 15 | 16 | @interface SRKeyCodeTransformer : NSValueTransformer {} @end 17 | -------------------------------------------------------------------------------- /Recent Menu/SRRecorderCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // SRRecorderCell.h 3 | // ShortcutRecorder 4 | // 5 | // Copyright 2006-2007 Contributors. All rights reserved. 6 | // 7 | // License: BSD 8 | // 9 | // Contributors: 10 | // David Dauer 11 | // Jesper 12 | // Jamie Kirkpatrick 13 | 14 | #import 15 | #import "SRCommon.h" 16 | 17 | #define SRMinWidth 50 18 | #define SRMaxHeight 22 19 | 20 | #define SRTransitionFPS 30.0f 21 | #define SRTransitionDuration 0.35f 22 | //#define SRTransitionDuration 2.35 23 | #define SRTransitionFrames (SRTransitionFPS*SRTransitionDuration) 24 | #define SRAnimationAxisIsY YES 25 | #define ShortcutRecorderNewStyleDrawing 26 | 27 | #define SRAnimationOffsetRect(X,Y) (SRAnimationAxisIsY ? NSOffsetRect(X,0.0f,-NSHeight(Y)) : NSOffsetRect(X,NSWidth(Y),0.0f)) 28 | 29 | @class SRRecorderControl, SRValidator; 30 | 31 | enum SRRecorderStyle { 32 | SRGradientBorderStyle = 0, 33 | SRGreyStyle = 1 34 | }; 35 | typedef enum SRRecorderStyle SRRecorderStyle; 36 | 37 | @interface SRRecorderCell : NSActionCell 38 | { 39 | NSGradient *recordingGradient; 40 | NSString *autosaveName; 41 | 42 | BOOL isRecording; 43 | BOOL mouseInsideTrackingArea; 44 | BOOL mouseDown; 45 | 46 | SRRecorderStyle style; 47 | 48 | BOOL isAnimating; 49 | CGFloat transitionProgress; 50 | BOOL isAnimatingNow; 51 | BOOL isAnimatingTowardsRecording; 52 | BOOL comboJustChanged; 53 | 54 | NSTrackingRectTag removeTrackingRectTag; 55 | NSTrackingRectTag snapbackTrackingRectTag; 56 | 57 | KeyCombo keyCombo; 58 | BOOL hasKeyChars; 59 | NSString *keyChars; 60 | NSString *keyCharsIgnoringModifiers; 61 | 62 | NSUInteger allowedFlags; 63 | NSUInteger requiredFlags; 64 | NSUInteger recordingFlags; 65 | 66 | BOOL allowsKeyOnly; 67 | BOOL escapeKeysRecord; 68 | 69 | NSSet *cancelCharacterSet; 70 | 71 | SRValidator *validator; 72 | 73 | IBOutlet id delegate; 74 | BOOL globalHotKeys; 75 | void *hotKeyModeToken; 76 | } 77 | 78 | - (void)resetTrackingRects; 79 | 80 | #pragma mark *** Aesthetics *** 81 | 82 | + (BOOL)styleSupportsAnimation:(SRRecorderStyle)style; 83 | 84 | - (BOOL)animates; 85 | - (void)setAnimates:(BOOL)an; 86 | - (SRRecorderStyle)style; 87 | - (void)setStyle:(SRRecorderStyle)nStyle; 88 | 89 | #pragma mark *** Delegate *** 90 | 91 | - (id)delegate; 92 | - (void)setDelegate:(id)aDelegate; 93 | 94 | #pragma mark *** Responder Control *** 95 | 96 | - (BOOL)becomeFirstResponder; 97 | - (BOOL)resignFirstResponder; 98 | 99 | #pragma mark *** Key Combination Control *** 100 | 101 | - (BOOL)performKeyEquivalent:(NSEvent *)theEvent; 102 | - (void)flagsChanged:(NSEvent *)theEvent; 103 | 104 | - (NSUInteger)allowedFlags; 105 | - (void)setAllowedFlags:(NSUInteger)flags; 106 | 107 | - (NSUInteger)requiredFlags; 108 | - (void)setRequiredFlags:(NSUInteger)flags; 109 | 110 | - (BOOL)allowsKeyOnly; 111 | - (void)setAllowsKeyOnly:(BOOL)nAllowsKeyOnly; 112 | - (void)setAllowsKeyOnly:(BOOL)nAllowsKeyOnly escapeKeysRecord:(BOOL)nEscapeKeysRecord; 113 | - (BOOL)escapeKeysRecord; 114 | - (void)setEscapeKeysRecord:(BOOL)nEscapeKeysRecord; 115 | 116 | - (BOOL)canCaptureGlobalHotKeys; 117 | - (void)setCanCaptureGlobalHotKeys:(BOOL)inState; 118 | 119 | - (KeyCombo)keyCombo; 120 | - (void)setKeyCombo:(KeyCombo)aKeyCombo; 121 | 122 | #pragma mark *** Autosave Control *** 123 | 124 | - (NSString *)autosaveName; 125 | - (void)setAutosaveName:(NSString *)aName; 126 | 127 | // Returns the displayed key combination if set 128 | - (NSString *)keyComboString; 129 | 130 | - (NSString *)keyChars; 131 | - (NSString *)keyCharsIgnoringModifiers; 132 | 133 | @end 134 | 135 | // Delegate Methods 136 | @interface NSObject (SRRecorderCellDelegate) 137 | - (BOOL)shortcutRecorderCell:(SRRecorderCell *)aRecorderCell isKeyCode:(NSInteger)keyCode andFlagsTaken:(NSUInteger)flags reason:(NSString **)aReason; 138 | - (void)shortcutRecorderCell:(SRRecorderCell *)aRecorderCell keyComboDidChange:(KeyCombo)newCombo; 139 | @end 140 | -------------------------------------------------------------------------------- /Recent Menu/SRRecorderControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // SRRecorderControl.h 3 | // ShortcutRecorder 4 | // 5 | // Copyright 2006-2007 Contributors. All rights reserved. 6 | // 7 | // License: BSD 8 | // 9 | // Contributors: 10 | // David Dauer 11 | // Jesper 12 | // Jamie Kirkpatrick 13 | 14 | #import 15 | #import "SRRecorderCell.h" 16 | 17 | @interface SRRecorderControl : NSControl 18 | { 19 | IBOutlet id delegate; 20 | } 21 | 22 | #pragma mark *** Aesthetics *** 23 | - (BOOL)animates; 24 | - (void)setAnimates:(BOOL)an; 25 | - (SRRecorderStyle)style; 26 | - (void)setStyle:(SRRecorderStyle)nStyle; 27 | 28 | #pragma mark *** Delegate *** 29 | - (id)delegate; 30 | - (void)setDelegate:(id)aDelegate; 31 | 32 | #pragma mark *** Key Combination Control *** 33 | 34 | - (NSUInteger)allowedFlags; 35 | - (void)setAllowedFlags:(NSUInteger)flags; 36 | 37 | - (BOOL)allowsKeyOnly; 38 | - (void)setAllowsKeyOnly:(BOOL)nAllowsKeyOnly escapeKeysRecord:(BOOL)nEscapeKeysRecord; 39 | - (BOOL)escapeKeysRecord; 40 | 41 | - (BOOL)canCaptureGlobalHotKeys; 42 | - (void)setCanCaptureGlobalHotKeys:(BOOL)inState; 43 | 44 | - (NSUInteger)requiredFlags; 45 | - (void)setRequiredFlags:(NSUInteger)flags; 46 | 47 | - (KeyCombo)keyCombo; 48 | - (void)setKeyCombo:(KeyCombo)aKeyCombo; 49 | 50 | - (NSString *)keyChars; 51 | - (NSString *)keyCharsIgnoringModifiers; 52 | 53 | #pragma mark *** Autosave Control *** 54 | 55 | - (NSString *)autosaveName; 56 | - (void)setAutosaveName:(NSString *)aName; 57 | 58 | #pragma mark - 59 | 60 | // Returns the displayed key combination if set 61 | - (NSString *)keyComboString; 62 | 63 | #pragma mark *** Conversion Methods *** 64 | 65 | - (NSUInteger)cocoaToCarbonFlags:(NSUInteger)cocoaFlags; 66 | - (NSUInteger)carbonToCocoaFlags:(NSUInteger)carbonFlags; 67 | 68 | #pragma mark *** Binding Methods *** 69 | 70 | - (NSDictionary *)objectValue; 71 | - (void)setObjectValue:(NSDictionary *)shortcut; 72 | 73 | @end 74 | 75 | // Delegate Methods 76 | @interface NSObject (SRRecorderDelegate) 77 | - (BOOL)shortcutRecorder:(SRRecorderControl *)aRecorder isKeyCode:(NSInteger)keyCode andFlagsTaken:(NSUInteger)flags reason:(NSString **)aReason; 78 | - (void)shortcutRecorder:(SRRecorderControl *)aRecorder keyComboDidChange:(KeyCombo)newKeyCombo; 79 | @end 80 | -------------------------------------------------------------------------------- /Recent Menu/SRValidator.h: -------------------------------------------------------------------------------- 1 | // 2 | // SRValidator.h 3 | // ShortcutRecorder 4 | // 5 | // Copyright 2006-2007 Contributors. All rights reserved. 6 | // 7 | // License: BSD 8 | // 9 | // Contributors: 10 | // David Dauer 11 | // Jesper 12 | // Jamie Kirkpatrick 13 | 14 | #import 15 | 16 | @interface SRValidator : NSObject { 17 | id delegate; 18 | } 19 | 20 | - (id) initWithDelegate:(id)theDelegate; 21 | 22 | - (BOOL) isKeyCode:(NSInteger)keyCode andFlagsTaken:(NSUInteger)flags error:(NSError **)error; 23 | - (BOOL) isKeyCode:(NSInteger)keyCode andFlags:(NSUInteger)flags takenInMenu:(NSMenu *)menu error:(NSError **)error; 24 | 25 | - (id) delegate; 26 | - (void) setDelegate: (id) theDelegate; 27 | 28 | @end 29 | 30 | #pragma mark - 31 | 32 | @interface NSObject( SRValidation ) 33 | - (BOOL) shortcutValidator:(SRValidator *)validator isKeyCode:(NSInteger)keyCode andFlagsTaken:(NSUInteger)flags reason:(NSString **)aReason; 34 | @end 35 | -------------------------------------------------------------------------------- /Recent Menu/Search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/Search.png -------------------------------------------------------------------------------- /Recent Menu/action.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/action.png -------------------------------------------------------------------------------- /Recent Menu/de.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1343\cocoasubrtf140 2 | {\fonttbl\f0\fnil\fcharset0 LucidaGrande;} 3 | {\colortbl;\red255\green255\blue255;\red0\green0\blue153;} 4 | \paperw12240\paperh15840\viewkind0 5 | \deftab720 6 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\pardirnatural\qc 7 | 8 | \f0\b\fs20 \cf0 \expnd0\expndtw0\kerning0 9 | \ 10 | 11 | \b0 \expnd0\expndtw0\kerning0 12 | Version 1.2.4 (Oktober 2014)\ 13 | \ 14 | von Tim Schr\'f6der\ 15 | \cf2 \expnd0\expndtw0\kerning0 16 | \ul \ulc2 \ 17 | {\field{\*\fldinst{HYPERLINK "http://www.timschroeder.net"}}{\fldrslt \expnd0\expndtw0\kerning0 18 | http://www.timschroeder.net}}\ 19 | \pard\pardeftab720 20 | \cf0 \kerning1\expnd0\expndtw0 \ulnone \ 21 | \pard\pardeftab720\qc 22 | \cf0 \ 23 | Copyright 2011-2014 Tim Schr\'f6der\ 24 | \ 25 | Hiermit wird unentgeltlich jeder Person, die eine Kopie der Software und der zugeh\'f6rigen Dokumentationen (die "Software") erh\'e4lt, die Erlaubnis erteilt, sie uneingeschr\'e4nkt zu benutzen, inklusive und ohne Ausnahme dem Recht, sie zu verwenden, kopieren, \'e4ndern, fusionieren, verlegen, verbreiten, unterlizenzieren und/oder zu verkaufen, und Personen, die diese Software erhalten, diese Rechte zu geben, unter den folgenden Bedingungen:\ 26 | \ 27 | Der obige Urheberrechtsvermerk und dieser Erlaubnisvermerk sind in allen Kopien oder Teilkopien der Software beizulegen.\ 28 | \ 29 | DIE SOFTWARE WIRD OHNE JEDE AUSDR\'dcCKLICHE ODER IMPLIZIERTE GARANTIE BEREITGESTELLT, EINSCHLIESSLICH DER GARANTIE ZUR BENUTZUNG F\'dcR DEN VORGESEHENEN ODER EINEM BESTIMMTEN ZWECK SOWIE JEGLICHER RECHTSVERLETZUNG, JEDOCH NICHT DARAUF BESCHR\'c4NKT. IN KEINEM FALL SIND DIE AUTOREN ODER COPYRIGHTINHABER F\'dcR JEGLICHEN SCHADEN ODER SONSTIGE ANSPR\'dcCHE HAFTBAR ZU MACHEN, OB INFOLGE DER ERF\'dcLLUNG EINES VERTRAGES, EINES DELIKTES ODER ANDERS IM ZUSAMMENHANG MIT DER SOFTWARE ODER SONSTIGER VERWENDUNG DER SOFTWARE ENTSTANDEN.\ 30 | \pard\pardeftab720 31 | \cf0 \ 32 | \ 33 | \ 34 | \pard\pardeftab720\qc 35 | \cf0 Recent Menu verwendet Code folgender Open-Source-Projekte:\ 36 | \ 37 | \ 38 | \pard\pardeftab720\qc 39 | 40 | \b \cf0 DBPrefsWindowController 41 | \b0 \ 42 | \pard\pardeftab720 43 | \cf0 \ 44 | \pard\pardeftab720\qc 45 | \cf0 Copyright 2007 Dave Barton. Some rights reserved. \ 46 | http://www.Mere-Mortal-Software.com/blog/\ 47 | \ 48 | \pard\tx560\pardeftab560\pardirnatural 49 | \cf0 \ 50 | \pard\tx560\pardeftab560\pardirnatural\qc 51 | 52 | \b \cf0 DDHotKey 53 | \b0 \ 54 | \ 55 | Copyright (c) 2010, Dave DeLong \ 56 | \ 57 | License Text:\ 58 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. The software is provided "as is", without warranty of any kind, including all implied warranties of merchantability and fitness. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.\ 59 | \ 60 | \ 61 | 62 | \b ShortcutRecorder 63 | \b0 \ 64 | \ 65 | Copyright (c) 2006, contributors to ShortcutRecorder.\ 66 | http://code.google.com/p/shortcutrecorder/\ 67 | \ 68 | All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\ 69 | \ 70 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\ 71 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\ 72 | * The name of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission.\ 73 | \ 74 | THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\ 75 | \ 76 | \ 77 | ***} -------------------------------------------------------------------------------- /Recent Menu/de.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/de.lproj/Localizable.strings -------------------------------------------------------------------------------- /Recent Menu/de.lproj/ShortcutRecorder.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/de.lproj/ShortcutRecorder.strings -------------------------------------------------------------------------------- /Recent Menu/defaultfilters.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | title 7 | All 8 | type 9 | Filename 10 | value 11 | 12 | hidden 13 | NO 14 | enabled 15 | YES 16 | editable 17 | NO 18 | showcount 19 | 10 20 | tag 21 | 0 22 | 23 | 24 | title 25 | iWork Files 26 | type 27 | UTI 28 | value 29 | com.apple.iwork.* 30 | hidden 31 | NO 32 | enabled 33 | NO 34 | editable 35 | YES 36 | showcount 37 | 10 38 | tag 39 | 1 40 | 41 | 42 | title 43 | Source Code 44 | type 45 | UTI 46 | value 47 | public.source-code 48 | hidden 49 | NO 50 | enabled 51 | NO 52 | editable 53 | YES 54 | showcount 55 | 10 56 | tag 57 | 2 58 | 59 | 60 | title 61 | Documents 62 | type 63 | UTI 64 | value 65 | public.content 66 | hidden 67 | NO 68 | enabled 69 | NO 70 | editable 71 | YES 72 | showcount 73 | 10 74 | tag 75 | 3 76 | 77 | 78 | title 79 | PDF 80 | type 81 | UTI 82 | value 83 | com.adobe.pdf 84 | hidden 85 | NO 86 | enabled 87 | NO 88 | editable 89 | YES 90 | showcount 91 | 10 92 | tag 93 | 4 94 | 95 | 96 | title 97 | Movies 98 | type 99 | UTI 100 | value 101 | public.movie 102 | hidden 103 | NO 104 | enabled 105 | NO 106 | editable 107 | YES 108 | showcount 109 | 10 110 | tag 111 | 5 112 | 113 | 114 | title 115 | Images 116 | type 117 | UTI 118 | value 119 | public.image 120 | hidden 121 | NO 122 | enabled 123 | NO 124 | editable 125 | YES 126 | showcount 127 | 10 128 | tag 129 | 6 130 | 131 | 132 | title 133 | Folders 134 | type 135 | UTI 136 | value 137 | public.folder 138 | hidden 139 | NO 140 | enabled 141 | YES 142 | editable 143 | YES 144 | showcount 145 | 10 146 | tag 147 | 7 148 | 149 | 150 | title 151 | Apps 152 | type 153 | UTI 154 | value 155 | com.apple.application-bundle 156 | hidden 157 | NO 158 | enabled 159 | YES 160 | editable 161 | YES 162 | showcount 163 | 10 164 | tag 165 | 8 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /Recent Menu/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1343\cocoasubrtf140 2 | {\fonttbl\f0\fnil\fcharset0 LucidaGrande;} 3 | {\colortbl;\red255\green255\blue255;\red0\green0\blue153;} 4 | \paperw12240\paperh15840\viewkind0 5 | \deftab720 6 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\pardirnatural\qc 7 | 8 | \f0\b\fs20 \cf0 \expnd0\expndtw0\kerning0 9 | \ 10 | 11 | \b0 \expnd0\expndtw0\kerning0 12 | Version 1.2.4 (October 2014) \ 13 | \ 14 | by Tim Schr\'f6der\ 15 | \cf2 \expnd0\expndtw0\kerning0 16 | \ul \ulc2 \ 17 | {\field{\*\fldinst{HYPERLINK "http://www.timschroeder.net"}}{\fldrslt \expnd0\expndtw0\kerning0 18 | http://www.timschroeder.net}}\ 19 | \pard\pardeftab720 20 | \cf0 \kerning1\expnd0\expndtw0 \ulnone \ 21 | \ 22 | \pard\pardeftab720\qc 23 | \cf0 Copyright 2011-2014 Tim Schr\'f6der\ 24 | \ 25 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\ 26 | \ 27 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\ 28 | \ 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\ 30 | \pard\pardeftab720 31 | \cf0 \ 32 | \ 33 | \ 34 | \pard\pardeftab720\qc 35 | \cf0 Recent Menu uses code from several open source projects which is acknowledged hereby:\ 36 | \ 37 | \ 38 | \pard\pardeftab720\qc 39 | 40 | \b \cf0 DBPrefsWindowController 41 | \b0 \ 42 | \pard\pardeftab720 43 | \cf0 \ 44 | \pard\pardeftab720\qc 45 | \cf0 Copyright 2007 Dave Barton. Some rights reserved. \ 46 | http://www.Mere-Mortal-Software.com/blog/\ 47 | \pard\tx560\pardeftab560\pardirnatural\qc 48 | \cf0 \ 49 | \ 50 | 51 | \b DDHotKey 52 | \b0 \ 53 | \ 54 | Copyright (c) 2010, Dave DeLong \ 55 | \ 56 | License Text:\ 57 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. The software is provided "as is", without warranty of any kind, including all implied warranties of merchantability and fitness. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.\ 58 | \ 59 | \ 60 | 61 | \b ShortcutRecorder 62 | \b0 \ 63 | \ 64 | Copyright (c) 2006, contributors to ShortcutRecorder.\ 65 | http://code.google.com/p/shortcutrecorder/\ 66 | \ 67 | All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\ 68 | \ 69 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\ 70 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\ 71 | * The name of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission.\ 72 | \ 73 | THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\ 74 | \ 75 | \ 76 | ***} -------------------------------------------------------------------------------- /Recent Menu/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/en.lproj/Localizable.strings -------------------------------------------------------------------------------- /Recent Menu/en.lproj/ShortcutRecorder.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/en.lproj/ShortcutRecorder.strings -------------------------------------------------------------------------------- /Recent Menu/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Recent Menu 4 | // 5 | // Created by Tim Schröder on 09.02.11. 6 | // Copyright 2011 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char **) argv); 14 | } 15 | -------------------------------------------------------------------------------- /Recent Menu/menuitem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/menuitem.png -------------------------------------------------------------------------------- /Recent Menu/menuitem@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/menuitem@2x.png -------------------------------------------------------------------------------- /Recent Menu/rmicon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/Recent Menu/rmicon.icns -------------------------------------------------------------------------------- /RecentMenu-Helper/RecentMenu-Helper/RecentMenu-Helper-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.timschroeder.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSHumanReadableCopyright 28 | Copyright © 2012 Tim Schröder. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | LSBackgroundOnly 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /RecentMenu-Helper/RecentMenu-Helper/RecentMenu-Helper-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'RecentMenu-Helper' target in the 'RecentMenu-Helper' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /RecentMenu-Helper/RecentMenu-Helper/RecentMenu-Helper.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /RecentMenu-Helper/RecentMenu-Helper/TSAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // TSAppDelegate.h 3 | // RecentMenu-Helper 4 | // 5 | // Created by Tim Schröder on 12.07.12. 6 | // Copyright (c) 2012 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TSAppDelegate : NSObject 12 | 13 | @property (assign) IBOutlet NSWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /RecentMenu-Helper/RecentMenu-Helper/TSAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // TSAppDelegate.m 3 | // RecentMenu-Helper 4 | // 5 | // Created by Tim Schröder on 12.07.12. 6 | // Copyright (c) 2012 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import "TSAppDelegate.h" 10 | 11 | @implementation TSAppDelegate 12 | 13 | 14 | #define mainAppBundleIdentifier @"com.timschroeder.recentmenu" 15 | #define mainAppName @"Recent Menu" 16 | 17 | @synthesize window = _window; 18 | 19 | - (void)dealloc 20 | { 21 | [super dealloc]; 22 | } 23 | 24 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 25 | { 26 | // Check if main app is already running 27 | BOOL alreadyRunning = NO; 28 | NSArray *running = [[NSWorkspace sharedWorkspace] runningApplications]; 29 | for (NSRunningApplication *app in running) { 30 | if ([[app bundleIdentifier] isEqualToString:mainAppBundleIdentifier]) { 31 | alreadyRunning = YES; 32 | } 33 | } 34 | 35 | if (!alreadyRunning) { 36 | // Launch Main App 37 | NSString *path = [[NSBundle mainBundle] bundlePath]; 38 | NSArray *p = [path pathComponents]; 39 | NSMutableArray *pathComponents = [NSMutableArray arrayWithArray:p]; 40 | [pathComponents removeLastObject]; 41 | [pathComponents removeLastObject]; 42 | [pathComponents removeLastObject]; 43 | [pathComponents addObject:@"MacOS"]; 44 | [pathComponents addObject:mainAppName]; 45 | NSString *newPath = [NSString pathWithComponents:pathComponents]; 46 | [[NSWorkspace sharedWorkspace] launchApplication:newPath]; 47 | } 48 | [NSApp terminate:nil]; 49 | } 50 | 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /RecentMenu-Helper/RecentMenu-Helper/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /RecentMenu-Helper/RecentMenu-Helper/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /RecentMenu-Helper/RecentMenu-Helper/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // RecentMenu-Helper 4 | // 5 | // Created by Tim Schröder on 12.07.12. 6 | // Copyright (c) 2012 Tim Schröder. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char **)argv); 14 | } 15 | -------------------------------------------------------------------------------- /recentmenu-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timschroederme/recentmenu/df9090049cb59c17a21d54e84a8fcb5b934533f3/recentmenu-screenshot.png --------------------------------------------------------------------------------