Bug 790891 - Search operators are hardcoded in debugger.xul, r=past
authorVictor Porof <vporof@mozilla.com>
Fri, 14 Sep 2012 00:00:19 +0300
changeset 106953 516c72f9ac25f8ab3fc952effc528bddbe24a5b7
parent 106952 69848e5d3672abe9bb84ab5b0fa8a433e9e7d596
child 106954 3f7d16ee5712e82211861f50dffbc8c83c76fb20
push id1077
push uservporof@mozilla.com
push dateThu, 13 Sep 2012 21:01:32 +0000
treeherderfx-team@516c72f9ac25 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspast
bugs790891
milestone18.0a1
Bug 790891 - Search operators are hardcoded in debugger.xul, r=past
browser/devtools/debugger/debugger-view.js
browser/devtools/debugger/debugger.xul
--- a/browser/devtools/debugger/debugger-view.js
+++ b/browser/devtools/debugger/debugger-view.js
@@ -54,19 +54,22 @@ let DebuggerView = {
     this._stepOutKey = document.getElementById("stepOutKey");
 
     // Buttons, textboxes etc.
     this._resumeButton = document.getElementById("resume");
     this._stepOverButton = document.getElementById("step-over");
     this._stepInButton = document.getElementById("step-in");
     this._stepOutButton = document.getElementById("step-out");
     this._scriptsSearchbox = document.getElementById("scripts-search");
-    this._globalOperatorButton = document.getElementById("global-operator");
-    this._tokenOperatorButton = document.getElementById("token-operator");
-    this._lineOperatorButton = document.getElementById("line-operator");
+    this._globalOperatorLabel = document.getElementById("global-operator-label");
+    this._globalOperatorButton = document.getElementById("global-operator-button");
+    this._tokenOperatorLabel = document.getElementById("token-operator-label");
+    this._tokenOperatorButton = document.getElementById("token-operator-button");
+    this._lineOperatorLabel = document.getElementById("line-operator-label");
+    this._lineOperatorButton = document.getElementById("line-operator-button");
   },
 
   /**
    * Applies the correct key labels and tooltips across global view elements.
    */
   initializeKeys: function DV_initializeKeys() {
     this._resumeButton.setAttribute("tooltiptext",
       L10N.getFormatStr("pauseButtonTooltip", [LayoutHelpers.prettyKey(this._resumeKey)]));
@@ -74,22 +77,26 @@ let DebuggerView = {
       L10N.getFormatStr("stepOverTooltip", [LayoutHelpers.prettyKey(this._stepOverKey)]));
     this._stepInButton.setAttribute("tooltiptext",
       L10N.getFormatStr("stepInTooltip", [LayoutHelpers.prettyKey(this._stepInKey)]));
     this._stepOutButton.setAttribute("tooltiptext",
       L10N.getFormatStr("stepOutTooltip", [LayoutHelpers.prettyKey(this._stepOutKey)]));
 
     this._scriptsSearchbox.setAttribute("placeholder",
       L10N.getFormatStr("emptyFilterText", [LayoutHelpers.prettyKey(this._fileSearchKey)]));
-    this._globalOperatorButton.setAttribute("value",
+    this._globalOperatorLabel.setAttribute("value",
       L10N.getFormatStr("searchPanelGlobal", [LayoutHelpers.prettyKey(this._globalSearchKey)]));
-    this._tokenOperatorButton.setAttribute("value",
+    this._tokenOperatorLabel.setAttribute("value",
       L10N.getFormatStr("searchPanelToken", [LayoutHelpers.prettyKey(this._tokenSearchKey)]));
-    this._lineOperatorButton.setAttribute("value",
+    this._lineOperatorLabel.setAttribute("value",
       L10N.getFormatStr("searchPanelLine", [LayoutHelpers.prettyKey(this._lineSearchKey)]));
+
+    this._globalOperatorButton.setAttribute("label", SEARCH_GLOBAL_FLAG);
+    this._tokenOperatorButton.setAttribute("label", SEARCH_TOKEN_FLAG);
+    this._lineOperatorButton.setAttribute("label", SEARCH_LINE_FLAG);
   },
 
   /**
    * Initializes UI properties for all the displayed panes.
    */
   initializePanes: function DV_initializePanes() {
     this._togglePanesButton.addEventListener("click", this._onTogglePanesButtonPressed);
 
@@ -250,18 +257,21 @@ let DebuggerView = {
   _stepOverKey: null,
   _stepInKey: null,
   _stepOutKey: null,
   _resumeButton: null,
   _stepOverButton: null,
   _stepInButton: null,
   _stepOutButton: null,
   _scriptsSearchbox: null,
+  _globalOperatorLabel: null,
   _globalOperatorButton: null,
+  _tokenOperatorLabel: null,
   _tokenOperatorButton: null,
+  _lineOperatorLabel: null,
   _lineOperatorButton: null
 };
 
 /**
  * A simple way of displaying a "Connect to..." prompt.
  */
 function RemoteDebuggerPrompt() {
 
--- a/browser/devtools/debugger/debugger.xul
+++ b/browser/devtools/debugger/debugger.xul
@@ -100,29 +100,29 @@
     </toolbar>
     <panel id="scripts-search-panel"
            type="arrow"
            noautofocus="true"
            position="before_start">
       <vbox>
         <label class="description" value="&debuggerUI.searchPanelTitle;"/>
         <hbox align="center">
-          <button class="operator" label="!"
+          <button id="global-operator-button" class="operator"
                   onclick="DebuggerView.Scripts._onGlobalSearch()"/>
-          <label id="global-operator" class="plain operator"/>
+          <label id="global-operator-label" class="plain operator"/>
         </hbox>
         <hbox align="center">
-          <button class="operator" label="#"
+          <button id="token-operator-button" class="operator"
                   onclick="DebuggerView.Scripts._onTokenSearch()"/>
-          <label id="token-operator" class="plain operator"/>
+          <label id="token-operator-label" class="plain operator"/>
         </hbox>
         <hbox align="center">
-          <button class="operator" label=":"
+          <button id="line-operator-button" class="operator"
                   onclick="DebuggerView.Scripts._onLineSearch()"/>
-          <label id="line-operator" class="plain operator"/>
+          <label id="line-operator-label" class="plain operator"/>
         </hbox>
       </vbox>
     </panel>
     <vbox id="dbg-content" flex="1">
       <vbox id="globalsearch" hidden="true"/>
       <splitter id="globalsearch-splitter"
                 class="devtools-horizontal-splitter" hidden="true"/>
       <hbox flex="1">