Commit fb42490d authored by Eisha Chen-yen-su's avatar Eisha Chen-yen-su

UI: Implement media viewer overflow menu

See https://gitlab.gnome.org/World/fractal/issues/76
parent 5dc73ff4
......@@ -25,6 +25,7 @@
<file preprocess="xml-stripblanks">ui/password_dialog.ui</file>
<file preprocess="xml-stripblanks">ui/markdown_popover.ui</file>
<file preprocess="xml-stripblanks">ui/media_viewer.ui</file>
<file preprocess="xml-stripblanks">ui/media_viewer_menu.ui</file>
<file preprocess="xml-stripblanks">ui/server_chooser_menu.ui</file>
<file preprocess="xml-stripblanks">ui/stickers_popover.ui</file>
<file preprocess="xml-stripblanks">ui/sticker_group.ui</file>
......
......@@ -235,6 +235,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="popover">media_viewer_popover</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkPopover" id="media_viewer_popover">
<property name="can_focus">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkModelButton" id="save_as_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="action_name">app.save_as</property>
<property name="text" translatable="yes">Save as</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
......@@ -16,6 +16,8 @@ impl App {
let joinr = gio::SimpleAction::new("join_room", None);
let logout = gio::SimpleAction::new("logout", None);
let save = gio::SimpleAction::new("save_as", None);
let room = gio::SimpleAction::new("room_details", None);
let inv = gio::SimpleAction::new("room_invite", None);
let search = gio::SimpleAction::new("search", None);
......@@ -35,6 +37,8 @@ impl App {
op.lock().unwrap().gtk_app.add_action(&joinr);
op.lock().unwrap().gtk_app.add_action(&logout);
op.lock().unwrap().gtk_app.add_action(&save);
op.lock().unwrap().gtk_app.add_action(&room);
op.lock().unwrap().gtk_app.add_action(&inv);
op.lock().unwrap().gtk_app.add_action(&search);
......@@ -52,6 +56,8 @@ impl App {
account.connect_activate(clone!(op => move |_, _| op.lock().unwrap().show_account_settings_dialog()) );
save.connect_activate(clone!(op => move |_, _| op.lock().unwrap().save_media() ));
dir.connect_activate(clone!(op => move |_, _| op.lock().unwrap().set_state(AppState::Directory) ));
logout.connect_activate(clone!(op => move |_, _| op.lock().unwrap().logout() ));
room.connect_activate(clone!(op => move |_, _| op.lock().unwrap().show_room_dialog() ));
......
......@@ -281,6 +281,9 @@ impl AppOp {
.expect("Cant find main_window in ui file.");
main_window.unfullscreen();
}
pub fn save_media(&self) {
}
}
fn update_zoom_entry(ui: &uibuilder::UI, zoom_level: f64) {
......
......@@ -32,6 +32,8 @@ impl UI {
.expect("Can't load ui file: server_chooser_menu.ui");
builder.add_from_resource("/org/gnome/Fractal/ui/stickers_popover.ui")
.expect("Can't load ui file: stickers_popover.ui");
builder.add_from_resource("/org/gnome/Fractal/ui/media_viewer_menu.ui")
.expect("Can't load ui file: media_viewer_menu.ui");
builder.add_from_resource("/org/gnome/Fractal/ui/main_window.ui")
.expect("Can't load ui file: main_window.ui");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment