Permalink
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...
1 parent 415f47a commit 9fc93ee2a7d10fad60ec28c75d5fda19584fe123 @SebastianZ SebastianZ committed Jun 17, 2013
@@ -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

janodvarko Jun 18, 2013

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

SebastianZ Jul 3, 2013

Member

For reference, issue 6575 was created to cover that.

Sebastian

// Listen for set filters, so the panel is properly updated when needed
Firebug.Console.addListener(this);
},
@@ -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

janodvarko Jun 18, 2013

Owner

The same as above.
Honza

// Listen for set filters, so the panel is properly updated when needed
Firebug.NetMonitor.addListener(this);
},
@@ -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

0 comments on commit 9fc93ee

Please sign in to comment.