From 0dd4ec66bfaa68e8a9692248d908b9deb21484ca Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Tue, 11 Aug 2009 00:42:39 +0100 Subject: [PATCH] clear some migrated code from terminator.py --- terminatorlib/terminal.py | 34 +++++++++++++++++++++++++ terminatorlib/terminator.py | 51 +++++-------------------------------- 2 files changed, 41 insertions(+), 44 deletions(-) create mode 100755 terminatorlib/terminal.py diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py new file mode 100755 index 00000000..577aa106 --- /dev/null +++ b/terminatorlib/terminal.py @@ -0,0 +1,34 @@ +#!/usr/bin/python +# Terminator by Chris Jones +# GPL v2 only +"""terminal.py - classes necessary to provide Terminal widgets""" + +import sys + +import pygtk +pygtk.require('2.0') +import gobject +import gtk +import pango + +try: + import vte +except ImportError: + error = gtk.MessageDialog(None, + gtk.DIALOG_MODAL, + gtk.MESSAGE_ERROR, + gtk.BUTTONS_OK, + 'You need to install python bindings for libvte') + error.run() + sys.exit(1) + +from terminator import Terminator + +class Terminal(gtk.VBox): + """Class implementing the VTE widget and its wrappings""" + + def __init__(self): + """Class initialiser""" + pass + +# vim: set expandtab ts=4 sw=4: diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 33a1bb73..42493e49 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -22,53 +22,16 @@ import pygtk pygtk.require ("2.0") import gobject, gtk, pango -from terminatorlib.version import APP_NAME, APP_VERSION - -from terminatorlib import config +from version import APP_NAME, APP_VERSION +import config from util import dbg, err, debug -from terminatorlib.keybindings import TerminatorKeybindings -from terminatorlib.terminatorterm import TerminatorTerm -from terminatorlib.prefs_profile import ProfileEditor -from terminatorlib import translation +from keybindings import TerminatorKeybindings +from terminatorterm import TerminatorTerm +from prefs_profile import ProfileEditor +import translation -try: - import deskbar.core.keybinder as bindkey -except: - dbg (_("Unable to find python bindings for deskbar, "\ - "hide_window is not available.")) - pass - -class TerminatorWindowTitle: - _window = None - text = None - _forced = False - - def __init__ (self, window): - self._window = window - - def set_title (self, newtext): - if not self._forced: - self.text = newtext - self.update () - - def force_title (self, newtext): - if newtext: - self.set_title (newtext) - self._forced = True - else: - self._forced = False - - def update (self): - title = None - - if self._forced: - title = self.text - else: - title = "%s" % self.text - - self._window.set_title (title) - +# FIXME: Move to notebook.py class TerminatorNotebookTabLabel(gtk.HBox): _terminator = None _notebook = None