mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 21:42:32 +00:00
removed obsolte code. Better display of trash context bar
This commit is contained in:
@@ -110,18 +110,14 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
|
|||||||
|
|
||||||
- (void)_showEntryHistory:(NSNotification *)notification {
|
- (void)_showEntryHistory:(NSNotification *)notification {
|
||||||
self.activeTab = MPContextTabHistory;
|
self.activeTab = MPContextTabHistory;
|
||||||
[self _updateBindings];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_didChangeCurrentItem:(NSNotification *)notification {
|
- (void)_didChangeCurrentItem:(NSNotification *)notification {
|
||||||
MPDocument *document = [notification object];
|
MPDocument *document = notification.object;
|
||||||
|
KPKGroup *group = document.selectedGroups.firstObject;
|
||||||
KPKNode *node = document.selectedNodes.count == 1 ? document.selectedNodes.firstObject : nil;
|
BOOL showTrash = document.tree.metaData.useTrash && group.isTrash;
|
||||||
|
|
||||||
BOOL showTrash = document.tree.metaData.useTrash && (node.isTrashed || node.isTrash);
|
|
||||||
if(showTrash && ! document.hasSearch) {
|
if(showTrash && ! document.hasSearch) {
|
||||||
self.activeTab = MPContextTabTrash;
|
self.activeTab = MPContextTabTrash;
|
||||||
[self _updateBindings];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,10 +132,6 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
|
|||||||
|
|
||||||
|
|
||||||
#pragma mark UI Helper
|
#pragma mark UI Helper
|
||||||
- (void)_updateBindings {
|
|
||||||
// only the entry view has to be bound, the rest not
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)_updateFilterButtons {
|
- (void)_updateFilterButtons {
|
||||||
MPDocument *document = [[self windowController] document];
|
MPDocument *document = [[self windowController] document];
|
||||||
MPEntrySearchFlags currentFlags = document.searchContext.searchFlags;
|
MPEntrySearchFlags currentFlags = document.searchContext.searchFlags;
|
||||||
|
|||||||
Reference in New Issue
Block a user