From 5214c805634169499365c9a096e1bf0519deaa28 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Sun, 6 Sep 2009 01:34:45 +0200 Subject: Automatic loading of the external menu --- portato/gui/windows/basic.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'portato/gui/windows/basic.py') diff --git a/portato/gui/windows/basic.py b/portato/gui/windows/basic.py index e7f48a6..cab2fb9 100644 --- a/portato/gui/windows/basic.py +++ b/portato/gui/windows/basic.py @@ -77,10 +77,24 @@ class UIBuilder (object): if not hasattr(self, "__file__"): self.__file__ = self.__class__.__name__ + # general setup self._builder = gtk.Builder() self._builder.add_from_file(os.path.join(TEMPLATE_DIR, self.__file__+".ui")) self._builder.set_translation_domain(APP) + + self.tree = WrappedTree(self.__class__.__name__, self._builder) + # load menu if existing + menufile = os.path.join(TEMPLATE_DIR, self.__file__+".menu") + if os.path.exists(menufile): + debug("Menufile for '%s' exists.", self.__file__) + barbox = self.tree.get_widget("menubar_box") + if barbox is not None: + self._builder.add_from_file(menufile) + bar = self.tree.get_ui("menubar") + barbox.pack_start(bar, expand = False, fill = False) + + # signal connections if connector is None: connector = self unconnected = self._builder.connect_signals(connector) @@ -89,8 +103,6 @@ class UIBuilder (object): 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) - class Window (UIBuilder): def __init__ (self): -- cgit v1.2.3-70-g09d2 value='search'/>
path: root/kosten/static/images/img03.gif (unfollow)
Commit message (Expand)AuthorFilesLines
2021-10-13Revert "Remove jQuery-UI -- the datepicker is gone now..."René 'Necoro' Neumann17-0/+17
2021-05-26Revert SQLAlchemy to 1.3 -- changes in 1.4 are way to much for the momentRené 'Necoro' Neumann1-2/+2
2021-05-26Update dependenciesRené 'Necoro' Neumann3-14/+19
2020-12-13UffRené 'Necoro' Neumann1-1/+1
2020-12-13Fix NULL check queryRené 'Necoro' Neumann2-2/+2
2020-11-21Fix search resultsRené 'Necoro' Neumann1-6/+5
2020-08-02Fix some errorsRené 'Necoro' Neumann3-6/+6
2020-08-01Fix optional 'description' fieldRené 'Necoro' Neumann2-2/+2
2020-07-24Revert "Remove translation hack"René 'Necoro' Neumann1-1/+7
2020-07-24length validators for string fieldsRené 'Necoro' Neumann4-3/+9
2020-07-24Fix handling of prefilling the description field on adding a new expense.René 'Necoro' Neumann1-9/+6
2020-07-24Remove translation hackRené 'Necoro' Neumann1-7/+1
2020-07-24Improved debuggingRené 'Necoro' Neumann2-1/+2
2020-07-23RestructureRené 'Necoro' Neumann51-2/+3
2020-07-22Do not write bytecode for local debug runningRené 'Necoro' Neumann1-1/+4
2020-07-22Remove left over mention of jquery-uiRené 'Necoro' Neumann1-6/+1
2020-07-22Add simplejson as a dependencyRené 'Necoro' Neumann1-0/+1
2020-07-22Settings splittingRené 'Necoro' Neumann2-5/+3
2020-07-22Add flipflopRené 'Necoro' Neumann1-0/+1