summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2010-01-15 19:09:10 +0100
committerJulian Andres Klode <jak@debian.org>2010-01-15 19:09:10 +0100
commit34b01eb60ec315bc542d0cad7239091219a8388c (patch)
treef867e2bce16aea074f78e1c5fa66295f2a846b96 /doc
parent4f3788456a453c132c130f9beb570bbe33c47904 (diff)
downloadpython-apt-34b01eb60ec315bc542d0cad7239091219a8388c.tar.gz
Rewrite apt.progress.gtk2 documentation by hand and drop python-gtk2
build-time dependency.
Diffstat (limited to 'doc')
-rw-r--r--doc/source/library/apt.progress.gtk2.rst128
1 files changed, 115 insertions, 13 deletions
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