aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-10-16 03:25:44 +0200
committerfiaxh <git@lightrise.org>2019-10-16 03:32:22 +0200
commitf34aa58626980e199b9e68532661c3ed0487771a (patch)
tree7eded68797cfab7467493effbfa6ebce4ad6ce8a
parent8e6db8859c756ef2445e1f5277103d83c735c726 (diff)
downloaddino-f34aa58626980e199b9e68532661c3ed0487771a.tar.gz
dino-f34aa58626980e199b9e68532661c3ed0487771a.zip
Fix slash commands
-rw-r--r--main/src/ui/application.vala2
-rw-r--r--main/src/ui/chat_input/view.vala4
-rw-r--r--main/src/ui/chat_input_controller.vala4
3 files changed, 5 insertions, 5 deletions
diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala
index d5ec0170..df937a50 100644
--- a/main/src/ui/application.vala
+++ b/main/src/ui/application.vala
@@ -155,7 +155,7 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application {
}
private void show_join_muc_dialog(Account? account, Jid jid) {
- Dialog dialog = new Dialog.with_buttons(_("Join Conference"), window, Gtk.DialogFlags.MODAL | Gtk.DialogFlags.USE_HEADER_BAR, _("Join"), ResponseType.OK, _("Cancel"), ResponseType.CANCEL);
+ Dialog dialog = new Dialog.with_buttons(_("Join Channel"), window, Gtk.DialogFlags.MODAL | Gtk.DialogFlags.USE_HEADER_BAR, _("Join"), ResponseType.OK, _("Cancel"), ResponseType.CANCEL);
dialog.modal = true;
Button ok_button = dialog.get_widget_for_response(ResponseType.OK) as Button;
ok_button.get_style_context().add_class("suggested-action");
diff --git a/main/src/ui/chat_input/view.vala b/main/src/ui/chat_input/view.vala
index 24297e6a..960e4e14 100644
--- a/main/src/ui/chat_input/view.vala
+++ b/main/src/ui/chat_input/view.vala
@@ -10,7 +10,7 @@ namespace Dino.Ui.ChatInput {
[GtkTemplate (ui = "/im/dino/Dino/chat_input.ui")]
public class View : Box {
- public signal void send_text(string text);
+ public signal void send_text();
public string text {
owned get { return text_input.buffer.text; }
@@ -138,7 +138,7 @@ public class View : Box {
if ((event.state & ModifierType.SHIFT_MASK) > 0) {
text_input.buffer.insert_at_cursor("\n", 1);
} else if (this.text != "") {
- send_text(this.text);
+ send_text();
edit_history.reset_history();
}
return true;
diff --git a/main/src/ui/chat_input_controller.vala b/main/src/ui/chat_input_controller.vala
index 413b8bd5..c386f55e 100644
--- a/main/src/ui/chat_input_controller.vala
+++ b/main/src/ui/chat_input_controller.vala
@@ -82,8 +82,8 @@ public class ChatInputController : Object {
string text = chat_input.text_input.buffer.text;
chat_input.text_input.buffer.text = "";
- if (chat_input.text.has_prefix("/")) {
- string[] token = chat_input.text.split(" ", 2);
+ if (text.has_prefix("/")) {
+ string[] token = text.split(" ", 2);
switch(token[0]) {
case "/me":
// Just send as is.