зеркало из https://github.com/mozilla/pjs.git
make edit sites use a ExtendedTableView so it gets backspace support. Set
table view explicitly to be the first responder so it accepts keys right off the bat.
This commit is contained in:
Родитель
e31490c688
Коммит
c4e92e1a45
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
IBClasses = (
|
||||
{CLASS = ExtendedTableView; LANGUAGE = ObjC; SUPERCLASS = NSTableView; },
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
CLASS = NSPreferencePane;
|
||||
|
@ -33,7 +34,7 @@
|
|||
mCookiesEnabled = NSButton;
|
||||
mEditSitesButton = NSButton;
|
||||
mEditSitesText = NSTextField;
|
||||
mSiteTable = NSTableView;
|
||||
mSiteTable = ExtendedTableView;
|
||||
mStorePasswords = NSButton;
|
||||
};
|
||||
SUPERCLASS = PreferencePaneBase;
|
||||
|
|
|
@ -3,10 +3,14 @@
|
|||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>115 71 356 240 0 0 1152 848 </string>
|
||||
<string>133 69 356 240 0 0 1280 832 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>362.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>287</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>7B85</string>
|
||||
<string>7D24</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичные данные
camino/PreferencePanes/Privacy/English.lproj/Privacy.nib/objects.nib
сгенерированный
Двоичные данные
camino/PreferencePanes/Privacy/English.lproj/Privacy.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -2,6 +2,7 @@
|
|||
#import <PreferencePanes/NSPreferencePane.h>
|
||||
#import "PreferencePaneBase.h"
|
||||
#include "nsCOMArray.h"
|
||||
#import "ExtendedTableView.h"
|
||||
|
||||
class nsIPref;
|
||||
class nsIPermissionManager;
|
||||
|
@ -19,7 +20,7 @@ class nsIPermission;
|
|||
IBOutlet NSButton* mStorePasswords;
|
||||
IBOutlet NSButton* mAutoFillPasswords;
|
||||
|
||||
IBOutlet NSTableView* mSiteTable;
|
||||
IBOutlet ExtendedTableView* mSiteTable;
|
||||
nsIPermissionManager* mManager; // STRONG (should be nsCOMPtr)
|
||||
nsCOMArray<nsIPermission>* mCachedPermissions; // parallel list of permissions for speed
|
||||
}
|
||||
|
|
|
@ -194,8 +194,11 @@ PR_STATIC_CALLBACK(int) compareCapabilities(nsIPermission* aPerm1, nsIPermission
|
|||
// ensure a row is selected (cocoa doesn't do this for us, but will keep
|
||||
// us from unselecting a row once one is set; go figure).
|
||||
[mSiteTable selectRow:0 byExtendingSelection:NO];
|
||||
[[mSiteTable window] makeFirstResponder:mSiteTable];
|
||||
|
||||
[mSiteTable setHighlightedTableColumn:[mSiteTable tableColumnWithIdentifier:@"Website"]];
|
||||
[mSiteTable setDeleteAction:@selector(removeCookieSite:)];
|
||||
[mSiteTable setTarget:self];
|
||||
|
||||
// we shouldn't need to do this, but the scrollbar won't enable unless we
|
||||
// force the table to reload its data. Oddly it gets the number of rows correct,
|
||||
|
|
Загрузка…
Ссылка в новой задаче