mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Clean up the sheet for editing popup blocking whitelist. In particular, disable the Add button when the text field is empty.
This commit is contained in:
parent
642809a403
commit
cc4d961414
@ -28,6 +28,7 @@
|
||||
CLASS = OrgMozillaChimeraPreferenceWebFeatures;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mAddButton = NSButton;
|
||||
mAddField = NSTextField;
|
||||
mEditWhitelist = NSButton;
|
||||
mEnableAnnoyanceBlocker = NSButton;
|
||||
|
@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>302 81 356 240 0 0 1600 1002 </string>
|
||||
<string>67 152 356 240 0 0 1600 1002 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>364.0</string>
|
||||
<key>IBGroupedObjects</key>
|
||||
|
Binary file not shown.
@ -17,8 +17,10 @@ class nsISupportsArray;
|
||||
IBOutlet NSButton *mEditWhitelist;
|
||||
|
||||
IBOutlet id mWhitelistPanel;
|
||||
IBOutlet ExtendedTableView* mWhitelistTable;
|
||||
IBOutlet NSTextField* mAddField;
|
||||
IBOutlet ExtendedTableView* mWhitelistTable;
|
||||
IBOutlet NSTextField* mAddField;
|
||||
IBOutlet NSButton* mAddButton;
|
||||
|
||||
nsIPermissionManager* mManager; // STRONG (should be nsCOMPtr)
|
||||
nsISupportsArray* mCachedPermissions; // parallel list of permissions for speed, STRONG (should be nsCOMPtr)
|
||||
|
||||
|
@ -154,6 +154,8 @@
|
||||
[mWhitelistTable setDeleteAction:@selector(removeWhitelistSite:)];
|
||||
[mWhitelistTable setTarget:self];
|
||||
|
||||
[mAddButton setEnabled:NO];
|
||||
|
||||
// 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,
|
||||
// it just forgets to tell the scrollbar. *shrug*
|
||||
@ -254,6 +256,11 @@
|
||||
return retVal;
|
||||
}
|
||||
|
||||
- (void)controlTextDidChange:(NSNotification*)notification
|
||||
{
|
||||
[mAddButton setEnabled:[[mAddField stringValue] length] > 0];
|
||||
}
|
||||
|
||||
//
|
||||
// clickEnableAnnoyanceBlocker:
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user