mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Use OakIsEmptyString where appropriate
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#import "NSMenuItem Additions.h"
|
||||
#import "NSView Additions.h"
|
||||
#import "OakFileIconImage.h"
|
||||
#import <OakFoundation/OakFoundation.h>
|
||||
#import <OakFoundation/NSString Additions.h>
|
||||
#import <OakFoundation/NSArray Additions.h>
|
||||
#import <oak/oak.h>
|
||||
@@ -793,7 +794,7 @@ layout_metrics_t::raw_layer_t layout_metrics_t::parse_layer (NSDictionary* item)
|
||||
// We use the path as an identifer since this is more unique than the title
|
||||
// Ideally we should introduce a real (unique) identifier, like the document’s UUID
|
||||
NSString* tabIdentifier = tabPaths[previousShowAsLastTab];
|
||||
if([tabIdentifier isEqualToString:@""])
|
||||
if(OakIsEmptyString(tabIdentifier))
|
||||
previousShowAsLastTab = [paths indexOfObject:tabTitles[previousShowAsLastTab]];
|
||||
else previousShowAsLastTab = [paths indexOfObject:tabIdentifier];
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#import <OakAppKit/OakPopOutAnimation.h>
|
||||
#import <OakAppKit/OakToolTip.h>
|
||||
#import <OakFoundation/NSString Additions.h>
|
||||
#import <OakFoundation/OakFoundation.h>
|
||||
#import <OakFoundation/OakFindProtocol.h>
|
||||
#import <OakFoundation/OakTimer.h>
|
||||
#import <OakSystem/application.h>
|
||||
@@ -1718,7 +1719,7 @@ static void update_menu_key_equivalents (NSMenu* menu, action_to_key_t const& ac
|
||||
{
|
||||
SEL action = [item action];
|
||||
action_to_key_t::const_iterator it = actionToKey.find(sel_getName(action));
|
||||
if(it != actionToKey.end() && [[item keyEquivalent] isEqualToString:@""])
|
||||
if(it != actionToKey.end() && OakIsEmptyString([item keyEquivalent]))
|
||||
[item setKeyEquivalentCxxString:it->second];
|
||||
|
||||
update_menu_key_equivalents([item submenu], actionToKey);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#import "BundlesPreferences.h"
|
||||
#import <BundlesManager/BundlesManager.h>
|
||||
#import <OakFoundation/OakFoundation.h>
|
||||
#import <OakFoundation/NSDate Additions.h>
|
||||
#import <OakFoundation/NSString Additions.h>
|
||||
#import <MGScopeBar/MGScopeBar.h>
|
||||
@@ -50,7 +51,7 @@ static std::string textify (std::string str)
|
||||
bundles_db::bundle_ptr bundle = [_bundlesManager bundleAtIndex:i];
|
||||
if(enabledCategories.empty() || enabledCategories.find(bundle->category()) != enabledCategories.end())
|
||||
{
|
||||
if(!filterString || [filterString isEqualToString:@""])
|
||||
if(OakIsEmptyString(filterString))
|
||||
{
|
||||
bundles.push_back(bundle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user