summaryrefslogtreecommitdiff
path: root/portato/gui/gtk
diff options
context:
space:
mode:
authorNecoro <>2007-10-19 17:14:47 +0000
committerNecoro <>2007-10-19 17:14:47 +0000
commitb40b79fcdcca9418964a44c84e73b61b22caf08f (patch)
treea719ee8c17dc84b0c93a0034a6017be62b462de0 /portato/gui/gtk
parent3992e6b8c511fe7796f9a3b10b88f4db932945ff (diff)
downloadportato-b40b79fcdcca9418964a44c84e73b61b22caf08f.tar.gz
portato-b40b79fcdcca9418964a44c84e73b61b22caf08f.tar.bz2
portato-b40b79fcdcca9418964a44c84e73b61b22caf08f.zip
small changes to prepare for 0.8.6
Diffstat (limited to '')
-rw-r--r--portato/gui/gtk/windows.py35
1 files changed, 14 insertions, 21 deletions
diff --git a/portato/gui/gtk/windows.py b/portato/gui/gtk/windows.py
index 456d962..e3bf133 100644
--- a/portato/gui/gtk/windows.py
+++ b/portato/gui/gtk/windows.py
@@ -15,10 +15,7 @@ from __future__ import absolute_import
# gtk stuff
import gtk
import gobject
-try:
- import gtksourceview2
-except ImportError:
- gtksourceview2 = None
+import gtksourceview2
# other
import types, logging
@@ -385,23 +382,19 @@ class EbuildWindow (AbstractDialog):
def _build_view(self):
"""Creates the buffer and the view."""
- if gtksourceview2 is None:
- self.buf = gtk.TextBuffer()
- self.view = gtk.TextView(self.buf)
- else:
- man = gtksourceview2.LanguageManager()
- man.set_search_path(man.get_search_path()+[DATA_DIR])
- language = man.get_language("ebuild")
-
- if language is None:
- warning(_("No ebuild language file installed. Falling back to shell."))
- language = man.get_language("sh")
-
- # set buffer and view
- self.buf = gtksourceview2.Buffer()
- self.buf.set_language(language)
- #self.buf.set_highlight(True)
- self.view = gtksourceview2.View(self.buf)
+ man = gtksourceview2.LanguageManager()
+ man.set_search_path(man.get_search_path()+[DATA_DIR])
+ language = man.get_language("ebuild")
+
+ if language is None:
+ warning(_("No ebuild language file installed. Falling back to shell."))
+ language = man.get_language("sh")
+
+ # set buffer and view
+ self.buf = gtksourceview2.Buffer()
+ self.buf.set_language(language)
+ #self.buf.set_highlight(True)
+ self.view = gtksourceview2.View(self.buf)
def _show (self):
"""Fill the buffer with content and shows the window."""