From 9f7ed7ee21f223f93c6c85be514d316e82dc9782 Mon Sep 17 00:00:00 2001 From: Vulcalien Date: Sat, 6 Nov 2021 11:43:23 +0100 Subject: [PATCH] Remove encoding from the Preferences menu --- terminatorlib/preferences.glade | 49 ++------------------------------- terminatorlib/prefseditor.py | 27 ------------------ terminatorlib/terminal.py | 2 -- 3 files changed, 2 insertions(+), 76 deletions(-) diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index 9ed10183..2c73f5e5 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -137,14 +137,6 @@ - - - - - - - - @@ -2955,7 +2947,7 @@ - + True False @@ -3051,42 +3043,6 @@ 2 - - - True - False - end - Encoding: - True - center - end - 0 - - - 0 - 3 - - - - - True - False - start - True - EncodingListStore - - - - - 0 - - - - - 1 - 3 - - _Reset Compatibility Options to Defaults @@ -3101,7 +3057,7 @@ 0 - 4 + 3 2 @@ -4127,7 +4083,6 @@ Much of the behavior of Terminator is based on GNOME Terminal, and we are adding - diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index 7d4d1c31..23325940 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -14,7 +14,6 @@ from .util import dbg, err from . import config from .keybindings import Keybindings, KeymapError from .translation import _ -from .encoding import TerminatorEncoding from .terminator import Terminator from .plugin import PluginRegistry from .version import APP_NAME @@ -687,23 +686,6 @@ class PrefsEditor: widget.set_active(3) else: widget.set_active(0) - # Encoding - rowiter = None - widget = guiget('encoding_combobox') - encodingstore = guiget('EncodingListStore') - value = self.config['encoding'] - encodings = TerminatorEncoding().get_list() - encodings.sort(key=lambda x: x[2].lower()) - - for encoding in encodings: - if encoding[1] is None: - continue - - label = "%s %s" % (encoding[2], encoding[1]) - rowiter = encodingstore.append([label, encoding[1]]) - - if encoding[1] == value: - widget.set_active_iter(rowiter) ## Titlebar tab # Titlebar colors @@ -924,15 +906,6 @@ class PrefsEditor: self.config['backspace_binding'] = value self.config.save() - def on_encoding_combobox_changed(self, widget): - """Encoding setting changed""" - selected = widget.get_active_iter() - liststore = widget.get_model() - value = liststore.get_value(selected, 1) - - self.config['encoding'] = value - self.config.save() - def on_scrollback_lines_spinbutton_value_changed(self, widget): """Scrollback lines setting changed""" value = widget.get_value_as_int() diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 70ff6984..3c877b08 100644 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -660,8 +660,6 @@ class Terminal(Gtk.VBox): self.cnxids.new(self.vte, 'child-exited', lambda x, y: self.emit('close-term')) - if self.custom_encoding != True: - self.vte.set_encoding(self.config['encoding']) # Word char support was missing from vte 0.38, silently skip this setting if hasattr(self.vte, 'set_word_char_exceptions'): self.vte.set_word_char_exceptions(self.config['word_chars'])