summaryrefslogtreecommitdiff
path: root/UpdateManager/GtkProgress.py
diff options
context:
space:
mode:
authorSebastian Heinlein <sebastian.heinlein@web.de>2006-02-03 13:34:43 +0100
committerSebastian Heinlein <sebastian.heinlein@web.de>2006-02-03 13:34:43 +0100
commit4155c6064c956a51876c25c20ad265e4c2f3466d (patch)
treec2923bd213a44bccff3ce2de8f1732b2945b957f /UpdateManager/GtkProgress.py
parentc6d126a887c61610227717eae43c24f732580500 (diff)
downloadpython-apt-4155c6064c956a51876c25c20ad265e4c2f3466d.tar.gz
* Use "host_window" instead of "window", since it is a gtk attribute
* Set the deault icon of all windows in the code so that we also get the app icon on code generated dialogs * Do not show a "X" in the window decoation of dialogs - the dialog needs to be realized before - it is a HIG recommendation
Diffstat (limited to 'UpdateManager/GtkProgress.py')
-rw-r--r--UpdateManager/GtkProgress.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/UpdateManager/GtkProgress.py b/UpdateManager/GtkProgress.py
index 704946c7..d11ca3e9 100644
--- a/UpdateManager/GtkProgress.py
+++ b/UpdateManager/GtkProgress.py
@@ -27,14 +27,17 @@ import apt_pkg
from gettext import gettext as _
class GtkOpProgress(apt.OpProgress):
- def __init__(self, window, progressbar, status, parent):
+ def __init__(self, host_window, progressbar, status, parent):
self._parent = parent
- self._window = window
+ self._window = host_window
self._status = status
self._progressbar = progressbar
+ # Do not show the close button
+ self._window.realize()
+ host_window.window.set_functions(gtk.gdk.FUNC_MOVE)
#self._progressbar.set_pulse_step(0.01)
#self._progressbar.pulse()
- window.set_transient_for(parent)
+ self._window.set_transient_for(parent)
def update(self, percent):
#print percent
#print self.Op
@@ -66,6 +69,8 @@ class GtkFetchProgress(apt.progress.FetchProgress):
self.progress = parent.progressbar_fetch
self.window_fetch = parent.window_fetch
self.window_fetch.set_transient_for(parent.window_main)
+ self.window_fetch.realize()
+ self.window_fetch.window.set_functions(gtk.gdk.FUNC_MOVE)
# set summary
if self.summary != "":
self.summary.set_markup("<big><b>%s</b></big> \n\n%s" %