summaryrefslogtreecommitdiffstats
path: root/iw/progress_gui.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-02-26 17:22:13 +0000
committerJeremy Katz <katzj@redhat.com>2003-02-26 17:22:13 +0000
commit4622037e5b23ed2ce0d2365a0bfeb14bf8fd0faa (patch)
tree6ef93338f08963a5cee408bcef39d939cf4778bc /iw/progress_gui.py
parent4cc5434c8f9ba9b3c9987f2f8516744466db43f9 (diff)
downloadanaconda-4622037e5b23ed2ce0d2365a0bfeb14bf8fd0faa.tar.gz
anaconda-4622037e5b23ed2ce0d2365a0bfeb14bf8fd0faa.tar.xz
anaconda-4622037e5b23ed2ce0d2365a0bfeb14bf8fd0faa.zip
merge branch to HEAD
Diffstat (limited to 'iw/progress_gui.py')
-rw-r--r--iw/progress_gui.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/iw/progress_gui.py b/iw/progress_gui.py
index c5c93a853..bdc6e96fc 100644
--- a/iw/progress_gui.py
+++ b/iw/progress_gui.py
@@ -23,6 +23,7 @@ from iw_gui import *
from rhpl.translate import _, N_
from packages import doInstall
from constants import *
+from rhpl.log import log
class InstallProgressWindow (InstallWindow):
@@ -113,7 +114,10 @@ class InstallProgressWindow (InstallWindow):
def setPackage(self, header):
if len(self.pixmaps):
# set to switch every N seconds
- if self.pixtimer.elapsed() > 30:
+ if self.pixtimer is None or self.pixtimer.elapsed() > 30:
+ if self.pixtimer is None:
+ self.pixtimer = timer.Timer()
+
num = self.pixcurnum
if num >= len(self.pixmaps):
num = 0
@@ -124,6 +128,8 @@ class InstallProgressWindow (InstallWindow):
pix.set_alignment (0.5, 0.5)
self.adbox.add (pix)
self.adpix = pix
+ else:
+ log("couldn't get a pix")
self.adbox.show_all()
self.pixcurnum = num + 1
self.pixtimer.reset()
@@ -173,12 +179,18 @@ class InstallProgressWindow (InstallWindow):
if (os.environ.has_key('LANG')):
try:
shortlang = string.split(os.environ['LANG'], '_')[0]
+ longlang = string.split(os.environ['LANG'], '.')[0]
except:
shortlang = ''
+ longlang = os.environ['LANG']
else:
shortlang = ''
-
- pixmaps1 = glob.glob("/usr/share/anaconda/pixmaps/rnotes/%s/*.png" % shortlang)
+ longlang = ''
+
+ pixmaps1 = glob.glob("/usr/share/anaconda/pixmaps/rnotes/%s/*.png" % (shortlang,))
+
+ if len(pixmaps1) <= 0:
+ pixmaps1 = glob.glob("/usr/share/anaconda/pixmaps/rnotes/%s/*.png" % (longlang,))
if len(pixmaps1) <= 0:
# for beta try top level w/o lang
@@ -202,7 +214,7 @@ class InstallProgressWindow (InstallWindow):
pixmaps.append(pixmap[string.find(pixmap, "rnotes/"):])
self.pixmaps = pixmaps
- self.pixtimer = timer.Timer()
+ self.pixtimer = None
self.pixcurnum = 0
table = gtk.Table (3, 2)