aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/CMakeLists.txt6
-rw-r--r--client/data/manage_accounts/dialog.ui52
-rw-r--r--client/src/service/connection_manager.vala2
-rw-r--r--client/src/ui/conversation_summary/merged_message_item.vala2
-rw-r--r--client/src/ui/manage_accounts/dialog.vala90
5 files changed, 89 insertions, 63 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 574d603e..b86d63a5 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -1,5 +1,7 @@
find_package(Vala REQUIRED)
find_package(PkgConfig REQUIRED)
+find_package(GPGME REQUIRED)
+find_package(LIBUUID REQUIRED)
include(${VALA_USE_FILE})
include(GlibCompileResourcesSupport)
@@ -138,9 +140,9 @@ OPTIONS
)
-set(CFLAGS ${CLIENT_CFLAGS} ${GPGME_CFLAGS} ${LIBUUID_CFLAGS} -g -I${CMAKE_BINARY_DIR}/xmpp-vala -I${CMAKE_BINARY_DIR}/qlite ${VALA_CFLAGS})
+set(CFLAGS ${CLIENT_CFLAGS} -g -I${CMAKE_BINARY_DIR}/xmpp-vala -I${CMAKE_BINARY_DIR}/qlite ${VALA_CFLAGS})
add_definitions(${CFLAGS})
add_executable(dino ${CLIENT_VALA_C} ${CLIENT_GRESOURCES_TARGET})
add_dependencies(dino xmpp-vala-vapi qlite-vapi)
-target_link_libraries(dino xmpp-vala qlite ${CLIENT_LIBRARIES} ${GPGME_LIBRARIES} ${LIBUUID_LIBRARIES} -lm)
+target_link_libraries(dino xmpp-vala qlite ${CLIENT_LIBRARIES} -lm)
diff --git a/client/data/manage_accounts/dialog.ui b/client/data/manage_accounts/dialog.ui
index b3a99711..64397fb7 100644
--- a/client/data/manage_accounts/dialog.ui
+++ b/client/data/manage_accounts/dialog.ui
@@ -247,6 +247,58 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">OpenPGP</property>
+ <property name="xalign">1</property>
+ <property name="visible">True</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkStack" id="pgp_stack">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkButton" id="pgp_button">
+ <property name="relief">none</property>
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="pgp_label">
+ <property name="xalign">0</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="name">label</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="pgp_combobox">
+ <property name="hexpand">True</property>
+ <property name="width_request">200</property>
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="name">entry</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
</object>
</child>
</object>
diff --git a/client/src/service/connection_manager.vala b/client/src/service/connection_manager.vala
index 75155e98..92827296 100644
--- a/client/src/service/connection_manager.vala
+++ b/client/src/service/connection_manager.vala
@@ -92,7 +92,7 @@ public class ConnectionManager {
foreach (Core.XmppStreamModule module in module_manager.get_modules(account, resource)) {
stream.add_module(module);
}
- stream.debug = true;
+ stream.debug = false;
Connection connection = new Connection(stream, new DateTime.now_local());
stream_states[account] = connection;
diff --git a/client/src/ui/conversation_summary/merged_message_item.vala b/client/src/ui/conversation_summary/merged_message_item.vala
index b73e8b4f..3647d082 100644
--- a/client/src/ui/conversation_summary/merged_message_item.vala
+++ b/client/src/ui/conversation_summary/merged_message_item.vala
@@ -68,11 +68,11 @@ public class MergedMessageItem : Grid {
}
private void update_received() {
- received_image.visible = true;
bool all_received = true;
bool all_read = true;
foreach (Message message in messages) {
if (message.marked == Message.Marked.WONTSEND) {
+ received_image.visible = true;
Gtk.IconTheme icon_theme = Gtk.IconTheme.get_default();
Gtk.IconInfo? icon_info = icon_theme.lookup_icon("dialog-warning-symbolic", IconSize.SMALL_TOOLBAR, 0);
received_image.set_from_pixbuf(icon_info.load_symbolic({1,0,0,1}));
diff --git a/client/src/ui/manage_accounts/dialog.vala b/client/src/ui/manage_accounts/dialog.vala
index 4f3ade45..5d18cb30 100644
--- a/client/src/ui/manage_accounts/dialog.vala
+++ b/client/src/ui/manage_accounts/dialog.vala
@@ -11,55 +11,28 @@ public class Dialog : Gtk.Window {
public signal void account_enabled(Account account);
public signal void account_disabled(Account account);
- [GtkChild]
- public Stack main_stack;
+ [GtkChild] public Stack main_stack;
+ [GtkChild] public ListBox account_list;
+ [GtkChild] public Button no_accounts_add;
+ [GtkChild] public ToolButton add_button;
+ [GtkChild] public ToolButton remove_button;
+ [GtkChild] public Image image;
+ [GtkChild] public Button image_button;
+ [GtkChild] public Label jid_label;
+ [GtkChild] public Switch active_switch;
+ [GtkChild] public Stack password_stack;
+ [GtkChild] public Label password_label;
+ [GtkChild] public Button password_button;
+ [GtkChild] public Entry password_entry;
+ [GtkChild] public Stack alias_stack;
+ [GtkChild] public Label alias_label;
+ [GtkChild] public Button alias_button;
+ [GtkChild] public Entry alias_entry;
+ [GtkChild] public Stack pgp_stack;
+ [GtkChild] public Label pgp_label;
+ [GtkChild] public Button pgp_button;
+ [GtkChild] public ComboBoxText pgp_combobox;
- [GtkChild]
- public ListBox account_list;
-
- [GtkChild]
- public Button no_accounts_add;
-
- [GtkChild]
- public ToolButton add_button;
-
- [GtkChild]
- public ToolButton remove_button;
-
- [GtkChild]
- public Image image;
-
- [GtkChild] Button image_button;
-
- [GtkChild]
- public Label jid_label;
-
- [GtkChild]
- public Switch active_switch;
-
- [GtkChild]
- public Stack password_stack;
-
- [GtkChild]
- public Label password_label;
-
- [GtkChild]
- public Button password_button;
-
- [GtkChild]
- public Entry password_entry;
-
- [GtkChild]
- public Stack alias_stack;
-
- [GtkChild]
- public Label alias_label;
-
- [GtkChild]
- public Button alias_button;
-
- [GtkChild]
- public Entry alias_entry;
private Database db;
private StreamInteractor stream_interactor;
@@ -142,22 +115,14 @@ public class Dialog : Gtk.Window {
for (int i = 0; i < account.password.length; i++) filler += password_entry.get_invisible_char().to_string();
password_label.label = filler;
password_stack.set_visible_child_name("label");
- password_button.clicked.connect(() => {
- password_stack.set_visible_child_name("entry");
- alias_stack.set_visible_child_name("label");
- set_focus(password_entry);
- });
password_entry.text = account.password;
- alias_label.label = account.alias;
alias_stack.set_visible_child_name("label");
- alias_button.clicked.connect(() => {
- alias_stack.set_visible_child_name("entry");
- password_stack.set_visible_child_name("label");
- set_focus(alias_entry);
- });
+ alias_label.label = account.alias;
alias_entry.text = account.alias;
+ password_button.clicked.connect(() => { set_active_stack(password_stack); });
+ alias_button.clicked.connect(() => { set_active_stack(alias_stack); });
active_switch.state_set.connect(on_active_switch_state_changed);
}
@@ -216,6 +181,13 @@ public class Dialog : Gtk.Window {
Util.image_set_from_scaled_pixbuf(image, (new AvatarGenerator(50, 50, image.scale_factor)).draw_account(stream_interactor, account));
}
}
+
+ private void set_active_stack(Stack stack) {
+ stack.set_visible_child_name("entry");
+ if (stack != password_stack) password_stack.set_visible_child_name("label");
+ if (stack != alias_stack) alias_stack.set_visible_child_name("label");
+ if (stack != pgp_stack) pgp_stack.set_visible_child_name("label");
+ }
}
}