disable "remove all" button in cookies and permissions sheet when the user

has typed in a filter to avoid confusion as to what "all" gets removed
(bug 286438)
This commit is contained in:
pinkerton%aol.net 2005-08-01 02:33:48 +00:00
Родитель 01ff08ee96
Коммит c8189bb142
5 изменённых файлов: 9 добавлений и 3 удалений

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

@ -43,6 +43,8 @@
mPermissionFilterField = SearchTextField;
mPermissionsPanel = id;
mPermissionsTable = ExtendedTableView;
mRemoveAllCookiesButton = NSButton;
mRemoveAllPermissionsButton = NSButton;
mRemoveCookiesButton = NSButton;
mStorePasswords = NSButton;
};

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

@ -3,10 +3,10 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>139 118 356 240 0 0 1600 1002 </string>
<string>103 92 356 240 0 0 1280 832 </string>
<key>IBFramework Version</key>
<string>364.0</string>
<string>437.0</string>
<key>IBSystem Version</key>
<string>7W98</string>
<string>8C46</string>
</dict>
</plist>

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

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

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

@ -71,11 +71,13 @@ class nsICookie;
IBOutlet SearchTextField* mPermissionFilterField;
nsIPermissionManager* mPermissionManager; // STRONG (should be nsCOMPtr)
nsCOMArray<nsIPermission>* mCachedPermissions; // parallel list for speed, STRONG
IBOutlet NSButton* mRemoveAllPermissionsButton;
// cookie sheet
IBOutlet id mCookiesPanel;
IBOutlet ExtendedTableView* mCookiesTable;
IBOutlet NSButton* mRemoveCookiesButton;
IBOutlet NSButton* mRemoveAllCookiesButton;
IBOutlet SearchTextField* mCookiesFilterField;
nsICookieManager* mCookieManager;
nsCOMArray<nsICookie>* mCachedCookies;

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

@ -860,6 +860,7 @@ PR_STATIC_CALLBACK(int) compareValues(nsICookie* aCookie1, nsICookie* aCookie2,
if (([aNotification object] == mPermissionFilterField) && mCachedPermissions && mPermissionManager) {
// the user wants to filter down the list of cookies. Reinitialize the list of permission in case
// they deleted or replaced a letter.
[mRemoveAllPermissionsButton setEnabled:([filterString length] == 0)];
[self filterCookiesPermissionsWithString:filterString];
// re-sort
[self sortPermissionsByColumn:[mPermissionsTable highlightedTableColumn] inAscendingOrder:mSortedAscending];
@ -869,6 +870,7 @@ PR_STATIC_CALLBACK(int) compareValues(nsICookie* aCookie1, nsICookie* aCookie2,
}
else if (([aNotification object] == mCookiesFilterField) && mCachedCookies && mCookieManager) {
// reinitialize the list of cookies in case user deleted a letter or replaced a letter
[mRemoveAllCookiesButton setEnabled:([filterString length] == 0)];
[self filterCookiesWithString:filterString];
// re-sort
[self sortCookiesByColumn:[mCookiesTable highlightedTableColumn] inAscendingOrder:mSortedAscending];