[fractal] Videos: open viewer when clicking on play button
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal] Videos: open viewer when clicking on play button
- Date: Thu, 13 Feb 2020 07:30:17 +0000 (UTC)
commit 6f5b611d70822b38232bde35dda57b60c1e71699
Author: Sonja Heinze <sonjaleaheinze gmail com>
Date: Wed Feb 12 13:08:04 2020 +0100
Videos: open viewer when clicking on play button
Before, when clicking on a video widget in the room history, the media
viewer was only opened, if it was clicked anywhere on the widget but the
play button.
fractal-gtk/src/widgets/message.rs | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/fractal-gtk/src/widgets/message.rs b/fractal-gtk/src/widgets/message.rs
index 7a3e40d0..c569e17c 100644
--- a/fractal-gtk/src/widgets/message.rs
+++ b/fractal-gtk/src/widgets/message.rs
@@ -457,6 +457,9 @@ impl MessageBox {
play_button.get_style_context().add_class("osd");
play_button.get_style_context().add_class("play-icon");
play_button.get_style_context().add_class("flat");
+ let data = glib::Variant::from(msg.id.as_str());
+ play_button.set_action_name(Some("app.open-media-viewer"));
+ play_button.set_action_target_value(Some(&data));
overlay.add_overlay(&play_button);
let menu_button = gtk::MenuButton::new();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]