[the-board] [ui] Move GtkApplication creation to a separate function
- From: Lucas Rocha <lucasr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [the-board] [ui] Move GtkApplication creation to a separate function
- Date: Mon, 22 Nov 2010 12:57:19 +0000 (UTC)
commit a8b10ceb1ce0b1e92a96dd86f286039f63da687f
Author: Lucas Rocha <lucasr litl com>
Date: Thu Nov 18 19:10:31 2010 +0000
[ui] Move GtkApplication creation to a separate function
src/js/ui/main.js | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/js/ui/main.js b/src/js/ui/main.js
index 22c92c9..cb3e453 100644
--- a/src/js/ui/main.js
+++ b/src/js/ui/main.js
@@ -37,14 +37,19 @@ function onActivate(application) {
}
}
-function run() {
- Gettext.bindtextdomain("the-board", Path.LOCALE_DIR);
-
+function createApplication() {
let application =
Gtk.Application.new("org.gnome.TheBoard",
GIO.ApplicationFlags.FLAGS_NONE);
application.connect("activate", onActivate);
+ return application;
+}
+
+function run() {
+ Gettext.bindtextdomain("the-board", Path.LOCALE_DIR);
+
+ let application = createApplication();
application.run(0, "");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]