[gnome-sudoku/multithread_printing] Move spinner.start() before async generation call
- From: Parin Porecha <parinporecha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku/multithread_printing] Move spinner.start() before async generation call
- Date: Thu, 14 Aug 2014 15:25:44 +0000 (UTC)
commit 9f1ebf3ac1c87709d0610152a31b682ad0495dcb
Author: Parin Porecha <parinporecha gmail com>
Date: Thu Aug 14 17:24:38 2014 +0200
Move spinner.start() before async generation call
src/sudoku-printer.vala | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/sudoku-printer.vala b/src/sudoku-printer.vala
index f55548b..c77dacb 100644
--- a/src/sudoku-printer.vala
+++ b/src/sudoku-printer.vala
@@ -318,12 +318,13 @@ public class GamePrinter: GLib.Object
settings.set_enum (DIFFICULTY_KEY_NAME, level);
+ spinner.visible = true;
+ spinner.active = true;
+ spinner.show ();
+ spinner.start ();
+
SudokuGenerator.generate_boards_async.begin(nsudokus, level, (obj, res) => {
try {
- spinner.visible = true;
- spinner.start ();
- spinner.show ();
-
var boards = SudokuGenerator.generate_boards_async.end(res);
SudokuPrinter printer = new SudokuPrinter (boards, ref window);
@@ -337,6 +338,7 @@ public class GamePrinter: GLib.Object
boards_list = null;
spinner.stop ();
+ spinner.hide ();
} catch (ThreadError e) {
error ("Thread error: %s\n", e.message);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]