Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix accept-cookies-from-sites options + fix tooltips for options + re…

…move ... from labels
  • Loading branch information...
commit 4008e3bbc5f0a2a4c6ba86f6b320bd11ccac33a5 1 parent b57bd20
@janodvarko janodvarko authored
View
11 extension/content/firebug/cookies/cookiePanel.js
@@ -44,9 +44,6 @@ const removeConfirmation = "cookies.removeConfirmation";
// Services
var cookieManager = Xpcom.CCSV("@mozilla.org/cookiemanager;1", "nsICookieManager2");
-const networkPrefDomain = "network.cookie";
-const cookieBehaviorPref = "cookieBehavior";
-
// ********************************************************************************************* //
// Panel Implementation
@@ -294,13 +291,13 @@ FireCookiePanel.prototype = Obj.extend(Firebug.ActivablePanel,
{
return [
MenuUtils.optionAllowGlobally(context, "firecookie.AllowGlobally",
- networkPrefDomain, cookieBehaviorPref),
+ "firecookie.tip.AllowGlobally", "network.cookie", "cookieBehavior"),
/*MenuUtils.optionMenu(context, "cookies.clearWhenDeny",
- Firebug.prefDomain, clearWhenDeny),*/
+ "cookies.tip.clearWhenDeny", Firebug.prefDomain, clearWhenDeny),*/
MenuUtils.optionMenu(context, "firecookie.LogEvents",
- Firebug.prefDomain, logEventsPref),
+ "firecookie.tip.LogEvents", Firebug.prefDomain, logEventsPref),
MenuUtils.optionMenu(context, "firecookie.Confirm cookie removal",
- Firebug.prefDomain, removeConfirmation)
+ "firecookie.tip.Confirm cookie removal", Firebug.prefDomain, removeConfirmation)
];
},
View
38 extension/content/firebug/cookies/menuUtils.js
@@ -3,44 +3,52 @@
define([
"firebug/lib/object",
"firebug/lib/options",
- "firebug/lib/locale",
],
-function(Obj, Options, Locale) {
+function(Obj, Options) {
// ********************************************************************************************* //
// Menu Utils
var MenuUtils =
{
- optionMenu: function(context, label, domain, option)
+ optionMenu: function(context, label, tooltiptext, domain, option)
{
- var value = Options.get(option);
- return { label: Locale.$STR(label), nol10n: true, type: "checkbox", checked: value,
- command: Obj.bindFixed(MenuUtils.setPref, this, domain, option, !value) };
+ var value = Options.getPref(domain, option);
+ return {
+ label: label,
+ tooltiptext: tooltiptext,
+ type: "checkbox",
+ checked: value,
+ command: Obj.bindFixed(this.setPref, this, domain, option, !value)
+ };
},
- optionAllowGlobally: function(context, label, domain, option)
+ optionAllowGlobally: function(context, label, tooltiptext, domain, option)
{
- var value = Options.get(option) == 0;
- return { label: Locale.$STR(label), nol10n: true, type: "checkbox",
+ var value = Options.getPref(domain, option) == 0;
+ return {
+ label: label,
+ tooltiptext: tooltiptext,
+ type: "checkbox",
checked: value,
- command: Obj.bindFixed(this.onAllowCookie, this, domain, option)}
+ command: Obj.bindFixed(this.onAllowCookie, this, domain, option)
+ }
},
// Command handlers
onAllowCookie: function(domain, option)
{
- var value = Options.get(option);
+ var value = Options.getPref(domain, option);
switch (value)
{
case 0: // accept all cookies by default
- Options.set(option, 2);
+ Options.setPref(domain, option, 2);
return;
case 1: // only accept from the originating site (block third party cookies)
case 2: // block all cookies by default;
case 3: // use p3p settings
- Options.set(option, 0);
+ Options.setPref(domain, option, 0);
return;
}
},
@@ -49,9 +57,9 @@ var MenuUtils =
{
},
- setPref: function(prefDomain, name, value)
+ setPref: function(domain, name, value)
{
- Options.set(name, value);
+ Options.setPref(domain, name, value);
}
};
View
24 extension/locale/en-US/cookies.properties
@@ -8,13 +8,16 @@ firecookie.Panel=Cookies
# LOCALIZATION NOTE (firecookie.Session): Label used to mark session cookies.
firecookie.Session=Session
-# LOCALIZATION NOTE (firecookie.AllowGlobally): Label used for cookies permission.
+# LOCALIZATION NOTE (firecookie.AllowGlobally, firecookie.tip.AllowGlobally):
+# Label used for cookies permission.
firecookie.AllowGlobally=Accept cookies from sites
+firecookie.tip.AllowGlobally=Accept all cookies by default or block all cookies by default
-# LOCALIZATION NOTE (firecookie.LogEvents): Label used in Cookies panel options menu (the
-# small arrow next to the Cookies panel label). If checked, various cookies events are
-# displayed in Firebug's Console panel.
+# LOCALIZATION NOTE (firecookie.LogEvents, firecookie.tip.LogEvents):
+# Label used in Cookies panel options menu (the small arrow next to the Cookies panel label).
+# If checked, various cookies events are displayed in Firebug's Console panel.
firecookie.LogEvents=Show logs in console
+firecookie.tip.LogEvents=Use to display various cookie events (changed, deleted) in the Console panel
# LOCALIZATION NOTE (firecookie.clearWhenDeny): Label used in Cookies panel options menu (the
# small arrow next to the Cookies panel label). If checked, cookies are automatically removed
@@ -82,6 +85,7 @@ firecookie.msg.Do_not_show_this_message_again=Do not show this message again
# LOCALIZATION NOTE (firecookie.Confirm_cookie_removal): A label used for option (mini tab menu)
# that says whether a confirmation dialog is displayed when removing cookies.
firecookie.Confirm_cookie_removal=Confirm cookie removal
+firecookie.tip.Confirm_cookie_removal=If checked, there is a confirmation dialog displayed before deleting all cookies in the list.
# LOCALIZATION NOTE (firecookie.removeall.tooltip): A tooltip for Cookies->Remove Cookies menu
firecookie.removeall.tooltip=Remove all cookies in the list.
@@ -205,7 +209,7 @@ firecookie.header.size.tooltip=Size of the stored cookie
firecookie.header.path.tooltip=Directory where the cookie is active
firecookie.header.expires.tooltip=Expiration date for the cookie
firecookie.header.security.tooltip=Shows whether it is a secure cookie or not
-firecookie.header.status.tooltip=Status of the cookie (downgraded, flagged...)
+firecookie.header.status.tooltip=Status of the cookie (downgraded, flagged, etc.)
firecookie.header.httponly.tooltip=Shows if the cookie is an HTTP only cookie
# LOCALIZATION NOTE (firecookie.netinfo.Received_Cookies, firecookie.netinfo.Sent_Cookies):
@@ -225,9 +229,9 @@ firecookie.menu.Cookies=Cookies
# LOCALIZATION NOTE (firecookie.export.Export_All_Cookies, firecookie.export.Export_All_Cookies_Tooltip,
# firecookie.export.Export_For_Site, firecookie.export.Export_For_Site_Tooltip): Labels and
# tooltips for exporting menus available under Cookies menus.
-firecookie.export.Export_All_Cookies=Export All Cookies...
+firecookie.export.Export_All_Cookies=Export All Cookies
firecookie.export.Export_All_Cookies_Tooltip=Export all browser cookies into cookies.txt file
-firecookie.export.Export_For_Site=Export Cookies For This Site...
+firecookie.export.Export_For_Site=Export Cookies For This Site
firecookie.export.Export_For_Site_Tooltip=Export cookies for %S into cookies.txt file
# LOCALIZATION NOTE (firecookie.message.There_is_no_active_page): An error message displayed
@@ -272,20 +276,20 @@ firecookie.ToolsTooltip=Tools
# LOCALIZATION NOTE (firecookie.ViewAll, firecookie.ViewAllTooltip) Label and tooltip for
# view all cookies menu item (Tools menu). This action opens Firefox built-in cookie manager window.
-firecookie.ViewAll=Show All Cookies...
+firecookie.ViewAll=Show All Cookies
firecookie.ViewAllTooltip=Open Cookie Manager
# LOCALIZATION NOTE (firecookie.ViewExceptions, firecookie.ViewExceptionsTooltip) Label and
# tooltip for Site Permissions menu item (Tools menu). This action opens Firefox built-in
# dialog for setting web site cookie permissions.
-firecookie.ViewExceptions=Web Sites Permissions...
+firecookie.ViewExceptions=Web Sites Permissions
firecookie.ViewExceptionsTooltip=View list of allowed or prohibited web sites
# LOCALIZATION NOTE (firecookie.Help, firecookie.HelpTooltip, firecookie.About,
# firecookie.AboutTooltip) Labels and tooltips for additional menu items in Tools menu.
firecookie.Help=Help
firecookie.HelpTooltip=Help for Firecookie
-firecookie.About=About...
+firecookie.About=About
firecookie.AboutTooltip=About Firecookie
# LOCALIZATION NOTE (firecookie.Filter, firecookie.FilterTooltip, firecookie.filter.byPath,

0 comments on commit 4008e3b

Please sign in to comment.
Something went wrong with that request. Please try again.