Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added hint to filter button tooltips about the shortcut for selecting

multiple filters (related to issue 4621 and issue 4156)
  • Loading branch information...
commit 9fc93ee2a7d10fad60ec28c75d5fda19584fe123 1 parent 415f47a
@SebastianZ SebastianZ authored
View
12 extension/content/firebug/console/consolePanel.js
@@ -97,6 +97,18 @@ Firebug.ConsolePanel.prototype = Obj.extend(Firebug.ActivablePanel,
if (!this.persistedContent && Firebug.Console.isAlwaysEnabled())
this.insertLogLimit(this.context);
+ // Initialize filter button tooltips
+ var doc = this.context.chrome.window.document;
+ var filterButtons = doc.getElementsByClassName("fbConsoleFilter");
+ for (var i=0, len=filterButtons.length; i<len; ++i)
+ {
+ if (filterButtons[i].id != "fbConsoleFilter-all")
+ {
+ filterButtons[i].tooltipText = Locale.$STRF("firebug.labelWithShortcut",
+ [filterButtons[i].tooltipText, Locale.$STR("tooltip.multipleFiltersHint")]);
+ }
+ }
+
@janodvarko Owner

This way the tooltips are initialized again and again every time the Console panel is created (e.g. refresh).
Couldn't we do it just once somewhere else? (e.g. when console module is initialized?)

Honza

@SebastianZ Owner

For reference, issue 6575 was created to cover that.

Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
// Listen for set filters, so the panel is properly updated when needed
Firebug.Console.addListener(this);
},
View
12 extension/content/firebug/net/netPanel.js
@@ -85,6 +85,18 @@ NetPanel.prototype = Obj.extend(Firebug.ActivablePanel,
Firebug.ActivablePanel.initialize.apply(this, arguments);
+ // Initialize filter button tooltips
+ var doc = this.context.chrome.window.document;
+ var filterButtons = doc.getElementsByClassName("fbNetFilter");
+ for (var i=0, len=filterButtons.length; i<len; ++i)
+ {
+ if (filterButtons[i].id != "fbNetFilter-all")
+ {
+ filterButtons[i].tooltipText = Locale.$STRF("firebug.labelWithShortcut",
+ [filterButtons[i].tooltipText, Locale.$STR("tooltip.multipleFiltersHint")]);
+ }
+ }
+
@janodvarko Owner

The same as above.
Honza

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
// Listen for set filters, so the panel is properly updated when needed
Firebug.NetMonitor.addListener(this);
},
View
6 extension/locale/en-US/firebug.properties
@@ -819,6 +819,12 @@ console.Use_Arrow_keys,_Tab_or_Enter=Use Arrow keys, Tab or Enter
# LOCALIZATION NOTE (console.JSDisabledInFirefoxPrefs): Hint shown inside the Console panel in the case
# JavaScript is not available
console.JSDisabledInFirefoxPrefs=JavaScript is disabled in your Firefox preferences. If you want to use the Console panel, then please enable this option via Tools > Options > Content > Enable JavaScript
+
+# LOCALIZATION NOTE (tooltip.multipleFiltersHint):
+# Hint used for Console and Net panel filter button tooltips describing the shortcut for selecting
+# multiple filters
+tooltip.multipleFiltersHint=Use Ctrl+Click to select multiple filters
+
# LOCALIZATION NOTE (console.multiHighlightLimitExceeded):
# Used by the Console panel for arrays. If the user moves the mouse over an array bracket,
# all elements in the array are highlighted on the page. If there are too many elements
Please sign in to comment.
Something went wrong with that request. Please try again.