Revision: 29679
http://sourceforge.net/p/bibdesk/svn/29679
Author: hofman
Date: 2025-10-06 15:35:29 +0000 (Mon, 06 Oct 2025)
Log Message:
-----------
call specific menu update methods
Modified Paths:
--------------
trunk/bibdesk/BibDocument_UI.m
trunk/bibdesk/NSMenu_BDSKExtensions.m
Modified: trunk/bibdesk/BibDocument_UI.m
===================================================================
--- trunk/bibdesk/BibDocument_UI.m 2025-10-06 15:02:08 UTC (rev 29678)
+++ trunk/bibdesk/BibDocument_UI.m 2025-10-06 15:35:29 UTC (rev 29679)
@@ -792,6 +792,23 @@
}
}
+- (void)updateSharingMenu:(NSMenu *)menu {
+ // remove all items; then fill it with the items from the current document
+ [menu removeAllItems];
+
+ NSArray *services = [self sharingServices];
+ if ([services count] > 0) {
+ for (NSSharingService *service in services) {
+ NSMenuItem *item = [menu addItemWithTitle:[service title]
action:@selector(share:) keyEquivalent:@""];
+ [item setTarget:self];
+ [item setImage:[service image]];
+ [item setRepresentedObject:service];
+ }
+ } else {
+ [menu addItemWithTitle:NSLocalizedString(@"Nothing Selected", @"")
action:NULL keyEquivalent:@""];
+ }
+}
+
- (void)changeRating:(id)sender {
BibItem *pub = [[self clickedOrSelectedPublications] firstObject];
NSString *field = [[sender cell] representedObject];
@@ -892,8 +909,8 @@
[menu addItem:[item copy]];
}
}else{
- [self menuNeedsUpdate:alternateCopyMenu];
- [self menuNeedsUpdate:sharingMenu];
+ [self updateCopyAsMenu:alternateCopyMenu];
+ [self updateSharingMenu:sharingMenu];
[menu addItemsFromMenu:actionMenu];
[menu removeItemAtIndex:0];
if ([tcId isRatingField] && [tableView
numberOfClickedOrSelectedRows] == 1 && [self
hasGroupTypeSelected:BDSKExternalGroupType] == NO){
@@ -998,23 +1015,6 @@
}
}
-- (void)updateSharingMenu:(NSMenu *)menu {
- // remove all items; then fill it with the items from the current document
- [menu removeAllItems];
-
- NSArray *services = [self sharingServices];
- if ([services count] > 0) {
- for (NSSharingService *service in services) {
- NSMenuItem *item = [menu addItemWithTitle:[service title]
action:@selector(share:) keyEquivalent:@""];
- [item setTarget:self];
- [item setImage:[service image]];
- [item setRepresentedObject:service];
- }
- } else {
- [menu addItemWithTitle:NSLocalizedString(@"Nothing Selected", @"")
action:NULL keyEquivalent:@""];
- }
-}
-
- (void)menuNeedsUpdate:(NSMenu *)menu {
if (menu == actionMenu)
[self updateActionMenu:menu];
@@ -1029,7 +1029,7 @@
else if (menu == [groupOutlineView menu])
[self updateGroupTableMenu:menu];
else if (menu == sharingMenu)
- [self updateSharingMenu:menu];
+ [self updateSharingMenu:menu];
}
#pragma mark SplitView delegate
Modified: trunk/bibdesk/NSMenu_BDSKExtensions.m
===================================================================
--- trunk/bibdesk/NSMenu_BDSKExtensions.m 2025-10-06 15:02:08 UTC (rev
29678)
+++ trunk/bibdesk/NSMenu_BDSKExtensions.m 2025-10-06 15:35:29 UTC (rev
29679)
@@ -147,7 +147,7 @@
return sharedOpenWithController;
}
-- (id)copyWithZone:(NSZone *)zone{ return self; }
+- (id) WithZone:(NSZone *)zone{ return self; }
- (instancetype)initWithCoder:(NSCoder *)decoder {
self = nil;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit