diff options
author | necoro <> | 2006-09-30 08:23:46 +0000 |
---|---|---|
committer | necoro <> | 2006-09-30 08:23:46 +0000 |
commit | e9df5f9ed8b2d67ff74a7861d2ccc4f51a10d86c (patch) | |
tree | 76d9de6a72f67cb914396ba88b7204b80bac7dc7 | |
parent | 702f6a0b7d3799b70ed904e199f4275bc0dc54e2 (diff) | |
download | portato-e9df5f9ed8b2d67ff74a7861d2ccc4f51a10d86c.tar.gz portato-e9df5f9ed8b2d67ff74a7861d2ccc4f51a10d86c.tar.bz2 portato-e9df5f9ed8b2d67ff74a7861d2ccc4f51a10d86c.zip |
0.3.2 release; changed font in terminal; added new "masking"-dialog
Diffstat (limited to '')
-rw-r--r-- | doc/Changelog | 9 | ||||
-rw-r--r-- | geneticone/gui/gui_helper.py | 6 | ||||
-rw-r--r-- | geneticone/gui/windows.py | 32 |
3 files changed, 36 insertions, 11 deletions
diff --git a/doc/Changelog b/doc/Changelog index 2b19a75..b394eb9 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,10 @@ -0.3.1 +0.3.2: +- restructured program files +- changed font in terminal +- added new dialog warning when we cannot emerge a masked program +- using debug() instead of print +- fixing small bugs + +0.3.1: - added AboutWindow - make the menu work diff --git a/geneticone/gui/gui_helper.py b/geneticone/gui/gui_helper.py index 2f98bd7..b485bf0 100644 --- a/geneticone/gui/gui_helper.py +++ b/geneticone/gui/gui_helper.py @@ -95,7 +95,11 @@ class EmergeQueue: if not unmerge: try: # insert dependencies - pkg = backend.find_packages("="+cpv)[0] + pkg = backend.find_packages("="+cpv) + if pkg: + pkg = pkg[0] + else: + raise backend.PackageNotFoundException(cpv) deps = pkg.get_dep_packages() if update: diff --git a/geneticone/gui/windows.py b/geneticone/gui/windows.py index 7fe7d62..bfc279d 100644 --- a/geneticone/gui/windows.py +++ b/geneticone/gui/windows.py @@ -241,22 +241,25 @@ class PackageWindow: def cb_emerge_clicked (self, button, data = None): """Adds the package to the EmergeQueue.""" if not am_i_root(): - errorMB = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, "You cannot (un)merge without being root.") - errorMB.run() - errorMB.destroy() + not_root_dialog() else: - self.queue.append(self.actual_package().get_cpv(), False) + try: + self.queue.append(self.actual_package().get_cpv(), False) + except backend.PackageNotFoundException, e: + masked_dialog(e[0]) self.window.destroy() return True def cb_unmerge_clicked (self, button, data = None): """Adds the package to the UnmergeQueue.""" - if not backend.am_i_root(): - errorMB = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, "You cannot (un)merge without being root.") - errorMB.run() - errorMB.destroy() + if not am_i_root(): + not_root_dialog() else: - self.queue.append(self.actual_package().get_cpv(), True) + try: + self.queue.append(self.actual_package().get_cpv(), False) + except backend.PackageNotFoundException, e: + masked_dialog(e[0]) + self.window.destroy() return True @@ -432,6 +435,7 @@ class MainWindow: term = vte.Terminal() term.set_scrollback_lines(1024) term.set_scroll_on_output(True) + term.set_font_from_string("Monospace 11") # XXX why is this not working with the colors term.set_color_background(gtk.gdk.color_parse("white")) term.set_color_foreground(gtk.gdk.color_parse("black")) @@ -630,3 +634,13 @@ def blocked_dialog (blocked, blocks): dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, blocked+" is blocked by "+blocks+".\nPlease unmerge the blocking package.") dialog.run() dialog.destroy() + +def not_root_dialog (): + errorMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, "You cannot (un)merge without being root.") + errorMB.run() + errorMB.destroy() + +def masked_dialog (cpv): + dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, cpv+" seems to be masked.\nPlease edit the appropriate file(s) to unmask it and restart Genetic/One.\n") + dialog.run() + dialog.destroy() |