summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_shm/__init__.py (renamed from shm/__init__.py)0
-rw-r--r--_shm/shm_wrapper.py (renamed from shm/shm_wrapper.py)0
-rw-r--r--_shm/shmmodule.c (renamed from shm/shmmodule.c)0
-rw-r--r--doc/TODO3
-rw-r--r--etc/portato.cfg9
-rwxr-xr-xportato.py2
-rw-r--r--portato/gui/gtk/dialogs.py6
-rw-r--r--portato/gui/gtk/windows.py153
-rw-r--r--portato/gui/gtk/wrapper.py38
-rw-r--r--portato/gui/gui_helper.py66
-rw-r--r--portato/gui/templates/portato.glade455
-rw-r--r--portato/gui/wrapper.py34
-rw-r--r--portato/plistener.py2
-rw-r--r--setup.py6
14 files changed, 525 insertions, 249 deletions
diff --git a/shm/__init__.py b/_shm/__init__.py
index e69de29..e69de29 100644
--- a/shm/__init__.py
+++ b/_shm/__init__.py
diff --git a/shm/shm_wrapper.py b/_shm/shm_wrapper.py
index bf29f65..bf29f65 100644
--- a/shm/shm_wrapper.py
+++ b/_shm/shm_wrapper.py
diff --git a/shm/shmmodule.c b/_shm/shmmodule.c
index 98596f1..98596f1 100644
--- a/shm/shmmodule.c
+++ b/_shm/shmmodule.c
diff --git a/doc/TODO b/doc/TODO
index 6027737..6a959ca 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -16,6 +16,7 @@ Backend:
- save/restore queue on exit/start
- only remove already merged packages from queue
- make sure, a package being removed from the queue is not needed as a dependency by another package
+- binary package support
- "nach hause telefonieren" :)
@@ -38,6 +39,8 @@ GTK:
- show dependencies
- reload package table when emerge is finished
- dependency tree out of the installed packages
+- better display for search results
+
Qt (stopped):
---
diff --git a/etc/portato.cfg b/etc/portato.cfg
index 25b9f89..8870757 100644
--- a/etc/portato.cfg
+++ b/etc/portato.cfg
@@ -73,4 +73,13 @@ browserCmd = firefox
; sets the font of the console - string values
consolefont = Monospace 11
+; sets the position of the tabs of the two notebooks
+; allowed positions:
+; - 1 : top
+; - 2 : bottom
+; - 3 : left
+; - 4 : right
+packagetabpos = 2
+systemtabpos = 2
+
# vim:ts=4:sw=4:ft=cfg
diff --git a/portato.py b/portato.py
index 42726ee..1e3a7c9 100755
--- a/portato.py
+++ b/portato.py
@@ -102,7 +102,7 @@ def main ():
try:
import shm_wrapper as shm
except ImportError:
- from portato.shm import shm_wrapper as shm
+ from portato._shm import shm_wrapper as shm
mem = shm.create_memory(1024, permissions=0600)
sig = shm.create_semaphore(InitialValue = 0, permissions = 0600)
diff --git a/portato/gui/gtk/dialogs.py b/portato/gui/gtk/dialogs.py
index 7bea2b8..7a1f28d 100644
--- a/portato/gui/gtk/dialogs.py
+++ b/portato/gui/gtk/dialogs.py
@@ -68,6 +68,12 @@ def remove_deps_dialog ():
infoMB.destroy()
return ret
+def remove_updates_dialog():
+ askMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, _("This is the updates queue. You cannot remove single elements.\nDo you want to clear the whole queue instead?"))
+ ret = askMB.run()
+ askMB.destroy()
+ return ret
+
def remove_queue_dialog ():
askMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, _("Do you really want to clear the whole queue?"))
ret = askMB.run()
diff --git a/portato/gui/gtk/windows.py b/portato/gui/gtk/windows.py
index 3f5255f..d8366a0 100644
--- a/portato/gui/gtk/windows.py
+++ b/portato/gui/gtk/windows.py
@@ -37,7 +37,7 @@ from .exception_handling import GtkThread
from .views import LogView, HighlightView, InstalledOnlyView
from .dialogs import (blocked_dialog, changed_flags_dialog, io_ex_dialog,
nothing_found_dialog, queue_not_empty_dialog, remove_deps_dialog,
- remove_queue_dialog, unmask_dialog)
+ remove_queue_dialog, remove_updates_dialog, unmask_dialog)
class AboutWindow (AbstractDialog):
"""A window showing the "about"-informations."""
@@ -304,23 +304,37 @@ class PreferenceWindow (AbstractDialog):
"browserEdit" : ("browserCmd", "GUI")
}
- def __init__ (self, parent, cfg, set_console_font):
+ # the mappings for the tabpos combos
+ tabpos = {
+ 1 : gtk.POS_TOP,
+ 2 : gtk.POS_BOTTOM,
+ 3 : gtk.POS_LEFT,
+ 4 : gtk.POS_RIGHT
+ }
+
+ def __init__ (self, parent, cfg, console_fn, linkbtn_fn, tabpos_fn):
"""Constructor.
@param parent: parent window
@type parent: gtk.Window
@param cfg: configuration object
@type cfg: gui_helper.Config
- @param set_console_font: function to call to set the console font
- @type set_console_font: function(string)"""
+ @param console_fn: function to call to set the console font
+ @type console_fn: function(string)
+ @param linkbtn_fn: function to call to set the linkbutton behavior
+ @type linkbtn_fn: function(string)
+ @param tabpos_fn: function to call to set the tabposition of the notebooks
+ @type tabpos_fn: function(gtk.ComboBox,int)"""
AbstractDialog.__init__(self, parent)
# our config
self.cfg = cfg
- # the console font setter
- self.set_console_font = set_console_font
+ # the setter functions
+ self.console_fn = console_fn
+ self.linkbtn_fn = linkbtn_fn
+ self.tabpos_fn = tabpos_fn
# set the bg-color of the hint
hintEB = self.tree.get_widget("hintEB")
@@ -348,6 +362,19 @@ class PreferenceWindow (AbstractDialog):
self.consoleFontBtn = self.tree.get_widget("consoleFontBtn")
self.consoleFontBtn.set_font_name(self.cfg.get("consolefont", section = "GTK"))
+ # the comboboxes
+ self.systemTabCombo = self.tree.get_widget("systemTabCombo")
+ self.pkgTabCombo = self.tree.get_widget("packageTabCombo")
+
+ for c in (self.systemTabCombo, self.pkgTabCombo):
+ m = c.get_model()
+ m.clear()
+ for i in (_("Top"), _("Bottom"), _("Left"), _("Right")):
+ m.append((i,))
+
+ self.systemTabCombo.set_active(int(self.cfg.get("systemTabPos", section = "GTK"))-1)
+ self.pkgTabCombo.set_active(int(self.cfg.get("packageTabPos", section = "GTK"))-1)
+
self.window.show_all()
def _save(self):
@@ -367,9 +394,17 @@ class PreferenceWindow (AbstractDialog):
font = self.consoleFontBtn.get_font_name()
self.cfg.set("consolefont", font, section = "GTK")
- self.set_console_font(font)
+ self.console_fn(font)
+
+ pkgPos = self.pkgTabCombo.get_active()+1
+ sysPos = self.systemTabCombo.get_active()+1
+
+ self.cfg.set("packageTabPos", str(pkgPos), section = "GTK")
+ self.cfg.set("systemTabPos", str(sysPos), section = "GTK")
+
+ self.tabpos_fn(map(self.tabpos.get, (pkgPos, sysPos)))
- gtk.link_button_set_uri_hook(lambda btn, x: get_listener().send_cmd([self.cfg.get("browserCmd", section = "GUI"), btn.get_uri()]))
+ self.linkbtn_fn(self.cfg.get("browserCmd", section="GUI"))
def cb_ok_clicked(self, button):
"""Saves, writes to config-file and closes the window."""
@@ -642,15 +677,15 @@ class PackageTable:
if emerge:
try:
try:
- self.queue.append(self.actual_package().get_cpv(), unmerge = False, update = update)
+ self.queue.append(self.actual_package().get_cpv(), type = "install", update = update)
except PackageNotFoundException, e:
if unmask_dialog(e[0]) == gtk.RESPONSE_YES:
- self.queue.append(self.actual_package().get_cpv(), unmerge = False, unmask = True, update = update)
+ self.queue.append(self.actual_package().get_cpv(), type = "install", unmask = True, update = update)
except BlockedException, e:
blocked_dialog(e[0], e[1])
else:
try:
- self.queue.append(self.actual_package().get_cpv(), unmerge = True)
+ self.queue.append(self.actual_package().get_cpv(), type = "uninstall")
except PackageNotFoundException, e:
error(_("Package could not be found: %s"), e[0])
#masked_dialog(e[0])
@@ -752,9 +787,9 @@ class PackageTable:
self.actual_package().remove_new_use_flags()
self.actual_package().remove_new_masked()
self.actual_package().remove_new_testing()
- self.versList.get_model().clear()
- self.fill_vers_list()
- self.cb_vers_list_changed()
+ self.versionCombo.get_model().clear()
+ self.fill_version_combo()
+ self.cb_version_combo_changed()
if self.instantChange:
self._update_keywords(True, update = True)
return True
@@ -762,13 +797,13 @@ class PackageTable:
def cb_package_emerge_clicked (self, button):
"""Callback for pressed emerge-button. Adds the package to the EmergeQueue."""
self._update_keywords(True)
- self.main.notebook.set_current_page(self.main.QUEUE_PAGE)
+ self.main.sysNotebook.set_current_page(self.main.QUEUE_PAGE)
return True
def cb_package_unmerge_clicked (self, button):
"""Callback for pressed unmerge-button clicked. Adds the package to the UnmergeQueue."""
self._update_keywords(False)
- self.main.notebook.set_current_page(self.main.QUEUE_PAGE)
+ self.main.sysNotebook.set_current_page(self.main.QUEUE_PAGE)
return True
def cb_testing_toggled (self, button):
@@ -978,8 +1013,9 @@ class MainWindow (Window):
splash(_("Finishing startup"))
- # notebook
- self.notebook = self.tree.get_widget("systemNotebook")
+ # notebooks
+ self.sysNotebook = self.tree.get_widget("systemNotebook")
+ self.pkgNotebook = self.tree.get_widget("packageNotebook")
self.window.show_all()
# the hidden stuff
@@ -1025,7 +1061,7 @@ class MainWindow (Window):
self.queueList.set_model(store)
cell = gtk.CellRendererText()
- col = gtk.TreeViewColumn(_("Queue"), cell, text = 0)
+ col = gtk.TreeViewColumn(_("Queue"), cell, markup = 0)
self.queueList.append_column(col)
col = gtk.TreeViewColumn(_("Options"), cell, markup = 1)
@@ -1163,6 +1199,13 @@ class MainWindow (Window):
"""Is called when we want to jump to a specific package."""
self.show_package(cp, self.queue, version = version)
+ def set_uri_hook (self, browser):
+ gtk.link_button_set_uri_hook(lambda btn, x: get_listener().send_cmd([browser, btn.get_uri()]))
+
+ def set_notebook_tabpos (self, tabposlist):
+ self.pkgNotebook.set_tab_pos(tabposlist[0])
+ self.sysNotebook.set_tab_pos(tabposlist[1])
+
def title_update (self, title):
def window_title_update (title):
@@ -1189,7 +1232,7 @@ class MainWindow (Window):
else:
title = (_("Console (%(title)s)") % {"title" : title})
- self.notebook.set_tab_label_text(self.termHB, title)
+ self.sysNotebook.set_tab_label_text(self.termHB, title)
return False
@@ -1297,10 +1340,8 @@ class MainWindow (Window):
tooltip.set_markup(string)
return string != ""
- def cb_emerge_clicked (self, action):
- """Do emerge."""
-
- self.notebook.set_current_page(self.CONSOLE_PAGE)
+ def cb_execute_clicked (self, action):
+ """Execute the current queue."""
if len(flags.newUseFlags) > 0:
changed_flags_dialog(_("use flags"))
@@ -1314,20 +1355,27 @@ class MainWindow (Window):
flags.write_masked()
flags.write_testing()
system.reload_settings()
+
+ model, iter = self.queueList.get_selection().get_selected()
+
+ if iter is None:
+ if model.iter_n_children(None) == 1: # only one queue there - take this as being selected
+ iter = model.get_iter_root()
+ else:
+ return False
+
+ self.sysNotebook.set_current_page(self.CONSOLE_PAGE)
- if not self.doUpdate:
- self.queue.emerge(force=True)
+ # test which type of queue we have here
+ if self.queueTree.is_in_emerge(iter):
+ self.queue.emerge(force = True)
+ elif self.queueTree.is_in_unmerge(iter):
+ self.queue.unmerge(force = True)
else:
self.queue.update_world(force=True, newuse = self.cfg.get_boolean("newuse"), deep = self.cfg.get_boolean("deep"))
- self.doUpdate = False
-
- def cb_unmerge_clicked (self, button):
- """Do unmerge."""
- self.notebook.set_current_page(self.CONSOLE_PAGE)
- self.queue.unmerge(force=True)
return True
-
+
def cb_update_clicked (self, action):
def __update():
@@ -1335,15 +1383,15 @@ class MainWindow (Window):
try:
try:
for pkg, old_pkg in updating:
- self.queue.append(pkg.get_cpv(), unmask = False)
+ self.queue.append(pkg.get_cpv(), type = "update", unmask = False)
except PackageNotFoundException, e:
if unmask_dialog(e[0]) == gtk.RESPONSE_YES:
for pkg, old_pkg in updating:
- self.queue.append(pkg.get_cpv(), unmask = True)
+ self.queue.append(pkg.get_cpv(), type = "update", unmask = True)
except BlockedException, e:
blocked_dialog(e[0], e[1])
- self.queue.remove_children(self.queue.emergeIt)
+ self.queue.remove_children(self.queueTree.get_update_it())
return False
@@ -1353,7 +1401,6 @@ class MainWindow (Window):
updating = system.update_world(newuse = self.cfg.get_boolean("newuse"), deep = self.cfg.get_boolean("deep"))
debug("updating list: %s --> length: %s", [(x.get_cpv(), y.get_cpv()) for x,y in updating], len(updating))
gobject.idle_add(cb_idle_append, updating)
- if len(updating): self.doUpdate = True
finally:
self.window.window.set_cursor(None)
@@ -1363,29 +1410,35 @@ class MainWindow (Window):
def cb_remove_clicked (self, button):
"""Removes a selected item in the (un)emerge-queue if possible."""
- selected = self.queueList.get_selection()
+ model, iter = self.queueList.get_selection().get_selected()
- if selected:
- model, iter = selected.get_selected()
+ if iter:
+ parent = model.iter_parent(iter)
- if iter == None: return False
-
- if not model.iter_parent(iter): # top-level
+ if self.queueTree.is_in_update(iter) and parent:
+ if remove_updates_dialog() == gtk.RESPONSE_YES:
+ self.queue.remove_with_children(self.queueTree.get_update_it())
+
+ elif not parent: # top-level
if model.iter_n_children(iter) > 0: # and has children which can be removed :)
if remove_queue_dialog() == gtk.RESPONSE_YES :
- self.queue.remove_children(iter)
- self.doUpdate = False
+ self.queue.remove_with_children(iter)
+ else:
+ self.queue.remove(iter)
- elif model.iter_parent(model.iter_parent(iter)): # this is in the 3rd level => dependency
+ elif model.iter_parent(parent): # this is in the 3rd level => dependency
remove_deps_dialog()
else:
self.queue.remove_with_children(iter)
- self.doUpdate = False
+
+ if model.iter_n_children(parent) == 0: # no more children left - remove queue too
+ self.queue.remove(parent)
- return True
+ return True
+ return False
def cb_sync_clicked (self, action):
- self.notebook.set_current_page(self.CONSOLE_PAGE)
+ self.sysNotebook.set_current_page(self.CONSOLE_PAGE)
cmd = self.cfg.get("syncCommand")
if cmd != "emerge --sync":
@@ -1424,7 +1477,7 @@ class MainWindow (Window):
SearchWindow(self.window, packages, self.jump_to)
def cb_preferences_clicked (self, button):
- PreferenceWindow(self.window, self.cfg, self.console.set_font_from_string)
+ PreferenceWindow(self.window, self.cfg, self.console.set_font_from_string, self.set_uri_hook, self.set_notebook_tabpos)
return True
def cb_about_clicked (self, button):
diff --git a/portato/gui/gtk/wrapper.py b/portato/gui/gtk/wrapper.py
index a322514..cadec6a 100644
--- a/portato/gui/gtk/wrapper.py
+++ b/portato/gui/gtk/wrapper.py
@@ -29,8 +29,9 @@ class GtkTree (Tree):
self.tree = tree
self.cpv_col = col
- self.emergeIt = self.append(None, ["Emerge", ""])
- self.unmergeIt = self.append(None, ["Unmerge", ""])
+ self.emergeIt = None
+ self.unmergeIt = None
+ self.updateIt = None
def build_append_value (self, cpv, oneshot = False, update = False, downgrade = False, version = None, useChange = []):
string = ""
@@ -60,17 +61,38 @@ class GtkTree (Tree):
return [cpv, string]
+ def set_in_progress (self, it):
+ iter = self.tree.get_iter_from_string(self.tree.get_string_from_iter(it).split(":")[0])
+ self.tree.set_value(iter, 1, "<b>%s</b>" % _("(In Progress)"))
+
def get_emerge_it (self):
+ if self.emergeIt is None:
+ self.emergeIt = self.append(None, ["<b>%s</b>" % _("Install"), ""])
return self.emergeIt
def get_unmerge_it (self):
+ if self.unmergeIt is None:
+ self.unmergeIt = self.append(None, ["<b>%s</b>" % _("Uninstall"), ""])
+
return self.unmergeIt
+ def get_update_it (self):
+ if self.updateIt is None:
+ self.updateIt = self.append(None, ["<b>%s</b>" % _("Update"), ""])
+
+ return self.updateIt
+
+ def is_in (self, it, in_it):
+ return in_it and self.tree.get_string_from_iter(it).split(":")[0] == self.tree.get_string_from_iter(in_it)
+
def is_in_emerge (self, it):
- return self.tree.get_string_from_iter(it).split(":")[0] == self.tree.get_string_from_iter(self.emergeIt)
+ return self.is_in(it, self.emergeIt)
def is_in_unmerge (self, it):
- return self.tree.get_string_from_iter(it).split(":")[0] == self.tree.get_string_from_iter(self.unmergeIt)
+ return self.is_in(it, self.unmergeIt)
+
+ def is_in_update (self, it):
+ return self.is_in(it, self.updateIt)
def iter_has_parent (self, it):
return (self.tree.iter_parent(it) != None)
@@ -90,10 +112,18 @@ class GtkTree (Tree):
def get_value (self, it, column):
return self.tree.get_value(it, column)
+ def iter_equal (self, it, other_it):
+ return self.tree.get_string_from_iter(it) == self.tree.get_string_from_iter(other_it)
+
def append (self, parent = None, values = None):
return self.tree.append(parent, values)
def remove (self, it):
+
+ if self.emergeIt and self.iter_equal(it, self.emergeIt) : self.emergeIt = None
+ elif self.unmergeIt and self.iter_equal(it, self.unmergeIt) : self.unmergeIt = None
+ elif self.updateIt and self.iter_equal(it, self.updateIt) : self.updateIt = None
+
self.tree.remove(it)
def get_original (self):
diff --git a/portato/gui/gui_helper.py b/portato/gui/gui_helper.py
index 1e465a7..0459d5b 100644
--- a/portato/gui/gui_helper.py
+++ b/portato/gui/gui_helper.py
@@ -264,13 +264,6 @@ class EmergeQueue:
self.db = db
self.title_update = title_update
- # our iterators pointing at the toplevels; they are set to None if we do not have a tree
- if self.tree:
- self.emergeIt = self.tree.get_emerge_it()
- self.unmergeIt = self.tree.get_unmerge_it()
- else:
- self.emergeIt = self.unmergeIt = None
-
def _get_pkg_from_cpv (self, cpv, unmask = False):
"""Gets a L{backend.Package}-object from a cpv.
@@ -390,14 +383,14 @@ class EmergeQueue:
self.remove_with_children(subIt)
raise
- def append (self, cpv, unmerge = False, update = False, forceUpdate = False, unmask = False, oneshot = False):
+ def append (self, cpv, type = "install", update = False, forceUpdate = False, unmask = False, oneshot = False):
"""Appends a cpv either to the merge queue or to the unmerge-queue.
Also updates the tree-view.
@param cpv: Package to add
@type cpv: string (cat/pkg-ver)
- @param unmerge: Set to True if you want to unmerge this package - else False.
- @type unmerge: boolean
+ @param type: The type of this append process. Possible values are "install", "uninstall", "update".
+ @type unmerge: string
@param update: Set to True if a package is going to be updated (e.g. if the use-flags changed).
@type update: boolean
@param forceUpdate: Set to True if the update should be forced.
@@ -409,7 +402,7 @@ class EmergeQueue:
@raises portato.backend.PackageNotFoundException: if trying to add a package which does not exist"""
- if not unmerge: # emerge
+ if type in ("install", "update"): # emerge
# insert dependencies
pkg = self._get_pkg_from_cpv(cpv, unmask)
deps = pkg.get_dep_packages()
@@ -429,14 +422,17 @@ class EmergeQueue:
self.update_tree(parentIt, cpv, unmask, oneshot = oneshot)
else: # not update
- self._queue_append(cpv, oneshot)
- if self.emergeIt:
- self.update_tree(self.emergeIt, cpv, unmask, oneshot = oneshot)
+ if type == "install":
+ self._queue_append(cpv, oneshot)
+ if self.tree:
+ self.update_tree(self.tree.get_emerge_it(), cpv, unmask, oneshot = oneshot)
+ elif type == "update" and self.tree:
+ self.update_tree(self.tree.get_update_it(), cpv, unmask, oneshot = oneshot)
else: # unmerge
self.unmergequeue.append(cpv)
- if self.unmergeIt: # update tree
- self.tree.append(self.unmergeIt, self.tree.build_append_value(cpv))
+ if self.tree: # update tree
+ self.tree.append(self.tree.get_unmerge_it(), self.tree.build_append_value(cpv))
def _queue_append (self, cpv, oneshot = False):
"""Convenience function appending a cpv either to self.mergequeue or to self.oneshotmerge.
@@ -453,8 +449,11 @@ class EmergeQueue:
if cpv not in self.oneshotmerge:
self.oneshotmerge.append(cpv)
- def doEmerge (self, *args, **kwargs):
- self.threadQueue.put(self.__emerge, *args, **kwargs)
+ def doEmerge (self, options, packages, it, *args, **kwargs):
+ if self.tree and it:
+ self.tree.set_in_progress(it[0])
+
+ self.threadQueue.put(self.__emerge, options, packages, it, *args, **kwargs)
def __emerge (self, options, packages, it, command = None):
"""Calls emerge and updates the terminal.
@@ -530,14 +529,21 @@ class EmergeQueue:
its = []
for k in queue:
list += ["="+k]
- its.append(self.iters[k])
+ if self.tree: its.append(self.iters[k])
return list, its
+ if self.tree:
+ ownit = [self.tree.get_emerge_it()]
+ else:
+ ownit = []
+
# oneshot-queue
if self.oneshotmerge:
# prepare package-list for oneshot
list, its = prepare(self.oneshotmerge)
+ if not self.mergequeue :# the other one does not exist - remove completely
+ its = ownit
s = system.get_oneshot_option()
if not force: s += system.get_pretend_option()
@@ -549,6 +555,8 @@ class EmergeQueue:
if self.mergequeue:
# prepare package-list
list, its = prepare(self.mergequeue)
+ if not self.oneshotmerge: # the other one does not exist - remove completely
+ its = ownit
s = []
if not force: s = system.get_pretend_option()
@@ -573,7 +581,12 @@ class EmergeQueue:
if not force: s += system.get_pretend_option()
if options is not None: s += options
- self.doEmerge(s,list, [self.unmergeIt], caller = self.unmerge)
+ if self.tree:
+ it = [self.tree.get_unmerge_it()]
+ else:
+ it = []
+
+ self.doEmerge(s,list, it, caller = self.unmerge)
def update_world(self, force = False, newuse = False, deep = False, options = None):
"""Does an update world. newuse and deep are the arguments handed to emerge.
@@ -594,7 +607,12 @@ class EmergeQueue:
if not force: opts += system.get_pretend_option()
if options is not None: opts += options
- self.doEmerge(opts, ["world"], [self.emergeIt], caller = self.update_world)
+ if self.tree:
+ it = [self.tree.get_update_it()]
+ else:
+ it = []
+
+ self.doEmerge(opts, ["world"], it, caller = self.update_world)
def sync (self, command = None):
"""Calls "emerge --sync".
@@ -677,7 +695,7 @@ class EmergeQueue:
@param removeNewFlags: True if new flags should be removed; False otherwise. Default: True.
@type removeNewFlags: boolean"""
- if self.tree.iter_has_parent(it): # NEVER remove our top stuff
+ if self.tree.iter_has_parent(it):
cpv = self.tree.get_value(it, self.tree.get_cpv_column())
if self.tree.is_in_emerge(it): # Emerge
del self.iters[cpv]
@@ -698,10 +716,10 @@ class EmergeQueue:
flags.remove_new_masked(cpv)
flags.remove_new_testing(cpv)
- else: # in Unmerge
+ elif self.tree.is_in_unmerge(it): # in Unmerge
self.unmergequeue.remove(cpv)
- self.tree.remove(it)
+ self.tree.remove(it)
def is_empty (self):
"""Checks whether the current queue is empty and not working. Therefore it looks, whether the queues are empty,
diff --git a/portato/gui/templates/portato.glade b/portato/gui/templates/portato.glade
index cb0fe6a..f6ca9a1 100644
--- a/portato/gui/templates/portato.glade
+++ b/portato/gui/templates/portato.glade
@@ -86,9 +86,10 @@
<child>
<widget class="GtkImageMenuItem" id="emergeItem">
<property name="visible">True</property>
- <property name="label" translatable="yes">E_merge</property>
+ <property name="label" translatable="yes">_Install</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="cb_emerge_clicked"/>
+ <signal name="activate" handler="cb_package_emerge_clicked"/>
+ <accelerator key="plus" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image9">
<property name="visible">True</property>
@@ -101,8 +102,10 @@
<child>
<widget class="GtkImageMenuItem" id="unmergeItem">
<property name="visible">True</property>
- <property name="label" translatable="yes">_Unmerge</property>
+ <property name="label" translatable="yes">_Uninstall</property>
<property name="use_underline">True</property>
+ <signal name="activate" handler="cb_package_unmerge_clicked"/>
+ <accelerator key="minus" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image10">
<property name="visible">True</property>
@@ -133,7 +136,7 @@
<widget class="GtkCheckMenuItem" id="showInstalledItem">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">Show Only _Installed Packages</property>
+ <property name="label" translatable="yes">Show _Only Installed Packages</property>
<property name="use_underline">True</property>
<signal name="toggled" handler="cb_show_installed_toggled"/>
<accelerator key="i" modifiers="GDK_CONTROL_MASK" signal="activate"/>
@@ -452,68 +455,73 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
- <widget class="GtkToolbar" id="packageTB">
+ <widget class="GtkHBox" id="hbox5">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="icon_size">GTK_ICON_SIZE_BUTTON</property>
- <property name="icon_size_set">True</property>
- <child>
- <widget class="GtkToolButton" id="pkgEmergeBtn">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">Add to Emerge Queue</property>
- <property name="stock_id">gtk-add</property>
- <signal name="clicked" handler="cb_package_emerge_clicked"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkToolButton" id="pkgUnmergeBtn">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">Remove from Emerge Queue</property>
- <property name="stock_id">gtk-remove</property>
- <signal name="clicked" handler="cb_package_unmerge_clicked"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkToolButton" id="pkgRevertBtn">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">Revert changes</property>
- <property name="stock_id">gtk-undo</property>
- <signal name="clicked" handler="cb_package_revert_clicked"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="packageHB">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="homogeneous">True</property>
+ <property name="spacing">5</property>
<child>
- <widget class="GtkLabel" id="nameLabel">
+ <widget class="GtkHBox" id="packageHB">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">label</property>
+ <property name="spacing">4</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <widget class="GtkLabel" id="nameLabel">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">label</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="versionCombo">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
</widget>
</child>
<child>
- <widget class="GtkComboBox" id="versionCombo">
+ <widget class="GtkToolbar" id="packageTB">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="icon_size">GTK_ICON_SIZE_BUTTON</property>
+ <property name="icon_size_set">True</property>
+ <child>
+ <widget class="GtkToolButton" id="pkgEmergeBtn">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Install onto system</property>
+ <property name="label" translatable="yes">_Install</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-add</property>
+ <signal name="clicked" handler="cb_package_emerge_clicked"/>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="pkgUnmergeBtn">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Uninstall from system</property>
+ <property name="label" translatable="yes">_Uninstall</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-remove</property>
+ <signal name="clicked" handler="cb_package_unmerge_clicked"/>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkToolButton" id="pkgRevertBtn">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Revert changes</property>
+ <property name="label" translatable="yes">Re_vert</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-undo</property>
+ <signal name="clicked" handler="cb_package_revert_clicked"/>
+ </widget>
+ </child>
</widget>
<packing>
<property name="position">1</property>
@@ -522,12 +530,13 @@
</widget>
<packing>
<property name="expand">False</property>
- <property name="position">1</property>
+ <property name="padding">5</property>
</packing>
</child>
<child>
<widget class="GtkNotebook" id="packageNotebook">
<property name="visible">True</property>
+ <property name="tab_pos">GTK_POS_BOTTOM</property>
<child>
<widget class="GtkEventBox" id="generalEB">
<property name="visible">True</property>
@@ -866,7 +875,7 @@
<widget class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">F_iles</property>
+ <property name="label" translatable="yes">Fi_les</property>
<property name="use_underline">True</property>
</widget>
<packing>
@@ -877,7 +886,7 @@
</child>
</widget>
<packing>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
@@ -891,40 +900,22 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tab_pos">GTK_POS_BOTTOM</property>
<child>
<widget class="GtkVBox" id="queueVB">
<property name="visible">True</property>
<child>
- <widget class="GtkScrolledWindow" id="queueScroll">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <child>
- <widget class="GtkTreeView" id="queueList">
- <property name="visible">True</property>
- <property name="has_tooltip">True</property>
- <property name="headers_visible">False</property>
- <property name="enable_search">False</property>
- <signal name="button_press_event" handler="cb_right_click"/>
- <signal name="query_tooltip" handler="cb_queue_tooltip_queried"/>
- <signal name="row_activated" handler="cb_row_activated"/>
- </widget>
- </child>
- </widget>
- </child>
- <child>
<widget class="GtkHButtonBox" id="queueBB">
<property name="visible">True</property>
<property name="border_width">5</property>
<property name="homogeneous">True</property>
<property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
<child>
- <widget class="GtkButton" id="emergeBtn">
+ <widget class="GtkButton" id="executeBtn">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">Install all packages in the "Emerge Queue"</property>
+ <property name="tooltip" translatable="yes">Execute the current selected queue</property>
<property name="response_id">0</property>
- <signal name="clicked" handler="cb_emerge_clicked"/>
+ <signal name="clicked" handler="cb_execute_clicked"/>
<child>
<widget class="GtkHBox" id="hbox7">
<property name="visible">True</property>
@@ -933,7 +924,7 @@
<widget class="GtkImage" id="image6">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="stock">gtk-add</property>
+ <property name="stock">gtk-execute</property>
</widget>
</child>
<child>
@@ -941,7 +932,7 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">E_merge</property>
+ <property name="label" translatable="yes">E_xecute</property>
<property name="use_underline">True</property>
<property name="single_line_mode">True</property>
</widget>
@@ -954,43 +945,6 @@
</widget>
</child>
<child>
- <widget class="GtkButton" id="unmergeBtn">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Deinstall all packages in the "Unmerge Queue"</property>
- <property name="response_id">0</property>
- <signal name="clicked" handler="cb_unmerge_clicked"/>
- <child>
- <widget class="GtkHBox" id="hbox8">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <child>
- <widget class="GtkImage" id="image7">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="stock">gtk-remove</property>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label13">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Unmerge</property>
- <property name="use_underline">True</property>
- <property name="single_line_mode">True</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
<widget class="GtkButton" id="updateBtn">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Calculate the packages which will be installed during an "update world"</property>
@@ -1000,7 +954,7 @@
<signal name="clicked" handler="cb_update_clicked"/>
</widget>
<packing>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -1013,13 +967,34 @@
<signal name="clicked" handler="cb_remove_clicked"/>
</widget>
<packing>
- <property name="position">3</property>
+ <property name="position">2</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkScrolledWindow" id="queueScroll">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <child>
+ <widget class="GtkTreeView" id="queueList">
+ <property name="visible">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="headers_visible">False</property>
+ <property name="enable_search">False</property>
+ <signal name="button_press_event" handler="cb_right_click"/>
+ <signal name="query_tooltip" handler="cb_queue_tooltip_queried"/>
+ <signal name="row_activated" handler="cb_row_activated"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
<property name="position">1</property>
</packing>
</child>
@@ -1669,83 +1644,231 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
- <widget class="GtkCheckButton" id="titleUpdateCheck">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">Show emerge progress in title - similar to the console tab</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <widget class="GtkCheckButton" id="systrayCheck">
+ <widget class="GtkFrame" id="visualGeneralFrame">
<property name="visible">True</property>
- <property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">Enable systray</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
+ <property name="label_xalign">0</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment8">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="left_padding">12</property>
+ <child>
+ <widget class="GtkVBox" id="vbox6">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkCheckButton" id="systrayCheck">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">Enable systray</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="titleUpdateCheck">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">Show emerge progress in title - similar to the console tab</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="minimizeCheck">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">Hide on minimization (only if systray is enabled)</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">&lt;b&gt;General Options&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
- <property name="position">2</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="minimizeCheck">
+ <widget class="GtkFrame" id="consoleFrame">
<property name="visible">True</property>
- <property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">Hide on minimization (only if systray is enabled)</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
+ <property name="label_xalign">0</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment9">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="bottom_padding">5</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">5</property>
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">5</property>
+ <child>
+ <widget class="GtkLabel" id="label11">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Console Font</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkFontButton" id="consoleFontBtn">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="response_id">0</property>
+ <property name="title" translatable="yes">Chose a console font</property>
+ <property name="use_font">True</property>
+ <property name="use_size">True</property>
+ <property name="show_style">False</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">&lt;b&gt;Console Options&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
- <property name="position">3</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox1">
+ <widget class="GtkFrame" id="tabFrame">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="spacing">5</property>
+ <property name="label_xalign">0</property>
<child>
- <widget class="GtkLabel" id="label11">
+ <widget class="GtkAlignment" id="alignment10">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Console Font</property>
+ <property name="bottom_padding">5</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">5</property>
+ <child>
+ <widget class="GtkVBox" id="vbox7">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">5</property>
+ <child>
+ <widget class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <widget class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Package Tabs</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="packageTabCombo">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="items" translatable="yes"></property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox4">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <widget class="GtkLabel" id="label21">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">System Tabs</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="combobox3">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="items" translatable="yes"></property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
</widget>
</child>
<child>
- <widget class="GtkFontButton" id="consoleFontBtn">
+ <widget class="GtkLabel" id="label9">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="response_id">0</property>
- <property name="title" translatable="yes">Chose a console font</property>
- <property name="use_font">True</property>
- <property name="use_size">True</property>
- <property name="show_style">False</property>
+ <property name="label" translatable="yes">&lt;b&gt;Tab Options&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
</widget>
<packing>
- <property name="position">1</property>
+ <property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
- <property name="padding">5</property>
- <property name="position">4</property>
+ <property name="position">2</property>
</packing>
</child>
</widget>
diff --git a/portato/gui/wrapper.py b/portato/gui/wrapper.py
index c7a5916..011c819 100644
--- a/portato/gui/wrapper.py
+++ b/portato/gui/wrapper.py
@@ -125,6 +125,26 @@ class Tree:
@rtype: boolean"""
raise NotImplementedError
+ def is_in_emerge (self, it):
+ """Checks whether an iterator is part of the "Update" section.
+
+ @param it: the iterator to check
+ @type it: Iterator
+ @returns: True if the iter is part; False otherwise
+ @rtype: boolean"""
+ raise NotImplementedError
+
+ def iter_equal (self, it, other_it):
+ """Checks whether to iterators are equal.
+
+ @param it: the one iterator to compare
+ @type it: Iterator
+ @param other_it: the other iterator to compare
+ @type other_it: Iterator
+ @returns: True if both iterators are equal; False otherwise
+ @rtype boolean"""
+ raise NotImplementedError
+
def get_emerge_it (self):
"""Returns an iterator signaling the top of the emerge section.
@@ -139,6 +159,20 @@ class Tree:
@rtype: Iterator"""
raise NotImplementedError
+ def get_update_it (self):
+ """Returns an iterator signaling the top of the update section.
+
+ @returns: unmerge-iterator
+ @rtype: Iterator"""
+ raise NotImplementedError
+
+ def set_in_progress (self, it):
+ """Marks the queue where the given iterator belongs as being in progress.
+
+ @param it: one iterator of the queue to mark to
+ @type it: Iterator"""
+ raise NotImplementedError
+
def build_append_value (self, cpv, oneshot = False, update = False, downgrade = False, version = None, useChange = []):
"""Builds the list, which is going to be passed to append.
diff --git a/portato/plistener.py b/portato/plistener.py
index eb12606..53cab38 100644
--- a/portato/plistener.py
+++ b/portato/plistener.py
@@ -93,7 +93,7 @@ class PListener (object):
try:
import shm_wrapper as shm
except ImportError:
- from portato.shm import shm_wrapper as shm
+ from portato._shm import shm_wrapper as shm
self._mem = shm.SharedMemoryHandle(mem)
self._sig = shm.SemaphoreHandle(sig)
diff --git a/setup.py b/setup.py
index 246d325..3b4bb36 100644
--- a/setup.py
+++ b/setup.py
@@ -127,14 +127,14 @@ def ui_file_list ():
uis = [x for x in os.listdir("portato/gui/templates/ui/") if x.endswith(".ui")]
return [os.path.join("portato/gui/templates/ui",x) for x in uis]
-packages = ["portato", "portato.gui", "portato.plugins", "portato.backend", "portato.backend.portage", "portato.backend.catapult", "portato.shm"]
-ext_modules = [Extension("portato.shm.shm", ["shm/shmmodule.c"], define_macros = MacrosAndDefines, extra_compile_args=["-fPIC"])]
+packages = ["portato", "portato.gui", "portato.plugins", "portato.backend", "portato.backend.portage", "portato.backend.catapult", "portato._shm"]
+ext_modules = [Extension("portato._shm.shm", ["_shm/shmmodule.c"], define_macros = MacrosAndDefines, extra_compile_args=["-fPIC"])]
data_files = [
(ICON_DIR, ["icons/portato-icon.png"]),
#(PLUGIN_DIR, plugin_list("shutdown", "resume_loop")),
(DATA_DIR, ["plugin.xsd"])]
cmdclass = {}
-package_dir = {"portato.shm" : "shm"}
+package_dir = {"portato._shm" : "_shm"}
if "gtk" in FRONTENDS:
packages.append("portato.gui.gtk")