diff options
-rw-r--r-- | doc/Hooks | 16 | ||||
-rw-r--r-- | plugins/dbus_init.xml | 4 | ||||
-rw-r--r-- | plugins/new_version.xml | 2 | ||||
-rw-r--r-- | portato/gui/windows/main.py | 6 |
4 files changed, 11 insertions, 17 deletions
@@ -7,7 +7,7 @@ Called: When emerge or every other command given by e.g. the synccmd preference Parameters: - string[] packages: Packages to emerge (includes "world", "system"). - string[] command: The exact command to execute. - - portato.gui.wrapper.Console console: The console the output will be written to. + - vte.Console console: The console the output will be written to. - function(string) -> None title_update: Function which updates the console title in the GUIs. Return if override: Nothing @@ -23,12 +23,10 @@ Parameters: Return if override: Nothing Comment: This uses an extra hook as emerge is started in an extra thread and thus all plugins being wanting to come "after" will be called while emerge is still running. -open_ebuild: ------------- -Called: When an ebuild window is opened. -Parameters: - - portato.backend.Package package: The current package whose is going to be displayed. - - Window parent: The parent window. Exact type depends on the frontend. +main: +----- +Called: When the main routine is being entered. Everything in the application is done inside this main routine. Hooks connecting "after" will be run, when the application is shutdown. +Parameters: None +Return if override: Nothing -Return if override: Window-object which can be called by the frontends. Please see the explicit code to see what is expected. -Comment: If you want to override - do this only for ONE specific frontend. +Comment: DO NOT OVERRIDE :) diff --git a/plugins/dbus_init.xml b/plugins/dbus_init.xml index 8b93718..b17f269 100644 --- a/plugins/dbus_init.xml +++ b/plugins/dbus_init.xml @@ -7,9 +7,7 @@ <import>portato.plugins.dbus_init</import> <hooks> - <hook type="thread_init" call="dbus_init"> - <connect type="after" /> - </hook> + <hook type="main" call="dbus_init" /> </hooks> </plugin> diff --git a/plugins/new_version.xml b/plugins/new_version.xml index eda1704..41c9ccb 100644 --- a/plugins/new_version.xml +++ b/plugins/new_version.xml @@ -7,7 +7,7 @@ <import>portato.plugins.new_version</import> <hooks> - <hook type="after_startup" call="find_version" /> + <hook type="main" call="find_version" /> </hooks> <menu> diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index 7cc07c4..1e28a3c 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -779,8 +779,6 @@ class MainWindow (Window): splash(_("Finishing startup")) self.window.show_all() - - plugin.hook("after_startup")(lambda: True)() def show_package (self, *args, **kwargs): self.packageTable.update(*args, **kwargs) @@ -1662,7 +1660,7 @@ class MainWindow (Window): """ Main. """ - plugin.hook("thread_init")(gobject.threads_init)() + gobject.threads_init() # now subthreads can run normally, but are not allowed to touch the GUI. If threads should change sth there - use gobject.idle_add(). # for more informations on threading and gtk: http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq20.006.htp - gtk.main() + plugin.hook("main")(gtk.main)() |