diff options
author | fiaxh <git@mx.ax.lt> | 2017-10-28 22:02:32 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-10-31 15:41:45 +0100 |
commit | d9b91206c0291fa8aa58df572292784a4f8ff878 (patch) | |
tree | 09721f9fdffbb87ec8ab25fd1c44a7bc535fffab /main/src/ui/application.vala | |
parent | 7e83529afcd0ccfff5c65c99e4427bd6cf3f82ac (diff) | |
download | dino-d9b91206c0291fa8aa58df572292784a4f8ff878.tar.gz dino-d9b91206c0291fa8aa58df572292784a4f8ff878.zip |
Keep MUC join dialog open until joined, show errors
Diffstat (limited to 'main/src/ui/application.vala')
-rw-r--r-- | main/src/ui/application.vala | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index ff5f44ac..625673fb 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -40,9 +40,9 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { case "join": Dialog dialog = new Dialog.with_buttons(_("Join Conference"), window, Gtk.DialogFlags.MODAL | Gtk.DialogFlags.USE_HEADER_BAR, _("Join"), ResponseType.OK, _("Cancel"), ResponseType.CANCEL); dialog.modal = true; - Widget ok_button = dialog.get_widget_for_response(ResponseType.OK); + Button ok_button = dialog.get_widget_for_response(ResponseType.OK) as Button; ok_button.get_style_context().add_class("suggested-action"); - AddConversation.Conference.ConferenceDetailsFragment conference_fragment = new AddConversation.Conference.ConferenceDetailsFragment(stream_interactor); + ConferenceDetailsFragment conference_fragment = new ConferenceDetailsFragment(stream_interactor, ok_button); conference_fragment.jid = jid; conference_fragment.set_editable(); Box content_area = dialog.get_content_area(); @@ -64,14 +64,10 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { stream_interactor.get_module(ConversationManager.IDENTITY).start_conversation(conversation, true); window.on_conversation_selected(conversation); } else { - AddConversation.Chat.Dialog dialog = new AddConversation.Chat.Dialog(stream_interactor, stream_interactor.get_accounts()); + AddChatDialog dialog = new AddChatDialog(stream_interactor, stream_interactor.get_accounts()); dialog.set_filter(jid); dialog.set_transient_for(window); - dialog.title = _("Start Chat"); - dialog.ok_button.label = _("Start"); - dialog.selected.connect((account, jid) => { - Conversation conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(jid, account, Conversation.Type.CHAT); - stream_interactor.get_module(ConversationManager.IDENTITY).start_conversation(conversation, true); + dialog.added.connect((conversation) => { window.on_conversation_selected(conversation); }); dialog.present(); |