aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/data/conversation_summary/image_toolbar.ui29
-rw-r--r--main/src/ui/chat_input/view.vala2
-rw-r--r--main/src/ui/conversation_summary/default_file_display.vala4
-rw-r--r--main/src/ui/conversation_summary/image_display.vala17
4 files changed, 10 insertions, 42 deletions
diff --git a/main/data/conversation_summary/image_toolbar.ui b/main/data/conversation_summary/image_toolbar.ui
index 791dc2b9..562f944b 100644
--- a/main/data/conversation_summary/image_toolbar.ui
+++ b/main/data/conversation_summary/image_toolbar.ui
@@ -2,17 +2,18 @@
<interface>
<object class="GtkBox" id="main">
<property name="valign">end</property>
+ <property name="halign">end</property>
<property name="margin">10</property>
<property name="visible">True</property>
<child>
<object class="GtkToolItem">
<property name="visible">True</property>
<child>
- <object class="GtkBox" id="url_box">
+ <object class="GtkBox">
<property name="visible">True</property>
<child>
<object class="GtkLabel" id="url_label">
- <property name="max_width_chars">10</property>
+ <property name="max_width_chars">25</property>
<property name="ellipsize">middle</property>
<property name="hexpand">True</property>
<property name="margin-left">5</property>
@@ -20,31 +21,7 @@
</object>
</child>
<child>
- <object class="GtkButton" id="copy_button">
- <property name="visible">True</property>
- <property name="relief">none</property>
- <child>
- <object class="GtkImage" id="copy_image">
- <property name="icon-name">edit-copy-symbolic</property>
- <property name="icon-size">1</property>
- <property name="visible">True</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkToolItem">
- <property name="visible">True</property>
- <child>
- <object class="GtkToolItem">
- <property name="visible">True</property>
- <child>
<object class="GtkButton" id="open_button">
- <property name="margin-left">5</property>
<property name="relief">none</property>
<property name="visible">True</property>
<child>
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");
}
});