Skip to content
Snippets Groups Projects
Commit 79036d82 authored by Nico's avatar Nico
Browse files

Make it more beautiful and prepare input field

parent a685f097
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
<gresources>
<gresource prefix="/app/briar/gtk">
<file compressed="true">ui/application.css</file>
<file compressed="true" preprocess="xml-stripblanks">ui/chat.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/login.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/main.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/setup.ui</file>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkGrid" id="main">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin_left">18</property>
<property name="margin_right">18</property>
<property name="margin_top">18</property>
<property name="margin_bottom">18</property>
<child>
<object class="GtkListBox" id="messages_list">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="chat_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="placeholder_text" translatable="yes">Type Message</property>
<property name="show_emoji_icon">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>
</interface>
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkGrid" id="main">
<object class="GtkListBox" id="contacts_list">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
......@@ -10,12 +10,7 @@
<property name="margin_right">18</property>
<property name="margin_top">18</property>
<property name="margin_bottom">18</property>
<child>
<object class="GtkListBox" id="contacts_list">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<property name="hexpand">True</property>
</object>
</interface>
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-24 23:15+0100\n"
"POT-Creation-Date: 2019-06-01 18:15+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -17,11 +17,15 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../data/ui/chat.ui:29
msgid "Type Message"
msgstr ""
#: ../data/ui/login.ui:23 ../data/ui/setup.ui:64
msgid "Password"
msgstr ""
#: ../data/ui/login.ui:43
#: ../data/ui/login.ui:44
msgid "Sign in"
msgstr ""
......@@ -33,14 +37,14 @@ msgstr ""
msgid "Choose your nickname"
msgstr ""
#: ../data/ui/setup.ui:44 ../data/ui/setup.ui:95
#: ../data/ui/setup.ui:44 ../data/ui/setup.ui:97
msgid "Next"
msgstr ""
#: ../data/ui/setup.ui:74
#: ../data/ui/setup.ui:75
msgid "Choose your password"
msgstr ""
#: ../data/ui/setup.ui:84
#: ../data/ui/setup.ui:86
msgid "Confirm your password"
msgstr ""
#: ../data/ui/chat.ui:29
msgid "Type Message"
msgstr ""
#: ../data/ui/login.ui:23 ../data/ui/setup.ui:64
msgid "Password"
msgstr "Passwort"
#: ../data/ui/login.ui:43
#: ../data/ui/login.ui:44
msgid "Sign in"
msgstr ""
......@@ -14,14 +18,14 @@ msgstr "Nutzername"
msgid "Choose your nickname"
msgstr ""
#: ../data/ui/setup.ui:44 ../data/ui/setup.ui:95
#: ../data/ui/setup.ui:44 ../data/ui/setup.ui:97
msgid "Next"
msgstr ""
#: ../data/ui/setup.ui:74
#: ../data/ui/setup.ui:75
msgid "Choose your password"
msgstr ""
#: ../data/ui/setup.ui:84
#: ../data/ui/setup.ui:86
msgid "Confirm your password"
msgstr ""
#: ../data/ui/chat.ui:29
msgid "Type Message"
msgstr ""
#: ../data/ui/login.ui:23 ../data/ui/setup.ui:64
msgid "Password"
msgstr ""
#: ../data/ui/login.ui:43
#: ../data/ui/login.ui:44
msgid "Sign in"
msgstr ""
......@@ -14,14 +18,14 @@ msgstr ""
msgid "Choose your nickname"
msgstr ""
#: ../data/ui/setup.ui:44 ../data/ui/setup.ui:95
#: ../data/ui/setup.ui:44 ../data/ui/setup.ui:97
msgid "Next"
msgstr "Seguir"
#: ../data/ui/setup.ui:74
#: ../data/ui/setup.ui:75
msgid "Choose your password"
msgstr ""
#: ../data/ui/setup.ui:84
#: ../data/ui/setup.ui:86
msgid "Confirm your password"
msgstr ""
......@@ -20,14 +20,14 @@ class ChatContainer(Container):
self._load_content(contact_id)
def _setup_view(self):
self.builder.add_from_resource("/app/briar/gtk/ui/main.ui")
self.builder.add_from_resource("/app/briar/gtk/ui/chat.ui")
self.add(self.builder.get_object("main"))
self.builder.connect_signals(self)
def _load_content(self, contact_id):
private_chat = PrivateChat(self._api)
messages_list = private_chat.get(contact_id)
self._messages_list_box = self.builder.get_object("contacts_list")
self._messages_list_box = self.builder.get_object("messages_list")
for message in messages_list:
self._add_message(message)
private_chat.watch_messages(contact_id, self._add_message_async)
......
......@@ -27,7 +27,7 @@ class MainContainer(Container):
def _setup_view(self):
self.builder.add_from_resource("/app/briar/gtk/ui/main.ui")
self.add(self.builder.get_object("main"))
self.add(self.builder.get_object("contacts_list"))
self.builder.connect_signals(self)
def _load_content(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment