Closed Bug 169144 Opened 22 years ago Closed 22 years ago

[Patch] Cookie Manager

Categories

(Core :: Networking: Cookies, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 152297

People

(Reporter: alex.martin, Assigned: morse)

Details

Attachments

(2 files)

I've written a patch to improve the actual Cookie Manager. (This is my first
contribution, sorry if i've made something wrong)

Description
New button called "Refresh Cookie List". When pressed it refreshes the cookie
list displayed in the cookie manager, so user doesn't needs to close & open the
Cookie Manager to see new cookies.

Witch files are affected?
By now only:
comm.jar\content\communicator\wallet\CookieViewer.xul
comm.jar\content\communicator\wallet\CookieViewer.js
en-US.jar\locale\en-US\communicator\wallet\CookieViewer.dtd

Mozilla Version:
Mozilla 1.1
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826


Finally I've attached the diffs.

The Diffs:
a) comm.jar\content\communicator\wallet\CookieViewer.xul:
120,123d119
<             <button id="refreshAllCookies"
<                           label="&button.refreshcookies.label;"
<                           oncommand="reloadCookies();"/>
<             

b) en-US.jar\locale\en-US\communicator\wallet\CookieViewer.dtd:
11d10
< <!ENTITY     button.refreshcookies.label    "Refresh Cookie List">

c) comm.jar\content\communicator\wallet\CookieViewer.js:
194,196d193
<   else {
<     document.getElementById("removeAllCookies").setAttribute("disabled","false");
<   }
204,212d200
< function reloadCookies() {
<    cookies            = [];
<    permissions        = [];
<    deletedCookies     = [];
<    deletedPermissions = [];
< 
<    loadCookies();
< }
< 
314,315d301
< 
<    CommitChanges();
323,325c309
<    CommitChanges();
< }   
< 
---
> }
451,464d434
< function CommitChanges() {
< 
<   for (var c=0; c<deletedCookies.length; c++) {
<     cookiemanager.remove(deletedCookies[c].host,
<                          deletedCookies[c].name,
<                          deletedCookies[c].path,
<                          document.getElementById("checkbox").checked);
<   }
< 
<   for (var p=0; p<deletedPermissions.length; p++) {
<     permissionmanager.remove(deletedPermissions[p].host,
deletedPermissions[p].type);
<   }
< }
< 
468c438
< /*
---
> 
479d448
< */
481,482d449
<   CommitChanges();
<
I've have included the files patched:
comm.jar\content\communicator\wallet\CookieViewer.xul
comm.jar\content\communicator\wallet\CookieViewer.js
en-US.jar\locale\en-US\communicator\wallet\CookieViewer.dtd
Attachment #99500 - Attachment mime type: text/plain → application/zip
Patches are always welcome!  However, there are a few things you need to change:
The patches should be unified diffs (diff -u), not context diffs.  
Your patches are reverse patches, so they can't be used to apply the changes to 
the existing code.
You should really be using cvs diff to create the patches against the tip.  
This also means that the file paths are included in the patch itself.

This is a duplicate of bug 152297.  As bug 152297 comment 1 says, it would be 
far more useful if the cookie dialog updated automatically, but something is 
probably better than nothing.

Marking as a duplicate of bug 152297 - please attach an updated patch to that 
bug.

*** This bug has been marked as a duplicate of 152297 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You must be running a very old version of the browser.  Automatic updating was
implemented a while ago.  See bug 156922
Non context diffs from
mozilla/extensions/wallet/cookieViewer/CookieViewer{.js,.xul,.dtd}
verified duplicate
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: