From aee9ac1390410b1a751978da59ce10d6468cd551 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 18 Feb 2009 16:30:03 +0100 Subject: Show database types in the preferences - though nothing useful can be done atm ;) --- portato/gui/windows/preference.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'portato/gui/windows') diff --git a/portato/gui/windows/preference.py b/portato/gui/windows/preference.py index df18e88..c8025d0 100644 --- a/portato/gui/windows/preference.py +++ b/portato/gui/windows/preference.py @@ -20,6 +20,7 @@ from .basic import AbstractDialog from ..dialogs import io_ex_dialog from ..utils import get_color from ...helper import debug +from ... import db class PreferenceWindow (AbstractDialog): """Window displaying some preferences.""" @@ -151,6 +152,16 @@ class PreferenceWindow (AbstractDialog): self.systemTabCombo.set_active(int(self.cfg.get("systemTabPos", section = "GUI"))-1) self.pkgTabCombo.set_active(int(self.cfg.get("packageTabPos", section = "GUI"))-1) + # the database combo + self.databaseCombo = self.tree.get_widget("databaseCombo") + model = gtk.ListStore(str, str, str) + + for k, (name, desc) in db.types.iteritems(): + model.append([name, desc, k]) + + self.databaseCombo.set_model(model) + self.databaseCombo.set_active(0) # XXX: just set one thing active - no meaning yet + self.window.show_all() def _save(self): -- cgit v1.2.3-54-g00ecf From 2c6eed28c67d737e8da9877ee95e71825c6ff377 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 18 Feb 2009 22:01:54 +0100 Subject: converted the basic structure to gtkbuilder --- portato/gui/windows/basic.py | 45 ++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) (limited to 'portato/gui/windows') diff --git a/portato/gui/windows/basic.py b/portato/gui/windows/basic.py index 1117e5e..330f823 100644 --- a/portato/gui/windows/basic.py +++ b/portato/gui/windows/basic.py @@ -14,7 +14,6 @@ from __future__ import absolute_import # gtk stuff import gtk -import gtk.glade import gobject from functools import wraps @@ -23,9 +22,6 @@ import os.path from ...constants import TEMPLATE_DIR, APP, LOCALE_DIR from ...helper import error -gtk.glade.bindtextdomain (APP, LOCALE_DIR) -gtk.glade.textdomain (APP) - class WrappedTree (object): __slots__ = ("klass", "tree", "get_widget") def __init__ (self, klass, tree): @@ -39,25 +35,35 @@ class WrappedTree (object): return getattr(self.tree, name) def get_widget(self, name): - w = self.tree.get_widget(name) + w = self.tree.get_object(name) if w is None: error("Widget '%s' could not be found in class '%s'.", name, self.klass) return w -class Window (object): +class UIBuilder (object): + + def __init__ (self, connector = None): + if not hasattr(self, "__file__"): + self.__file__ = self.__class__.__name__ + + self._builder = gtk.Builder() + self._builder.add_from_file(os.path.join(TEMPLATE_DIR, self.__file__+".ui")) + self._builder.set_translation_domain(APP) + + if connector is None: connector = self + + self._builder.connect_signals(connector) + + self.tree = WrappedTree(self.__class__.__name__, self._builder) + +class Window (UIBuilder): def __init__ (self): - if not hasattr(self, "__tree__"): - self.__tree__ = self.__class__.__name__ + UIBuilder.__init__(self) if not hasattr(self, "__window__"): self.__window__ = self.__class__.__name__ - if not hasattr(self, "__file__"): - self.__file__ = self.__class__.__name__ - - self.tree = self.get_tree(self.__tree__) - self.tree.signal_autoconnect(self) self.window = self.tree.get_widget(self.__window__) @staticmethod @@ -82,9 +88,6 @@ class Window (object): return wrapper - def get_tree (self, name): - return WrappedTree(self.__class__.__name__, gtk.glade.XML(os.path.join(TEMPLATE_DIR, self.__file__+".glade"), name)) - class AbstractDialog (Window): """A class all our dialogs get derived from. It sets useful default vars and automatically handles the ESC-Button.""" @@ -115,11 +118,13 @@ class AbstractDialog (Window): def close (self, *args): self.window.destroy() -class Popup (object): +class Popup (UIBuilder): + + __file__ = "popups" + + def __init__ (self, name, parent): - def __init__ (self, name, parent, file = "popups"): - self.tree = WrappedTree(self.__class__.__name__, gtk.glade.XML(os.path.join(TEMPLATE_DIR, file+".glade"), root = name)) - self.tree.signal_autoconnect(parent) + UIBuilder.__init__(self, connector = parent) self._popup = self.tree.get_widget(name) def popup (self, *args): -- cgit v1.2.3-54-g00ecf From 9fc80ac9b4fdb7589e66923d79bbd45e80758630 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 18 Feb 2009 22:02:31 +0100 Subject: Make it start - though there are still itches - esp. with the menu --- portato/gui/templates/MainWindow.ui | 138 ++++++++++++++++-------------------- portato/gui/windows/main.py | 25 ++++--- 2 files changed, 74 insertions(+), 89 deletions(-) (limited to 'portato/gui/windows') diff --git a/portato/gui/templates/MainWindow.ui b/portato/gui/templates/MainWindow.ui index 168c661..3f5f7bf 100644 --- a/portato/gui/templates/MainWindow.ui +++ b/portato/gui/templates/MainWindow.ui @@ -1,28 +1,28 @@ - + - - fileMenuItem + + fileMenuAction _File - + gtk-preferences - prefItem + prefAction _Preferences - + gtk-refresh - reloadItem + reloadAction Re_load Portage @@ -30,86 +30,86 @@ - + gtk-quit - closeItem + closeAction - - emergeMenuItem + + emergeMenuAction _Emerge - + gtk-add - emergeItem + emergeAction _Install - + gtk-remove - unmergeItem + unmergeAction _Uninstall - - updateItem + + updateAction Update _World - - showUpdatesItem + + showUpdatesAction Show Updatable P_ackages - - showInstalledItem + + showInstalledAction Show _Only Installed Packages - + gtk-refresh - syncItem + syncAction _Sync - + gtk-save - saveFlagsItem + saveFlagsAction Save _Flags - - pauseItemMenu + + pauseActionMenu Emerge _Paused - + gtk-stop - killItem + killAction _Kill Emerge @@ -122,51 +122,37 @@ - + gtk-copy - copyItem + copyAction _Copy - - gtk-stop - killItemPopup - _Kill Emerge - - - - - - pauseItemPopup - Emerge _Paused - - - - - pluginMenuItem + + pluginMenuAction Plu_gins - - helpMenuItem + + helpMenuAction _? - + gtk-about - aboutItem + aboutAction _About - + gtk-connect - pluginsItem + pluginsAction _Plugins @@ -175,34 +161,34 @@ - - - + + + - + - - - - - - + + + + + + - - + + - - + + - - - - + + + + - - - - + + + + @@ -217,7 +203,7 @@ True - + True diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index 443fa76..5494b25 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -62,7 +62,7 @@ class PackageTable: self.main = main self.tree = main.tree self.window = main.window - self.tree.signal_autoconnect(self) + self.main._builder.connect_signals(self) # all the package data is in this one VB self.vb = self.tree.get_widget("packageVB") @@ -480,14 +480,13 @@ class MainWindow (Window): plugin.load_plugins() menus = [p.menus for p in plugin.get_plugin_queue().get_plugins()] - if menus: - self.tree.get_widget("pluginMenuItem").set_no_show_all(False) - pluginMenu = self.tree.get_widget("pluginMenu") + #if menus: + # pluginMenu = self.tree.get_widget("pluginMenu") - for m in itt.chain(*menus): - item = gtk.MenuItem(m.label) - item.connect("activate", m.call) - pluginMenu.append(item) + # for m in itt.chain(*menus): + # item = gtk.MenuItem(m.label) + # item.connect("activate", m.call) + # pluginMenu.append(item) splash(_("Building frontend")) # set paned position @@ -554,15 +553,15 @@ class MainWindow (Window): self.packageTable = PackageTable(self) # popups - self.consolePopup = Popup("consolePopup", self, self.__file__) - self.trayPopup = Popup("systrayPopup", self) + # self.consolePopup = Popup("consolePopup", self, self.__file__) + # self.trayPopup = Popup("systrayPopup", self) # pause menu items self.emergePaused = False self.pauseItems = {} - self.pauseItems["tray"] = self.trayPopup.tree.get_widget("pauseItemTray") - self.pauseItems["popup"] = self.consolePopup.tree.get_widget("pauseItemPopup") - self.pauseItems["menu"] = self.tree.get_widget("pauseItemMenu") + # self.pauseItems["tray"] = self.trayPopup.tree.get_widget("pauseItemTray") + # self.pauseItems["popup"] = self.consolePopup.tree.get_widget("pauseItemPopup") + # self.pauseItems["menu"] = self.tree.get_widget("pauseItemMenu") for k,v in self.pauseItems.iteritems(): self.pauseItems[k] = (v, v.connect_after("activate", self.cb_pause_emerge(k))) -- cgit v1.2.3-54-g00ecf From c0046edcf062eda241d9285806e3ac9c21754129 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 18 Feb 2009 22:25:04 +0100 Subject: Fix popups --- portato/gui/templates/MainWindow.ui | 32 ++++++++++++++++------------ portato/gui/templates/popups.ui | 42 ------------------------------------- portato/gui/windows/main.py | 4 ++-- 3 files changed, 21 insertions(+), 57 deletions(-) delete mode 100644 portato/gui/templates/popups.ui (limited to 'portato/gui/windows') diff --git a/portato/gui/templates/MainWindow.ui b/portato/gui/templates/MainWindow.ui index 914207b..39d7d4e 100644 --- a/portato/gui/templates/MainWindow.ui +++ b/portato/gui/templates/MainWindow.ui @@ -3,7 +3,7 @@ - + fileMenuAction @@ -115,13 +115,6 @@ - - - False - hiddenConsoleMenu - Console - - gtk-copy @@ -181,19 +174,32 @@ - - - - - + + + + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 GTK_WIN_POS_CENTER diff --git a/portato/gui/templates/popups.ui b/portato/gui/templates/popups.ui deleted file mode 100644 index 52d2450..0000000 --- a/portato/gui/templates/popups.ui +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - pauseItemTray - Emerge _Paused - - - - - gtk-stop - killItemTray - _Kill Emerge - - - - - - gtk-quit - closeItemTray - - - - - - - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index 5494b25..b043532 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -553,8 +553,8 @@ class MainWindow (Window): self.packageTable = PackageTable(self) # popups - # self.consolePopup = Popup("consolePopup", self, self.__file__) - # self.trayPopup = Popup("systrayPopup", self) + self.consolePopup = self.tree.get_widget("uimanager").get_widget("ui/consolePopup") + self.trayPopup = self.tree.get_widget("uimanager").get_widget("ui/systrayPopup") # pause menu items self.emergePaused = False -- cgit v1.2.3-54-g00ecf From af31f8ecc8465984d7dfc7b824ff5f8ca037a37a Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 18 Feb 2009 22:35:04 +0100 Subject: Remove the 'pause' hack --- portato/gui/templates/MainWindow.ui | 1 + portato/gui/windows/main.py | 60 +++++-------------------------------- 2 files changed, 9 insertions(+), 52 deletions(-) (limited to 'portato/gui/windows') diff --git a/portato/gui/templates/MainWindow.ui b/portato/gui/templates/MainWindow.ui index 39d7d4e..3a30907 100644 --- a/portato/gui/templates/MainWindow.ui +++ b/portato/gui/templates/MainWindow.ui @@ -103,6 +103,7 @@ pauseActionMenu Emerge _Paused + diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index b043532..33a5ee4 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -558,13 +558,6 @@ class MainWindow (Window): # pause menu items self.emergePaused = False - self.pauseItems = {} - # self.pauseItems["tray"] = self.trayPopup.tree.get_widget("pauseItemTray") - # self.pauseItems["popup"] = self.consolePopup.tree.get_widget("pauseItemPopup") - # self.pauseItems["menu"] = self.tree.get_widget("pauseItemMenu") - - for k,v in self.pauseItems.iteritems(): - self.pauseItems[k] = (v, v.connect_after("activate", self.cb_pause_emerge(k))) # systray if self.cfg.get_boolean("showSystray", "GUI"): @@ -1771,50 +1764,13 @@ class MainWindow (Window): self.queue.append(package, update = True, oneshot = set, forceUpdate = True) - def cb_pause_emerge (self, curr): - """ - This method returns a callback for a "pause emerge" toggle button. - It is needed as there are different toggle buttons of this type and if one is clicked, - the others should be marked too. - - @param curr: The button to return the callback for. - @type curr: gtk.ToggleButton - """ - def pause (cb): - """ - The actual callback. - - Mark all other buttons too. - - @param cb: The button which got toggled. - @type cb: gtk.ToggleButton - """ - - # pause or continue - self.emergePaused = cb.get_active() - if not self.emergePaused: - self.queue.continue_emerge() - #self.tray.set_from_file(APP_ICON) - else: - self.queue.stop_emerge() - #self.tray.set_from_file(os.path.join(ICON_DIR, "pausing.png")) - - # block the handlers of the other buttons - # so that calling "set_active" does not call this callback recursivly - for v in self.pauseItems.itervalues(): - v[0].handler_block(v[1]) - - # mark the others - for k, v in self.pauseItems.iteritems(): - if k != curr: - v[0].set_active(self.emergePaused) - - # unblock - for v in self.pauseItems.itervalues(): - v[0].handler_unblock(v[1]) - - return False - return pause + def cb_pause_emerge (self, action): + # pause or continue + self.emergePaused = action.get_active() + if not self.emergePaused: + self.queue.continue_emerge() + else: + self.queue.stop_emerge() def cb_kill_clicked (self, *args): """ @@ -1822,7 +1778,7 @@ class MainWindow (Window): """ self.queue.kill_emerge() if self.emergePaused: # unmark the "pause emerge" buttons - self.pauseItems["menu"][0].set_active(False) # calling one button is enough (see: cb_pause_emerge) + self.tree.get_widget("generalActionGroup").get_action("pauseAction").set_active(False) def cb_copy_clicked (self, *args): """ -- cgit v1.2.3-54-g00ecf From 1644d262d2c577b1592a60914ec034a1e91171b7 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 18 Feb 2009 22:42:10 +0100 Subject: Add dummy signal handlers for PackageTable -- and so also the error output for not connected signals --- portato/gui/windows/basic.py | 6 +++++- portato/gui/windows/main.py | 13 ++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'portato/gui/windows') diff --git a/portato/gui/windows/basic.py b/portato/gui/windows/basic.py index 330f823..9d1b9ed 100644 --- a/portato/gui/windows/basic.py +++ b/portato/gui/windows/basic.py @@ -52,7 +52,11 @@ class UIBuilder (object): if connector is None: connector = self - self._builder.connect_signals(connector) + unconnected = self._builder.connect_signals(connector) + + if unconnected is not None: + for uc in set(unconnected): + error("Signal '%s' not connected in class '%s'.", uc, self.__class__.__name__) self.tree = WrappedTree(self.__class__.__name__, self._builder) diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index 33a5ee4..b7a5802 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -62,7 +62,6 @@ class PackageTable: self.main = main self.tree = main.tree self.window = main.window - self.main._builder.connect_signals(self) # all the package data is in this one VB self.vb = self.tree.get_widget("packageVB") @@ -1834,6 +1833,18 @@ class MainWindow (Window): else: self.window.iconify() + def cb_testing_toggled (self, *args): + return self.packageTable.cb_testing_toggled(*args) + def cb_masked_toggled (self, *args): + return self.packageTable.cb_masked_toggled(*args) + def cb_button_pressed (self, *args): + return self.packageTable.cb_button_pressed(*args) + def cb_package_revert_clicked (self, *args): + return self.packageTable.cb_package_revert_clicked(*args) + def cb_package_unmerge_clicked (self, *args): + return self.packageTable.cb_package_unmerge_clicked(*args) + def cb_package_emerge_clicked (self, *args): + return self.packageTable.cb_package_emerge_clicked(*args) def cb_use_flag_toggled (self, *args): return self.packageTable.cb_use_flag_toggled(*args) -- cgit v1.2.3-54-g00ecf From 7bf178f343c212aefbba88b74bc0e68e8b87b318 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 18 Feb 2009 22:44:34 +0100 Subject: Remove the 'Popup' class --- portato/gui/windows/basic.py | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'portato/gui/windows') diff --git a/portato/gui/windows/basic.py b/portato/gui/windows/basic.py index 9d1b9ed..d7c7940 100644 --- a/portato/gui/windows/basic.py +++ b/portato/gui/windows/basic.py @@ -121,15 +121,3 @@ class AbstractDialog (Window): def close (self, *args): self.window.destroy() - -class Popup (UIBuilder): - - __file__ = "popups" - - def __init__ (self, name, parent): - - UIBuilder.__init__(self, connector = parent) - self._popup = self.tree.get_widget(name) - - def popup (self, *args): - self._popup.popup(*args) -- cgit v1.2.3-54-g00ecf From bc8b90244640273e775ce25a2f33d97f5da5bbfb Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 18 Feb 2009 22:45:00 +0100 Subject: Remove the 'Popup' class --- portato/gui/windows/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'portato/gui/windows') diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index b7a5802..eb4f7b3 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -43,7 +43,7 @@ from ..dialogs import (blocked_dialog, changed_flags_dialog, io_ex_dialog, from ..exceptions import PreReqError # even more GUI stuff -from .basic import Window, Popup +from .basic import Window from .about import AboutWindow from .plugin import PluginWindow from .preference import PreferenceWindow -- cgit v1.2.3-54-g00ecf From 6f740cbb6b651dfa73ed6c0e0e2cf4176310e3c8 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 18 Feb 2009 22:51:55 +0100 Subject: Add 'get_ui()' method for convenience --- portato/gui/windows/basic.py | 15 ++++++++++++++- portato/gui/windows/main.py | 8 ++++---- 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'portato/gui/windows') diff --git a/portato/gui/windows/basic.py b/portato/gui/windows/basic.py index d7c7940..a4f8236 100644 --- a/portato/gui/windows/basic.py +++ b/portato/gui/windows/basic.py @@ -23,7 +23,7 @@ from ...constants import TEMPLATE_DIR, APP, LOCALE_DIR from ...helper import error class WrappedTree (object): - __slots__ = ("klass", "tree", "get_widget") + __slots__ = ("klass", "tree", "get_widget", "get_ui") def __init__ (self, klass, tree): self.tree = tree self.klass = klass @@ -40,6 +40,19 @@ class WrappedTree (object): error("Widget '%s' could not be found in class '%s'.", name, self.klass) return w + def get_ui (self, name, ui = "uimanager"): + uiw = self.get_widget(ui) + if uiw is None: + return None + + if not name.startswith("ui/"): + name = "ui/%s" % name + + w = uiw.get_widget(name) + if w is None: + error("UIItem '%s' of UIManager '%s' could not be found in class '%s'.", name, ui, self.klass) + return w + class UIBuilder (object): def __init__ (self, connector = None): diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index eb4f7b3..437d305 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -479,8 +479,8 @@ class MainWindow (Window): plugin.load_plugins() menus = [p.menus for p in plugin.get_plugin_queue().get_plugins()] - #if menus: - # pluginMenu = self.tree.get_widget("pluginMenu") + # if menus: + # pluginMenu = self.tree.get_ui("pluginMenu") # for m in itt.chain(*menus): # item = gtk.MenuItem(m.label) @@ -552,8 +552,8 @@ class MainWindow (Window): self.packageTable = PackageTable(self) # popups - self.consolePopup = self.tree.get_widget("uimanager").get_widget("ui/consolePopup") - self.trayPopup = self.tree.get_widget("uimanager").get_widget("ui/systrayPopup") + self.consolePopup = self.tree.get_ui("consolePopup") + self.trayPopup = self.tree.get_ui("systrayPopup") # pause menu items self.emergePaused = False -- cgit v1.2.3-54-g00ecf From 4dfc7b063ec7dc476462e843bfecd07fd02cb25e Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 18 Feb 2009 23:14:37 +0100 Subject: Make the plugin menu work again --- portato/gui/templates/MainWindow.ui | 16 ++++++++++------ portato/gui/windows/main.py | 24 ++++++++++++++++++------ 2 files changed, 28 insertions(+), 12 deletions(-) (limited to 'portato/gui/windows') diff --git a/portato/gui/templates/MainWindow.ui b/portato/gui/templates/MainWindow.ui index 3a30907..98da2ad 100644 --- a/portato/gui/templates/MainWindow.ui +++ b/portato/gui/templates/MainWindow.ui @@ -2,6 +2,16 @@ + + + + + pluginMenuAction + Plu_gins + + + + @@ -124,12 +134,6 @@ - - - pluginMenuAction - Plu_gins - - helpMenuAction diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index 437d305..2ee4447 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -479,13 +479,25 @@ class MainWindow (Window): plugin.load_plugins() menus = [p.menus for p in plugin.get_plugin_queue().get_plugins()] - # if menus: - # pluginMenu = self.tree.get_ui("pluginMenu") + if menus: + uim = self.tree.get_widget("uimanager") + ag = self.tree.get_widget("pluginActionGroup") - # for m in itt.chain(*menus): - # item = gtk.MenuItem(m.label) - # item.connect("activate", m.call) - # pluginMenu.append(item) + ctr = 0 + for m in itt.chain(*menus): + + # create action + aname = "plugin%d" % ctr + a = gtk.Action(aname, m.label, None, None) + a.connect("activate", m.call) + ag.add_action(a) + + # add to UI + mid = uim.new_merge_id() + uim.add_ui(mid, "ui/menubar/pluginMenu", aname, aname, gtk.UI_MANAGER_MENUITEM, False) + + ctr += 1 + splash(_("Building frontend")) # set paned position -- cgit v1.2.3-54-g00ecf From e1b6dc981399e3149bc57e62af257969899cb4e4 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 19 Feb 2009 00:01:15 +0100 Subject: Translations --- i18n/de.po | 530 ++++++++++++++++-------------- i18n/messages.pot | 93 +++--- portato/gui/templates/PreferenceWindow.ui | 162 ++++++--- portato/gui/windows/main.py | 2 +- 4 files changed, 458 insertions(+), 329 deletions(-) (limited to 'portato/gui/windows') diff --git a/i18n/de.po b/i18n/de.po index 0072569..b2e78d7 100644 --- a/i18n/de.po +++ b/i18n/de.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: Portato\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-02-17 00:14+0100\n" -"PO-Revision-Date: 2009-02-17 00:15+0100\n" +"POT-Creation-Date: 2009-02-18 23:42+0100\n" +"PO-Revision-Date: 2009-02-18 23:45+0100\n" "Last-Translator: René 'Necoro' Neumann \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -13,101 +13,93 @@ msgstr "" "X-Poedit-Country: GERMANY\n" "X-Poedit-SourceCharset: utf-8\n" -#: portato/gui/templates/popups.glade:12 -#: portato/gui/templates/MainWindow.glade:192 -#: portato/gui/templates/MainWindow.glade:265 -msgid "Emerge _Paused" -msgstr "Emerge _angehalten" - -#: portato/gui/templates/popups.glade:19 -#: portato/gui/templates/MainWindow.glade:200 -#: portato/gui/templates/MainWindow.glade:247 -msgid "_Kill Emerge" -msgstr "_Kill Emerge" - -#: portato/gui/templates/popups.glade:37 -#: portato/gui/templates/MainWindow.glade:70 -msgid "gtk-quit" -msgstr "" - -#: portato/gui/templates/UpdateWindow.glade:7 +#: portato/gui/templates/UpdateWindow.ui:6 msgid "Updatable Packages" msgstr "Pakete mit Updates" -#: portato/gui/templates/UpdateWindow.glade:49 +#: portato/gui/templates/UpdateWindow.ui:48 msgid "_Close" msgstr "_Schließen" -#: portato/gui/templates/UpdateWindow.glade:61 +#: portato/gui/templates/UpdateWindow.ui:59 msgid "Select _All" msgstr "_Alles auswählen" -#: portato/gui/templates/UpdateWindow.glade:76 +#: portato/gui/templates/UpdateWindow.ui:73 msgid "_Install Selected" msgstr "_Installiere ausgewählte" -#: portato/gui/templates/AboutWindow.glade:8 -msgid "About Portato" -msgstr "Portato" - -#: portato/gui/templates/PreferenceWindow.glade:7 +#: portato/gui/templates/PreferenceWindow.ui:24 msgid "Preferences" msgstr "Einstellungen" -#: portato/gui/templates/PreferenceWindow.glade:44 +#: portato/gui/templates/PreferenceWindow.ui:60 msgid "Debug" msgstr "Debug" -#: portato/gui/templates/PreferenceWindow.glade:60 +#: portato/gui/templates/PreferenceWindow.ui:79 msgid "Browser command: " msgstr "Browser-Befehl: " -#: portato/gui/templates/PreferenceWindow.glade:86 -#: portato/gui/templates/PreferenceWindow.glade:602 +#: portato/gui/templates/PreferenceWindow.ui:106 +#: portato/gui/templates/PreferenceWindow.ui:697 msgid "General Options" msgstr "Allgemeine Optionen" -#: portato/gui/templates/PreferenceWindow.glade:168 +#: portato/gui/templates/PreferenceWindow.ui:140 +msgid "Used database type" +msgstr "Benutzter Datenbank-Typ" + +#: portato/gui/templates/PreferenceWindow.ui:167 +msgid "Database Options" +msgstr "Datenbank-Optionen" + +#: portato/gui/templates/PreferenceWindow.ui:189 +#: portato/gui/templates/MainWindow.ui:754 +msgid "General" +msgstr "Allgemein" + +#: portato/gui/templates/PreferenceWindow.ui:271 msgid "Package sets to update" msgstr "Paket-Sets für \"Update\"" -#: portato/gui/templates/PreferenceWindow.glade:187 +#: portato/gui/templates/PreferenceWindow.ui:287 msgid "Update World Options" msgstr "Optionen für \"update world\"" -#: portato/gui/templates/PreferenceWindow.glade:216 +#: portato/gui/templates/PreferenceWindow.ui:313 msgid "Sync command: " msgstr "Sync-Befehl: " -#: portato/gui/templates/PreferenceWindow.glade:237 +#: portato/gui/templates/PreferenceWindow.ui:335 msgid "Sync Options" msgstr "Sync Optionen" -#: portato/gui/templates/PreferenceWindow.glade:290 +#: portato/gui/templates/PreferenceWindow.ui:376 msgid "File name to use, if package.use is a directory: " msgstr "Zu benutzender Dateiname, wenn package.use ein Verzeichnis ist:" -#: portato/gui/templates/PreferenceWindow.glade:301 +#: portato/gui/templates/PreferenceWindow.ui:386 msgid "Add only exact version to package.use" msgstr "Füge nur die exakte Paketversion zu package.keywords hinzu" -#: portato/gui/templates/PreferenceWindow.glade:314 +#: portato/gui/templates/PreferenceWindow.ui:400 msgid "Add only exact version to package.keywords" msgstr "Füge nur die exakte Paketversion zu package.keywords hinzu" -#: portato/gui/templates/PreferenceWindow.glade:328 +#: portato/gui/templates/PreferenceWindow.ui:416 msgid "File name to use, if package.keywords is a directory: " msgstr "Zu benutzender Dateiname, wenn package.keywords ein Verzeichnis ist:" -#: portato/gui/templates/PreferenceWindow.glade:362 +#: portato/gui/templates/PreferenceWindow.ui:450 msgid "File name to use, if package.mask/package.unmask is a directory: " msgstr "Zu benutzender Dateiname, wenn package.mask/package.unmask ein Verzeichnis ist:" -#: portato/gui/templates/PreferenceWindow.glade:373 +#: portato/gui/templates/PreferenceWindow.ui:460 msgid "Add only exact version to package.mask/package.unmask" msgstr "Füge nur die exakte Paketversion zu package.mask/package.unmask hinzu" -#: portato/gui/templates/PreferenceWindow.glade:395 +#: portato/gui/templates/PreferenceWindow.ui:484 msgid "" "You may use the following placeholders:\n" "\n" @@ -122,167 +114,158 @@ msgstr "" "$(cat): Kategorie\n" "$(cat-1)/$(cat-2): erster/zweiter Teil der Kategorie$(version): Paketversion" -#: portato/gui/templates/PreferenceWindow.glade:422 +#: portato/gui/templates/PreferenceWindow.ui:508 msgid "Use-Flags" msgstr "Use-Flags" -#: portato/gui/templates/PreferenceWindow.glade:437 +#: portato/gui/templates/PreferenceWindow.ui:523 msgid "Testing Keywords" msgstr "Testing Keywords" -#: portato/gui/templates/PreferenceWindow.glade:452 +#: portato/gui/templates/PreferenceWindow.ui:538 msgid "Masking Keywords" msgstr "Masking Keywords" -#: portato/gui/templates/PreferenceWindow.glade:469 +#: portato/gui/templates/PreferenceWindow.ui:564 msgid "Use Flag and Keyword Options" msgstr "Use-Flag- und Keyword-Optionen" -#: portato/gui/templates/PreferenceWindow.glade:488 -#: portato/gui/templates/MainWindow.glade:875 -msgid "General" -msgstr "Allgemein" +#: portato/gui/templates/PreferenceWindow.ui:582 +msgid "Portage" +msgstr "Portage" -#: portato/gui/templates/PreferenceWindow.glade:527 +#: portato/gui/templates/PreferenceWindow.ui:618 msgid "Enable systray" msgstr "Aktiviere Systray" -#: portato/gui/templates/PreferenceWindow.glade:540 +#: portato/gui/templates/PreferenceWindow.ui:632 msgid "Show emerge progress in window title" msgstr "Zeige den Emerge Prozess im Fenstertitel" -#: portato/gui/templates/PreferenceWindow.glade:554 +#: portato/gui/templates/PreferenceWindow.ui:646 msgid "Show emerge progress in console title" msgstr "Zeige den Emerge Prozess im Konsolentitel" -#: portato/gui/templates/PreferenceWindow.glade:568 +#: portato/gui/templates/PreferenceWindow.ui:660 msgid "Hide on minimization (only if systray is enabled)" msgstr "Minimiere zu Systray" -#: portato/gui/templates/PreferenceWindow.glade:585 +#: portato/gui/templates/PreferenceWindow.ui:674 msgid "Search while typing" msgstr "Suche währen des Tippens" -#: portato/gui/templates/PreferenceWindow.glade:640 +#: portato/gui/templates/PreferenceWindow.ui:733 msgid "Console Font" msgstr "Schriftart in Konsole" -#: portato/gui/templates/PreferenceWindow.glade:651 +#: portato/gui/templates/PreferenceWindow.ui:746 msgid "Chose a console font" msgstr "Wähle eine Schriftart" -#: portato/gui/templates/PreferenceWindow.glade:669 +#: portato/gui/templates/PreferenceWindow.ui:767 msgid "Maximum length of the console title" msgstr "Maximale Länge des Konsolentitels" -#: portato/gui/templates/PreferenceWindow.glade:699 +#: portato/gui/templates/PreferenceWindow.ui:800 msgid "Console Options" msgstr "Konsolen Optionen" -#: portato/gui/templates/PreferenceWindow.glade:740 +#: portato/gui/templates/PreferenceWindow.ui:838 msgid "Package Tabs" msgstr "Pakettabs" -#: portato/gui/templates/PreferenceWindow.glade:765 +#: portato/gui/templates/PreferenceWindow.ui:869 msgid "System Tabs" msgstr "Systemtabs" -#: portato/gui/templates/PreferenceWindow.glade:791 +#: portato/gui/templates/PreferenceWindow.ui:898 msgid "Tab Options" msgstr "Tab Optionen" -#: portato/gui/templates/PreferenceWindow.glade:825 +#: portato/gui/templates/PreferenceWindow.ui:926 msgid "Show slots in the version list" msgstr "Zeige die Slots in der Versionsliste" -#: portato/gui/templates/PreferenceWindow.glade:837 +#: portato/gui/templates/PreferenceWindow.ui:939 msgid "Collapse categories with same prefix" msgstr "Fasse Kategorien mit gleichem Präfix zusammen" -#: portato/gui/templates/PreferenceWindow.glade:853 +#: portato/gui/templates/PreferenceWindow.ui:960 msgid "Package Options" msgstr "Paket Optionen" -#: portato/gui/templates/PreferenceWindow.glade:877 +#: portato/gui/templates/PreferenceWindow.ui:981 msgid "Visual" msgstr "Oberfläche" -#: portato/gui/templates/PreferenceWindow.glade:895 -#: portato/gui/templates/PluginWindow.glade:223 -#: portato/gui/templates/SearchWindow.glade:48 -#: portato/gui/templates/MailInfoWindow.glade:170 +#: portato/gui/templates/PreferenceWindow.ui:1000 +#: portato/gui/templates/PluginWindow.ui:211 +#: portato/gui/templates/MailInfoWindow.ui:168 +#: portato/gui/templates/SearchWindow.ui:47 msgid "gtk-cancel" msgstr "" -#: portato/gui/templates/PreferenceWindow.glade:904 -#: portato/gui/templates/PluginWindow.glade:235 +#: portato/gui/templates/PreferenceWindow.ui:1013 +#: portato/gui/templates/PluginWindow.ui:222 msgid "gtk-apply" msgstr "" -#: portato/gui/templates/PluginWindow.glade:8 +#: portato/gui/templates/PluginWindow.ui:7 msgid "Plugins" msgstr "Plugins" -#: portato/gui/templates/PluginWindow.glade:52 +#: portato/gui/templates/PluginWindow.ui:51 msgid "_Install dependencies" msgstr "_Installiere Abhängigkeiten" -#: portato/gui/templates/PluginWindow.glade:81 +#: portato/gui/templates/PluginWindow.ui:79 msgid "Needed dependencies" msgstr "Abhängigkeiten" -#: portato/gui/templates/PluginWindow.glade:98 -#: portato/gui/templates/PluginWindow.glade:123 -#: portato/gui/templates/MainWindow.glade:484 -#: portato/gui/templates/MainWindow.glade:603 -#: portato/gui/templates/MainWindow.glade:716 -#: portato/gui/templates/MainWindow.glade:731 +#: portato/gui/templates/PluginWindow.ui:93 +#: portato/gui/templates/PluginWindow.ui:118 +#: portato/gui/templates/MainWindow.ui:369 +#: portato/gui/templates/MainWindow.ui:485 +#: portato/gui/templates/MainWindow.ui:598 +#: portato/gui/templates/MainWindow.ui:613 msgid "label" msgstr "" -#: portato/gui/templates/PluginWindow.glade:109 +#: portato/gui/templates/PluginWindow.ui:104 msgid "Author:" msgstr "Autor:" -#: portato/gui/templates/PluginWindow.glade:144 +#: portato/gui/templates/PluginWindow.ui:139 #: portato/gui/windows/update.py:47 -#: portato/gui/windows/main.py:942 +#: portato/gui/windows/main.py:957 #: portato/gui/windows/plugin.py:27 msgid "Enabled" msgstr "Aktiviert" -#: portato/gui/templates/PluginWindow.glade:154 +#: portato/gui/templates/PluginWindow.ui:148 #: portato/gui/windows/plugin.py:27 msgid "Temporarily enabled" msgstr "Aktiviert (temporär)" -#: portato/gui/templates/PluginWindow.glade:166 +#: portato/gui/templates/PluginWindow.ui:159 #: portato/gui/windows/plugin.py:27 msgid "Temporarily disabled" msgstr "Deaktiviert (temporär)" -#: portato/gui/templates/PluginWindow.glade:179 +#: portato/gui/templates/PluginWindow.ui:171 #: portato/gui/windows/plugin.py:27 msgid "Disabled" msgstr "Deaktiviert" -#: portato/gui/templates/SearchWindow.glade:8 -msgid "Search Results" -msgstr "Ergebnisse" - -#: portato/gui/templates/SearchWindow.glade:60 -msgid "gtk-jump-to" -msgstr "" - -#: portato/gui/templates/SearchWindow.glade:75 -msgid "gtk-ok" -msgstr "" +#: portato/gui/templates/AboutWindow.ui:7 +msgid "About Portato" +msgstr "Portato" -#: portato/gui/templates/MailInfoWindow.glade:6 +#: portato/gui/templates/MailInfoWindow.ui:5 msgid "Send Bug Mail ..." msgstr "Sende Bug-Email ..." -#: portato/gui/templates/MailInfoWindow.glade:31 +#: portato/gui/templates/MailInfoWindow.ui:30 msgid "" "Additional Information\n" "\n" @@ -292,15 +275,15 @@ msgstr "" "\n" "(alle optional)" -#: portato/gui/templates/MailInfoWindow.glade:75 +#: portato/gui/templates/MailInfoWindow.ui:74 msgid "Email address:" msgstr "Email-Adresse:" -#: portato/gui/templates/MailInfoWindow.glade:90 +#: portato/gui/templates/MailInfoWindow.ui:89 msgid "Name:" msgstr "Name:" -#: portato/gui/templates/MailInfoWindow.glade:105 +#: portato/gui/templates/MailInfoWindow.ui:104 msgid "" "Comments /\n" "what did you do to hit the bug?" @@ -308,208 +291,231 @@ msgstr "" "Kommentare /\n" "Vorgehensweise um den Bug zu erzeugen?" -#: portato/gui/templates/MailInfoWindow.glade:142 +#: portato/gui/templates/MailInfoWindow.ui:141 msgid "Attaches the logfile to the mail. This log only contains debug information." msgstr "Hängt die Logdatei an die Mail an. In der Datei sind nur Debug-Informationen enthalten." -#: portato/gui/templates/MailInfoWindow.glade:143 +#: portato/gui/templates/MailInfoWindow.ui:142 msgid "Attach _Logfile" msgstr "Hänge _Logdatei an" -#: portato/gui/templates/MailInfoWindow.glade:198 +#: portato/gui/templates/MailInfoWindow.ui:194 msgid "_Send" msgstr "_Send" -#: portato/gui/templates/MainWindow.glade:20 +#: portato/gui/templates/SearchWindow.ui:7 +msgid "Search Results" +msgstr "Ergebnisse" + +#: portato/gui/templates/SearchWindow.ui:58 +msgid "gtk-jump-to" +msgstr "" + +#: portato/gui/templates/SearchWindow.ui:72 +msgid "gtk-ok" +msgstr "" + +#: portato/gui/templates/MainWindow.ui:10 +msgid "Plu_gins" +msgstr "Plu_gins" + +#: portato/gui/templates/MainWindow.ui:20 msgid "_File" msgstr "_Datei" -#: portato/gui/templates/MainWindow.glade:28 +#: portato/gui/templates/MainWindow.ui:27 msgid "_Preferences" msgstr "_Einstellungen" -#: portato/gui/templates/MainWindow.glade:46 +#: portato/gui/templates/MainWindow.ui:36 msgid "Re_load Portage" msgstr "Aktua_lisiere Portage-Cache" -#: portato/gui/templates/MainWindow.glade:83 +#: portato/gui/templates/MainWindow.ui:44 +msgid "gtk-quit" +msgstr "" + +#: portato/gui/templates/MainWindow.ui:52 msgid "_Emerge" msgstr "_Emerge" -#: portato/gui/templates/MainWindow.glade:91 +#: portato/gui/templates/MainWindow.ui:59 msgid "_Install" msgstr "_Installieren" -#: portato/gui/templates/MainWindow.glade:107 +#: portato/gui/templates/MainWindow.ui:68 msgid "_Uninstall" msgstr "_Deinstallieren" -#: portato/gui/templates/MainWindow.glade:123 -#: portato/gui/templates/MainWindow.glade:1082 +#: portato/gui/templates/MainWindow.ui:76 +#: portato/gui/templates/MainWindow.ui:939 msgid "Update _World" msgstr "Update _World" -#: portato/gui/templates/MainWindow.glade:132 +#: portato/gui/templates/MainWindow.ui:83 msgid "Show Updatable P_ackages" msgstr "Zeige Pakete mit _Updates" -#: portato/gui/templates/MainWindow.glade:141 +#: portato/gui/templates/MainWindow.ui:90 msgid "Show _Only Installed Packages" msgstr "_Zeige nur installierte Pakete" -#: portato/gui/templates/MainWindow.glade:155 +#: portato/gui/templates/MainWindow.ui:99 msgid "_Sync" msgstr "_Sync" -#: portato/gui/templates/MainWindow.glade:171 +#: portato/gui/templates/MainWindow.ui:108 msgid "Save _Flags" msgstr "Speichere _Flags" -#: portato/gui/templates/MainWindow.glade:223 -#: portato/gui/templates/MainWindow.glade:1192 -#: portato/gui/windows/main.py:1295 -#: portato/gui/windows/main.py:1297 -msgid "Console" -msgstr "Konsole" +#: portato/gui/templates/MainWindow.ui:115 +msgid "Emerge _Paused" +msgstr "Emerge _angehalten" -#: portato/gui/templates/MainWindow.glade:230 +#: portato/gui/templates/MainWindow.ui:124 +msgid "_Kill Emerge" +msgstr "_Kill Emerge" + +#: portato/gui/templates/MainWindow.ui:133 msgid "_Copy" msgstr "_Kopieren" -#: portato/gui/templates/MainWindow.glade:276 -msgid "Plu_gins" -msgstr "Plu_gins" - -#: portato/gui/templates/MainWindow.glade:288 +#: portato/gui/templates/MainWindow.ui:140 msgid "_?" msgstr "_?" -#: portato/gui/templates/MainWindow.glade:296 +#: portato/gui/templates/MainWindow.ui:147 msgid "_About" msgstr "_Über" -#: portato/gui/templates/MainWindow.glade:314 +#: portato/gui/templates/MainWindow.ui:155 msgid "_Plugins" msgstr "_Plugins" -#: portato/gui/templates/MainWindow.glade:356 +#: portato/gui/templates/MainWindow.ui:246 msgid "gtk-delete" msgstr "" -#: portato/gui/templates/MainWindow.glade:370 +#: portato/gui/templates/MainWindow.ui:259 msgid "gtk-find" msgstr "" -#: portato/gui/templates/MainWindow.glade:495 +#: portato/gui/templates/MainWindow.ui:380 msgid "Install onto system" msgstr "Füge zum System hinzu" -#: portato/gui/templates/MainWindow.glade:518 +#: portato/gui/templates/MainWindow.ui:402 msgid "Uninstall from system" msgstr "Lösche vom System" -#: portato/gui/templates/MainWindow.glade:541 +#: portato/gui/templates/MainWindow.ui:424 msgid "Revert changes" msgstr "Änderungen rückgängig machen" -#: portato/gui/templates/MainWindow.glade:619 +#: portato/gui/templates/MainWindow.ui:501 msgid "License:" msgstr "Lizenz:" -#: portato/gui/templates/MainWindow.glade:636 +#: portato/gui/templates/MainWindow.ui:518 msgid "Installed, but not in portage anymore" msgstr "Installiert, aber nicht mehr im Portage-Tree vorhanden" -#: portato/gui/templates/MainWindow.glade:651 +#: portato/gui/templates/MainWindow.ui:533 msgid "MISSING KEYWORD" msgstr "FEHLENDES KEYWORD" -#: portato/gui/templates/MainWindow.glade:683 +#: portato/gui/templates/MainWindow.ui:565 msgid "Description:" msgstr "Beschreibung:" -#: portato/gui/templates/MainWindow.glade:699 +#: portato/gui/templates/MainWindow.ui:581 msgid "Overlay:" msgstr "Overlay:" -#: portato/gui/templates/MainWindow.glade:747 +#: portato/gui/templates/MainWindow.ui:629 msgid "Homepage:" msgstr "Homepage:" -#: portato/gui/templates/MainWindow.glade:765 -#: portato/gui/windows/main.py:943 +#: portato/gui/templates/MainWindow.ui:647 +#: portato/gui/windows/main.py:958 msgid "Installed" msgstr "Installiert" -#: portato/gui/templates/MainWindow.glade:784 -#: portato/gui/windows/main.py:258 -#: portato/gui/windows/main.py:261 -#: portato/gui/windows/main.py:264 -#: portato/gui/windows/main.py:363 -#: portato/gui/windows/main.py:367 -#: portato/gui/windows/main.py:374 -#: portato/gui/windows/main.py:378 +#: portato/gui/templates/MainWindow.ui:665 +#: portato/gui/windows/main.py:259 +#: portato/gui/windows/main.py:262 +#: portato/gui/windows/main.py:265 +#: portato/gui/windows/main.py:364 +#: portato/gui/windows/main.py:368 +#: portato/gui/windows/main.py:375 +#: portato/gui/windows/main.py:379 msgid "Masked" msgstr "Masked" -#: portato/gui/templates/MainWindow.glade:817 -#: portato/gui/windows/main.py:275 -#: portato/gui/windows/main.py:278 -#: portato/gui/windows/main.py:336 -#: portato/gui/windows/main.py:340 +#: portato/gui/templates/MainWindow.ui:697 +#: portato/gui/windows/main.py:276 +#: portato/gui/windows/main.py:279 +#: portato/gui/windows/main.py:337 +#: portato/gui/windows/main.py:341 msgid "Testing" msgstr "Testing" -#: portato/gui/templates/MainWindow.glade:836 +#: portato/gui/templates/MainWindow.ui:715 msgid "Use Flags:" msgstr "Use Flags:" -#: portato/gui/templates/MainWindow.glade:901 +#: portato/gui/templates/MainWindow.ui:776 msgid "Use List" msgstr "Use-Flag-Liste" -#: portato/gui/templates/MainWindow.glade:928 +#: portato/gui/templates/MainWindow.ui:799 msgid "Dependencies" msgstr "Abhängigkeiten" -#: portato/gui/templates/MainWindow.glade:955 +#: portato/gui/templates/MainWindow.ui:822 msgid "Ebuild" msgstr "Ebuild" -#: portato/gui/templates/MainWindow.glade:982 +#: portato/gui/templates/MainWindow.ui:845 msgid "Changelog" msgstr "Changelog" -#: portato/gui/templates/MainWindow.glade:1009 +#: portato/gui/templates/MainWindow.ui:868 msgid "Files" msgstr "Dateien" -#: portato/gui/templates/MainWindow.glade:1047 +#: portato/gui/templates/MainWindow.ui:905 msgid "Execute the current selected queue" msgstr "Führe die aktuell gewählte Queue aus" -#: portato/gui/templates/MainWindow.glade:1066 +#: portato/gui/templates/MainWindow.ui:923 msgid "E_xecute" msgstr "_Ausführen" -#: portato/gui/templates/MainWindow.glade:1081 +#: portato/gui/templates/MainWindow.ui:938 msgid "Calculate the packages which will be installed during an \"update world\"" msgstr "Berechnet die Pakete, welche während eines \"update world\" installiert werden würden" -#: portato/gui/templates/MainWindow.glade:1094 +#: portato/gui/templates/MainWindow.ui:950 msgid "Remove the selected package from the queue" msgstr "Löscht das gewählte Paket aus der Queue" -#: portato/gui/templates/MainWindow.glade:1095 +#: portato/gui/templates/MainWindow.ui:951 msgid "_Remove" msgstr "_Löschen" -#: portato/gui/templates/MainWindow.glade:1167 -#: portato/gui/windows/main.py:636 +#: portato/gui/templates/MainWindow.ui:1021 +#: portato/gui/windows/main.py:645 msgid "Queue" msgstr "Queue" -#: portato/gui/templates/MainWindow.glade:1227 +#: portato/gui/templates/MainWindow.ui:1042 +#: portato/gui/windows/main.py:1315 +#: portato/gui/windows/main.py:1317 +msgid "Console" +msgstr "Konsole" + +#: portato/gui/templates/MainWindow.ui:1073 msgid "Log" msgstr "Log" @@ -655,6 +661,12 @@ msgstr "" "Hinweis: Auf frisch installierten Sabayon-Systemen bzw. der Sabayon LiveDVD/-CD existiert standardmäßig kein Portage-Tree.\n" "Bitte führe emerge --sync && layman -S aus." +#: portato/gui/dialogs.py:123 +#: portato/gui/windows/main.py:1364 +#, python-format +msgid "No versions of package '%s' found!" +msgstr "Keine Version vom Paket '%s' gefunden!" + #: portato/gui/views.py:85 msgid "Package is not installed" msgstr "Paket ist nicht installiert" @@ -670,7 +682,7 @@ msgid "No %(old)s language file installed. Disable highlighting." msgstr "Keine \"%(old)s\" Syntaxdatei gefunden. Deaktiviere Hervorhebung." #: portato/gui/views.py:130 -#: portato/gui/windows/main.py:536 +#: portato/gui/windows/main.py:552 #, python-format msgid "Error: %s" msgstr "Fehler: %s" @@ -735,150 +747,155 @@ msgstr "Paket" msgid "... is starting up: %s" msgstr "... startet: %s" -#: portato/gui/windows/preference.py:148 +#: portato/gui/windows/preference.py:149 msgid "Top" msgstr "Oben" -#: portato/gui/windows/preference.py:148 +#: portato/gui/windows/preference.py:149 msgid "Bottom" msgstr "Unten" -#: portato/gui/windows/preference.py:148 +#: portato/gui/windows/preference.py:149 msgid "Left" msgstr "Links" -#: portato/gui/windows/preference.py:148 +#: portato/gui/windows/preference.py:149 msgid "Right" msgstr "Rechts" -#: portato/gui/windows/preference.py:206 +#: portato/gui/windows/preference.py:217 msgid "Package Set" msgstr "Paket-Set" -#: portato/gui/windows/preference.py:211 -#: portato/gui/windows/main.py:945 +#: portato/gui/windows/preference.py:222 +#: portato/gui/windows/main.py:960 msgid "Description" msgstr "Beschreibung" -#: portato/gui/windows/main.py:145 +#: portato/gui/windows/main.py:146 msgid "" msgstr "" -#: portato/gui/windows/main.py:171 +#: portato/gui/windows/main.py:172 msgid "The first homepage part does not start with 'http' or 'ftp'." msgstr "Der erste Teil der Homepage startet nicht mit 'http' oder 'ftp'." -#: portato/gui/windows/main.py:175 +#: portato/gui/windows/main.py:176 msgid "Blank inside homepage." msgstr "Leerzeichen innerhalb der Homepage-URL." -#: portato/gui/windows/main.py:214 +#: portato/gui/windows/main.py:215 #, python-format msgid "Package could not be found: %s" msgstr "Paket konnte nicht gefunden werden: %s" -#: portato/gui/windows/main.py:267 -#: portato/gui/windows/main.py:365 +#: portato/gui/windows/main.py:268 +#: portato/gui/windows/main.py:366 msgid "Masked by user" msgstr "Vom Benutzer maskiert" -#: portato/gui/windows/main.py:457 +#: portato/gui/windows/main.py:462 msgid "Loading Config" msgstr "Lade Konfiguration" -#: portato/gui/windows/main.py:469 +#: portato/gui/windows/main.py:474 msgid "Creating Database" msgstr "Erstelle Datenbank" -#: portato/gui/windows/main.py:473 +#: portato/gui/windows/main.py:478 msgid "Loading Plugins" msgstr "Lade Plugins" -#: portato/gui/windows/main.py:486 +#: portato/gui/windows/main.py:502 msgid "Building frontend" msgstr "Erstelle Oberfläche" -#: portato/gui/windows/main.py:577 +#: portato/gui/windows/main.py:586 msgid "Restoring Session" msgstr "Lade Session" -#: portato/gui/windows/main.py:587 +#: portato/gui/windows/main.py:596 msgid "Finishing startup" msgstr "Erledige letzte Handgriffe :)" -#: portato/gui/windows/main.py:639 +#: portato/gui/windows/main.py:648 msgid "Options" msgstr "Optionen" -#: portato/gui/windows/main.py:655 +#: portato/gui/windows/main.py:664 msgid "Categories" msgstr "Kategorien" -#: portato/gui/windows/main.py:714 +#: portato/gui/windows/main.py:723 msgid "Packages" msgstr "Pakete" -#: portato/gui/windows/main.py:762 +#: portato/gui/windows/main.py:758 +#, python-format +msgid "Package '%s/%s' is disabled." +msgstr "Paket '%s/%s' wurde deaktiviert." + +#: portato/gui/windows/main.py:775 msgid "Versions" msgstr "Versionen" -#: portato/gui/windows/main.py:765 +#: portato/gui/windows/main.py:778 msgid "Slot" msgstr "Slot" -#: portato/gui/windows/main.py:898 +#: portato/gui/windows/main.py:913 #, python-format msgid "If '%s' is disabled" msgstr "Wenn '%s' deaktiviert ist" -#: portato/gui/windows/main.py:900 +#: portato/gui/windows/main.py:915 #, python-format msgid "If '%s' is enabled" msgstr "Wenn '%s' aktiviert ist" -#: portato/gui/windows/main.py:906 +#: portato/gui/windows/main.py:921 msgid "One of the following" msgstr "Eins der folgenden" -#: portato/gui/windows/main.py:911 +#: portato/gui/windows/main.py:926 msgid "All of the following" msgstr "Alle folgenden" -#: portato/gui/windows/main.py:922 +#: portato/gui/windows/main.py:937 msgid "Can't display dependencies: This package has an unsupported dependency string." msgstr "Kann Abhängigkeiten nicht anzeigen: Format der Abhängigkeiten des Pakets wird nicht unterstützt." -#: portato/gui/windows/main.py:944 +#: portato/gui/windows/main.py:959 msgid "Flag" msgstr "Flag" -#: portato/gui/windows/main.py:968 +#: portato/gui/windows/main.py:983 msgid "This is an expanded use flag and cannot be selected" msgstr "Dies ist ein \"Expanded Use Flag\" und kann daher nicht ausgewählt werden." -#: portato/gui/windows/main.py:1006 +#: portato/gui/windows/main.py:1021 #, python-format msgid "Translating session from version %d to %d." msgstr "Upgrade Session von Version %d auf Version %d." -#: portato/gui/windows/main.py:1009 +#: portato/gui/windows/main.py:1024 #, python-format msgid "Cannot translate session from version %d to %d." msgstr "Kann Session nicht von Version %d nach %d upgraden." -#: portato/gui/windows/main.py:1471 +#: portato/gui/windows/main.py:1500 msgid "use flags" msgstr "Use Flags" -#: portato/gui/windows/main.py:1483 +#: portato/gui/windows/main.py:1512 msgid "masking keywords" msgstr "Masking Keywords" -#: portato/gui/windows/main.py:1885 +#: portato/gui/windows/main.py:1886 msgid "The portage tree is not existing." msgstr "Der Portage-Tree existiert nicht." -#: portato/gui/windows/main.py:1889 +#: portato/gui/windows/main.py:1890 msgid "The portage tree seems to be empty." msgstr "Der Portage-Tree scheint leer zu sein." @@ -899,29 +916,6 @@ msgstr "Das aktuelle Sessionformat ist zu alt." msgid "Current session format is newer than this version supports." msgstr "Das aktuelle Sessionformat ist neuer, als diese Portato-Version unterstützt." -#: portato/gui/utils.py:180 -#: portato/gui/utils.py:337 -msgid "ALL" -msgstr "ALLE" - -#: portato/gui/utils.py:268 -#, python-format -msgid "Catched KeyError => %s seems not to be an available category. Have you played with rsync-excludes?" -msgstr "Catched KeyError => %s scheint keine valide Kategorie zu sein. Hast du mit rsync-excludes gespielt?" - -#: portato/gui/utils.py:329 -#, python-format -msgid "Error while compiling search expression: '%s'." -msgstr "Fehler beim erstellen des Suchausdrucks: '%s'." - -#: portato/gui/utils.py:367 -msgid "Cleaning database..." -msgstr "Leere Datenbank..." - -#: portato/gui/utils.py:369 -msgid "Populating database..." -msgstr "Fülle Datenbank..." - #: portato/backend/flags.py:528 #, python-format msgid "Conflicting values for masking status: %s" @@ -951,15 +945,71 @@ msgstr "BUG in flags.new_masking_status. Es gibt '%s' zurück." msgid "Invalid dependency string" msgstr "Ungültiger Dependency-String." -#: portato/session.py:63 +#: portato/db/__init__.py:22 +msgid "SQLite" +msgstr "SQLite" + +#: portato/db/__init__.py:22 +msgid "" +"Uses an SQLite-database to store package information.\n" +"May take longer to generate at the first time, but has advantages if portato is re-started with an unchanged portage tree. Additionally it allows to use fast SQL expressions for fetching the data." +msgstr "" + +#: portato/db/__init__.py:23 +msgid "Hashmap" +msgstr "Hashtabelle" + +#: portato/db/__init__.py:23 +msgid "" +"Uses an in-memory hashmap to store package information.\n" +"Has been used since at least version 0.3.3, but all information has to be regenerated on each startup." +msgstr "" + +#: portato/db/__init__.py:43 +msgid "Cannot load SQLDatabase." +msgstr "Kann SQL-Datenbank nicht laden." + +#: portato/db/database.py:38 +msgid "ALL" +msgstr "ALLE" + +#: portato/db/dict.py:94 +#, python-format +msgid "Catched KeyError => %s seems not to be an available category. Have you played with rsync-excludes?" +msgstr "Catched KeyError => %s scheint keine valide Kategorie zu sein. Hast du mit rsync-excludes gespielt?" + +#: portato/db/dict.py:149 +#, python-format +msgid "Error while compiling search expression: '%s'." +msgstr "Fehler beim erstellen des Suchausdrucks: '%s'." + +#: portato/db/sql.py:75 +msgid "Cleaning database..." +msgstr "Leere Datenbank..." + +#: portato/db/sql.py:77 +msgid "Populating database..." +msgstr "Fülle Datenbank..." + +#: portato/session.py:67 +#, python-format +msgid "Loading '%s' session from %s." +msgstr "Lade '%s'-Session von %s." + +#: portato/session.py:69 +#, python-format +msgid "Loading session from %s." +msgstr "Lade Session von %s." + +#: portato/session.py:141 #, python-format -msgid "Loading '%s' session from '%s'." -msgstr "Lade '%s'-Session von '%s'." +msgid "Saving '%s' session to %s." +msgstr "Schreibe '%s'-Session nach %s." -#: portato/session.py:65 +#: portato/session.py:143 #, python-format -msgid "Loading session from '%s'." -msgstr "Lade Session von '%s'." +msgid "Saving session to %s." +msgstr "Schreibe Session nach %s." #: portato/plistener.py:94 msgid "Listener has not been started." diff --git a/i18n/messages.pot b/i18n/messages.pot index bd57ef6..fdeca82 100644 --- a/i18n/messages.pot +++ b/i18n/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-02-18 23:17+0100\n" +"POT-Creation-Date: 2009-02-18 23:42+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -32,77 +32,77 @@ msgstr "" msgid "_Install Selected" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:14 +#: portato/gui/templates/PreferenceWindow.ui:24 msgid "Preferences" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:51 +#: portato/gui/templates/PreferenceWindow.ui:60 msgid "Debug" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:66 +#: portato/gui/templates/PreferenceWindow.ui:79 msgid "Browser command: " msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:92 -#: portato/gui/templates/PreferenceWindow.ui:652 +#: portato/gui/templates/PreferenceWindow.ui:106 +#: portato/gui/templates/PreferenceWindow.ui:697 msgid "General Options" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:125 +#: portato/gui/templates/PreferenceWindow.ui:140 msgid "Used database type" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:146 +#: portato/gui/templates/PreferenceWindow.ui:167 msgid "Database Options" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:168 +#: portato/gui/templates/PreferenceWindow.ui:189 #: portato/gui/templates/MainWindow.ui:754 msgid "General" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:245 +#: portato/gui/templates/PreferenceWindow.ui:271 msgid "Package sets to update" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:261 +#: portato/gui/templates/PreferenceWindow.ui:287 msgid "Update World Options" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:284 +#: portato/gui/templates/PreferenceWindow.ui:313 msgid "Sync command: " msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:305 +#: portato/gui/templates/PreferenceWindow.ui:335 msgid "Sync Options" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:355 +#: portato/gui/templates/PreferenceWindow.ui:376 msgid "File name to use, if package.use is a directory: " msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:366 +#: portato/gui/templates/PreferenceWindow.ui:386 msgid "Add only exact version to package.use" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:378 +#: portato/gui/templates/PreferenceWindow.ui:400 msgid "Add only exact version to package.keywords" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:391 +#: portato/gui/templates/PreferenceWindow.ui:416 msgid "File name to use, if package.keywords is a directory: " msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:425 +#: portato/gui/templates/PreferenceWindow.ui:450 msgid "File name to use, if package.mask/package.unmask is a directory: " msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:436 +#: portato/gui/templates/PreferenceWindow.ui:460 msgid "Add only exact version to package.mask/package.unmask" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:457 +#: portato/gui/templates/PreferenceWindow.ui:484 msgid "" "You may use the following placeholders:\n" "\n" @@ -112,98 +112,98 @@ msgid "" "$(version) : version of the package" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:481 +#: portato/gui/templates/PreferenceWindow.ui:508 msgid "Use-Flags" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:496 +#: portato/gui/templates/PreferenceWindow.ui:523 msgid "Testing Keywords" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:511 +#: portato/gui/templates/PreferenceWindow.ui:538 msgid "Masking Keywords" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:528 +#: portato/gui/templates/PreferenceWindow.ui:564 msgid "Use Flag and Keyword Options" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:543 +#: portato/gui/templates/PreferenceWindow.ui:582 msgid "Portage" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:582 +#: portato/gui/templates/PreferenceWindow.ui:618 msgid "Enable systray" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:594 +#: portato/gui/templates/PreferenceWindow.ui:632 msgid "Show emerge progress in window title" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:607 +#: portato/gui/templates/PreferenceWindow.ui:646 msgid "Show emerge progress in console title" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:620 +#: portato/gui/templates/PreferenceWindow.ui:660 msgid "Hide on minimization (only if systray is enabled)" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:636 +#: portato/gui/templates/PreferenceWindow.ui:674 msgid "Search while typing" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:687 +#: portato/gui/templates/PreferenceWindow.ui:733 msgid "Console Font" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:697 +#: portato/gui/templates/PreferenceWindow.ui:746 msgid "Chose a console font" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:715 +#: portato/gui/templates/PreferenceWindow.ui:767 msgid "Maximum length of the console title" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:745 +#: portato/gui/templates/PreferenceWindow.ui:800 msgid "Console Options" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:783 +#: portato/gui/templates/PreferenceWindow.ui:838 msgid "Package Tabs" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:807 +#: portato/gui/templates/PreferenceWindow.ui:869 msgid "System Tabs" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:832 +#: portato/gui/templates/PreferenceWindow.ui:898 msgid "Tab Options" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:863 +#: portato/gui/templates/PreferenceWindow.ui:926 msgid "Show slots in the version list" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:874 +#: portato/gui/templates/PreferenceWindow.ui:939 msgid "Collapse categories with same prefix" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:889 +#: portato/gui/templates/PreferenceWindow.ui:960 msgid "Package Options" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:907 +#: portato/gui/templates/PreferenceWindow.ui:981 msgid "Visual" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:924 +#: portato/gui/templates/PreferenceWindow.ui:1000 #: portato/gui/templates/PluginWindow.ui:211 #: portato/gui/templates/MailInfoWindow.ui:168 #: portato/gui/templates/SearchWindow.ui:47 msgid "gtk-cancel" msgstr "" -#: portato/gui/templates/PreferenceWindow.ui:932 +#: portato/gui/templates/PreferenceWindow.ui:1013 #: portato/gui/templates/PluginWindow.ui:222 msgid "gtk-apply" msgstr "" @@ -639,7 +639,7 @@ msgid "" "Please run emerge --sync && layman -S." msgstr "" -#: portato/gui/dialogs.py:123 +#: portato/gui/dialogs.py:123 portato/gui/windows/main.py:1364 #, python-format msgid "No versions of package '%s' found!" msgstr "" @@ -866,11 +866,6 @@ msgstr "" msgid "Cannot translate session from version %d to %d." msgstr "" -#: portato/gui/windows/main.py:1364 -#, python-format -msgid "No versions of package '%s' found!." -msgstr "" - #: portato/gui/windows/main.py:1500 msgid "use flags" msgstr "" diff --git a/portato/gui/templates/PreferenceWindow.ui b/portato/gui/templates/PreferenceWindow.ui index a3ec174..3e04a9e 100644 --- a/portato/gui/templates/PreferenceWindow.ui +++ b/portato/gui/templates/PreferenceWindow.ui @@ -1,22 +1,32 @@ - + + 300 - 0 - 10 1 - 0 - 0 + 10 + + + + + + + + + + + + 5 Preferences True - GTK_WIN_POS_CENTER_ON_PARENT + center-on-parent True True - + True @@ -47,12 +57,15 @@ True - True Debug + True + False + False True False + 0 @@ -67,6 +80,7 @@ False + 0 @@ -96,6 +110,7 @@ False + 0 @@ -124,6 +139,9 @@ 0 Used database type + + 0 + @@ -135,6 +153,9 @@ + + 0 + @@ -189,19 +210,24 @@ True - True --deep + True + False + False True False False + 0 - True --newuse + True + False + False True @@ -214,7 +240,7 @@ True 0 - GTK_SHADOW_NONE + none True @@ -225,8 +251,8 @@ True True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True @@ -263,6 +289,9 @@ + + 0 + @@ -285,6 +314,7 @@ False + 0 @@ -328,15 +358,6 @@ True 10 2 - - - - - - - - - True @@ -362,8 +383,10 @@ - True Add only exact version to package.use + True + False + False True @@ -374,8 +397,10 @@ - True Add only exact version to package.keywords + True + False + False True @@ -432,8 +457,10 @@ - True Add only exact version to package.mask/package.unmask + True + False + False True @@ -449,7 +476,7 @@ True 0 - GTK_SHADOW_OUT + out True @@ -463,7 +490,7 @@ True - + @@ -518,6 +545,15 @@ 5 + + + + + + + + + @@ -536,6 +572,9 @@ + + 1 + @@ -576,22 +615,25 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Enable systray True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Enable systray True False + 0 + Show emerge progress in window title True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Show emerge progress in window title True @@ -601,10 +643,11 @@ + Show emerge progress in console title True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Show emerge progress in console title True @@ -614,10 +657,11 @@ + Hide on minimization (only if systray is enabled) True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Hide on minimization (only if systray is enabled) True @@ -627,13 +671,14 @@ + Search while typing True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True Update the package list with the current search results while you are typing. <b>Note</b>: Will slow down the typing process. - Search while typing 0.47999998927116394 True @@ -656,6 +701,7 @@ False + 0 @@ -687,6 +733,9 @@ Console Font True + + 0 + @@ -704,6 +753,9 @@ + + 0 + @@ -715,6 +767,9 @@ Maximum length of the console title True + + 0 + @@ -782,17 +837,24 @@ 0 Package Tabs + + 0 + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + pkgComboStore 1 + + 0 + @@ -806,11 +868,15 @@ 0 System Tabs + + 0 + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + systemComboStore 1 @@ -857,21 +923,26 @@ True + Show slots in the version list True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Show slots in the version list True + + 0 + + Collapse categories with same prefix True True + False True Organize the categories in a tree. Thereby collapse categories with the same prefix: As an example: <i>app-admin</i>, <i>app-emacs</i>, and <i>app-vim</i> would be collapsed into <i><b>app</b></i> as root and <i>admin</i>, <i>emacs</i>, and <i>vim</i> as children. - Collapse categories with same prefix True @@ -899,6 +970,9 @@ As an example: <i>app-admin</i>, <i>app-emacs</i>, and & + + 2 + @@ -912,27 +986,37 @@ As an example: <i>app-admin</i>, <i>app-emacs</i>, and & + + 0 + True True - GTK_BUTTONBOX_SPREAD + spread - True gtk-cancel + True + False + False True - + + + 0 + - True gtk-apply + True + False + False True 0.51999998092651367 - + 1 diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index 2ee4447..761f6f3 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -1361,7 +1361,7 @@ class MainWindow (Window): try: self.fill_version_list(self.selCP) except VersionsNotFoundException, e: - warning(_("No versions of package '%s' found!.") % self.selCP) + warning(_("No versions of package '%s' found!") % self.selCP) no_versions_dialog(self.selCP) self.db.disable(self.selCP) self.selCP = oldcp -- cgit v1.2.3-54-g00ecf From df87ac431080518039d1fb3943b06ec80677c2b7 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 19 Feb 2009 00:34:17 +0100 Subject: Make translation work correctly --- portato/gui/windows/basic.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'portato/gui/windows') diff --git a/portato/gui/windows/basic.py b/portato/gui/windows/basic.py index a4f8236..f631376 100644 --- a/portato/gui/windows/basic.py +++ b/portato/gui/windows/basic.py @@ -22,6 +22,16 @@ import os.path from ...constants import TEMPLATE_DIR, APP, LOCALE_DIR from ...helper import error +# for the GtkBuilder to translate correctly :) +import ctypes +try: + getlib = ctypes.cdll.LoadLibrary("libgettextlib.s") +except OSError: + error("'libgettextlib.so' cannot be loaded. Might be, that there are no translations available in the GUI.") +else: + getlib.textdomain(APP) + getlib.bindtextdomain(APP, LOCALE_DIR) + class WrappedTree (object): __slots__ = ("klass", "tree", "get_widget", "get_ui") def __init__ (self, klass, tree): -- cgit v1.2.3-54-g00ecf From 49b36ab957a53cea103fe63e117c3fe244485eaa Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 19 Feb 2009 23:31:03 +0100 Subject: Fix gettext library name --- portato/gui/windows/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'portato/gui/windows') diff --git a/portato/gui/windows/basic.py b/portato/gui/windows/basic.py index f631376..b3f210c 100644 --- a/portato/gui/windows/basic.py +++ b/portato/gui/windows/basic.py @@ -25,7 +25,7 @@ from ...helper import error # for the GtkBuilder to translate correctly :) import ctypes try: - getlib = ctypes.cdll.LoadLibrary("libgettextlib.s") + getlib = ctypes.cdll.LoadLibrary("libgettextlib.so") except OSError: error("'libgettextlib.so' cannot be loaded. Might be, that there are no translations available in the GUI.") else: -- cgit v1.2.3-54-g00ecf From 796f983e0eb5889ee18169bfedfdef99e5b9e2ef Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 19 Feb 2009 23:52:52 +0100 Subject: Make combos work --- portato/gui/templates/PreferenceWindow.ui | 14 -------------- portato/gui/windows/preference.py | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 17 deletions(-) (limited to 'portato/gui/windows') diff --git a/portato/gui/templates/PreferenceWindow.ui b/portato/gui/templates/PreferenceWindow.ui index 3e04a9e..e5618fd 100644 --- a/portato/gui/templates/PreferenceWindow.ui +++ b/portato/gui/templates/PreferenceWindow.ui @@ -7,18 +7,6 @@ 1 10 - - - - - - - - - - - - 5 Preferences @@ -845,7 +833,6 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - pkgComboStore 1 @@ -876,7 +863,6 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - systemComboStore 1 diff --git a/portato/gui/windows/preference.py b/portato/gui/windows/preference.py index c8025d0..a7661c5 100644 --- a/portato/gui/windows/preference.py +++ b/portato/gui/windows/preference.py @@ -144,10 +144,15 @@ class PreferenceWindow (AbstractDialog): self.pkgTabCombo = self.tree.get_widget("packageTabCombo") for c in (self.systemTabCombo, self.pkgTabCombo): - m = c.get_model() - m.clear() + model = gtk.ListStore(str) for i in (_("Top"), _("Bottom"), _("Left"), _("Right")): - m.append((i,)) + model.append((i,)) + + c.set_model(model) + + cell = gtk.CellRendererText() + c.pack_start(cell) + c.set_attributes(cell, text = 0) self.systemTabCombo.set_active(int(self.cfg.get("systemTabPos", section = "GUI"))-1) self.pkgTabCombo.set_active(int(self.cfg.get("packageTabPos", section = "GUI"))-1) @@ -161,6 +166,10 @@ class PreferenceWindow (AbstractDialog): self.databaseCombo.set_model(model) self.databaseCombo.set_active(0) # XXX: just set one thing active - no meaning yet + + cell = gtk.CellRendererText() + self.databaseCombo.pack_start(cell) + self.databaseCombo.set_attributes(cell, text = 0) self.window.show_all() -- cgit v1.2.3-54-g00ecf From d3f2196d3c638222a8e96c3d61626a9ff8efb2e1 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Fri, 20 Feb 2009 00:29:36 +0100 Subject: Add color btns to the preferences, so they are configurable here too --- doc/Changelog | 1 + etc/portato.cfg | 1 - portato/gui/templates/PreferenceWindow.ui | 269 ++++++++++++++++++++---------- portato/gui/windows/main.py | 16 +- portato/gui/windows/preference.py | 34 ++-- 5 files changed, 222 insertions(+), 99 deletions(-) (limited to 'portato/gui/windows') diff --git a/doc/Changelog b/doc/Changelog index 5c7f8a7..448c8ee 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -8,6 +8,7 @@ next: - check prerequisites before starting - reorganize preferences - change from libglade to GtkBuilder +- add color buttns to the preferences, so the colors can be changed - bugs fixed: #44, #41, #15, #47 0.11.1: diff --git a/etc/portato.cfg b/etc/portato.cfg index 5533064..950d78d 100644 --- a/etc/portato.cfg +++ b/etc/portato.cfg @@ -106,7 +106,6 @@ scrollbacklines = 1000 # # Color section -# Values in this section are normally not editable through the GUI. # [COLORS] diff --git a/portato/gui/templates/PreferenceWindow.ui b/portato/gui/templates/PreferenceWindow.ui index e5618fd..3b0edb8 100644 --- a/portato/gui/templates/PreferenceWindow.ui +++ b/portato/gui/templates/PreferenceWindow.ui @@ -56,6 +56,20 @@ 0 + + + Search while typing + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0.47999998927116394 + True + + + 1 + + True @@ -81,7 +95,7 @@ - 1 + 2 @@ -657,23 +671,6 @@ 3 - - - Search while typing - True - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - Update the package list with the current search results while you are typing. -<b>Note</b>: Will slow down the typing process. - 0.47999998927116394 - True - - - 4 - - @@ -693,12 +690,12 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 @@ -706,35 +703,30 @@ 12 5 - + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 + True - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - Console Font - True + Package Tabs 0 - + True - True - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Chose a console font - True - True - False 1 @@ -746,26 +738,25 @@ - + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True - + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - Maximum length of the console title - True + System Tabs 0 - + True - True - adjustment1 - True - True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 @@ -773,7 +764,6 @@ - 4 1 @@ -782,10 +772,10 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - <b>Console Options</b> + <b>Tab Options</b> True @@ -796,12 +786,12 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 @@ -809,30 +799,97 @@ 12 5 - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - + + Show slots in the version list True + True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True + True + + + 0 + + + + + Collapse categories with same prefix + True + True + False + True + Organize the categories in a tree. Thereby collapse categories with the same prefix: +As an example: <i>app-admin</i>, <i>app-emacs</i>, and <i>app-vim</i> would be collapsed into <i><b>app</b></i> as root and <i>admin</i>, <i>emacs</i>, and <i>vim</i> as children. + True + + + 1 + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>Package Options</b> + True + + + + + False + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + 5 + 12 + 5 + + + True + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - Package Tabs + Console Font + True 0 - + True + True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Chose a console font + True + True + False 1 @@ -844,25 +901,26 @@ - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - System Tabs + Maximum length of the console title + True 0 - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + adjustment1 + True + True 1 @@ -870,6 +928,7 @@ + 4 1 @@ -878,26 +937,26 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - <b>Tab Options</b> + <b>Console Options</b> True False - 2 + 3 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 @@ -905,31 +964,71 @@ 12 5 - + True - - Show slots in the version list + True - True - False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True + 5 + True + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Package Detail Background + True + + + 0 + + + + + True + True + True + #000000000000 + + + 1 + + 0 - - Collapse categories with same prefix + True - True - False - True - Organize the categories in a tree. Thereby collapse categories with the same prefix: -As an example: <i>app-admin</i>, <i>app-emacs</i>, and <i>app-vim</i> would be collapsed into <i><b>app</b></i> as root and <i>admin</i>, <i>emacs</i>, and <i>vim</i> as children. - True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + True + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Flag Placeholder Description Background + True + + + 0 + + + + + True + True + True + #000000000000 + + + 1 + + 1 @@ -940,17 +1039,17 @@ As an example: <i>app-admin</i>, <i>app-emacs</i>, and & - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - <b>Package Options</b> + <b>Color Options</b> True False - 3 + 4 diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index 761f6f3..ee51703 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -76,8 +76,7 @@ class PackageTable: self.maskedLabel = self.tree.get_widget("maskedLabel") # labels - generalVB = self.tree.get_widget("generalVB") - generalVB.modify_bg(gtk.STATE_NORMAL, get_color(self.main.cfg, "packagetable")) + self.main.set_color(get_color(self.main.cfg, "packagetable")) self.nameLabel = self.tree.get_widget("nameLabel") self.descLabel = self.tree.get_widget("descLabel") @@ -1259,6 +1258,17 @@ class MainWindow (Window): self.catList.get_selection().select_path(pos) self.catList.scroll_to_cell(pos) + def set_color (self, color): + """ + Sets the color of the general VB (i.e. the thing that displays the package details) + + @param color: color to set it to + @type color: gtk.gdk.Color + """ + + generalVB = self.tree.get_widget("generalVB") + generalVB.modify_bg(gtk.STATE_NORMAL, color) + def set_uri_hook (self, browser): """ Sets the browser command which is called when a URL is going to be opened. @@ -1678,7 +1688,7 @@ class MainWindow (Window): """ User wants to open preferences. """ - PreferenceWindow(self.window, self.cfg, self.console.set_font_from_string, self.set_uri_hook, self.set_notebook_tabpos, self.fill_cat_store) + PreferenceWindow(self.window, self.cfg, self.console.set_font_from_string, self.set_uri_hook, self.set_notebook_tabpos, self.fill_cat_store, self.set_color) return True def cb_about_clicked (self, *args): diff --git a/portato/gui/windows/preference.py b/portato/gui/windows/preference.py index a7661c5..4d3493f 100644 --- a/portato/gui/windows/preference.py +++ b/portato/gui/windows/preference.py @@ -61,7 +61,7 @@ class PreferenceWindow (AbstractDialog): 4 : gtk.POS_RIGHT } - def __init__ (self, parent, cfg, console_fn, linkbtn_fn, tabpos_fn, catmodel_fn): + def __init__ (self, parent, cfg, console_fn, linkbtn_fn, tabpos_fn, catmodel_fn, labelcolor_fn): """Constructor. @param parent: parent window @@ -75,7 +75,9 @@ class PreferenceWindow (AbstractDialog): @param tabpos_fn: function to call to set the tabposition of the notebooks @type tabpos_fn: function(gtk.ComboBox,int) @param catmodel_fn: function to call to set the model of the cat list (collapsed/not collapsed) - @type catmodel_fn: function()""" + @type catmodel_fn: function() + @param labelcolor_fn: function to call to set the color of the label + @type labelcolor_fn: function(gtk.gdk.Color)""" AbstractDialog.__init__(self, parent) @@ -102,6 +104,7 @@ class PreferenceWindow (AbstractDialog): self.linkbtn_fn = linkbtn_fn self.tabpos_fn = tabpos_fn self.catmodel_fn = catmodel_fn + self.labelcolor_fn = labelcolor_fn # set the bg-color of the hint hintEB = self.tree.get_widget("hintEB") @@ -110,20 +113,16 @@ class PreferenceWindow (AbstractDialog): # the checkboxes for box, val in self.checkboxes.iteritems(): if isinstance(val, tuple): - self.tree.get_widget(box).\ - set_active(self.cfg.get_boolean(val[0], section = val[1])) + self.tree.get_widget(box).set_active(self.cfg.get_boolean(val[0], section = val[1])) else: - self.tree.get_widget(box).\ - set_active(self.cfg.get_boolean(val)) + self.tree.get_widget(box).set_active(self.cfg.get_boolean(val)) # the edits for edit, val in self.edits.iteritems(): if isinstance(val,tuple): - self.tree.get_widget(edit).\ - set_text(self.cfg.get(val[0], section = val[1])) + self.tree.get_widget(edit).set_text(self.cfg.get(val[0], section = val[1])) else: - self.tree.get_widget(edit).\ - set_text(self.cfg.get(val)) + self.tree.get_widget(edit).set_text(self.cfg.get(val)) # the set list self.setList = self.tree.get_widget("setList") @@ -139,6 +138,13 @@ class PreferenceWindow (AbstractDialog): self.titleLengthSpinBtn = self.tree.get_widget("titleLengthSpinBtn") self.titleLengthSpinBtn.set_value(int(self.cfg.get("titlelength", section = "GUI"))) + # the color buttons + self.pkgTableColorBtn = self.tree.get_widget("pkgTableColorBtn") + self.pkgTableColorBtn.set_color(get_color(self.cfg, "packagetable")) + + self.prefColorBtn = self.tree.get_widget("prefColorBtn") + self.prefColorBtn.set_color(get_color(self.cfg, "prefhint")) + # the comboboxes self.systemTabCombo = self.tree.get_widget("systemTabCombo") self.pkgTabCombo = self.tree.get_widget("packageTabCombo") @@ -209,6 +215,14 @@ class PreferenceWindow (AbstractDialog): self.catmodel_fn() + # colors + c = self.pkgTableColorBtn.get_color() + self.cfg.set("packagetable", str(c)[1:], section = "COLORS") + self.labelcolor_fn(c) + + c = self.prefColorBtn.get_color() + self.cfg.set("prefhint", str(c)[1:], section = "COLORS") + def fill_setlist (self): store = gtk.ListStore(bool, str, str, str) -- cgit v1.2.3-54-g00ecf From 9756f5649fc17b4be9b8f3f9a537ee027faabca2 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Fri, 20 Feb 2009 00:58:36 +0100 Subject: Add database type to global config -- no user-config for the moment --- etc/portato.cfg | 11 ++++++++++ portato/db/__init__.py | 23 ++++++++++---------- portato/gui/templates/PreferenceWindow.ui | 35 +++++++++++++++++++++++++++++++ portato/gui/windows/main.py | 2 +- portato/gui/windows/preference.py | 18 +++++++++++++++- 5 files changed, 76 insertions(+), 13 deletions(-) (limited to 'portato/gui/windows') diff --git a/etc/portato.cfg b/etc/portato.cfg index 950d78d..6d5d79f 100644 --- a/etc/portato.cfg +++ b/etc/portato.cfg @@ -115,4 +115,15 @@ packagetable = ffffff ; background color of the hint box in the preferences - hex value prefhint = f3f785 +# +# Section for the internal database +# +[DATABASE] + +; the type of the database to use - string value +; allowed values: +; - sql : SQLite Database +; - dict : Hashmap in Memory +type = sql + # vim:ts=4:sw=4:noexpandtab:ft=cfg diff --git a/portato/db/__init__.py b/portato/db/__init__.py index d36f900..5537c5e 100644 --- a/portato/db/__init__.py +++ b/portato/db/__init__.py @@ -13,29 +13,26 @@ from __future__ import absolute_import from ..session import Session, SectionDict -from ..helper import debug, warning +from ..helper import debug, warning, error + +class UnknownDatabaseTypeError (Exception): + pass _SESSION = None -_TYPE = None types = { "sql": (_("SQLite"), _("Uses an SQLite-database to store package information.\nMay take longer to generate at the first time, but has advantages if portato is re-started with an unchanged portage tree. Additionally it allows to use fast SQL expressions for fetching the data.")), "dict": (_("Hashmap"), _("Uses an in-memory hashmap to store package information.\nHas been used since at least version 0.3.3, but all information has to be regenerated on each startup.")) } -def _set_type(t): - global _TYPE - _TYPE = t - -def Database(): - global _SESSION, _TYPE +def Database(type): + global _SESSION if _SESSION is None: _SESSION = Session("db.cfg", name = "DB") - _SESSION.add_handler((["type"], _set_type, lambda: _TYPE), default = ["sql"]) _SESSION.load() - if _TYPE == "sql": + if type == "sql": debug("Using SQLDatabase") try: from .sql import SQLDatabase @@ -46,7 +43,11 @@ def Database(): else: return SQLDatabase(SectionDict(_SESSION, "SQL")) - elif _TYPE == "dict": + elif type == "dict": debug("Using DictDatabase") from .dict import DictDatabase return DictDatabase(SectionDict(_SESSION, "dict")) + + else: + error(_("Unknown database type: %s"), type) + raise UnknownDatabaseTypeError, "type" diff --git a/portato/gui/templates/PreferenceWindow.ui b/portato/gui/templates/PreferenceWindow.ui index 3b0edb8..0642e02 100644 --- a/portato/gui/templates/PreferenceWindow.ui +++ b/portato/gui/templates/PreferenceWindow.ui @@ -142,6 +142,7 @@ Used database type + False 0 @@ -149,6 +150,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 1 @@ -159,6 +161,39 @@ 0 + + + True + 0 + in + + + True + 5 + 5 + 12 + + + True + label + True + True + + + + + + + True + <b>Description</b> + True + + + + + 1 + + diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index ee51703..04a9995 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -471,7 +471,7 @@ class MainWindow (Window): # package db splash(_("Creating Database")) - self.db = Database() + self.db = Database(self.cfg.get("type", section = "DATABASE")) # set plugins and plugin-menu splash(_("Loading Plugins")) diff --git a/portato/gui/windows/preference.py b/portato/gui/windows/preference.py index 4d3493f..5b88b22 100644 --- a/portato/gui/windows/preference.py +++ b/portato/gui/windows/preference.py @@ -164,19 +164,28 @@ class PreferenceWindow (AbstractDialog): self.pkgTabCombo.set_active(int(self.cfg.get("packageTabPos", section = "GUI"))-1) # the database combo + dbtype = self.cfg.get("type", section = "DATABASE") self.databaseCombo = self.tree.get_widget("databaseCombo") model = gtk.ListStore(str, str, str) + ctr = 0 + active = 0 for k, (name, desc) in db.types.iteritems(): + if k == dbtype: + active = ctr + model.append([name, desc, k]) + ctr += 1 self.databaseCombo.set_model(model) - self.databaseCombo.set_active(0) # XXX: just set one thing active - no meaning yet + self.databaseCombo.set_active(active) cell = gtk.CellRendererText() self.databaseCombo.pack_start(cell) self.databaseCombo.set_attributes(cell, text = 0) + self.cb_db_combo_changed() + self.window.show_all() def _save(self): @@ -246,6 +255,13 @@ class PreferenceWindow (AbstractDialog): self.setList.set_model(store) + def cb_db_combo_changed (self, *args): + model = self.databaseCombo.get_model() + active = self.databaseCombo.get_active() + + descr = self.tree.get_widget("dbDescriptionLabel") + descr.set_markup("%s" % model[active][1]) + def cb_ok_clicked(self, button): """Saves, writes to config-file and closes the window.""" self._save() -- cgit v1.2.3-54-g00ecf