[fractal] ui: Separate login from main_window.ui
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal] ui: Separate login from main_window.ui
- Date: Mon, 15 Apr 2019 15:50:33 +0000 (UTC)
commit 336f0b22aebf19d52e9dde1547d53d8933cca44f
Author: Christopher Davis <brainblasted disroot org>
Date: Wed Mar 6 18:57:04 2019 -0500
ui: Separate login from main_window.ui
Branches the login flow off from the main window's UI file.
Like the account settings view we can add it to the stack
manually at run-time. This cuts down greatly on the
complexity of the main_window file.
fractal-gtk/res/ui/login_flow.ui | 216 +++++++++++++++++++++++
fractal-gtk/res/ui/main_window.ui | 353 --------------------------------------
2 files changed, 216 insertions(+), 353 deletions(-)
---
diff --git a/fractal-gtk/res/ui/login_flow.ui b/fractal-gtk/res/ui/login_flow.ui
new file mode 100644
index 00000000..a7a0e922
--- /dev/null
+++ b/fractal-gtk/res/ui/login_flow.ui
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.0 -->
+<interface>
+ <requires lib="gtk+" version="3.22"/>
+ <object class="GtkStack" id="login_flow_stack">
+ <property name="can_focus">False</property>
+ <property name="hhomogeneous">True</property>
+ <child>
+ <object class="GtkBox" id="login_greeter">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkImage" id="login_greeter_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="margin_start">18</property>
+ <property name="margin_end">18</property>
+ <property name="margin_top">18</property>
+ <property name="pixel_size">128</property>
+ <property name="icon_name">user-available-symbolic</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Welcome to Fractal</property>
+ <property name="margin_bottom">48</property>
+ <attributes>
+ <attribute name="weight" value="ultrabold"/>
+ <attribute name="scale" value="1.7"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="login_button">
+ <property name="visible">True</property>
+ <property name="label" translatable="true">Log In</property>
+ <property name="height-request">48</property>
+ <style>
+ <class name="suggested-action"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="create_account_button">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Create Account</property>
+ <property name="height-request">48</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="name">greeter</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="login_server_chooser">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkImage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="margin_start">18</property>
+ <property name="margin_end">18</property>
+ <property name="margin_top">18</property>
+ <property name="pixel_size">128</property>
+ <property name="icon_name">network-server-symbolic</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">What is your Server?</property>
+ <property name="margin_bottom">30</property>
+ <attributes>
+ <attribute name="weight" value="ultrabold"/>
+ <attribute name="scale" value="1.7"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkEntry" id="server_chooser_entry">
+ <property name="visible">True</property>
+ <property name="max_width_chars">-1</property>
+ <property name="width_request">312</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">The domain of your Matrix server, e.g.
myserver.co</property>
+ <style>
+ <class name="dim-label"/>
+ <class name="small-label"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="name">server-chooser</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="login_credentials">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">24</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">User ID</property>
+ <property name="halign">end</property>
+ <property name="valign">end</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Password</property>
+ <property name="halign">end</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="top-attach">3</property>
+ <property name="left-attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkEntry" id="username_entry">
+ <property name="visible">True</property>
+ <property name="max_width_chars">-1</property>
+ <property name="width_request">232</property>
+ <property name="can_focus">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">User name, email, or phone number</property>
+ <property name="halign">start</property>
+ <style>
+ <class name="dim-label"/>
+ <class name="small-font"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="height">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="password_entry">
+ <property name="visible">True</property>
+ <property name="max_width_chars">-1</property>
+ <property name="width_request">232</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="top-attach">3</property>
+ <property name="left-attach">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="name">credentials</property>
+ </packing>
+ </child>
+ </object>
+</interface>
diff --git a/fractal-gtk/res/ui/main_window.ui b/fractal-gtk/res/ui/main_window.ui
index 26fe2de6..db4626b7 100644
--- a/fractal-gtk/res/ui/main_window.ui
+++ b/fractal-gtk/res/ui/main_window.ui
@@ -366,359 +366,6 @@
<property name="position">2</property>
</packing>
</child>
- <child>
- <object class="GtkBox" id="login_state">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">center</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkGrid" id="login_grid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">6</property>
- <property name="column_homogeneous">True</property>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_bottom">40</property>
- <property name="label" translatable="yes" context="big label">Log In</property>
- <attributes>
- <attribute name="scale" value="4"/>
- <attribute name="weight" value="ultralight"/>
- </attributes>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="login_username_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="margin_bottom">6</property>
- <property name="hexpand">True</property>
- <property name="label" translatable="yes">Username</property>
- <property name="justify">right</property>
- <accessibility>
- <relation type="label-for" target="login_username"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="login_username">
- <property name="width_request">330</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="margin_bottom">6</property>
- <property name="placeholder_text" translatable="yes">Matrix username, email or phone
number</property>
- <accessibility>
- <relation type="labelled-by" target="login_username_label"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="login_button">
- <property name="label" translatable="yes" context="login button">Log In</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <style>
- <class name="suggested-action"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">5</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="login_password_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="margin_bottom">6</property>
- <property name="hexpand">True</property>
- <property name="label" translatable="yes">Password</property>
- <property name="justify">right</property>
- <accessibility>
- <relation type="label-for" target="login_password"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="login_password">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="margin_bottom">6</property>
- <property name="visibility">False</property>
- <property name="invisible_char">●</property>
- <property name="input_purpose">password</property>
- <accessibility>
- <relation type="labelled-by" target="login_password_label"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- <property name="width">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkRevealer" id="login_advanced">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkLabel" id="login_server_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="hexpand">True</property>
- <property name="label" translatable="yes">Home server URL</property>
- <property name="justify">right</property>
- <accessibility>
- <relation type="label-for" target="login_server"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="login_idp_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="margin_bottom">6</property>
- <property name="hexpand">True</property>
- <property name="label" translatable="yes">Identity server URL</property>
- <property name="justify">right</property>
- <accessibility>
- <relation type="label-for" target="login_idp"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="login_server">
- <property name="width_request">330</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="text"></property>
- <property name="placeholder_text" translatable="yes">Matrix Server</property>
- <property name="input_purpose">url</property>
- <accessibility>
- <relation type="labelled-by" target="login_server_label"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="login_idp">
- <property name="width_request">330</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="margin_bottom">6</property>
- <property name="text"></property>
- <property name="placeholder_text" translatable="yes">Identity
server</property>
- <property name="input_purpose">url</property>
- <accessibility>
- <relation type="labelled-by" target="login_idp_label"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">2</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkToggleButton" id="login_advanced_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="halign">start</property>
- <property name="margin_bottom">6</property>
- <child>
- <object class="GtkImage">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon_name">view-more-symbolic</property>
- </object>
- </child>
- <child internal-child="accessible">
- <object class="AtkObject" id="login_advanced_button-atkobject">
- <property name="AtkObject::accessible-name"
translatable="yes">Advanced</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="login_error_msg">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">10</property>
- <property name="margin_bottom">10</property>
- <property name="label" translatable="yes">Invalid username or password</property>
- <attributes>
- <attribute name="foreground" value="#efef29292929"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- <property name="width">2</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLinkButton">
- <property name="label" translatable="yes">Reset Password</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="uri">https://riot.im/app/#/login</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLinkButton">
- <property name="label" translatable="yes">Create Account</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="uri">https://riot.im/app/#/register</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLinkButton">
- <property name="label" translatable="yes">Log In as Guest</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="uri">https://riot.im/app/</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="name">login</property>
- <property name="title" translatable="yes">Login</property>
- <property name="position">3</property>
- </packing>
- </child>
</object>
</child>
<child type="titlebar">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]