From 34b01eb60ec315bc542d0cad7239091219a8388c Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 15 Jan 2010 19:09:10 +0100 Subject: Rewrite apt.progress.gtk2 documentation by hand and drop python-gtk2 build-time dependency. --- doc/source/library/apt.progress.gtk2.rst | 128 +++++++++++++++++++++++++++---- 1 file changed, 115 insertions(+), 13 deletions(-) (limited to 'doc') diff --git a/doc/source/library/apt.progress.gtk2.rst b/doc/source/library/apt.progress.gtk2.rst index b16c903c..6c00e731 100644 --- a/doc/source/library/apt.progress.gtk2.rst +++ b/doc/source/library/apt.progress.gtk2.rst @@ -1,27 +1,129 @@ :mod:`apt.progress.gtk2` --- Progress reporting for GTK+ interfaces =================================================================== -.. automodule:: apt.progress.gtk2 +.. module:: apt.progress.gtk2 + +The :mod:`apt.progress.gtk2` module provides classes with GObject signals and +a class with a GTK+ widget for progress handling. GObject progress classes ------------------------- +.. class:: GInstallProgress + + An implementation of :class:`apt.progress.base.InstallProgress` supporting + GObject signals. The class emits the following signals: + + .. describe:: status-changed(status: str, percent: int) + + Emitted when the status of an operation changed. + + .. describe:: status-started() + + Emitted when the installation started. + + .. describe:: status-finished() + + Emitted when the installation finished. + + .. describe:: status-timeout() + + Emitted when a timeout happens + + .. describe:: status-error() + + Emitted in case of an error. + + .. describe:: status-conffile() + + Emitted when a conffile update is happening. + + +.. class:: GFetchProgress + + An implementation of :class:`apt.progress.old.FetchProgress` supporting + GObject signals. The class emits the following signals: + + .. describe:: status-changed(description: str, percent: int) + + Emitted when the status of the fetcher changed, e.g. when the + percentage increased. + + .. describe:: status-started() + + Emitted when the fetcher starts to fetch. + + .. describe:: status-finished() + + Emitted when the fetcher finished. + + +.. class:: GDpkgInstallProgress + + An implementation of :class:`apt.progress.base.InstallProgress` supporting + GObject signals. This is the same as :class:`GInstallProgress` and is thus + completely deprecated. + +.. class:: GOpProgress + + An implementation of :class:`apt.progress.old.FetchProgress` supporting + GObject signals. The class emits the following signals: + + .. describe:: status-changed(operation: str, percent: int) + + Emitted when the status of an operation changed. + + .. describe:: status-started() + + Emitted when it starts - Not implemented yet. + + .. describe:: status-finished() + + Emitted when all operations have finished. + +GTK+ Widget +----------- +.. class:: GtkAptProgress + + Graphical progress for installation/fetch/operations, providing + a progress bar, a terminal and a status bar for showing the progress + of package manipulation tasks. + + .. method:: cancel_download() + + Cancel a currently running download. + + .. method:: clear() + + Reset all status information. + + .. attribute:: dpkg_install + + Return the install progress handler for dpkg. + + .. attribute:: fetch + + Return the fetch progress handler. + + .. method:: hide_terminal() -.. autoclass:: GDpkgInstallProgress - :members: + Hide the expander with the terminal widget. -.. autoclass:: GFetchProgress - :members: + .. attribute:: install + + Return the install progress handler. -.. autoclass:: GInstallProgress - :members: + .. attribute:: open -.. autoclass:: GOpProgress - :members: + Return the cache opening progress handler. + + .. method:: show() + + Show the Box -GTK+ Class ----------- -.. autoclass:: GtkAptProgress - :members: + .. method:: show_terminal(expanded=False) + + Show an expander with a terminal widget which provides a way to + interact with dpkg. Example -- cgit v1.2.3