summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
Diffstat (limited to 'portato')
-rw-r--r--portato/backend/package.py6
-rw-r--r--portato/backend/portage/package.py4
-rw-r--r--portato/gui/gtk/windows.py11
-rw-r--r--portato/gui/qt/windows.py6
-rw-r--r--portato/gui/templates/ui/MainWindow.ui5
5 files changed, 27 insertions, 5 deletions
diff --git a/portato/backend/package.py b/portato/backend/package.py
index f9b675d..59d552b 100644
--- a/portato/backend/package.py
+++ b/portato/backend/package.py
@@ -241,6 +241,12 @@ class Package:
@rtype: boolean"""
raise NotImplementedError
+
+ def get_overlay_path(self):
+ """Returns the path to the current overlay.
+ @rtype: string"""
+
+ raise NotImplementedError
def is_in_system (self):
"""Returns False if the package could not be found in the portage system.
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py
index 38e7369..e39dbe2 100644
--- a/portato/backend/portage/package.py
+++ b/portato/backend/portage/package.py
@@ -50,6 +50,10 @@ class PortagePackage (Package):
dir,ovl = self._settings.porttree.dbapi.findname2(self._cpv)
return ovl != self._settings.settings["PORTDIR"]
+ def get_overlay_path (self):
+ dir,ovl = self._settings.porttree.dbapi.findname2(self._cpv)
+ return ovl
+
def is_in_system (self):
return (self._status != None)
diff --git a/portato/gui/gtk/windows.py b/portato/gui/gtk/windows.py
index 2f06bc0..79e24b4 100644
--- a/portato/gui/gtk/windows.py
+++ b/portato/gui/gtk/windows.py
@@ -367,7 +367,7 @@ class PackageTable:
self.descLabel = self.tree.get_widget("descLabel")
self.notInSysLabel = self.tree.get_widget("notInSysLabel")
self.missingLabel = self.tree.get_widget("missingLabel")
-
+
# buttons
self.emergeBtn = self.tree.get_widget("pkgEmergeBtn")
self.unmergeBtn = self.tree.get_widget("pkgUnmergeBtn")
@@ -419,10 +419,15 @@ class PackageTable:
else:
desc = "<b>"+desc+"</b>"
use_markup = True
- desc = "<i><u>"+self.actual_package().get_cp()+"</u></i>\n\n"+desc
+ name = "<i><u>"+self.actual_package().get_cp()+"</u></i>"
+ if self.actual_package().is_overlay():
+ name = "%s\n<i>(Overlay: %s)</i>" % (name, self.actual_package().get_overlay_path())
+
+ desc = "%s\n\n%s" % (name, desc)
+
self.descLabel.set_use_markup(use_markup)
self.descLabel.set_label(desc)
-
+
if not self.queue or not self.doEmerge:
self.emergeBtn.set_sensitive(False)
self.unmergeBtn.set_sensitive(False)
diff --git a/portato/gui/qt/windows.py b/portato/gui/qt/windows.py
index 80e193f..904b07f 100644
--- a/portato/gui/qt/windows.py
+++ b/portato/gui/qt/windows.py
@@ -311,9 +311,13 @@ class PackageDetails:
desc = "<no description>"
else:
desc = "<b>%s</b>" % desc
+
+ name = "<i><u>%s</i></u>" % self.actual_package().get_cp()
+ if self.actual_package().is_overlay():
+ name = "%s\n<i>%s</i>" % (name, self.actual_package().get_overlay_path())
self.window.descLabel.setText(desc)
- self.window.nameLabel.setText("<i><u>%s</i></u>" % self.actual_package().get_cp())
+ self.window.nameLabel.setText(name)
# disable buttons when emerging is not allowed
if not self.queue or not self.doEmerge:
diff --git a/portato/gui/templates/ui/MainWindow.ui b/portato/gui/templates/ui/MainWindow.ui
index def2d67..569f73e 100644
--- a/portato/gui/templates/ui/MainWindow.ui
+++ b/portato/gui/templates/ui/MainWindow.ui
@@ -89,7 +89,7 @@
</widget>
<widget class="QTabWidget" name="tabWidget" >
<property name="currentIndex" >
- <number>1</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="pkgTab" >
<attribute name="title" >
@@ -120,6 +120,9 @@
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
+ <property name="wordWrap" >
+ <bool>true</bool>
+ </property>
</widget>
</item>
<item>