summaryrefslogtreecommitdiff
path: root/portato/gui/qt/windows.py
diff options
context:
space:
mode:
authornecoro <>2007-04-16 22:34:28 +0000
committernecoro <>2007-04-16 22:34:28 +0000
commitad74f5cfcda1e740e007f750f242bea33047920d (patch)
tree9a8275841693dcc4fe89cb39087473067712ca18 /portato/gui/qt/windows.py
parent35d7c73cf74e891b6ead631444e4e470b3a7a941 (diff)
downloadportato-ad74f5cfcda1e740e007f750f242bea33047920d.tar.gz
portato-ad74f5cfcda1e740e007f750f242bea33047920d.tar.bz2
portato-ad74f5cfcda1e740e007f750f242bea33047920d.zip
added ebuild window for Qt-Frontend
Diffstat (limited to 'portato/gui/qt/windows.py')
-rw-r--r--portato/gui/qt/windows.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/portato/gui/qt/windows.py b/portato/gui/qt/windows.py
index 3b1de2b..b2949bd 100644
--- a/portato/gui/qt/windows.py
+++ b/portato/gui/qt/windows.py
@@ -25,6 +25,7 @@ from portato.gui.gui_helper import Database, Config, EmergeQueue
# own GUI stuff
from terminal import QtConsole
from tree import QtTree
+from highlighter import EbuildHighlighter
from dialogs import *
from helper import qCheck, qIsChecked
@@ -112,6 +113,30 @@ class SearchDialog (Window):
self.done(0)
self.jumpTo(s)
+class EbuildDialog (Window):
+
+ __metaclass__ = WindowMeta
+
+ def __init__ (self, parent, package):
+
+ Window.__init__(self, parent)
+
+ self.setWindowTitle(package.get_cpv())
+
+ self.doc = Qt.QTextDocument()
+ self.hl = EbuildHighlighter(self.doc)
+
+ try: # read ebuild
+ f = open(package.get_ebuild_path(), "r")
+ lines = f.readlines()
+ f.close()
+ except IOError,e:
+ io_ex_dialog(self, e)
+ return
+
+ self.doc.setPlainText("".join(lines))
+ self.ebuildEdit.setDocument(self.doc)
+
class PreferenceWindow (Window):
"""Window displaying some preferences."""
@@ -202,6 +227,7 @@ class PackageDetails:
Qt.QObject.connect(self.window.pkgEmergeBtn, Qt.SIGNAL("clicked()"), self.cb_emerge_clicked)
Qt.QObject.connect(self.window.pkgUnmergeBtn, Qt.SIGNAL("clicked()"), self.cb_unmerge_clicked)
Qt.QObject.connect(self.window.pkgRevertBtn, Qt.SIGNAL("clicked()"), self.cb_revert_clicked)
+ Qt.QObject.connect(self.window.pkgEbuildBtn, Qt.SIGNAL("clicked()"), self.cb_ebuild_clicked)
# checkboxes
Qt.QObject.connect(self.window.maskedCheck, Qt.SIGNAL("clicked(bool)"), self.cb_masked_clicked)
@@ -326,6 +352,9 @@ class PackageDetails:
return self.packages[self.window.versCombo.currentIndex()]
+ def cb_ebuild_clicked (self):
+ EbuildDialog(self.window, self.actual_package()).exec_()
+
def cb_emerge_clicked (self):
"""Callback for pressed emerge-button. Adds the package to the EmergeQueue."""
if not am_i_root():
49 +0100'>2009-10-28Changelogv0.13.10.13René 'Necoro' Neumann1-0/+4 2009-10-28Corrected config path handling.René 'Necoro' Neumann2-9/+6 2009-10-28Corrected config path handling.René 'Necoro' Neumann2-9/+6 2009-10-24Fix the segfault in GLib due to wrong encodingRené 'Necoro' Neumann1-0/+1 2009-10-24Wrong debug message in new_version pluginRené 'Necoro' Neumann1-1/+1 2009-10-24Update TRANSLATING to use gitRené 'Necoro' Neumann1-2/+15 2009-10-24Also show revision during startup and with -vRené 'Necoro' Neumann1-1/+5 2009-10-24Adding revison info to version output.René 'Necoro' Neumann3-2/+44 2009-10-23Turn new_version plugin from a mess into sth useful.René 'Necoro' Neumann2-10/+10 2009-10-23Honor branches different from masterRené 'Necoro' Neumann1-2/+4 2009-10-23Change the new_version plugin to use git.René 'Necoro' Neumann2-32/+33 2009-10-15Objectified all the functional stuff in backend.__init__.René 'Necoro' Neumann2-32/+34 2009-10-08Enhance the splash window handling.René 'Necoro' Neumann2-2/+9 2009-10-08Enhance the splash window handling.René 'Necoro' Neumann2-2/+9 2009-10-05Some more stuff to ignoreRené 'Necoro' Neumann1-0/+3 2009-10-05Renamed the ignore fileRené 'Necoro' Neumann1-0/+0 2009-10-05Update NEWSRené 'Necoro' Neumann1-0/+1 2009-10-05Also allow 'unselect all' in the PkgListRené 'Necoro' Neumann1-1/+10 2009-10-05Now have it the sorted way in PkgListsRené 'Necoro' Neumann2-3/+9 2009-10-05Enhanced system.sort_package_list to also sort CPVsRené 'Necoro' Neumann5-27/+38 2009-10-05Added an PkgList window and rewrote UpdateWindow and WorldListWindow to use itRené 'Necoro' Neumann3-39/+63 2009-10-05Add uninstall button and rename to PkgListWindowRené 'Necoro' Neumann1-2/+17 2009-10-05First quick hack to have a world listRené 'Necoro' Neumann3-2/+24