Skip to content

Commit 0f87189

Browse files
Add bette Seach Usages button fo Grid Editor in Kewyords
1 parent d8ab1ad commit 0f87189

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/robotide/editor/macroeditors.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
import builtins
1617
import wx
1718

1819
from ..publish.messages import RideItemNameChanged
1920
from ..usages.UsageRunner import Usages
2021
from .editors import _RobotTableEditor, FindUsagesHeader
2122
from .kweditor import KeywordEditor
2223

24+
_ = wx.GetTranslation # To keep linter/code analyser happy
25+
builtins.__dict__['_'] = wx.GetTranslation
2326

2427
class TestCaseEditor(_RobotTableEditor):
2528
__test__ = False
@@ -121,8 +124,12 @@ class UserKeywordEditor(TestCaseEditor):
121124
_settings_open_id = 'user keyword settings open'
122125

123126
def _create_header(self, text, readonly=False):
127+
if readonly:
128+
text += _(' (READ ONLY)')
129+
124130
def cb(event):
125131
__ = event
126132
Usages(self.controller, self._tree.highlight).show()
127-
return FindUsagesHeader(self, text, cb, color_foreground=self.color_secondary_foreground,
133+
self._title_display = FindUsagesHeader(self, text, cb, color_foreground=self.color_secondary_foreground,
128134
color_background=self.color_secondary_background)
135+
return self._title_display

0 commit comments

Comments
 (0)