[polari/wip/bastianilso/initial-setup: 2/4] initialSetupWindow: Adapt to current code base
- From: Bastian Ilsø Hougaard <bastianilso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/bastianilso/initial-setup: 2/4] initialSetupWindow: Adapt to current code base
- Date: Thu, 4 Jun 2015 19:41:40 +0000 (UTC)
commit 273db1b0743ab3727bd97d12ecf5fadafa0545ca
Author: Bastian Ilsø <bastianilso src gnome org>
Date: Tue Jun 2 21:54:29 2015 +0200
initialSetupWindow: Adapt to current code base
Polari's codebase has changed a lot since last commit
to initial Setup. This commit adapts initialSetupWindow
to the current build system and updates some of the
deprecated API used in initial-setup.ui
data/org.gnome.Polari.data.gresource.xml | 1 +
data/resources/initial-setup.ui | 16 ++++++++--------
src/initialSetupWindow.js | 19 +++++++++++--------
src/mainWindow.js | 5 +++++
src/org.gnome.Polari.src.gresource.xml | 1 +
5 files changed, 26 insertions(+), 16 deletions(-)
---
diff --git a/data/org.gnome.Polari.data.gresource.xml b/data/org.gnome.Polari.data.gresource.xml
index 91c4de2..b128e88 100644
--- a/data/org.gnome.Polari.data.gresource.xml
+++ b/data/org.gnome.Polari.data.gresource.xml
@@ -4,6 +4,7 @@
<file alias="gtk/menus.ui" preprocess="xml-stripblanks">resources/menus.ui</file>
<file alias="connection-details.ui" preprocess="xml-stripblanks">resources/connection-details.ui</file>
<file alias="connection-list-dialog.ui"
preprocess="xml-stripblanks">resources/connection-list-dialog.ui</file>
+ <file alias="initial-setup.ui" preprocess="xml-stripblanks">resources/initial-setup.ui</file>
<file alias="join-room-dialog.ui" preprocess="xml-stripblanks">resources/join-room-dialog.ui</file>
<file alias="main-window.ui" preprocess="xml-stripblanks">resources/main-window.ui</file>
<file alias="message-user-dialog.ui" preprocess="xml-stripblanks">resources/message-user-dialog.ui</file>
diff --git a/data/resources/initial-setup.ui b/data/resources/initial-setup.ui
index 5e9fbdd..8b4697d 100644
--- a/data/resources/initial-setup.ui
+++ b/data/resources/initial-setup.ui
@@ -16,8 +16,8 @@
<object class="GtkBox" id="content">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">120</property>
- <property name="margin_right">120</property>
+ <property name="margin_start">120</property>
+ <property name="margin_end">120</property>
<property name="margin_top">40</property>
<property name="margin_bottom">40</property>
<property name="orientation">vertical</property>
@@ -25,8 +25,8 @@
<object class="GtkLabel" id="welcome">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">10</property>
- <property name="margin_right">10</property>
+ <property name="margin_start">10</property>
+ <property name="margin_end">10</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Welcome to Polari. An Internet Relay Chat client for
Gnome</property>
<property name="wrap">True</property>
@@ -44,8 +44,8 @@
<object class="GtkLabel" id="getStarted">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">10</property>
- <property name="margin_right">10</property>
+ <property name="margin_start">10</property>
+ <property name="margin_end">10</property>
<property name="margin_top">40</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Get started by adding a server connection</property>
@@ -72,7 +72,7 @@
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">20</property>
+ <property name="margin_start">20</property>
<child>
<object class="GtkImage" id="addIcon">
<property name="visible">True</property>
@@ -90,7 +90,7 @@
<object class="GtkLabel" id="addConnectionLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">10</property>
+ <property name="margin_start">10</property>
<property name="label" translatable="yes">Add connection</property>
</object>
<packing>
diff --git a/src/initialSetupWindow.js b/src/initialSetupWindow.js
index ee0892d..288b695 100644
--- a/src/initialSetupWindow.js
+++ b/src/initialSetupWindow.js
@@ -1,32 +1,35 @@
+const Gio = imports.gi.Gio;
+const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
const Tp = imports.gi.TelepathyGLib;
+const Tpl = imports.gi.TelepathyLogger;
+const AccountsMonitor = imports.accountsMonitor;
const Connections = imports.connections;
const Lang = imports.lang;
-const Signals = imports.signals;
const InitialSetupWindow = new Lang.Class({
Name: 'InitialSetupWindow',
_init: function() {
- let builder = new Gtk.Builder();
- builder.add_from_resource('/org/gnome/polari/initial-setup.ui');
+ let builder = new Gtk.Builder();
+ builder.add_from_resource('/org/gnome/Polari/initial-setup.ui');
this.window = builder.get_object('initial_setup');
- let connectionList = builder.get_object('connectionList');
- let addConnectionRow = builder.get_object('addConnectionRow');
+ let connectionList = builder.get_object('connectionList');
+ let addConnectionRow = builder.get_object('addConnectionRow');
connectionList.connect('row-activated', Lang.bind(this, this._addConnection));
this.window.show_all();
},
_addConnection: function() {
- log("connection activated");
- let dialog = new Connections.ConnectionsDialog();
+ log("connection activated");
+ let dialog = new Connections.ConnectionsDialog();
dialog.widget.show();
dialog.widget.connect('response',
function(widget) {
widget.destroy();
});
}
-});
\ No newline at end of file
+});
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 6e6ad86..35d6281 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -7,6 +7,7 @@ const Tp = imports.gi.TelepathyGLib;
const AccountsMonitor = imports.accountsMonitor;
const AppNotifications = imports.appNotifications;
const ChatroomManager = imports.chatroomManager;
+const InitialSetupWindow = imports.initialSetupWindow;
const JoinDialog = imports.joinDialog;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
@@ -99,6 +100,10 @@ const MainWindow = new Lang.Class({
this.window.maximize();
this.window.show_all();
+
+ //if(this._accountsMonitor.dupAccounts().length == 0) {
+ let initialSetupWindow = new InitialSetupWindow.InitialSetupWindow();
+ //}
},
_onWindowStateEvent: function(widget, event) {
diff --git a/src/org.gnome.Polari.src.gresource.xml b/src/org.gnome.Polari.src.gresource.xml
index c4b9fc2..289ad08 100644
--- a/src/org.gnome.Polari.src.gresource.xml
+++ b/src/org.gnome.Polari.src.gresource.xml
@@ -8,6 +8,7 @@
<file>chatView.js</file>
<file>connections.js</file>
<file>entryArea.js</file>
+ <file>initialSetupWindow.js</file>
<file>ircParser.js</file>
<file>joinDialog.js</file>
<file>main.js</file>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]