From bab0cc27d534bed26ceefdb55769c6e234b0d7a1 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Tue, 13 Jul 2010 13:50:33 +0100 Subject: [PATCH 1/2] Make font antialiasing configurable --- terminatorlib/config.py | 1 + terminatorlib/preferences.glade | 23 ++++++++++++++++++----- terminatorlib/prefseditor.py | 8 ++++++++ terminatorlib/terminal.py | 17 +++++++++++++---- 4 files changed, 40 insertions(+), 9 deletions(-) diff --git a/terminatorlib/config.py b/terminatorlib/config.py index fd3804bf..61d964b9 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -154,6 +154,7 @@ DEFAULTS = { 'profiles': { 'default': { 'allow_bold' : True, + 'antialias' : True, 'audible_bell' : False, 'visible_bell' : False, 'urgent_bell' : False, diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index 79db6fa9..0f554010 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -884,6 +884,19 @@ 2 + + + Anti-alias text + True + True + False + True + + + + 3 + + Show titlebar @@ -896,7 +909,7 @@ False False - 3 + 4 @@ -909,7 +922,7 @@ - 4 + 5 @@ -945,7 +958,7 @@ False - 5 + 6 @@ -1079,7 +1092,7 @@ False False - 6 + 7 @@ -1180,7 +1193,7 @@ False False - 7 + 8 diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index f7f67949..c8edabda 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -311,6 +311,9 @@ class PrefsEditor: # Allow bold text widget = guiget('allow_bold_checkbutton') widget.set_active(self.config['allow_bold']) + # Anti-alias + widget = guiget('antialias_checkbutton') + widget.set_active(self.config['antialias']) # Icon terminal bell widget = guiget('icon_bell_checkbutton') widget.set_active(self.config['icon_bell']) @@ -545,6 +548,11 @@ class PrefsEditor: self.config['allow_bold'] = widget.get_active() self.config.save() + def on_antialias_checkbutton_toggled(self, widget): + """Anti-alias setting changed""" + self.config['antialias'] = widget.get_active() + self.config.save() + def on_show_titlebar_toggled(self, widget): """Show titlebar setting changed""" self.config['show_titlebar'] = widget.get_active() diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 85313a81..43908c8a 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -585,7 +585,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) font = self.config.get_system_font() else: font = self.config['font'] - self.vte.set_font(pango.FontDescription(font)) + self.set_font(pango.FontDescription(font)) except: pass self.vte.set_allow_bold(self.config['allow_bold']) @@ -1071,7 +1071,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) return new_font.set_size(new_size) dbg('setting new font: %s' % new_font) - self.vte.set_font(new_font) + self.set_font(new_font) def is_zoomed(self): """Determine if we are a zoomed terminal""" @@ -1270,7 +1270,7 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) fontsize += pango.SCALE pangodesc.set_size(fontsize) - self.vte.set_font(pangodesc) + self.set_font(pangodesc) self.custom_font_size = fontsize def zoom_orig(self): @@ -1280,9 +1280,18 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) else: font = self.config['font'] dbg("Terminal::zoom_orig: restoring font to: %s" % font) - self.vte.set_font(pango.FontDescription(font)) + self.set_font(pango.FontDescription(font)) self.custom_font_size = None + def set_font(self, fontdesc): + """Set the font we want in VTE""" + antialias = self.config['antialias'] + if antialias: + antialias = vte.ANTI_ALIAS_FORCE_ENABLE + else: + antialias = vte.ANTI_ALIAS_FORCE_DISABLE + self.vte.set_font_full(fontdesc, antialias) + def get_cursor_position(self): """Return the co-ordinates of our cursor""" # FIXME: THIS METHOD IS DEPRECATED AND UNUSED From 06ccc75e33cd49f112c4dc988e5daaaf2ffc48f1 Mon Sep 17 00:00:00 2001 From: Launchpad Code Hosting Date: Thu, 15 Jul 2010 04:33:20 +0100 Subject: [PATCH 2/2] Launchpad automatic translations update. --- po/id.po | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/po/id.po b/po/id.po index 4aedc055..d1af5872 100644 --- a/po/id.po +++ b/po/id.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: terminator\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2010-07-03 22:04+0100\n" -"PO-Revision-Date: 2010-06-30 07:53+0000\n" -"Last-Translator: Cecep Mahbub \n" +"PO-Revision-Date: 2010-07-15 01:15+0000\n" +"Last-Translator: Arief Setiadi Wibowo \n" "Language-Team: Indonesian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-07-05 03:44+0000\n" +"X-Launchpad-Export-Date: 2010-07-15 03:33+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: ../data/terminator.desktop.in.h:1 @@ -222,11 +222,11 @@ msgstr "Perintah Baru" #: ../terminatorlib/plugins/custom_commands.py:248 msgid "Enabled:" -msgstr "" +msgstr "Aktifkan:" #: ../terminatorlib/plugins/custom_commands.py:254 msgid "Name:" -msgstr "" +msgstr "Nama:" #: ../terminatorlib/plugins/custom_commands.py:260 msgid "Command:" @@ -235,17 +235,17 @@ msgstr "Perintah:" #: ../terminatorlib/plugins/custom_commands.py:296 #: ../terminatorlib/plugins/custom_commands.py:406 msgid "You need to define a name and command" -msgstr "" +msgstr "Anda harus mendefinisikan nama dan perintah" #: ../terminatorlib/plugins/custom_commands.py:313 #: ../terminatorlib/plugins/custom_commands.py:425 #, python-format msgid "Name *%s* already exist" -msgstr "" +msgstr "Nama *%s* telah digunakan" #: ../terminatorlib/plugins/terminalshot.py:28 msgid "Terminal screenshot" -msgstr "" +msgstr "Tangkapan layar Terminal" #: ../terminatorlib/prefseditor.py:886 ../terminatorlib/prefseditor.py:891 msgid "New Profile" @@ -280,23 +280,23 @@ msgstr "" #: ../terminatorlib/searchbar.py:132 ../terminatorlib/searchbar.py:153 msgid "No more results" -msgstr "" +msgstr "Tidak ada lagi hasil" #: ../terminatorlib/searchbar.py:168 msgid "Found at row" -msgstr "" +msgstr "Temukan di baris" #: ../terminatorlib/terminal_popup_menu.py:51 msgid "_Send email to..." -msgstr "" +msgstr "Kirim _Surel ke..." #: ../terminatorlib/terminal_popup_menu.py:52 msgid "_Copy email address" -msgstr "" +msgstr "_Copy alamat surel" #: ../terminatorlib/terminal_popup_menu.py:54 msgid "Ca_ll VoIP address" -msgstr "" +msgstr "Panggi_l alamat VoIP" #: ../terminatorlib/terminal_popup_menu.py:55 msgid "_Copy VoIP address" @@ -340,7 +340,7 @@ msgstr "" #: ../terminatorlib/terminal_popup_menu.py:143 msgid "Grouping" -msgstr "" +msgstr "Pengelompokan" #: ../terminatorlib/terminal_popup_menu.py:150 msgid "Show _scrollbar" @@ -364,11 +364,11 @@ msgstr "Baku" #: ../terminatorlib/terminal_popup_menu.py:225 msgid "User defined" -msgstr "" +msgstr "Ditetapkan pengguna" #: ../terminatorlib/terminal_popup_menu.py:241 msgid "Other Encodings" -msgstr "" +msgstr "Pengkodean Lainnya" #: ../terminatorlib/terminal.py:365 msgid "New group..." @@ -381,7 +381,7 @@ msgstr "Tidak ada" #: ../terminatorlib/terminal.py:386 #, python-format msgid "Remove group %s" -msgstr "" +msgstr "Hapus grup %s" #: ../terminatorlib/terminal.py:391 msgid "G_roup all in tab" @@ -398,7 +398,7 @@ msgstr "Hapus semua grup" #: ../terminatorlib/terminal.py:408 #, python-format msgid "Close group %s" -msgstr "" +msgstr "Tutup grup %s" #: ../terminatorlib/terminal.py:417 msgid "Broadcast all" @@ -448,4 +448,4 @@ msgstr "Semua" #: ../terminatorlib/window.py:566 #, python-format msgid "Tab %d" -msgstr "" +msgstr "Tab %d"