We have to manually update items on the Bookmarks menu and its submenus, because we turn auto-enabling of items off for this menu (presumably, for performance with lots of bookmarks).

This commit is contained in:
sfraser%netscape.com 2002-07-05 23:50:08 +00:00
Родитель 9954ed21d6
Коммит 9039b8cf97
26 изменённых файлов: 112 добавлений и 18 удалений

3
camino/English.lproj/MainMenu.nib/classes.nib сгенерированный
Просмотреть файл

@ -44,11 +44,14 @@
CLASS = MainController;
LANGUAGE = ObjC;
OUTLETS = {
mAddBookmarkMenuItem = NSMenuItem;
mApplication = NSApplication;
mBookmarksMenu = NSMenu;
mBookmarksToolbarMenuItem = NSMenuItem;
mCloseTabMenuItem = NSMenuItem;
mCloseWindowMenuItem = NSMenuItem;
mCreateBookmarksFolderMenuItem = NSMenuItem;
mCreateBookmarksSeparatorMenuItem = NSMenuItem;
mFilterList = NSPopUpButton;
mFilterView = NSView;
mOfflineMenuItem = NSMenuItem;

6
camino/English.lproj/MainMenu.nib/info.nib сгенерированный
Просмотреть файл

@ -3,7 +3,7 @@
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>96 99 356 240 0 0 1152 746 </string>
<string>95 100 356 240 0 0 1152 746 </string>
<key>IBEditorPositions</key>
<dict>
<key>266</key>
@ -29,6 +29,10 @@
</dict>
<key>IBLastGroupID</key>
<string>2</string>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
</array>
<key>IBSystem Version</key>
<string>5S66</string>
</dict>

Двоичные данные
camino/English.lproj/MainMenu.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -60,6 +60,9 @@ class BookmarksService;
IBOutlet NSMenu* mBookmarksMenu;
IBOutlet NSMenuItem* mBookmarksToolbarMenuItem;
IBOutlet NSMenuItem* mAddBookmarkMenuItem;
IBOutlet NSMenuItem* mCreateBookmarksFolderMenuItem;
IBOutlet NSMenuItem* mCreateBookmarksSeparatorMenuItem;
BOOL mOffline;
@ -128,6 +131,8 @@ class BookmarksService;
- (void)adjustCloseTabMenuItemKeyEquivalent:(BOOL)inHaveTabs;
- (void)fixCloseMenuItemKeyEquivalents;
- (void)adjustBookmarksMenuItemsEnabling:(BOOL)inBrowserWindowFrontmost;
-(NSWindow*)getFrontmostBrowserWindow;
- (MVPreferencesController *)preferencesController;

Просмотреть файл

@ -327,6 +327,13 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
[[[mApplication mainWindow] windowController] home: aSender];
}
- (void)adjustBookmarksMenuItemsEnabling:(BOOL)inBrowserWindowFrontmost;
{
[mAddBookmarkMenuItem setEnabled:inBrowserWindowFrontmost];
[mCreateBookmarksFolderMenuItem setEnabled:inBrowserWindowFrontmost];
[mCreateBookmarksSeparatorMenuItem setEnabled:NO]; // separators are not implemented yet
}
-(NSWindow*)getFrontmostBrowserWindow
{
// for some reason, [NSApp mainWindow] doesn't always work, so we have to
@ -458,6 +465,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
-(IBAction) addSeparator:(id)aSender
{
NSLog(@"Separators not implemented yet");
}
-(IBAction) openMenuBookmark:(id)aSender
@ -582,10 +590,11 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
-(BOOL)validateMenuItem: (NSMenuItem*)aMenuItem
{
//NSLog(@"validateMenuItem for %@ called on the MainController", [aMenuItem title]);
// disable items that aren't relevant if there's no main browser window open
SEL action = [aMenuItem action];
//NSLog(@"MainController validateMenuItem for %@ (%s)", [aMenuItem title], action);
if (action == @selector(newTab:) ||
/* ... many more items go here ... */
action == @selector(printPage:) ||
@ -595,7 +604,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
action == @selector(smallerTextSize:) ||
action == @selector(viewSource:) ||
action == @selector(goHome:) ||
action == @selector(addBookmark:) || // doesn't work, not sure why
action == @selector(savePage:)) {
if ([self isMainWindowABrowserWindow])
return YES;

3
camino/MainMenu.nib/classes.nib сгенерированный
Просмотреть файл

@ -44,11 +44,14 @@
CLASS = MainController;
LANGUAGE = ObjC;
OUTLETS = {
mAddBookmarkMenuItem = NSMenuItem;
mApplication = NSApplication;
mBookmarksMenu = NSMenu;
mBookmarksToolbarMenuItem = NSMenuItem;
mCloseTabMenuItem = NSMenuItem;
mCloseWindowMenuItem = NSMenuItem;
mCreateBookmarksFolderMenuItem = NSMenuItem;
mCreateBookmarksSeparatorMenuItem = NSMenuItem;
mFilterList = NSPopUpButton;
mFilterView = NSView;
mOfflineMenuItem = NSMenuItem;

6
camino/MainMenu.nib/info.nib сгенерированный
Просмотреть файл

@ -3,7 +3,7 @@
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>96 99 356 240 0 0 1152 746 </string>
<string>95 100 356 240 0 0 1152 746 </string>
<key>IBEditorPositions</key>
<dict>
<key>266</key>
@ -29,6 +29,10 @@
</dict>
<key>IBLastGroupID</key>
<string>2</string>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
</array>
<key>IBSystem Version</key>
<string>5S66</string>
</dict>

Двоичные данные
camino/MainMenu.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -44,11 +44,14 @@
CLASS = MainController;
LANGUAGE = ObjC;
OUTLETS = {
mAddBookmarkMenuItem = NSMenuItem;
mApplication = NSApplication;
mBookmarksMenu = NSMenu;
mBookmarksToolbarMenuItem = NSMenuItem;
mCloseTabMenuItem = NSMenuItem;
mCloseWindowMenuItem = NSMenuItem;
mCreateBookmarksFolderMenuItem = NSMenuItem;
mCreateBookmarksSeparatorMenuItem = NSMenuItem;
mFilterList = NSPopUpButton;
mFilterView = NSView;
mOfflineMenuItem = NSMenuItem;

Просмотреть файл

@ -3,7 +3,7 @@
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>96 99 356 240 0 0 1152 746 </string>
<string>95 100 356 240 0 0 1152 746 </string>
<key>IBEditorPositions</key>
<dict>
<key>266</key>
@ -29,6 +29,10 @@
</dict>
<key>IBLastGroupID</key>
<string>2</string>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
</array>
<key>IBSystem Version</key>
<string>5S66</string>
</dict>

Двоичные данные
camino/resources/localized/English.lproj/MainMenu.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -60,6 +60,9 @@ class BookmarksService;
IBOutlet NSMenu* mBookmarksMenu;
IBOutlet NSMenuItem* mBookmarksToolbarMenuItem;
IBOutlet NSMenuItem* mAddBookmarkMenuItem;
IBOutlet NSMenuItem* mCreateBookmarksFolderMenuItem;
IBOutlet NSMenuItem* mCreateBookmarksSeparatorMenuItem;
BOOL mOffline;
@ -128,6 +131,8 @@ class BookmarksService;
- (void)adjustCloseTabMenuItemKeyEquivalent:(BOOL)inHaveTabs;
- (void)fixCloseMenuItemKeyEquivalents;
- (void)adjustBookmarksMenuItemsEnabling:(BOOL)inBrowserWindowFrontmost;
-(NSWindow*)getFrontmostBrowserWindow;
- (MVPreferencesController *)preferencesController;

Просмотреть файл

@ -327,6 +327,13 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
[[[mApplication mainWindow] windowController] home: aSender];
}
- (void)adjustBookmarksMenuItemsEnabling:(BOOL)inBrowserWindowFrontmost;
{
[mAddBookmarkMenuItem setEnabled:inBrowserWindowFrontmost];
[mCreateBookmarksFolderMenuItem setEnabled:inBrowserWindowFrontmost];
[mCreateBookmarksSeparatorMenuItem setEnabled:NO]; // separators are not implemented yet
}
-(NSWindow*)getFrontmostBrowserWindow
{
// for some reason, [NSApp mainWindow] doesn't always work, so we have to
@ -458,6 +465,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
-(IBAction) addSeparator:(id)aSender
{
NSLog(@"Separators not implemented yet");
}
-(IBAction) openMenuBookmark:(id)aSender
@ -582,10 +590,11 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
-(BOOL)validateMenuItem: (NSMenuItem*)aMenuItem
{
//NSLog(@"validateMenuItem for %@ called on the MainController", [aMenuItem title]);
// disable items that aren't relevant if there's no main browser window open
SEL action = [aMenuItem action];
//NSLog(@"MainController validateMenuItem for %@ (%s)", [aMenuItem title], action);
if (action == @selector(newTab:) ||
/* ... many more items go here ... */
action == @selector(printPage:) ||
@ -595,7 +604,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
action == @selector(smallerTextSize:) ||
action == @selector(viewSource:) ||
action == @selector(goHome:) ||
action == @selector(addBookmark:) || // doesn't work, not sure why
action == @selector(savePage:)) {
if ([self isMainWindowABrowserWindow])
return YES;

3
chimera/English.lproj/MainMenu.nib/classes.nib сгенерированный
Просмотреть файл

@ -44,11 +44,14 @@
CLASS = MainController;
LANGUAGE = ObjC;
OUTLETS = {
mAddBookmarkMenuItem = NSMenuItem;
mApplication = NSApplication;
mBookmarksMenu = NSMenu;
mBookmarksToolbarMenuItem = NSMenuItem;
mCloseTabMenuItem = NSMenuItem;
mCloseWindowMenuItem = NSMenuItem;
mCreateBookmarksFolderMenuItem = NSMenuItem;
mCreateBookmarksSeparatorMenuItem = NSMenuItem;
mFilterList = NSPopUpButton;
mFilterView = NSView;
mOfflineMenuItem = NSMenuItem;

6
chimera/English.lproj/MainMenu.nib/info.nib сгенерированный
Просмотреть файл

@ -3,7 +3,7 @@
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>96 99 356 240 0 0 1152 746 </string>
<string>95 100 356 240 0 0 1152 746 </string>
<key>IBEditorPositions</key>
<dict>
<key>266</key>
@ -29,6 +29,10 @@
</dict>
<key>IBLastGroupID</key>
<string>2</string>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
</array>
<key>IBSystem Version</key>
<string>5S66</string>
</dict>

Двоичные данные
chimera/English.lproj/MainMenu.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -60,6 +60,9 @@ class BookmarksService;
IBOutlet NSMenu* mBookmarksMenu;
IBOutlet NSMenuItem* mBookmarksToolbarMenuItem;
IBOutlet NSMenuItem* mAddBookmarkMenuItem;
IBOutlet NSMenuItem* mCreateBookmarksFolderMenuItem;
IBOutlet NSMenuItem* mCreateBookmarksSeparatorMenuItem;
BOOL mOffline;
@ -128,6 +131,8 @@ class BookmarksService;
- (void)adjustCloseTabMenuItemKeyEquivalent:(BOOL)inHaveTabs;
- (void)fixCloseMenuItemKeyEquivalents;
- (void)adjustBookmarksMenuItemsEnabling:(BOOL)inBrowserWindowFrontmost;
-(NSWindow*)getFrontmostBrowserWindow;
- (MVPreferencesController *)preferencesController;

Просмотреть файл

@ -327,6 +327,13 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
[[[mApplication mainWindow] windowController] home: aSender];
}
- (void)adjustBookmarksMenuItemsEnabling:(BOOL)inBrowserWindowFrontmost;
{
[mAddBookmarkMenuItem setEnabled:inBrowserWindowFrontmost];
[mCreateBookmarksFolderMenuItem setEnabled:inBrowserWindowFrontmost];
[mCreateBookmarksSeparatorMenuItem setEnabled:NO]; // separators are not implemented yet
}
-(NSWindow*)getFrontmostBrowserWindow
{
// for some reason, [NSApp mainWindow] doesn't always work, so we have to
@ -458,6 +465,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
-(IBAction) addSeparator:(id)aSender
{
NSLog(@"Separators not implemented yet");
}
-(IBAction) openMenuBookmark:(id)aSender
@ -582,10 +590,11 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
-(BOOL)validateMenuItem: (NSMenuItem*)aMenuItem
{
//NSLog(@"validateMenuItem for %@ called on the MainController", [aMenuItem title]);
// disable items that aren't relevant if there's no main browser window open
SEL action = [aMenuItem action];
//NSLog(@"MainController validateMenuItem for %@ (%s)", [aMenuItem title], action);
if (action == @selector(newTab:) ||
/* ... many more items go here ... */
action == @selector(printPage:) ||
@ -595,7 +604,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
action == @selector(smallerTextSize:) ||
action == @selector(viewSource:) ||
action == @selector(goHome:) ||
action == @selector(addBookmark:) || // doesn't work, not sure why
action == @selector(savePage:)) {
if ([self isMainWindowABrowserWindow])
return YES;

3
chimera/MainMenu.nib/classes.nib сгенерированный
Просмотреть файл

@ -44,11 +44,14 @@
CLASS = MainController;
LANGUAGE = ObjC;
OUTLETS = {
mAddBookmarkMenuItem = NSMenuItem;
mApplication = NSApplication;
mBookmarksMenu = NSMenu;
mBookmarksToolbarMenuItem = NSMenuItem;
mCloseTabMenuItem = NSMenuItem;
mCloseWindowMenuItem = NSMenuItem;
mCreateBookmarksFolderMenuItem = NSMenuItem;
mCreateBookmarksSeparatorMenuItem = NSMenuItem;
mFilterList = NSPopUpButton;
mFilterView = NSView;
mOfflineMenuItem = NSMenuItem;

6
chimera/MainMenu.nib/info.nib сгенерированный
Просмотреть файл

@ -3,7 +3,7 @@
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>96 99 356 240 0 0 1152 746 </string>
<string>95 100 356 240 0 0 1152 746 </string>
<key>IBEditorPositions</key>
<dict>
<key>266</key>
@ -29,6 +29,10 @@
</dict>
<key>IBLastGroupID</key>
<string>2</string>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
</array>
<key>IBSystem Version</key>
<string>5S66</string>
</dict>

Двоичные данные
chimera/MainMenu.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -44,11 +44,14 @@
CLASS = MainController;
LANGUAGE = ObjC;
OUTLETS = {
mAddBookmarkMenuItem = NSMenuItem;
mApplication = NSApplication;
mBookmarksMenu = NSMenu;
mBookmarksToolbarMenuItem = NSMenuItem;
mCloseTabMenuItem = NSMenuItem;
mCloseWindowMenuItem = NSMenuItem;
mCreateBookmarksFolderMenuItem = NSMenuItem;
mCreateBookmarksSeparatorMenuItem = NSMenuItem;
mFilterList = NSPopUpButton;
mFilterView = NSView;
mOfflineMenuItem = NSMenuItem;

Просмотреть файл

@ -3,7 +3,7 @@
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>96 99 356 240 0 0 1152 746 </string>
<string>95 100 356 240 0 0 1152 746 </string>
<key>IBEditorPositions</key>
<dict>
<key>266</key>
@ -29,6 +29,10 @@
</dict>
<key>IBLastGroupID</key>
<string>2</string>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
</array>
<key>IBSystem Version</key>
<string>5S66</string>
</dict>

Двоичные данные
chimera/resources/localized/English.lproj/MainMenu.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -60,6 +60,9 @@ class BookmarksService;
IBOutlet NSMenu* mBookmarksMenu;
IBOutlet NSMenuItem* mBookmarksToolbarMenuItem;
IBOutlet NSMenuItem* mAddBookmarkMenuItem;
IBOutlet NSMenuItem* mCreateBookmarksFolderMenuItem;
IBOutlet NSMenuItem* mCreateBookmarksSeparatorMenuItem;
BOOL mOffline;
@ -128,6 +131,8 @@ class BookmarksService;
- (void)adjustCloseTabMenuItemKeyEquivalent:(BOOL)inHaveTabs;
- (void)fixCloseMenuItemKeyEquivalents;
- (void)adjustBookmarksMenuItemsEnabling:(BOOL)inBrowserWindowFrontmost;
-(NSWindow*)getFrontmostBrowserWindow;
- (MVPreferencesController *)preferencesController;

Просмотреть файл

@ -327,6 +327,13 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
[[[mApplication mainWindow] windowController] home: aSender];
}
- (void)adjustBookmarksMenuItemsEnabling:(BOOL)inBrowserWindowFrontmost;
{
[mAddBookmarkMenuItem setEnabled:inBrowserWindowFrontmost];
[mCreateBookmarksFolderMenuItem setEnabled:inBrowserWindowFrontmost];
[mCreateBookmarksSeparatorMenuItem setEnabled:NO]; // separators are not implemented yet
}
-(NSWindow*)getFrontmostBrowserWindow
{
// for some reason, [NSApp mainWindow] doesn't always work, so we have to
@ -458,6 +465,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
-(IBAction) addSeparator:(id)aSender
{
NSLog(@"Separators not implemented yet");
}
-(IBAction) openMenuBookmark:(id)aSender
@ -582,10 +590,11 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
-(BOOL)validateMenuItem: (NSMenuItem*)aMenuItem
{
//NSLog(@"validateMenuItem for %@ called on the MainController", [aMenuItem title]);
// disable items that aren't relevant if there's no main browser window open
SEL action = [aMenuItem action];
//NSLog(@"MainController validateMenuItem for %@ (%s)", [aMenuItem title], action);
if (action == @selector(newTab:) ||
/* ... many more items go here ... */
action == @selector(printPage:) ||
@ -595,7 +604,6 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
action == @selector(smallerTextSize:) ||
action == @selector(viewSource:) ||
action == @selector(goHome:) ||
action == @selector(addBookmark:) || // doesn't work, not sure why
action == @selector(savePage:)) {
if ([self isMainWindowABrowserWindow])
return YES;