aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/add_conversation
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/add_conversation')
-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);