[polari/wip/dmoelgaard/initial-setup] foo
- From: Bastian Ilsø Hougaard <bastianilso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/dmoelgaard/initial-setup] foo
- Date: Wed, 2 Aug 2017 00:53:50 +0000 (UTC)
commit ed1e5871340fa1ddc42561fe6809e89b8b6a7ccd
Author: Bastian Ilsø <bastianilso gnome org>
Date: Tue Aug 1 22:23:43 2017 +0100
foo
src/initSetup.js | 61 ++++++++++++++++-------------------------------------
1 files changed, 19 insertions(+), 42 deletions(-)
---
diff --git a/src/initSetup.js b/src/initSetup.js
index 053a2b9..aa3cf49 100644
--- a/src/initSetup.js
+++ b/src/initSetup.js
@@ -37,45 +37,24 @@ var InitSetup = new Lang.Class({
this._currentAccount = null;
- this._addApplicationStyle();
-
this._setupConnectionPage();
this._setupRoomPage();
},
- _addApplicationStyle: function() {
- let provider = new Gtk.CssProvider();
- let uri = 'resource:///org/gnome/Polari/css/application.css';
- let file = Gio.File.new_for_uri(uri);
- try {
- provider.load_from_file(Gio.File.new_for_uri(uri));
- } catch(e) {
- logError(e, "Failed to add application style");
- }
- Gtk.StyleContext.add_provider_for_screen(
- this.get_screen(),
- provider,
- Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
- );
- },
-
_setupConnectionPage: function() {
- this._nextButton.connect('clicked', Lang.bind(this,
- function() {
- this._setPage(SetupPage.ROOM);
- }));
+ this._nextButton.connect('clicked', () => {
+ this._setPage(SetupPage.ROOM);
+ });
- this._cancelButton.connect('clicked', Lang.bind(this,
- function() {
- this.destroy();
- }));
+ this._cancelButton.connect('clicked', () => {
+ this.destroy();
+ });
- this._connectionPageList.connect('account-created', Lang.bind(this,
- function(w, account) {
- this._setPage(SetupPage.ROOM);
- this._currentAccount = account;
- this._serverRoomList.setAccount(account);
- }));
+ this._connectionPageList.connect('account-created', (w, account) => {
+ this._setPage(SetupPage.ROOM);
+ this._currentAccount = account;
+ this._serverRoomList.setAccount(account);
+ });
},
_setPage: function(page) {
@@ -94,16 +73,14 @@ var InitSetup = new Lang.Class({
},
_setupRoomPage: function() {
- this._backButton.connect('clicked', Lang.bind(this,
- function() {
- this._setPage(SetupPage.CONNECTION);
- }));
+ this._backButton.connect('clicked', () => {
+ this._setPage(SetupPage.CONNECTION);
+ });
- this._doneButton.connect('clicked', Lang.bind(this,
- function() {
+ this._doneButton.connect('clicked', () => {
this._joinRoom();
- this.destroy();
- }));
+ this.destroy();
+ });
this._doneButton.sensitive = false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]