From b88db6eda3711a5f5c17c9660cc784f1280ff3ac Mon Sep 17 00:00:00 2001 From: Nicolas Valcarcel Date: Sat, 6 Sep 2008 15:54:30 -0500 Subject: [PATCH 1/4] Sync packaging with debian --- debian/control | 2 +- debian/rules | 1 + debian/watch | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 0f9bbbfb..e1730c80 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Priority: optional Maintainer: Terminator Developers Build-Depends: debhelper (>= 5.0.62), python, cdbs (>=0.4.49) Build-Depends-Indep: python-central (>= 0.5.6) -Standards-Version: 3.7.3 +Standards-Version: 3.8.0 Vcs-Bzr: http://bazaar.launchpad.net/~gnome-terminator/terminator/trunk Vcs-Browser: http://code.launchpad.net/~gnome-terminator/terminator/trunk Homepage: http://www.tenshu.net/terminator/ diff --git a/debian/rules b/debian/rules index 890a3f8d..197bc06c 100755 --- a/debian/rules +++ b/debian/rules @@ -4,6 +4,7 @@ DEB_PYTHON_SYSTEM = pycentral include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/python-distutils.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk DEB_INSTALL_CHANGELOGS_ALL := ChangeLog diff --git a/debian/watch b/debian/watch index 649e09ec..8e68abdf 100644 --- a/debian/watch +++ b/debian/watch @@ -1,2 +1,2 @@ version=3 -https://launchpad.net/terminator/+download http://launchpad.net/terminator/.*/terminator_(.+)\.tar\.gz +http://launchpad.net/terminator/+download .*/terminator_(.+)\.tar\.gz From 8bf6ac3e8679b629f3f52cd09a96da02b8e77af8 Mon Sep 17 00:00:00 2001 From: Nicolas Valcarcel Date: Sat, 6 Sep 2008 15:54:39 -0500 Subject: [PATCH 2/4] Sync packaging with debian --- debian/patches/01_change_interpreter.patch | 27 ++++++++++++++++++++++ debian/pycompat | 1 + 2 files changed, 28 insertions(+) create mode 100644 debian/patches/01_change_interpreter.patch create mode 100644 debian/pycompat diff --git a/debian/patches/01_change_interpreter.patch b/debian/patches/01_change_interpreter.patch new file mode 100644 index 00000000..7e19fb14 --- /dev/null +++ b/debian/patches/01_change_interpreter.patch @@ -0,0 +1,27 @@ +diff -Nur -x '*.orig' -x '*~' terminator-0.10/terminatorlib/configfile.py terminator-0.10.new/terminatorlib/configfile.py +--- terminator-0.10/terminatorlib/configfile.py 2008-08-28 09:17:49.000000000 -0500 ++++ terminator-0.10.new/terminatorlib/configfile.py 2008-09-06 15:07:54.000000000 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/python ++#!/usr/bin/python + + import re + from terminatorlib.config import dbg, debug +diff -Nur -x '*.orig' -x '*~' terminator-0.10/terminatorlib/debugserver.py terminator-0.10.new/terminatorlib/debugserver.py +--- terminator-0.10/terminatorlib/debugserver.py 2008-08-28 09:17:49.000000000 -0500 ++++ terminator-0.10.new/terminatorlib/debugserver.py 2008-09-06 15:07:34.000000000 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/python ++#!/usr/bin/python + # + # Copyright (c) 2008, Thomas Hurst + # +diff -Nur -x '*.orig' -x '*~' terminator-0.10/terminatorlib/freebsd.py terminator-0.10.new/terminatorlib/freebsd.py +--- terminator-0.10/terminatorlib/freebsd.py 2008-08-28 09:17:49.000000000 -0500 ++++ terminator-0.10.new/terminatorlib/freebsd.py 2008-09-06 15:07:45.000000000 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/python ++#!/usr/bin/python + # + # Copyright (c) 2008, Thomas Hurst + # diff --git a/debian/pycompat b/debian/pycompat new file mode 100644 index 00000000..0cfbf088 --- /dev/null +++ b/debian/pycompat @@ -0,0 +1 @@ +2 From e370d9fbb56d6688cc2a79e44d1026009c56a30c Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sun, 7 Sep 2008 19:43:03 +0100 Subject: [PATCH 3/4] more specific updates for the profile editor --- terminatorlib/prefs_profile.py | 73 ++++++++++++++++++++++++++++++---- 1 file changed, 66 insertions(+), 7 deletions(-) diff --git a/terminatorlib/prefs_profile.py b/terminatorlib/prefs_profile.py index 47cff088..8e57feda 100644 --- a/terminatorlib/prefs_profile.py +++ b/terminatorlib/prefs_profile.py @@ -6,8 +6,10 @@ from terminatorlib.version import APP_NAME, APP_VERSION import gtk class ProfileEditor: - appearance = ['titlebars', 'titletips', 'allow_bold', 'silent_bell', 'background_color', 'background_darkness', 'background_type', 'background_image', 'cursor_blink', 'font', 'foreground_color', 'scrollbar_position', 'scroll_background', 'palette', 'use_system_font', 'use_theme_colors', 'force_no_bell', 'enable_real_transparency'] - behaviour = ['delete_binding', 'emulation', 'scroll_on_keystroke', 'scroll_on_output', 'scrollback_lines', 'focus'] + appearance = ['titlebars', 'titletips', 'allow_bold', 'silent_bell', 'background_darkness', 'background_type', 'background_image', 'cursor_blink', 'font', 'scrollbar_position', 'scroll_background', 'use_system_font', 'use_theme_colors', 'force_no_bell', 'enable_real_transparency'] + colours = ['foreground_color','background_color', 'palette'] + behaviour = ['backspace_binding', 'delete_binding', 'emulation', 'scroll_on_keystroke', 'scroll_on_output', 'scrollback_lines', 'focus', 'focus_on_close', 'exit_action', 'word_chars', 'mouse_autohide', 'use_custom_command', 'custom_command', 'http_proxy', 'encoding'] + globals = ['fullscreen', 'maximise', 'borderless', 'handle_size', 'cycle_term_tab', 'close_button_on_tab', 'copy_on_selection', 'extreme_tabs', 'try_posix_regexp'] data = {'titlebars': ['Show titlebars', 'This places a bar above each terminal which displays its title.'], 'titletips': ['Show title tooltips', 'This adds a tooltip to each terminal which contains its title'], 'allow_bold': ['Allow bold text', 'Controls whether or not the terminals will honour requests for bold text'], @@ -19,11 +21,30 @@ class ProfileEditor: self.notebook = gtk.Notebook() self.window.add (self.notebook) + self.notebook.append_page (self.auto_add (gtk.Table (), self.globals), gtk.Label ("Global Settings")) + self.notebook.append_page (self.auto_add (gtk.Table (), Defaults['keybindings']), gtk.Label ("Keybindings")) self.notebook.append_page (self.auto_add (gtk.Table (), self.appearance), gtk.Label ("Appearance")) + self.notebook.append_page (self.auto_add (gtk.Table (), self.colours), gtk.Label ("Colours")) self.notebook.append_page (self.auto_add (gtk.Table (), self.behaviour), gtk.Label ("Behaviour")) self.window.show_all () + def source_get_type (self, key): + if Defaults.has_key (key): + return Defaults[key].__class__.__name__ + elif Defaults['keybindings'].has_key (key): + return Defaults['keybindings'][key].__class__.__name__ + else: + raise KeyError + + def source_get_value (self, key): + if Defaults.has_key (key): + return Defaults[key] + elif Defaults['keybindings'].has_key (key): + return Defaults['keybindings'][key] + else: + raise KeyError + def auto_add (self, table, list): row = 0 for key in list: @@ -34,14 +55,11 @@ class ProfileEditor: label_text = key.replace ('_', ' ').capitalize () label = gtk.Label (label_text) - type = Defaults[key].__class__.__name__ - value = Defaults[key] + type = self.source_get_type (key) + value = self.source_get_value (key) widget = None if key == 'font': - #widget = gtk.FontSelection() - #widget.set_preview_text("Terminator: The robot future of terminals") - #widget.set_font_name(value) widget = gtk.FontButton(value) elif key == 'scrollback_lines': # estimated byte size per line according to g-t: @@ -62,6 +80,47 @@ class ProfileEditor: widget.append_text ('click') widget.append_text ('sloppy') widget.set_active (0) + elif key == 'background_type': + widget = gtk.combo_box_new_text() + widget.append_text ('solid') + widget.append_text ('image') + widget.append_text ('transparent') + widget.set_active (0) + elif key == 'background_darkness': + widget = gtk.HScale () + widget.set_digits (1) + widget.set_draw_value (True) + widget.set_value_pos (gtk.POS_LEFT) + widget.set_range (0, 1) + widget.set_value (value) + elif key == 'handle_size': + widget = gtk.HScale () + widget.set_digits (0) + widget.set_draw_value (True) + widget.set_value_pos (gtk.POS_LEFT) + widget.set_range (-1, 5) + widget.set_value (value) + elif key == 'foreground_color': + widget = gtk.ColorButton (gtk.gdk.color_parse (value)) + elif key == 'background_color': + widget = gtk.ColorButton (gtk.gdk.color_parse (value)) + elif key == 'palette': + colours = value.split (':') + numcolours = len (colours) + widget = gtk.Table (2, numcolours / 2) + x = 0 + y = 0 + for thing in colours: + if x == numcolours / 2: + y += 1 + x = 0 + widget.attach (gtk.ColorButton (gtk.gdk.color_parse (thing)), x, x + 1, y, y + 1) + x += 1 + elif key == 'background_image': + widget = gtk.FileChooserButton('Select a File') + filter = gtk.FileFilter() + filter.add_mime_type ('image/*') + widget.add_filter (filter) else: if type == "bool": widget = gtk.CheckButton () From c93e99b4c3b46bec3c02de92fb24c1253ac3789f Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sun, 7 Sep 2008 20:10:06 +0100 Subject: [PATCH 4/4] fix up backspace/delete binding widgets and fix a related mistake in the terminator_config manpage --- doc/terminator_config.5 | 2 +- terminatorlib/prefs_profile.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/terminator_config.5 b/doc/terminator_config.5 index f8a38470..2612bdfb 100644 --- a/doc/terminator_config.5 +++ b/doc/terminator_config.5 @@ -66,7 +66,7 @@ Default value: \fBascii\-del\fR .TP .B delete_binding Sets what code the delete key generates. Possible values are "ascii-del" for the ASCII DEL character, "control-h" for Control-H (AKA the ASCII BS character), "escape-sequence" for the escape sequence typically bound to backspace or delete. "escape-sequence" is normally considered the correct setting for the Delete key. -Default value: \fBdelete\-sequence\fR +Default value: \fBescape\-sequence\fR .TP .B cursor_blink \fR(boolean) Controls if the cursor blinks. diff --git a/terminatorlib/prefs_profile.py b/terminatorlib/prefs_profile.py index 8e57feda..51ac6d55 100644 --- a/terminatorlib/prefs_profile.py +++ b/terminatorlib/prefs_profile.py @@ -75,6 +75,18 @@ class ProfileEditor: widget.append_text ('right') widget.append_text ('disabled') widget.set_active (0) + elif key == 'backspace_binding': + widget = gtk.combo_box_new_text() + widget.append_text ('ascii-del') + widget.append_text ('control-h') + widget.append_text ('escape-sequence') + widget.set_active (0) + elif key == 'delete_binding': + widget = gtk.combo_box_new_text() + widget.append_text ('ascii-del') + widget.append_text ('control-h') + widget.append_text ('escape-sequence') + widget.set_active (2) elif key == 'focus': widget = gtk.combo_box_new_text() widget.append_text ('click')