1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
|
:mod:`apt.progress.gtk2` --- Progress reporting for GTK+ interfaces
===================================================================
.. 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:: GAcquireProgress
An implementation of :class:`apt.progress.base.AcquireProgress` 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()
Hide the expander with the terminal widget.
.. attribute:: install
Return the install progress handler.
.. attribute:: open
Return the cache opening progress handler.
.. method:: show()
Show the Box
.. method:: show_terminal(expanded=False)
Show an expander with a terminal widget which provides a way to
interact with dpkg.
Example
-------
.. literalinclude:: ../examples/apt-gtk.py
|