[gcompris/gcomprixogoo] Added a progress bar
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gcompris/gcomprixogoo] Added a progress bar
- Date: Fri, 25 Dec 2009 23:37:48 +0000 (UTC)
commit 8114ba63ef811c7f100b19585f1545566a098e48
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Fri Dec 25 15:58:36 2009 +0100
Added a progress bar
The board administration menu takes a long time to load
due to the rescaling of all the board's icons.
I added a progress bar to make it clear it's a long operation.
src/administration-activity/admin/board_list.py | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/administration-activity/admin/board_list.py b/src/administration-activity/admin/board_list.py
index 32b746e..6b42449 100644
--- a/src/administration-activity/admin/board_list.py
+++ b/src/administration-activity/admin/board_list.py
@@ -101,6 +101,9 @@ class Board_list:
self.active_profile = self.profiles_list[combobox.get_active()]
+ self.progressbar = gtk.ProgressBar(adjustment=None)
+ box1.pack_start(self.progressbar, False, False, 0)
+
# Create the table
sw = gtk.ScrolledWindow()
sw.set_shadow_type(gtk.SHADOW_ETCHED_IN)
@@ -215,9 +218,15 @@ class Board_list:
self.board_dict = {}
height = 24
+ self.progressbar.show()
+ index = 0.0
for board_cell in menu_list:
self.board_dict['%s/%s' % (board_cell[1].section,board_cell[1].name)] = board_cell[1]
+ self.progressbar.set_fraction(index / len(menu_list))
+ index = index + 1
+ while gtk.events_pending():
+ gtk.main_iteration(False)
if board_cell[0] == None:
row_dict[''] = \
@@ -234,7 +243,7 @@ class Board_list:
_(board_cell[1].title) + '\n' + '%s/%s' % (board_cell[1].section,board_cell[1].name),
not board_cell[1].board_id in self.out_dict[self.active_profile.profile_id],
'%s/%s' % (board_cell[1].section,board_cell[1].name), self.pixbuf_configurable(board_cell[1])])
-
+ self.progressbar.hide()
def pixbuf_admin_at_height(self, file, height):
pixbuf = gcompris.utils.load_pixmap(file)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]