[gedit] external tools: do not use underscores in the action name
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] external tools: do not use underscores in the action name
- Date: Sun, 24 Apr 2016 10:03:00 +0000 (UTC)
commit 2802af7c6aaa5ffe06da2fabdce1e379abee21e1
Author: Paolo Borelli <pborelli gnome org>
Date: Sun Apr 24 12:00:21 2016 +0200
external tools: do not use underscores in the action name
GLib became pickier wrt action names
plugins/externaltools/tools/appactivatable.py | 2 +-
plugins/externaltools/tools/windowactivatable.py | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/externaltools/tools/appactivatable.py b/plugins/externaltools/tools/appactivatable.py
index 0724065..ad99f23 100644
--- a/plugins/externaltools/tools/appactivatable.py
+++ b/plugins/externaltools/tools/appactivatable.py
@@ -53,7 +53,7 @@ class ToolMenu(object):
for tool in sorted(directory.tools, key=lambda x: x.name.lower()):
# FIXME: find a better way to share the action name
- action_name = 'external-tool_%X_%X' % (id(tool), id(tool.name))
+ action_name = 'external-tool-%X-%X' % (id(tool), id(tool.name))
item = Gio.MenuItem.new(tool.name.replace('_', '__'), "win.%s" % action_name)
item.set_attribute_value("hidden-when", GLib.Variant.new_string("action-disabled"))
menu.append_item(item)
diff --git a/plugins/externaltools/tools/windowactivatable.py
b/plugins/externaltools/tools/windowactivatable.py
index c4fd60a..24765c3 100644
--- a/plugins/externaltools/tools/windowactivatable.py
+++ b/plugins/externaltools/tools/windowactivatable.py
@@ -45,7 +45,8 @@ class ToolActions(object):
def _insert_directory(self, directory):
for tool in sorted(directory.tools, key=lambda x: x.name.lower()):
- action_name = 'external-tool_%X_%X' % (id(tool), id(tool.name))
+ # FIXME: find a better way to share the action name
+ action_name = 'external-tool-%X-%X' % (id(tool), id(tool.name))
self._action_tools[action_name] = tool
action = Gio.SimpleAction(name=action_name)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]