Refactoring Status Menu
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
#import "SettingsGeneral.h"
|
||||
#import "AppHook.h"
|
||||
#import "BarMenu.h"
|
||||
#import "BarStatusItem.h"
|
||||
#import "UserPrefs.h"
|
||||
#import "StoreCoordinator.h"
|
||||
#import "Constants.h"
|
||||
@@ -62,13 +62,13 @@
|
||||
|
||||
- (IBAction)fixCache:(NSButton *)sender {
|
||||
NSUInteger deleted = [StoreCoordinator deleteUnreferenced];
|
||||
[StoreCoordinator restoreFeedCountsAndIndexPaths];
|
||||
[StoreCoordinator restoreFeedIndexPaths];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kNotificationTotalUnreadCountReset object:nil];
|
||||
NSLog(@"Removed %lu unreferenced core data entries.", deleted);
|
||||
}
|
||||
|
||||
- (IBAction)changeMenuBarIconSetting:(NSButton*)sender {
|
||||
[[(AppHook*)NSApp barMenu] updateBarIcon];
|
||||
[[(AppHook*)NSApp statusItem] updateBarIcon];
|
||||
}
|
||||
|
||||
- (IBAction)changeHttpApplication:(NSPopUpButton *)sender {
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
+ (NSString*)getHttpApplication;
|
||||
+ (void)setHttpApplication:(NSString*)bundleID;
|
||||
+ (void)openURLsWithPreferredBrowser:(NSArray<NSURL*>*)urls;
|
||||
|
||||
+ (NSUInteger)openFewLinksLimit; // Change with: 'defaults write de.relikd.baRSS openFewLinksLimit -int 10'
|
||||
+ (NSUInteger)shortArticleNamesLimit; // Change with: 'defaults write de.relikd.baRSS shortArticleNamesLimit -int 50'
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#import "UserPrefs.h"
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@implementation UserPrefs
|
||||
|
||||
@@ -54,6 +55,16 @@
|
||||
[[NSUserDefaults standardUserDefaults] setObject:bundleID forKey:@"defaultHttpApplication"];
|
||||
}
|
||||
|
||||
/**
|
||||
Open web links in default browser or a browser the user selected in the preferences.
|
||||
|
||||
@param urls A list of @c NSURL objects that will be opened immediatelly in bulk.
|
||||
*/
|
||||
+ (void)openURLsWithPreferredBrowser:(NSArray<NSURL*>*)urls {
|
||||
if (urls.count == 0) return;
|
||||
[[NSWorkspace sharedWorkspace] openURLs:urls withAppBundleIdentifier:[self getHttpApplication] options:NSWorkspaceLaunchDefault additionalEventParamDescriptor:nil launchIdentifiers:nil];
|
||||
}
|
||||
|
||||
#pragma mark - Hidden Plist Properties -
|
||||
|
||||
/// @return The limit on how many links should be opened at the same time, if user holds the option key.
|
||||
|
||||
Reference in New Issue
Block a user