From 92faa11ef9e8af801713f12f8c205bd4fcf280b1 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Thu, 23 May 2019 20:42:23 +0200 Subject: externaltools plugin: change code for Python 2 & 3 compatibility. --- plugins/externaltools/tools/__init__.py | 13 +- plugins/externaltools/tools/capture.py | 21 +- plugins/externaltools/tools/functions.py | 6 +- plugins/externaltools/tools/library.py | 78 ++-- plugins/externaltools/tools/manager.py | 209 ++------- plugins/externaltools/tools/outputpanel.py | 9 +- plugins/externaltools/tools/outputpanel.ui | 22 +- plugins/externaltools/tools/tools.ui | 706 ++++++++++++++--------------- 8 files changed, 469 insertions(+), 595 deletions(-) (limited to 'plugins') diff --git a/plugins/externaltools/tools/__init__.py b/plugins/externaltools/tools/__init__.py index 153d6c6e..b0b67dcc 100755 --- a/plugins/externaltools/tools/__init__.py +++ b/plugins/externaltools/tools/__init__.py @@ -16,14 +16,13 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -__all__ = ('ExternalToolsPlugin', 'Manager', 'OutputPanel', 'Capture', 'UniqueById') +__all__ = ('ExternalToolsPlugin', ) from gi.repository import GObject, Gtk, Peas, Pluma -from manager import Manager -from library import ToolLibrary -from outputpanel import OutputPanel -from capture import Capture -from functions import * +from .manager import Manager +from .library import ToolLibrary +from .outputpanel import OutputPanel +from .functions import * class ToolMenu(object): def __init__(self, library, window, panel, plugin, menupath): @@ -214,7 +213,7 @@ class ExternalToolsPlugin(GObject.Object, Peas.Activatable): bottom = window.get_bottom_panel() bottom.add_item_with_icon(self._output_buffer.panel, _("Shell Output"), - Gtk.STOCK_EXECUTE) + "system-run") def do_deactivate(self): window = self.object diff --git a/plugins/externaltools/tools/capture.py b/plugins/externaltools/tools/capture.py index 73ce2702..67d12bfe 100755 --- a/plugins/externaltools/tools/capture.py +++ b/plugins/externaltools/tools/capture.py @@ -18,7 +18,9 @@ __all__ = ('Capture', ) -import os, sys, signal +import os +import sys +import signal import locale import subprocess import fcntl @@ -39,7 +41,7 @@ class Capture(GObject.Object): 'end-execute' : (GObject.SignalFlags.RUN_LAST, GObject.TYPE_NONE, (GObject.TYPE_INT,)) } - def __init__(self, command, cwd = None, env = {}): + def __init__(self, command, cwd=None, env={}): GObject.GObject.__init__(self) self.pipe = None self.env = env @@ -58,6 +60,8 @@ class Capture(GObject.Object): self.flags = flags def set_input(self, text): + if text and not isinstance(text, bytes): + text = text.encode("utf-8") self.input_text = text def set_cwd(self, cwd): @@ -87,7 +91,7 @@ class Capture(GObject.Object): try: self.pipe = subprocess.Popen(self.command, **popen_args) - except OSError, e: + except OSError as e: self.pipe = None self.emit('stderr-line', _('Could not execute command: %s') % (e, )) return @@ -116,7 +120,7 @@ class Capture(GObject.Object): # IO if self.input_text is not None: # Write async, in chunks of something - self.write_buffer = str(self.input_text) + self.write_buffer = self.input_text if self.idle_write_chunk(): self.idle_write_id = GLib.idle_add(self.idle_write_chunk) @@ -136,7 +140,7 @@ class Capture(GObject.Object): self.pipe.stdin.write(self.write_buffer[:m]) if m == l: - self.write_buffer = '' + self.write_buffer = b'' self.pipe.stdin.close() self.idle_write_id = 0 @@ -157,11 +161,10 @@ class Capture(GObject.Object): if len(line) > 0: try: - line = unicode(line, 'utf-8') + line = line.decode('utf-8') except: - line = unicode(line, - locale.getdefaultlocale()[1], - 'replace') + line = line.decode(locale.getdefaultlocale()[1], + 'replace') self.read_buffer += line lines = self.read_buffer.splitlines(True) diff --git a/plugins/externaltools/tools/functions.py b/plugins/externaltools/tools/functions.py index dd4f82b2..e76689bd 100755 --- a/plugins/externaltools/tools/functions.py +++ b/plugins/externaltools/tools/functions.py @@ -18,8 +18,8 @@ import os from gi.repository import Gio, Gdk, Gtk, GtkSource, Pluma -from outputpanel import OutputPanel -from capture import * +from .outputpanel import OutputPanel +from .capture import * def default(val, d): if val is not None: @@ -131,8 +131,6 @@ def run_external_tool(window, panel, node): elif input_type == 'selection' or input_type == 'selection-document': try: start, end = document.get_selection_bounds() - - print start, end except ValueError: if input_type == 'selection-document': start, end = document.get_bounds() diff --git a/plugins/externaltools/tools/library.py b/plugins/externaltools/tools/library.py index 186c33f2..ff3fa9b7 100755 --- a/plugins/externaltools/tools/library.py +++ b/plugins/externaltools/tools/library.py @@ -19,19 +19,21 @@ import os import re import locale +import codecs from gi.repository import GLib + class Singleton(object): _instance = None def __new__(cls, *args, **kwargs): if not cls._instance: - cls._instance = super(Singleton, cls).__new__( - cls, *args, **kwargs) + cls._instance = super(Singleton, cls).__new__(cls, *args, **kwargs) cls._instance.__init_once__() return cls._instance + class ToolLibrary(Singleton): def __init_once__(self): self.locations = [] @@ -46,7 +48,7 @@ class ToolLibrary(Singleton): # self.locations[0] is where we save the custom scripts toolsdir = os.path.join(GLib.get_user_config_dir(), 'pluma/tools') - self.locations.insert(0, toolsdir); + self.locations.insert(0, toolsdir) if not os.path.isdir(self.locations[0]): os.makedirs(self.locations[0]) @@ -74,7 +76,7 @@ class ToolLibrary(Singleton): if not os.path.isfile(filename): return - print "External tools: importing old tools into the new store..." + print("External tools: importing old tools into the new store...") xtree = et.parse(filename) xroot = xtree.getroot() @@ -97,7 +99,7 @@ class ToolLibrary(Singleton): tool.save_with_script(xtool.text) - def get_full_path(self, path, mode='r', system = True, local = True): + def get_full_path(self, path, mode='r', system=True, local=True): assert (system or local) if path is None: return None @@ -123,6 +125,7 @@ class ToolLibrary(Singleton): os.mkdir(dirname) return path + class ToolDirectory(object): def __init__(self, parent, dirname): super(ToolDirectory, self).__init__() @@ -145,8 +148,7 @@ class ToolDirectory(object): continue for i in os.listdir(d): elements[i] = None - keys = elements.keys() - keys.sort() + keys = sorted(elements.keys()) return keys def _load(self): @@ -196,7 +198,7 @@ class ToolDirectory(object): class Tool(object): RE_KEY = re.compile('^([a-zA-Z_][a-zA-Z0-9_.\-]*)(\[([a-zA-Z_@]+)\])?$') - def __init__(self, parent, filename = None): + def __init__(self, parent, filename=None): super(Tool, self).__init__() self.parent = parent self.library = parent.library @@ -212,7 +214,7 @@ class Tool(object): if value.strip() == '': return [] else: - return map(lambda x: x.strip(), value.split(',')) + return [x.strip() for x in value.split(',')] def _from_list(self, value): return ','.join(value) @@ -231,7 +233,7 @@ class Tool(object): if filename is None: return - fp = file(filename, 'r', 1) + fp = codecs.open(filename, 'r', encoding='utf-8') in_block = False lang = locale.getlocale(locale.LC_MESSAGES)[0] @@ -239,8 +241,10 @@ class Tool(object): if not in_block: in_block = line.startswith('# [Pluma Tool]') continue - if line.startswith('##') or line.startswith('# #'): continue - if not line.startswith('# '): break + if line.startswith('##') or line.startswith('# #'): + continue + if not line.startswith('# '): + break try: (key, value) = [i.strip() for i in line[2:].split('=', 1)] @@ -266,9 +270,6 @@ class Tool(object): def is_local(self): return self.library.get_full_path(self.get_path(), system=False) is not None - def is_global(self): - return self.library.get_full_path(self.get_path(), local=False) is not None - def get_path(self): if self.filename is not None: return os.path.join(self.parent.get_path(), self.filename) @@ -284,7 +285,8 @@ class Tool(object): def get_applicability(self): applicability = self._properties.get('Applicability') - if applicability: return applicability + if applicability: + return applicability return 'all' def set_applicability(self, value): @@ -294,7 +296,8 @@ class Tool(object): def get_name(self): name = self._properties.get('Name') - if name: return name + if name: + return name return os.path.basename(self.filename) def set_name(self, value): @@ -304,7 +307,8 @@ class Tool(object): def get_shortcut(self): shortcut = self._properties.get('Shortcut') - if shortcut: return shortcut + if shortcut: + return shortcut return None def set_shortcut(self, value): @@ -314,7 +318,8 @@ class Tool(object): def get_comment(self): comment = self._properties.get('Comment') - if comment: return comment + if comment: + return comment return self.filename def set_comment(self, value): @@ -324,7 +329,8 @@ class Tool(object): def get_input(self): input = self._properties.get('Input') - if input: return input + if input: + return input return 'nothing' def set_input(self, value): @@ -334,7 +340,8 @@ class Tool(object): def get_output(self): output = self._properties.get('Output') - if output: return output + if output: + return output return 'output-panel' def set_output(self, value): @@ -344,7 +351,8 @@ class Tool(object): def get_save_files(self): save_files = self._properties.get('Save-files') - if save_files: return save_files + if save_files: + return save_files return 'nothing' def set_save_files(self, value): @@ -354,7 +362,8 @@ class Tool(object): def get_languages(self): languages = self._properties.get('Languages') - if languages: return languages + if languages: + return languages return [] def set_languages(self, value): @@ -370,7 +379,7 @@ class Tool(object): if filename is None: return True - fp = open(filename, 'r', 1) + fp = codecs.open(filename, 'r', encoding='utf-8') for line in fp: if line.strip() == '': continue @@ -386,7 +395,7 @@ class Tool(object): if filename is None: return ["#!/bin/sh\n"] - fp = open(filename, 'r', 1) + fp = codecs.open(filename, 'r', encoding='utf-8') lines = list() # before entering the data block @@ -396,7 +405,8 @@ class Tool(object): lines.append(line) # in the block: for line in fp: - if line.startswith('##'): continue + if line.startswith('##'): + continue if not (line.startswith('# ') and '=' in line): # after the block: strip one emtpy line (if present) if line.strip() != '': @@ -410,7 +420,7 @@ class Tool(object): def _dump_properties(self): lines = ['# [Pluma Tool]'] - for item in self._properties.iteritems(): + for item in self._properties.items(): if item[0] in self._transform: lines.append('# %s=%s' % (item[0], self._transform[item[0]][1](item[1]))) elif item[1] is not None: @@ -419,7 +429,7 @@ class Tool(object): def save_with_script(self, script): filename = self.library.get_full_path(self.filename, 'w') - fp = open(filename, 'w', 1) + fp = codecs.open(filename, 'w', encoding='utf-8') # Make sure to first print header (shebang, modeline), then # properties, and then actual content @@ -430,7 +440,6 @@ class Tool(object): # Parse for line in script: line = line.rstrip("\n") - if not inheader: content.append(line) elif line.startswith('#!'): @@ -453,7 +462,7 @@ class Tool(object): fp.write(line + "\n") fp.close() - os.chmod(filename, 0750) + os.chmod(filename, 0o750) self.changed = False def save(self): @@ -478,16 +487,17 @@ class Tool(object): if __name__ == '__main__': library = ToolLibrary() + library.set_locations(os.path.expanduser("~/.config/pluma/tools")) def print_tool(t, indent): - print indent * " " + "%s: %s" % (t.filename, t.name) + print(indent * " " + "%s: %s" % (t.filename, t.name)) def print_dir(d, indent): - print indent * " " + d.dirname + '/' + print(indent * " " + d.dirname + '/') for i in d.subdirs: - print_dir(i, indent+1) + print_dir(i, indent + 1) for i in d.tools: - print_tool(i, indent+1) + print_tool(i, indent + 1) print_dir(library.tree, 0) diff --git a/plugins/externaltools/tools/manager.py b/plugins/externaltools/tools/manager.py index 4da0deb9..b8e143b0 100755 --- a/plugins/externaltools/tools/manager.py +++ b/plugins/externaltools/tools/manager.py @@ -19,71 +19,41 @@ __all__ = ('Manager', ) import os.path -from library import * -from functions import * +import re +from .library import * +from .functions import * import hashlib from xml.sax import saxutils from gi.repository import GObject, Gio, Gdk, Gtk, GtkSource, Pluma -class LanguagesPopup(Gtk.Window): - __gtype_name__ = "LanguagePopup" +class LanguagesPopup(Gtk.Popover): + __gtype_name__ = "LanguagesPopup" COLUMN_NAME = 0 COLUMN_ID = 1 COLUMN_ENABLED = 2 - def __init__(self, languages): - Gtk.Window.__init__(self, type=Gtk.WindowType.POPUP) + def __init__(self, widget, languages): + Gtk.Popover.__init__(self, relative_to=widget) - self.set_default_size(200, 200) self.props.can_focus = True self.build() self.init_languages(languages) - self.show() - - self.grab_add() - - self.keyboard = None - device_manager = Gdk.Display.get_device_manager(self.get_window().get_display()) - for device in device_manager.list_devices(Gdk.DeviceType.MASTER): - if device.get_source() == Gdk.InputSource.KEYBOARD: - self.keyboard = device - break - - self.pointer = device_manager.get_client_pointer() - - if self.keyboard is not None: - self.keyboard.grab(self.get_window(), - Gdk.GrabOwnership.WINDOW, False, - Gdk.EventMask.KEY_PRESS_MASK | - Gdk.EventMask.KEY_RELEASE_MASK, - None, Gdk.CURRENT_TIME) - self.pointer.grab(self.get_window(), - Gdk.GrabOwnership.WINDOW, False, - Gdk.EventMask.BUTTON_PRESS_MASK | - Gdk.EventMask.BUTTON_RELEASE_MASK | - Gdk.EventMask.POINTER_MOTION_MASK | - Gdk.EventMask.ENTER_NOTIFY_MASK | - Gdk.EventMask.LEAVE_NOTIFY_MASK | - Gdk.EventMask.PROXIMITY_IN_MASK | - Gdk.EventMask.PROXIMITY_OUT_MASK | - Gdk.EventMask.SCROLL_MASK, - None, Gdk.CURRENT_TIME) - self.view.get_selection().select_path((0,)) def build(self): self.model = Gtk.ListStore(str, str, bool) self.sw = Gtk.ScrolledWindow() + self.sw.set_size_request(-1, 200) self.sw.show() - self.sw.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) + self.sw.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) self.sw.set_shadow_type(Gtk.ShadowType.ETCHED_IN) - self.view = Gtk.TreeView(self.model) + self.view = Gtk.TreeView(model=self.model) self.view.show() self.view.set_headers_visible(False) @@ -92,16 +62,16 @@ class LanguagesPopup(Gtk.Window): renderer = Gtk.CellRendererToggle() column.pack_start(renderer, False) - column.set_attributes(renderer, active=self.COLUMN_ENABLED) + column.add_attribute(renderer, 'active', self.COLUMN_ENABLED) renderer.connect('toggled', self.on_language_toggled) renderer = Gtk.CellRendererText() column.pack_start(renderer, True) - column.set_attributes(renderer, text=self.COLUMN_NAME) + column.add_attribute(renderer, 'text', self.COLUMN_NAME) self.view.append_column(column) - self.view.set_row_separator_func(self.on_separator) + self.view.set_row_separator_func(self.on_separator, None) self.sw.add(self.view) @@ -124,7 +94,7 @@ class LanguagesPopup(Gtk.Window): self.model.foreach(self.enabled_languages, ret) return ret - def on_separator(self, model, piter): + def on_separator(self, model, piter, user_data=None): val = model.get_value(piter, self.COLUMN_NAME) return val == '-' @@ -142,7 +112,7 @@ class LanguagesPopup(Gtk.Window): self.model.append([lang.get_name(), lang.get_id(), lang.get_id() in languages]) def correct_all(self, model, path, piter, enabled): - if path == (0,): + if path.get_indices()[0] == 0: return False model.set_value(piter, self.COLUMN_ENABLED, enabled) @@ -158,113 +128,6 @@ class LanguagesPopup(Gtk.Window): else: self.model.set_value(self.model.get_iter_first(), self.COLUMN_ENABLED, False) - def do_key_press_event(self, event): - if event.keyval == Gdk.KEY_Escape: - self.destroy() - return True - else: - event.window = self.view.get_bin_window() - return self.view.event(event) - - def do_key_release_event(self, event): - event.window = self.view.get_bin_window() - return self.view.event(event) - - def in_window(self, event, window=None): - if not window: - window = self.get_window() - - geometry = window.get_geometry() - origin = window.get_origin() - - return event.x_root >= origin[1] and \ - event.x_root <= origin[1] + geometry[2] and \ - event.y_root >= origin[2] and \ - event.y_root <= origin[2] + geometry[3] - - def do_destroy(self): - if self.keyboard: - self.keyboard.ungrab(Gdk.CURRENT_TIME) - self.pointer.ungrab(Gdk.CURRENT_TIME) - - return Gtk.Window.do_destroy(self) - - def setup_event(self, event, window): - fr = event.window.get_origin() - to = window.get_origin() - - event.window = window - event.x += fr[1] - to[1] - event.y += fr[2] - to[2] - - def resolve_widgets(self, root): - res = [root] - - if isinstance(root, Gtk.Container): - root.forall(lambda x, y: res.extend(self.resolve_widgets(x)), None) - - return res - - def resolve_windows(self, window): - if not window: - return [] - - res = [window] - res.extend(window.get_children()) - - return res - - def propagate_mouse_event(self, event, reverse=True): - allwidgets = self.resolve_widgets(self.get_child()) - - if reverse: - allwidgets.reverse() - - for widget in allwidgets: - windows = self.resolve_windows(widget.get_window()) - windows.reverse() - - for window in windows: - if not (window.get_events() & event.type): - continue - - if self.in_window(event, window): - self.setup_event(event, window) - - if widget.event(event): - return True - - return False - - def do_button_press_event(self, event): - if not self.in_window(event): - self.destroy() - else: - return self.propagate_mouse_event(event) - - def do_button_release_event(self, event): - if not self.in_window(event): - self.destroy() - else: - return self.propagate_mouse_event(event) - - def do_scroll_event(self, event): - return self.propagate_mouse_event(event, False) - - def do_motion_notify_event(self, event): - return self.propagate_mouse_event(event) - - def do_enter_notify_event(self, event): - return self.propagate_mouse_event(event) - - def do_leave_notify_event(self, event): - return self.propagate_mouse_event(event) - - def do_proximity_in_event(self, event): - return self.propagate_mouse_event(event) - - def do_proximity_out_event(self, event): - return self.propagate_mouse_event(event) class Manager(GObject.Object): TOOL_COLUMN = 0 # For Tree @@ -450,7 +313,9 @@ class Manager(GObject.Object): n1 = t1.name n2 = t2.name - return cmp(n1.lower(), n2.lower()) + n1 = n1.lower() + n2 = n2.lower() + return (n1 > n2) - (n1 < n2) def __init_tools_view(self): # Tools column @@ -499,8 +364,8 @@ class Manager(GObject.Object): else: return None, None - def compute_hash(self, string): - return hashlib.md5(string).hexdigest() + def compute_hash(self, stringofbytes): + return hashlib.md5(stringofbytes).hexdigest() def save_current_tool(self): if self.current_node is None: @@ -521,7 +386,10 @@ class Manager(GObject.Object): buf = self['commands'].get_buffer() (start, end) = buf.get_bounds() script = buf.get_text(start, end, False) - h = self.compute_hash(script) + scriptbytes = script + if not isinstance(scriptbytes, bytes): + scriptbytes = scriptbytes.encode('utf-8') + h = self.compute_hash(scriptbytes) if h != self.script_hash: # script has changed -> save it self.current_node.save_with_script([line + "\n" for line in script.splitlines()]) @@ -573,6 +441,9 @@ class Manager(GObject.Object): buf.set_text(script) buf.end_not_undoable_action() + if not isinstance(script, bytes): + script = script.encode('utf-8') + self.script_hash = self.compute_hash(script) contenttype, uncertain = Gio.content_type_guess(None, script) lmanager = GtkSource.LanguageManager.get_default() @@ -703,7 +574,7 @@ class Manager(GObject.Object): if language in node.languages: node.languages.remove(language) - self._tool_rows[node] = filter(lambda x: x.valid(), self._tool_rows[node]) + self._tool_rows[node] = [x for x in self._tool_rows[node] if x.valid()] if not self._tool_rows[node]: del self._tool_rows[node] @@ -714,7 +585,9 @@ class Manager(GObject.Object): self.script_hash = None if self.model.iter_is_valid(piter): - self.view.set_cursor(self.model.get_path(piter), self.view.get_column(self.TOOL_COLUMN), False) + self.view.set_cursor(self.model.get_path(piter), + self.view.get_column(self.TOOL_COLUMN), + False) self.view.grab_focus() @@ -799,19 +672,19 @@ class Manager(GObject.Object): def on_accelerator_key_press(self, entry, event): mask = event.state & Gtk.accelerator_get_default_mod_mask() + keyname = Gdk.keyval_name(event.keyval) - if event.keyval == Gdk.KEY_Escape: + if keyname == 'Escape': entry.set_text(default(self.current_node.shortcut, '')) self['commands'].grab_focus() return True - elif event.keyval == Gdk.KEY_Delete \ - or event.keyval == Gdk.KEY_BackSpace: + elif keyname == 'Delete' or keyname == 'BackSpace': entry.set_text('') self.remove_accelerator(self.current_node) self.current_node.shortcut = None self['commands'].grab_focus() return True - elif event.keyval in range(Gdk.KEY_F1, Gdk.KEY_F12 + 1): + elif re.match('^F(:1[012]?|[2-9])$', keyname): # New accelerator if self.set_accelerator(event.keyval, mask): entry.set_text(default(self.current_node.shortcut, '')) @@ -911,7 +784,7 @@ class Manager(GObject.Object): ret = None if node: - ref = Gtk.TreeRowReference(self.model, self.model.get_path(piter)) + ref = Gtk.TreeRowReference.new(self.model, self.model.get_path(piter)) # Update languages, make sure to inhibit selection change stuff self.view.get_selection().handler_block(self.selection_changed_id) @@ -966,12 +839,8 @@ class Manager(GObject.Object): self.view.get_selection().handler_unblock(self.selection_changed_id) def on_languages_button_clicked(self, button): - popup = LanguagesPopup(self.current_node.languages) - popup.set_transient_for(self.dialog) - - origin = button.get_window().get_origin() - popup.move(origin[1], origin[2] - popup.get_allocation().height) - - popup.connect('destroy', self.update_languages) + popup = LanguagesPopup(button, self.current_node.languages) + popup.show() + popup.connect('closed', self.update_languages) # ex:et:ts=4: diff --git a/plugins/externaltools/tools/outputpanel.py b/plugins/externaltools/tools/outputpanel.py index e063eb20..39fd99a4 100755 --- a/plugins/externaltools/tools/outputpanel.py +++ b/plugins/externaltools/tools/outputpanel.py @@ -20,11 +20,12 @@ __all__ = ('OutputPanel', 'UniqueById') import os -from weakref import WeakKeyDictionary -from capture import * import re -import linkparsing -import filelookup + +from weakref import WeakKeyDictionary +from .capture import * +from . import linkparsing +from . import filelookup from gi.repository import GLib, Gdk, Gtk, Pango, Pluma class UniqueById: diff --git a/plugins/externaltools/tools/outputpanel.ui b/plugins/externaltools/tools/outputpanel.ui index 01904a6e..30f2e334 100644 --- a/plugins/externaltools/tools/outputpanel.ui +++ b/plugins/externaltools/tools/outputpanel.ui @@ -1,5 +1,5 @@ - - + True False + True + True True False True + True in @@ -33,9 +36,8 @@ Version: 2.91.3 - False - True - 0 + 0 + 0 @@ -43,7 +45,6 @@ Version: 2.91.3 True False 6 - vertical 6 end @@ -57,16 +58,15 @@ Version: 2.91.3 - True - True + False + False 0 - False - True - 1 + 1 + 0 diff --git a/plugins/externaltools/tools/tools.ui b/plugins/externaltools/tools/tools.ui index afdd3f9d..21de8428 100644 --- a/plugins/externaltools/tools/tools.ui +++ b/plugins/externaltools/tools/tools.ui @@ -1,30 +1,45 @@ - + + - + + + True + + - + - Nothing - nothing + All documents + all - Current document - document + All documents except untitled ones + titled - All documents - all + Local files only + local + + + Remote files only + remote + + + Untitled documents only + untitled + + @@ -62,7 +77,7 @@ - + Nothing nothing @@ -92,7 +107,7 @@ - + @@ -101,72 +116,105 @@ - All documents - all - - - All documents except untitled ones - titled - - - Local files only - local + Nothing + nothing - Remote files only - remote + Current document + document - Untitled documents only - untitled + All documents + all - - True - + False External Tools Manager 750 500 dialog True - - - + + + + + + - + True + False + vertical + + + True + False + end + + + gtk-help + True + True + True + False + True + + + False + False + 0 + + + + + gtk-close + True + True + True + False + True + + + False + False + 1 + + + + + False + False + end + 0 + + - + True True - 6 + True + True 275 - + True - 6 - - - True - 0 - _Tools: - True - view - - - False - False - 0 - - + False + 6 + 6 + 6 + 6 + True + True + vertical + 6 True False - automatic - automatic + True + True in @@ -174,29 +222,49 @@ True False True + + + - 1 + 0 + 1 + + + + + True + False + _Tools: + True + view + 0 + + + 0 + 0 - + True - 6 + False + start True False True False - + start + True + False gtk-new - 4 @@ -204,344 +272,311 @@ False False 0 + True - + + True False + True False - + start + - + True - gtk-revert-to-saved - 4 + False + gtk-delete False False - end - 2 + 1 + True - - True + False - True False - + start + - + True - gtk-delete - 4 + False + gtk-revert-to-saved False False - end - 1 + 2 + True - False - False - 2 + 0 + 2 - False - False + True + True - + True - 6 + False + True + True + vertical + 6 - - True - 0 - 0.5 - _Edit: - commands - True - - - False - False - 0 - - - - + True + False + True + True + vertical + 6 + 6 - + True - + False + _Applicability: + True + 0 - False - False - 0 + 0 + 5 + + + + + True + False + _Output: + True + 0 + + + 0 + 4 + + + + + True + False + _Input: + True + 0 + + + 0 + 3 - + True - 6 - 2 - 6 - 6 + False + _Save: + True + 0 + + + 0 + 2 + + + + + True + False + _Shortcut Key: + True + 0 + + + 0 + 1 + + + + + True + False + model_output - - True - True - - - - - - 1 - 2 - 1 - 2 - GTK_EXPAND | GTK_SHRINK | GTK_FILL - GTK_FILL - + + + 0 + + + + 1 + 4 + + + + + True + False + model_input - - True - - - True - model_applicability - - - - 0 - - - - - 0 - False - True - - - - - True - True - - - True - - - - True - All Languages - 0 - 0.5 - PANGO_ELLIPSIZE_MIDDLE - - - - - - - 1 - True - True - - - - - 1 - 2 - 5 - 6 - GTK_EXPAND | GTK_SHRINK | GTK_FILL - GTK_FILL - + + + 0 + + + + 1 + 3 + + + + + True + False + model_save_files - - True - model_output - - - - 0 - - - - - 1 - 2 - 4 - 5 - GTK_EXPAND | GTK_SHRINK | GTK_FILL - GTK_FILL - + + + 0 + + + + 1 + 2 + + + + + True + True + + + + + + 1 + 1 + + + + + True + True + True + True + in + + + commands_buffer + True + True + False + GTK_SOURCE_SMART_HOME_END_AFTER + 2 + True + False + True + + + + + 0 + 0 + 2 + + + + + True + False - + True - model_input + False - - - 0 - + + True + False + False + + + + True + False + All Languages + middle + 0 + 0.5 + + + 1 - 2 - 3 - 4 - GTK_EXPAND | GTK_SHRINK | GTK_FILL - GTK_FILL + 0 - - model_save_files + True + False + model_applicability - + 0 - 1 - 2 - 2 - 3 - GTK_EXPAND | GTK_SHRINK | GTK_FILL - GTK_FILL - - - - - True - 0 - _Applicability: - True - applicability - - - 5 - 6 - GTK_FILL - - - - - - True - 0 - _Output: - True - output - - - 4 - 5 - GTK_FILL - - - - - - True - 0 - _Input: - True - input - - - 3 - 4 - GTK_FILL - - - - - - 0 - _Save: - True - save-files - True - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - _Shortcut Key: - True - accelerator - - - 1 - 2 - GTK_FILL - - - - - - True - True - automatic - automatic - in - - - commands_buffer - True - True - False - GTK_SOURCE_SMART_HOME_END_AFTER - 2 - True - False - True - - - - - 2 + 0 + 0 - 1 + 1 + 5 - 1 + 0 + 1 + + + + + True + False + _Edit: + True + 0 + 0.5 + + + 0 + 0 @@ -557,47 +592,6 @@ 1 - - - True - end - - - gtk-help - True - True - True - False - True - - - False - False - 0 - - - - - gtk-close - True - True - True - False - True - - - False - False - 1 - - - - - False - end - 0 - - -- cgit v1.2.1