diff options
Diffstat (limited to 'portato')
-rw-r--r-- | portato/backend/package.py | 9 | ||||
-rw-r--r-- | portato/backend/portage/package.py | 7 | ||||
-rw-r--r-- | portato/gui/gtk/views.py | 21 | ||||
-rw-r--r-- | portato/gui/gtk/windows.py | 207 | ||||
-rw-r--r-- | portato/gui/templates/portato.glade | 894 | ||||
-rw-r--r-- | portato/session.py | 9 |
6 files changed, 663 insertions, 484 deletions
diff --git a/portato/backend/package.py b/portato/backend/package.py index 8df7dae..4f90765 100644 --- a/portato/backend/package.py +++ b/portato/backend/package.py @@ -330,6 +330,15 @@ class Package (_Package): raise NotImplementedError + def get_files (self): + """ + Returns an iterator over the installed files of a package. + If the package is not installed, the iterator should be "empty". + + @returns: the installed files + @rtype: string<iterator> + """ + def get_package_settings(self, var, tree = None): """Returns a package specific setting, such as DESCRIPTION, SRC_URI, IUSE ... diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py index 0c8e5f1..845cc0b 100644 --- a/portato/backend/portage/package.py +++ b/portato/backend/portage/package.py @@ -263,6 +263,13 @@ class PortagePackage (Package): def get_ebuild_path(self): return self._settings.porttree.dbapi.findname(self._cpv) + def get_files (self): + if self.is_installed(): + path = os.path.join(self.get_global_settings("ROOT"), portage.VDB_PATH, self.get_cpv(), "CONTENTS") + with open(path) as f: + for line in f: + yield line.split()[1].strip() + def get_package_settings(self, var, tree = None): if not tree: mytree = self._settings.vartree diff --git a/portato/gui/gtk/views.py b/portato/gui/gtk/views.py index a559aee..7c5af3d 100644 --- a/portato/gui/gtk/views.py +++ b/portato/gui/gtk/views.py @@ -17,6 +17,8 @@ import gtksourceview2 import gtk import logging +from gettext import lgettext as _ + class LazyView (object): def __init__ (self): self.connect("map", self.cb_mapped) @@ -24,13 +26,17 @@ class LazyView (object): self.pkg = None self.updated = False - def update (self, pkg): + def update (self, pkg, force = False): self.pkg = pkg self.updated = True + + if force: + self.cb_mapped() def cb_mapped (self, *args): if self.updated and self.pkg: - self.set_text("".join(self._get_content(self.pkg))) + self.set_text("".join(self._get_content())) + self.updated = False return False @@ -48,11 +54,14 @@ class ListView (gtk.TextView, LazyView): gtk.TextView.__init__(self) LazyView.__init__(self) + self.set_editable(False) + self.set_cursor_visible(False) + def set_text (self, text): self.get_buffer().set_text(text) def _get_content (self): - return self.content_fn() + return self.content_fn(self.pkg) class InstalledOnlyView (ListView): def _get_content (self): @@ -62,7 +71,7 @@ class InstalledOnlyView (ListView): else: return ListView._get_content(self) else: - return "" + return "Huh?" class HighlightView (gtksourceview2.View, LazyView): @@ -94,9 +103,9 @@ class HighlightView (gtksourceview2.View, LazyView): def set_text (self, text): self.get_buffer().set_text(text) - def _get_content (self, pkg): + def _get_content (self): try: - with open(self.get_fn(pkg)) as f: + with open(self.get_fn(self.pkg)) as f: return f.readlines() except IOError, e: return _("Error: %s") % e.strerror diff --git a/portato/gui/gtk/windows.py b/portato/gui/gtk/windows.py index 8c8ffe0..b49e701 100644 --- a/portato/gui/gtk/windows.py +++ b/portato/gui/gtk/windows.py @@ -34,7 +34,7 @@ from ..gui_helper import Database, Config, EmergeQueue from .basic import Window, AbstractDialog, Popup from .wrapper import GtkTree, GtkConsole from .exception_handling import GtkThread -from .views import LogView, HighlightView +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) @@ -400,36 +400,48 @@ class PackageTable: self.window = main.window self.tree.signal_autoconnect(self) - # the table - self.table = self.tree.get_widget("PackageTable") + # all the package data is in this one VB + self.vb = self.tree.get_widget("packageVB") + + # the notebook + self.notebook = self.tree.get_widget("packageNotebook") - # the version list - self.versList = self.tree.get_widget("versionList") - self.build_vers_list() + # the version combo + self.versionCombo = self.tree.get_widget("versionCombo") + self.build_version_combo() # chechboxes self.installedCheck = self.tree.get_widget("installedCheck") self.maskedCheck = self.tree.get_widget("maskedCheck") self.testingCheck = self.tree.get_widget("testingCheck") + self.maskedLabel = self.tree.get_widget("maskedLabel") # labels + generalEB = self.tree.get_widget("generalEB") + generalEB.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("#FFFFFF")) + + self.nameLabel = self.tree.get_widget("nameLabel") self.descLabel = self.tree.get_widget("descLabel") + self.overlayLabel = self.tree.get_widget("overlayLabel") + self.overlayLL = self.tree.get_widget("overlayLabelLabel") + self.linkBox = self.tree.get_widget("linkBox") self.notInSysLabel = self.tree.get_widget("notInSysLabel") self.missingLabel = self.tree.get_widget("missingLabel") - # link - self.pkgLinkBox = self.tree.get_widget("pkgLinkBox") - # buttons self.emergeBtn = self.tree.get_widget("pkgEmergeBtn") self.unmergeBtn = self.tree.get_widget("pkgUnmergeBtn") - self.cancelBtn = self.tree.get_widget("pkgCancelBtn") - self.ebuildBtn = self.tree.get_widget("pkgEbuildBtn") + self.revertBtn = self.tree.get_widget("pkgRevertBtn") # useList self.useList = self.tree.get_widget("useList") self.build_use_list() + # views + self.ebuildView = self.tree.get_widget("ebuildScroll").get_child() + self.changelogView = self.tree.get_widget("changelogScroll").get_child() + self.filesView = self.tree.get_widget("filesScroll").get_child() + def update (self, cp, queue = None, version = None, doEmerge = True, instantChange = False): """Updates the table to show the contents for the package. @@ -458,36 +470,66 @@ class PackageTable: self.instPackages = system.sort_package_list(system.find_installed_packages(cp, masked = True)) # version-combo-box - self.versList.get_model().clear() - self.fill_vers_list() + self.versionCombo.handler_block(self.versionCombo.changeHandler) # block change handler, because it would be called several times + self.versionCombo.get_model().clear() + self.fill_version_combo() + self.versionCombo.handler_unblock(self.versionCombo.changeHandler) # unblock handler again if not self.queue or not self.doEmerge: self.emergeBtn.set_sensitive(False) self.unmergeBtn.set_sensitive(False) # current status - self.cb_vers_list_changed() - self.table.show_all() + self.cb_version_combo_changed() + self.vb.show_all() def hide (self): - self.table.hide_all() + self.vb.hide_all() - def set_desc_label (self): - desc = self.actual_package().get_package_settings("DESCRIPTION").replace("&","&") - if not desc: - desc = _("<no description>") - use_markup = False - else: - desc = "<b>"+desc+"</b>" - use_markup = True - name = "<i><u>"+self.actual_package().get_cp()+"</u></i>" + def set_labels (self): + pkg = self.actual_package() + + # name + self.nameLabel.set_markup("<b>%s</b>" % pkg.get_cp()) + + # description + desc = pkg.get_package_settings("DESCRIPTION") or _("<no description>") + self.descLabel.set_label(desc) + + # overlay if self.actual_package().is_overlay(): - name = "%s\n<i>(Overlay: %s)</i>" % (name, self.actual_package().get_overlay_path()) + self.overlayLabel.set_label(pkg.get_overlay_path()) + self.overlayLabel.show() + self.overlayLL.show() + else: + self.overlayLabel.hide() + self.overlayLL.hide() - desc = "%s\n\n%s" % (name, desc) + # link + for c in self.linkBox.get_children(): + self.linkBox.remove(c) + + text = pkg.get_package_settings("HOMEPAGE") + texts = text.split(" ") + ftexts = [] + + for t in texts: + if not t.startswith(("http:", "ftp:")): + if count == 0: + error(_("The first homepage part does not start with 'http' or 'ftp'.")) + ftexts.append(t) + continue + else: + info(_("Blank inside homepage.")) + ftexts[-1] += t + else: + ftexts.append(t) - self.descLabel.set_use_markup(use_markup) - self.descLabel.set_label(desc) + for t in ftexts: + link = gtk.LinkButton(t) + link.set_alignment(0.0, 0.5) + link.set_border_width(0) + self.linkBox.add(link) def fill_use_list(self): @@ -537,7 +579,7 @@ class PackageTable: self.useList.set_search_column(2) self.useList.set_enable_tree_lines(True) - def build_vers_list (self): + def build_version_combo (self): """Builds the package list. @param name: name of the selected catetegory @@ -546,24 +588,26 @@ class PackageTable: store = gtk.ListStore(gtk.gdk.Pixbuf, str) # build view - self.versList.set_model(store) - col = gtk.TreeViewColumn(("Versions")) + self.versionCombo.set_model(store) + col = gtk.TreeViewColumn("Versions") # adding the pixbuf cell = gtk.CellRendererPixbuf() - col.pack_start(cell, False) - col.add_attribute(cell, "pixbuf", 0) + self.versionCombo.pack_start(cell, False) + self.versionCombo.add_attribute(cell, "pixbuf", 0) # adding the package name cell = gtk.CellRendererText() - col.pack_start(cell, True) - col.add_attribute(cell, "text", 1) + self.versionCombo.pack_start(cell, True) + self.versionCombo.add_attribute(cell, "text", 1) - self.versList.append_column(col) + # connect + self.versionCombo.changeHandler = self.versionCombo.connect("changed", self.cb_version_combo_changed) + + def fill_version_combo (self): - def fill_vers_list (self): + store = self.versionCombo.get_model() - store = self.versList.get_model() # append versions for vers, inst in ((x.get_version(), x.is_installed()) for x in self.packages): if inst: @@ -572,8 +616,6 @@ class PackageTable: icon = None store.append([icon, vers]) - sel = self.versList.get_selection() - # activate the first one try: best_version = "" @@ -583,10 +625,10 @@ class PackageTable: best_version = system.find_best_match(self.packages[0].get_cp(), only_installed = (self.instPackages != [])).get_version() for i in range(len(self.packages)): if self.packages[i].get_version() == best_version: - sel.select_path((i,)) + self.versionCombo.set_active(i) break except AttributeError: # no package found - sel.select_path((0,)) + self.versionCombo.set_active(0) def actual_package (self): """Returns the actual selected package. @@ -594,8 +636,7 @@ class PackageTable: @returns: the actual selected package @rtype: backend.Package""" - model, iter = self.versList.get_selection().get_selected() - return self.packages[model.get_path(iter)[0]] + return self.packages[self.versionCombo.get_active()] def _update_keywords (self, emerge, update = False): if emerge: @@ -614,20 +655,16 @@ class PackageTable: error(_("Package could not be found: %s"), e[0]) #masked_dialog(e[0]) - def cb_vers_list_changed (self, *args): + def cb_version_combo_changed (self, *args): pkg = self.actual_package() - self.main.ebuildView.update(pkg) - self.main.ebuildView.get_parent().show_all() - self.main.changelogView.update(pkg) - self.main.changelogView.get_parent().show_all() - - self.set_desc_label() - for c in self.pkgLinkBox.get_children(): - self.pkgLinkBox.remove(c) + # set the views + for v in (self.ebuildView, self.changelogView, self.filesView): + v.update(pkg, force = self.notebook.get_nth_page(self.notebook.get_current_page()) == v.get_parent()) - self.pkgLinkBox.add(gtk.LinkButton(pkg.get_package_settings("HOMEPAGE"))) + # set the labels + self.set_labels() # set use list self.useList.get_model().clear() @@ -644,9 +681,10 @@ class PackageTable: else: # missing keyword self.missingLabel.show() self.notInSysLabel.hide() - +# self.installedCheck.hide() self.maskedCheck.hide() + self.maskedLabel.hide() self.testingCheck.hide() self.emergeBtn.set_sensitive(False) else: # normal package @@ -654,12 +692,13 @@ class PackageTable: self.notInSysLabel.hide() self.installedCheck.show() self.maskedCheck.show() + self.maskedLabel.show() self.testingCheck.show() if self.doEmerge: self.emergeBtn.set_sensitive(True) self.installedCheck.set_active(pkg.is_installed()) - gtk.Tooltips().set_tip(self.maskedCheck, pkg.get_masking_reason()) # this returns None if it is not masked =) + reason = pkg.get_masking_reason() or " " if pkg.is_masked(use_changed = False) and not pkg.is_masked(use_changed = True): self.maskedCheck.set_label("<i>(%s)</i>" % _("Masked")) self.maskedCheck.get_child().set_use_markup(True) @@ -670,9 +709,13 @@ class PackageTable: self.maskedCheck.set_label("<b>%s</b>" % _("Masked")) self.maskedCheck.get_child().set_use_markup(True) self.maskedCheck.set_active(True) + reason = _("Masked by user") else: self.maskedCheck.set_active(pkg.is_masked(use_changed = False)) + if reason: + self.maskedLabel.set_label(reason) + if pkg.is_testing(use_keywords = False) and not pkg.is_testing(use_keywords = True): self.testingCheck.set_label("<i>(%s)</i>" % _("Testing")) self.testingCheck.get_child().set_use_markup(True) @@ -688,7 +731,7 @@ class PackageTable: else: self.unmergeBtn.set_sensitive(True) - self.table.show_all() + self.vb.show_all() return True @@ -726,19 +769,25 @@ class PackageTable: """Callback for toggled testing-checkbox.""" status = button.get_active() + # end of recursion :) if self.actual_package().is_testing(use_keywords = False) == status: return False + # if the package is not testing - don't allow to set it as such + if not self.actual_package().is_testing(use_keywords = False): + button.set_active(False) + return True + + # re-set to testing status if not self.actual_package().is_testing(use_keywords = True): self.actual_package().set_testing(False) button.set_label(_("Testing")) button.set_active(True) - else: + else: # disable testing self.actual_package().set_testing(True) - if self.actual_package().is_testing(use_keywords=False): - button.set_label("<i>(%s)</i>" % _("Testing")) - button.get_child().set_use_markup(True) - button.set_active(True) + button.set_label("<i>(%s)</i>" % _("Testing")) + button.get_child().set_use_markup(True) + button.set_active(True) if self.instantChange: self._update_keywords(True, update = True) @@ -761,6 +810,7 @@ class PackageTable: if pkg.is_locally_masked(): button.set_label("<b>%s</b>" % _("Masked")) button.get_child().set_use_markup(True) + self.maskedLabel.set_label(_("Masked by user")) else: button.set_label(_("Masked")) @@ -774,6 +824,7 @@ class PackageTable: button.set_active(True) else: button.set_label(_("Masked")) + self.maskedLabel.set_label("") if self.instantChange: self._update_keywords(True, update = True) @@ -804,13 +855,10 @@ class MainWindow (Window): # NOTEBOOK PAGE CONSTANTS ( - PKG_PAGE, - EBUILD_PAGE, - CHANGELOG_PAGE, QUEUE_PAGE, CONSOLE_PAGE, LOG_PAGE - ) = range(6) + ) = range(3) def __init__ (self, splash = None): """Build up window""" @@ -871,6 +919,8 @@ class MainWindow (Window): # set vpaned position self.vpaned = self.tree.get_widget("vpaned") self.vpaned.set_position(int(self.window.get_size()[1]/2)) + self.hpaned = self.tree.get_widget("hpaned") + self.hpaned.set_position(int(self.window.get_size()[0]/2)) # cat and pkg list self.sortPkgListByName = True @@ -923,19 +973,25 @@ class MainWindow (Window): splash(_("Finishing startup")) # notebook - self.notebook = self.tree.get_widget("notebook") + self.notebook = self.tree.get_widget("systemNotebook") self.window.show_all() # the hidden stuff ebuildScroll = self.tree.get_widget("ebuildScroll") - self.ebuildView = HighlightView(lambda p: p.get_ebuild_path(), ["gentoo", "sh"]) - ebuildScroll.add(self.ebuildView) + ebuildScroll.add(HighlightView(lambda p: p.get_ebuild_path(), ["gentoo", "sh"])) ebuildScroll.hide_all() changelogScroll = self.tree.get_widget("changelogScroll") - self.changelogView = HighlightView(lambda p: os.path.join(p.get_package_path(), "ChangeLog"), ["changelog"]) - changelogScroll.add(self.changelogView) + changelogScroll.add(HighlightView(lambda p: os.path.join(p.get_package_path(), "ChangeLog"), ["changelog"])) changelogScroll.hide_all() + + def show_files (p): + for f in p.get_files(): + yield " %s\n" % f + + filesScroll = self.tree.get_widget("filesScroll") + filesScroll.add(InstalledOnlyView(show_files)) + filesScroll.hide_all() # table self.packageTable = PackageTable(self) @@ -943,7 +999,6 @@ class MainWindow (Window): def show_package (self, *args, **kwargs): self.packageTable.update(*args, **kwargs) - self.notebook.set_current_page(self.PKG_PAGE) def build_terminal (self): """Builds the terminal.""" @@ -1067,6 +1122,7 @@ class MainWindow (Window): map(self.session.add_handler,[ ([("width", "window"), ("height", "window")], lambda w,h: self.window.resize(int(w), int(h)), self.window.get_size), ([("vpanedpos", "window")], lambda p: self.vpaned.set_position(int(p)), self.vpaned.get_position), + ([("hpanedpos", "window")], lambda p: self.hpaned.set_position(int(p)), self.hpaned.get_position), ([("merge", "queue"), ("unmerge", "queue"), ("oneshot", "queue")], load_queue, save_queue) ]) @@ -1149,9 +1205,8 @@ class MainWindow (Window): sel = view.get_selection() store, it = sel.get_selected() if it: - package = store.get_value(it, 1) - cat = store.get_value(it, 2) - self.show_package(cat+"/"+package, self.queue) + cp = "%s/%s" % (store.get_value(it, 2), store.get_value(it, 1)) + self.show_package(cp, self.queue) return True def cb_pkg_list_header_clicked(self, col): diff --git a/portato/gui/templates/portato.glade b/portato/gui/templates/portato.glade index 64f4555..671032d 100644 --- a/portato/gui/templates/portato.glade +++ b/portato/gui/templates/portato.glade @@ -443,577 +443,667 @@ </packing> </child> <child> - <widget class="GtkNotebook" id="notebook"> + <widget class="GtkHPaned" id="hpaned"> <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> <child> - <widget class="GtkTable" id="PackageTable"> + <widget class="GtkVBox" id="packageVB"> <property name="visible">True</property> - <property name="n_rows">5</property> - <property name="n_columns">3</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="GtkHBox" id="pkgLinkBox"> + <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> - <placeholder/> + <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> - </widget> - <packing> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_EXPAND</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="notInSysLabel"> - <property name="visible">True</property> - <property name="no_show_all">True</property> - <property name="label" translatable="yes"><b>Installed, but not in portage anymore</b></property> - <property name="use_markup">True</property> - </widget> - <packing> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> - <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="spacing">5</property> <child> - <widget class="GtkScrolledWindow" id="versionListScroll"> + <widget class="GtkToolButton" id="pkgUnmergeBtn"> <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="hscrollbar_policy">GTK_POLICY_NEVER</property> - <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <child> - <widget class="GtkTreeView" id="versionList"> - <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="headers_clickable">True</property> - <property name="show_expanders">False</property> - <signal name="cursor_changed" handler="cb_vers_list_changed"/> - </widget> - </child> + <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="GtkScrolledWindow" id="useListScroll"> + <widget class="GtkToolButton" id="pkgRevertBtn"> <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="useList"> - <property name="visible">True</property> - </widget> - </child> + <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="position">1</property> + <property name="expand">False</property> </packing> </child> </widget> <packing> - <property name="right_attach">3</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_padding">5</property> - <property name="y_padding">5</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="descLabel"> - <property name="visible">True</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">True</property> - </widget> - <packing> - <property name="right_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - <property name="y_padding">10</property> + <property name="expand">False</property> </packing> </child> <child> - <widget class="GtkLabel" id="missingLabel"> + <widget class="GtkHBox" id="packageHB"> <property name="visible">True</property> - <property name="no_show_all">True</property> - <property name="label" translatable="yes"><span foreground='red'><b>MISSING KEYWORD</b></span></property> - <property name="use_markup">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="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> <packing> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options">GTK_FILL</property> + <property name="expand">False</property> + <property name="position">1</property> </packing> </child> <child> - <widget class="GtkHButtonBox" id="buttonBB"> + <widget class="GtkNotebook" id="packageNotebook"> <property name="visible">True</property> - <property name="border_width">5</property> - <property name="layout_style">GTK_BUTTONBOX_SPREAD</property> <child> - <widget class="GtkButton" id="pkgEmergeBtn"> + <widget class="GtkEventBox" id="generalEB"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Mark package for installation</property> - <property name="response_id">0</property> - <signal name="clicked" handler="cb_package_emerge_clicked"/> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <child> - <widget class="GtkHBox" id="hbox4"> + <widget class="GtkTable" id="generalTable"> <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="border_width">6</property> + <property name="n_rows">7</property> + <property name="n_columns">2</property> + <property name="column_spacing">5</property> + <property name="row_spacing">5</property> <child> - <widget class="GtkImage" id="image3"> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <widget class="GtkLabel" id="notInSysLabel"> <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="no_show_all">True</property> + <property name="label" translatable="yes"><b>Installed, but not in portage anymore</b></property> + <property name="use_markup">True</property> </widget> + <packing> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="y_options"></property> + </packing> </child> <child> - <widget class="GtkLabel" id="emergeBtnLabel"> + <widget class="GtkLabel" id="missingLabel"> + <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="no_show_all">True</property> + <property name="label" translatable="yes"><span foreground='red'><b>MISSING KEYWORD</b></span></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkHBox" id="linkBox"> + <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> + <placeholder/> + </child> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="descLabelLabel"> <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">Add to E_merge Queue</property> - <property name="use_underline">True</property> + <property name="label" translatable="yes"><b>Description:</b></property> + <property name="use_markup">True</property> <property name="single_line_mode">True</property> </widget> <packing> - <property name="position">1</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="overlayLabelLabel"> + <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="no_show_all">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes"><b>Overlay:</b></property> + <property name="use_markup">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="descLabel"> + <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">label</property> + <property name="wrap">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="y_options"></property> </packing> </child> - </widget> - </child> - </widget> - </child> - <child> - <widget class="GtkButton" id="pkgUnmergeBtn"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Mark package for deinstallation</property> - <property name="response_id">0</property> - <signal name="clicked" handler="cb_package_unmerge_clicked"/> - <child> - <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> <child> - <widget class="GtkImage" id="image4"> + <widget class="GtkLabel" id="overlayLabel"> <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> + <property name="no_show_all">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">label</property> + <property name="selectable">True</property> + <property name="single_line_mode">True</property> </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> </child> <child> - <widget class="GtkLabel" id="label9"> + <widget class="GtkLabel" id="homepageLinkLabel"> <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">Add to _Unmerge Queue</property> - <property name="use_underline">True</property> + <property name="label" translatable="yes"><b>Homepage:</b></property> + <property name="use_markup">True</property> <property name="single_line_mode">True</property> </widget> <packing> - <property name="position">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> </packing> </child> - </widget> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <widget class="GtkButton" id="pkgRevertBtn"> - <property name="visible">True</property> - <property name="response_id">0</property> - <signal name="clicked" handler="cb_package_revert_clicked"/> - <child> - <widget class="GtkHBox" id="hbox6"> - <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="image5"> + <widget class="GtkCheckButton" id="installedCheck"> <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="stock">gtk-undo</property> + <property name="no_show_all">True</property> + <property name="label" translatable="yes">Installed</property> + <property name="xalign">0</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="button_press_event" handler="cb_button_pressed"/> </widget> + <packing> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> </child> <child> - <widget class="GtkLabel" id="label8"> + <widget class="GtkCheckButton" id="maskedCheck"> <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="no_show_all">True</property> + <property name="label" translatable="yes">Masked</property> <property name="xalign">0</property> - <property name="label" translatable="yes">Re_vert</property> - <property name="use_underline">True</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="cb_masked_toggled"/> </widget> <packing> - <property name="position">1</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="maskedLabel"> + <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> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkCheckButton" id="testingCheck"> + <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="no_show_all">True</property> + <property name="label" translatable="yes">Testing</property> + <property name="xalign">0</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="cb_testing_toggled"/> + </widget> + <packing> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> </packing> </child> </widget> </child> </widget> + </child> + <child> + <widget class="GtkLabel" id="label"> + <property name="visible">True</property> + <property name="label" translatable="yes">_General</property> + <property name="use_underline">True</property> + </widget> <packing> - <property name="position">2</property> + <property name="type">tab</property> + <property name="tab_fill">False</property> </packing> </child> - </widget> - <packing> - <property name="right_attach">3</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkHBox" id="checkHB"> - <property name="visible">True</property> - <property name="spacing">1</property> - <property name="homogeneous">True</property> <child> - <widget class="GtkCheckButton" id="installedCheck"> + <widget class="GtkScrolledWindow" id="useListScroll"> <property name="visible">True</property> - <property name="no_show_all">True</property> - <property name="label" translatable="yes">Installed</property> - <property name="response_id">0</property> - <property name="draw_indicator">True</property> - <signal name="button_press_event" handler="cb_button_pressed"/> + <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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <child> + <widget class="GtkTreeView" id="useList"> + <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="headers_clickable">True</property> + </widget> + </child> </widget> <packing> - <property name="fill">False</property> + <property name="position">1</property> </packing> </child> <child> - <widget class="GtkCheckButton" id="maskedCheck"> + <widget class="GtkLabel" id="label20"> <property name="visible">True</property> - <property name="no_show_all">True</property> - <property name="label" translatable="yes">Masked</property> - <property name="response_id">0</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="cb_masked_toggled"/> + <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">U_se List</property> + <property name="use_underline">True</property> </widget> <packing> - <property name="fill">False</property> + <property name="type">tab</property> <property name="position">1</property> + <property name="tab_fill">False</property> </packing> </child> <child> - <widget class="GtkCheckButton" id="testingCheck"> + <widget class="GtkScrolledWindow" id="ebuildScroll"> <property name="visible">True</property> - <property name="no_show_all">True</property> - <property name="label" translatable="yes">Testing</property> - <property name="response_id">0</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="cb_testing_toggled"/> + <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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <child> + <placeholder/> + </child> </widget> <packing> - <property name="fill">False</property> <property name="position">2</property> </packing> </child> + <child> + <widget class="GtkLabel" id="label16"> + <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">E_build</property> + <property name="use_underline">True</property> + </widget> + <packing> + <property name="type">tab</property> + <property name="position">2</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <widget class="GtkScrolledWindow" id="changelogScroll"> + <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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="position">3</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label14"> + <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">C_hangelog</property> + <property name="use_underline">True</property> + </widget> + <packing> + <property name="type">tab</property> + <property name="position">3</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <widget class="GtkScrolledWindow" id="filesScroll"> + <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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="position">4</property> + </packing> + </child> + <child> + <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="use_underline">True</property> + </widget> + <packing> + <property name="type">tab</property> + <property name="position">4</property> + <property name="tab_fill">False</property> + </packing> + </child> </widget> <packing> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options">GTK_FILL</property> + <property name="position">2</property> </packing> </child> </widget> <packing> - <property name="tab_fill">False</property> + <property name="resize">False</property> + <property name="shrink">True</property> </packing> </child> <child> - <widget class="GtkLabel" id="label"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Package</property> - <property name="use_underline">True</property> - </widget> - <packing> - <property name="type">tab</property> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <widget class="GtkScrolledWindow" id="ebuildScroll"> + <widget class="GtkNotebook" id="systemNotebook"> <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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label16"> - <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">E_build</property> - <property name="use_underline">True</property> - </widget> - <packing> - <property name="type">tab</property> - <property name="position">1</property> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <widget class="GtkScrolledWindow" id="changelogScroll"> - <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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="position">2</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label14"> - <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">C_hangelog</property> - <property name="use_underline">True</property> - </widget> - <packing> - <property name="type">tab</property> - <property name="position">2</property> - <property name="tab_fill">False</property> - </packing> - </child> - <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"> + <widget class="GtkVBox" id="queueVB"> <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="GtkScrolledWindow" id="queueScroll"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Install all packages in the "Emerge Queue"</property> - <property name="response_id">0</property> - <signal name="clicked" handler="cb_emerge_clicked"/> + <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="GtkHBox" id="hbox7"> + <widget class="GtkTreeView" id="queueList"> <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="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> - </widget> - </child> - <child> - <widget class="GtkLabel" id="label12"> - <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="use_underline">True</property> - <property name="single_line_mode">True</property> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> + <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="GtkButton" id="unmergeBtn"> + <widget class="GtkHButtonBox" id="queueBB"> <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"/> + <property name="border_width">5</property> + <property name="homogeneous">True</property> + <property name="layout_style">GTK_BUTTONBOX_SPREAD</property> <child> - <widget class="GtkHBox" id="hbox8"> + <widget class="GtkButton" id="emergeBtn"> <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 all packages in the "Emerge Queue"</property> + <property name="response_id">0</property> + <signal name="clicked" handler="cb_emerge_clicked"/> <child> - <widget class="GtkImage" id="image7"> + <widget class="GtkHBox" id="hbox7"> <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> + <child> + <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> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label12"> + <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="use_underline">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> </widget> </child> + </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="GtkLabel" id="label13"> + <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> - <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> + <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> - <packing> - <property name="position">1</property> - </packing> </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> + <property name="label" translatable="yes">Update _World</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <signal name="clicked" handler="cb_update_clicked"/> + </widget> + <packing> + <property name="position">2</property> + </packing> + </child> + <child> + <widget class="GtkButton" id="removeBtn"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Remove the selected package from the queue</property> + <property name="label" translatable="yes">_Remove</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <signal name="clicked" handler="cb_remove_clicked"/> + </widget> + <packing> + <property name="position">3</property> + </packing> </child> </widget> <packing> + <property name="expand">False</property> + <property name="fill">False</property> <property name="position">1</property> </packing> </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label17"> + <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">_Queue</property> + <property name="use_underline">True</property> + </widget> + <packing> + <property name="type">tab</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <widget class="GtkHBox" id="termHB"> + <property name="visible">True</property> <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> - <property name="label" translatable="yes">Update _World</property> - <property name="use_underline">True</property> - <property name="response_id">0</property> - <signal name="clicked" handler="cb_update_clicked"/> - </widget> - <packing> - <property name="position">2</property> - </packing> + <placeholder/> </child> <child> - <widget class="GtkButton" id="removeBtn"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Remove the selected package from the queue</property> - <property name="label" translatable="yes">_Remove</property> - <property name="use_underline">True</property> - <property name="response_id">0</property> - <signal name="clicked" handler="cb_remove_clicked"/> - </widget> - <packing> - <property name="position">3</property> - </packing> + <placeholder/> </child> </widget> <packing> - <property name="expand">False</property> - <property name="fill">False</property> <property name="position">1</property> </packing> </child> - </widget> - <packing> - <property name="position">3</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Queue</property> - <property name="use_underline">True</property> - <property name="single_line_mode">True</property> - </widget> - <packing> - <property name="type">tab</property> - <property name="position">3</property> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <widget class="GtkHBox" id="termHB"> - <property name="visible">True</property> <child> - <placeholder/> + <widget class="GtkLabel" id="label18"> + <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">_Console</property> + <property name="use_underline">True</property> + </widget> + <packing> + <property name="type">tab</property> + <property name="position">1</property> + <property name="tab_fill">False</property> + </packing> </child> <child> - <placeholder/> + <widget class="GtkScrolledWindow" id="logScroll"> + <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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <child> + <widget class="GtkTextView" id="logView"> + <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="editable">False</property> + <property name="wrap_mode">GTK_WRAP_WORD</property> + <property name="cursor_visible">False</property> + </widget> + </child> + </widget> + <packing> + <property name="position">2</property> + </packing> </child> - </widget> - <packing> - <property name="position">4</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Console</property> - <property name="use_underline">True</property> - <property name="single_line_mode">True</property> - </widget> - <packing> - <property name="type">tab</property> - <property name="position">4</property> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <widget class="GtkScrolledWindow" id="scrolledwindow3"> - <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="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <child> - <widget class="GtkTextView" id="logView"> + <widget class="GtkLabel" id="label19"> <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="editable">False</property> - <property name="wrap_mode">GTK_WRAP_WORD</property> - <property name="cursor_visible">False</property> + <property name="label" translatable="yes">L_og</property> + <property name="use_underline">True</property> </widget> + <packing> + <property name="type">tab</property> + <property name="position">2</property> + <property name="tab_fill">False</property> + </packing> </child> </widget> <packing> - <property name="position">5</property> - </packing> - </child> - <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="label" translatable="yes">_Log</property> - <property name="use_underline">True</property> - </widget> - <packing> - <property name="type">tab</property> - <property name="position">5</property> - <property name="tab_fill">False</property> + <property name="resize">True</property> + <property name="shrink">True</property> </packing> </child> </widget> diff --git a/portato/session.py b/portato/session.py index 0a61181..026c7fc 100644 --- a/portato/session.py +++ b/portato/session.py @@ -28,6 +28,9 @@ class Session (object): want to define boolean values, use 0 and 1. This is future proof. """ + # the current session format version + VERSION = 1 + def __init__ (self, file): """ Initialize a session with a certain file inside L{SESSION_DIR.} @@ -47,6 +50,9 @@ class Session (object): if e.errno == 2: pass else: raise + # add version check + self.add_handler(([("version", "session")], self.check_version, lambda: self.VERSION)) + def add_handler (self, (options, load_fn, save_fn)): """ Adds a handler to this session. A handler is a three-tuple consisting of: @@ -87,3 +93,6 @@ class Session (object): self._cfg.add(option, str(value), section = section, with_blankline = False) self._cfg.write() + + def check_version (self, vers): + pass # do nothing atm |