diff options
Diffstat (limited to 'main/src/ui')
-rw-r--r-- | main/src/ui/chat_input/view.vala | 2 | ||||
-rw-r--r-- | main/src/ui/conversation_summary/default_file_display.vala | 4 | ||||
-rw-r--r-- | main/src/ui/conversation_summary/image_display.vala | 17 |
3 files changed, 7 insertions, 16 deletions
diff --git a/main/src/ui/chat_input/view.vala b/main/src/ui/chat_input/view.vala index ec551647..c9db730a 100644 --- a/main/src/ui/chat_input/view.vala +++ b/main/src/ui/chat_input/view.vala @@ -105,7 +105,7 @@ public class View : Box { break; } } - stream_interactor.get_module(MessageProcessor.IDENTITY).send_message(text, conversation); + stream_interactor.get_module(MessageProcessor.IDENTITY).send_text(text, conversation); } private bool on_text_input_key_press(EventKey event) { diff --git a/main/src/ui/conversation_summary/default_file_display.vala b/main/src/ui/conversation_summary/default_file_display.vala index 15eab6fe..1547440b 100644 --- a/main/src/ui/conversation_summary/default_file_display.vala +++ b/main/src/ui/conversation_summary/default_file_display.vala @@ -66,9 +66,9 @@ public class DefaultFileDisplay : Plugins.MetaConversationItem { event_box.button_release_event.connect((event_button) => { if (event_button.button == 1) { try{ - AppInfo.launch_default_for_uri("file://" + file_transfer.get_uri(), null); + AppInfo.launch_default_for_uri(file_transfer.get_file().get_uri(), null); } catch (Error err) { - print("Tried to open " + file_transfer.get_uri()); + print("Tried to open " + file_transfer.get_file().get_path()); } } return false; diff --git a/main/src/ui/conversation_summary/image_display.vala b/main/src/ui/conversation_summary/image_display.vala index c1cd32a1..15880836 100644 --- a/main/src/ui/conversation_summary/image_display.vala +++ b/main/src/ui/conversation_summary/image_display.vala @@ -41,7 +41,7 @@ public class ImageDisplay : Plugins.MetaConversationItem { Image image = new Image() { halign=Align.START, visible = true }; Gdk.Pixbuf pixbuf; try { - pixbuf = new Gdk.Pixbuf.from_file(file_transfer.get_uri()); + pixbuf = new Gdk.Pixbuf.from_file(file_transfer.get_file().get_path()); } catch (Error error) { return null; } @@ -65,16 +65,7 @@ public class ImageDisplay : Plugins.MetaConversationItem { Label url_label = builder.get_object("url_label") as Label; Util.force_color(url_label, "#eee"); - file_transfer.notify["info"].connect_after(() => { update_info(url_label, file_transfer.info); }); - update_info(url_label, file_transfer.info); - - Image copy_image = builder.get_object("copy_image") as Image; - Util.force_css(copy_image, "*:not(:hover) { color: #eee; }"); - Button copy_button = builder.get_object("copy_button") as Button; - Util.force_css(copy_button, "*:hover { background-color: rgba(255,255,255,0.3); border-color: transparent; }"); - copy_button.clicked.connect(() => { - if (file_transfer.info != null) Clipboard.get_default(Gdk.Display.get_default()).set_text(file_transfer.info, file_transfer.info.length); - }); + update_info(url_label, file_transfer.file_name); Image open_image = builder.get_object("open_image") as Image; Util.force_css(open_image, "*:not(:hover) { color: #eee; }"); @@ -82,9 +73,9 @@ public class ImageDisplay : Plugins.MetaConversationItem { Util.force_css(open_button, "*:hover { background-color: rgba(255,255,255,0.3); border-color: transparent; }"); open_button.clicked.connect(() => { try{ - AppInfo.launch_default_for_uri(file_transfer.info, null); + AppInfo.launch_default_for_uri(file_transfer.get_file().get_uri(), null); } catch (Error err) { - print("Tried to open " + file_transfer.info); + print("Tried to open file://" + file_transfer.get_file().get_path() + " " + err.message + "\n"); } }); |