aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-02-20 16:29:23 +0100
committerfiaxh <git@lightrise.org>2020-02-20 17:15:51 +0100
commita81af020f30bfda4dec60a52aec142a0c5abb297 (patch)
tree5c130196e3fc6c702ab6fc6bd1b8cf1e52cc6fc9 /main/src/ui
parent4c953b58827b0d3ccb1f3c052ed1c2b7242e7afa (diff)
downloaddino-a81af020f30bfda4dec60a52aec142a0c5abb297.tar.gz
dino-a81af020f30bfda4dec60a52aec142a0c5abb297.zip
Preserve unchanged conference data (name) in bookmarks
fixes #748
Diffstat (limited to 'main/src/ui')
-rw-r--r--main/src/ui/add_conversation/add_groupchat_dialog.vala20
1 files changed, 1 insertions, 19 deletions
diff --git a/main/src/ui/add_conversation/add_groupchat_dialog.vala b/main/src/ui/add_conversation/add_groupchat_dialog.vala
index da6b10b2..7563da7f 100644
--- a/main/src/ui/add_conversation/add_groupchat_dialog.vala
+++ b/main/src/ui/add_conversation/add_groupchat_dialog.vala
@@ -19,7 +19,6 @@ protected class AddGroupchatDialog : Gtk.Dialog {
[GtkChild] private Entry nick_entry;
private StreamInteractor stream_interactor;
- private Conference? edit_conference = null;
private bool alias_entry_changed = false;
public AddGroupchatDialog(StreamInteractor stream_interactor) {
@@ -36,19 +35,6 @@ protected class AddGroupchatDialog : Gtk.Dialog {
nick_entry.key_release_event.connect(check_ok);
}
- public AddGroupchatDialog.for_conference(StreamInteractor stream_interactor, Account account, Conference conference) {
- this(stream_interactor);
- edit_conference = conference;
- ok_button.label = _("Save");
- ok_button.sensitive = true;
- accounts_stack.set_visible_child_name("label");
- account_label.label = account.bare_jid.to_string();
- account_combobox.selected = account;
- jid_entry.text = conference.jid.to_string();
- nick_entry.text = conference.nick ?? "";
- alias_entry.text = conference.name;
- }
-
private bool on_jid_key_release() {
check_ok();
if (!alias_entry_changed) {
@@ -78,11 +64,7 @@ protected class AddGroupchatDialog : Gtk.Dialog {
conference.jid = new Jid(jid_entry.text);
conference.nick = nick_entry.text != "" ? nick_entry.text : null;
conference.name = alias_entry.text;
- if (edit_conference == null) {
- stream_interactor.get_module(MucManager.IDENTITY).add_bookmark(account_combobox.selected, conference);
- } else {
- stream_interactor.get_module(MucManager.IDENTITY).replace_bookmark(account_combobox.selected, edit_conference, conference);
- }
+ stream_interactor.get_module(MucManager.IDENTITY).add_bookmark(account_combobox.selected, conference);
close();
} catch (InvalidJidError e) {
warning("Ignoring invalid conference Jid: %s", e.message);