Skip to content

Commit

Permalink
Do not include themes in the View menu when hideFromUser is true
Browse files Browse the repository at this point in the history
  • Loading branch information
sorbits committed Nov 22, 2018
1 parent 42cdb1c commit 95da575
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Applications/TextMate/src/AppController Menus.mm
Expand Up @@ -72,6 +72,9 @@ - (void)themesMenuNeedsUpdate:(NSMenu*)aMenu
std::map<std::string, std::multimap<std::string, bundles::item_ptr, text::less_t>> ordered;
for(auto const& item : bundles::query(bundles::kFieldAny, NULL_STR, scope::wildcard, bundles::kItemTypeTheme))
{
if(item->hidden_from_user())
continue;

auto semanticClass = text::split(item->value_for_field(bundles::kFieldSemanticClass), ".");
std::string themeClass = semanticClass.size() > 2 && semanticClass.front() == "theme" ? semanticClass[1] : "unspecified";
ordered[themeClass].emplace(item->name(), item);
Expand Down

0 comments on commit 95da575

Please sign in to comment.