summaryrefslogtreecommitdiff
path: root/portato/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'portato/gui/windows')
-rw-r--r--portato/gui/windows/main.py24
1 files changed, 20 insertions, 4 deletions
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index e51897f..472ddf0 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -28,7 +28,7 @@ from ...helper import debug, warning, error, info, unique_array
from ...session import Session
from ...db import Database
from ...constants import CONFIG_LOCATION, VERSION, APP_ICON, ICON_DIR
-from ...backend.exceptions import PackageNotFoundException, BlockedException
+from ...backend.exceptions import PackageNotFoundException, BlockedException, VersionsNotFoundException
# more GUI stuff
from ..utils import Config, GtkThread, get_color
@@ -38,7 +38,8 @@ from ..wrapper import GtkTree, GtkConsole
from ..views import LogView, HighlightView, InstalledOnlyView, LazyStoreView
from ..dialogs import (blocked_dialog, changed_flags_dialog, io_ex_dialog,
nothing_found_dialog, queue_not_empty_dialog, remove_deps_dialog,
- remove_queue_dialog, remove_updates_dialog, unmask_dialog)
+ remove_queue_dialog, remove_updates_dialog, unmask_dialog,
+ no_versions_dialog)
from ..exceptions import PreReqError
# even more GUI stuff
@@ -745,7 +746,11 @@ class MainWindow (Window):
store.clear()
if name:
- for cat, pkg, is_inst in self.db.get_cat(name, self.sortPkgListByName):
+ for cat, pkg, is_inst, disabled in self.db.get_cat(name, self.sortPkgListByName):
+ if disabled:
+ warning(_("Package '%s/%s' is disabled."), cat, pkg)
+ continue
+
if is_inst:
icon = self.icons["installed"]
elif not self.showAll:
@@ -806,6 +811,8 @@ class MainWindow (Window):
self.slotcol.set_visible(False)
packages = system.sort_package_list(system.find_packages(cp, masked=True))
+ if not packages:
+ raise VersionsNotFoundException(cp)
# append versions
for vers, inst, slot in ((x.get_version(), x.is_installed(), get_slot(x)) for x in packages):
@@ -1336,8 +1343,17 @@ class MainWindow (Window):
"""
store, it = selection.get_selected()
if it:
+ oldcp = self.selCP
+
self.selCP = "%s/%s" % (store.get_value(it, 2), store.get_value(it, 1))
- self.fill_version_list(self.selCP)
+ try:
+ self.fill_version_list(self.selCP)
+ except VersionsNotFoundException, e:
+ warning(_("No versions of package '%s' found!.") % self.selCP)
+ no_versions_dialog(self.selCP)
+ self.db.disable(self.selCP)
+ self.selCP = oldcp
+
return True
def cb_pkg_list_header_clicked(self, col):
ab07740c4b5e230d3fc92ddd2&follow=1'>pocompile testnecoro1-2/+3 2007-08-05pocompile testnecoro1-1/+6 2007-08-05i18n support and german translationsnecoro3-3/+11 2007-08-05i18n support and german translationsnecoro19-87/+1391 2007-08-04added an uncaught exception dialognecoro2-2/+1 2007-08-04added an uncaught exception dialognecoro4-3/+93 2007-08-04bugfixesnecoro3-5/+20 2007-08-01Removed "(GTK)" from desktop filenecoro1-1/+1 2007-07-30updatesnecoro1-1/+1 2007-07-30updatesnecoro2-21/+64 2007-07-28some more pause emerge itemsnecoro5-276/+423 2007-07-27changed design / added linknecoro3-66/+154 2007-07-26changed design / added linknecoro2-34/+27 2007-07-25changed design / added linknecoro5-86/+188 2007-07-24made the resume_loop-plugin change titles toonecoro5-7/+22 2007-07-21added logviewersnecoro7-215/+429 2007-07-21updated howtonecoro1-14/+24 2007-07-20new Plugin Schemenecoro1-5/+4 2007-07-20new Plugin Schemenecoro1-1/+1 2007-07-20new Plugin Schemenecoro9-162/+214 2007-07-13fixesnecoro4-27/+37 2007-07-13new fancier log outputnecoro14-127/+116 2007-07-11added SIGSTOP/SIGCONT support; SIGTERM now works ;)necoro8-208/+275 2007-07-09bug in shutdown pluginnecoro2-5/+12 2007-07-09added resume_loop pluginnecoro1-1/+1 2007-07-09added resume_loop pluginnecoro10-22/+162 2007-07-07some more documentationnecoro6-4/+108 2007-07-07Some documentation worknecoro7-18/+129