Commit ec52bbaa authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

export: use HdyWindow & HdyDeck

fixes #27
parent 9c615dbf
......@@ -5,7 +5,7 @@ trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
[*.{build,xml.in,xml.in.in,xml,yml}]
[*.{build,xml.in,xml.in.in,xml,yml,ui,ui.in}]
indent_size = 2
[*.{json,py}]
......
This diff is collapsed.
......@@ -6,7 +6,7 @@ use gio::prelude::*;
use gtk::prelude::*;
use gtk::prelude::{SettingsExt, TextBufferExt};
use gtk::Inhibit;
use libhandy::ActionRowExt;
use libhandy::{ActionRowExt, DeckExt};
use sourceview4::prelude::*;
use std::path::Path;
......@@ -139,29 +139,23 @@ impl ExportDialog {
// Switch view to: Include the icon in an App
get_widget!(self.builder, libhandy::ActionRow, in_app_row);
in_app_row.connect_activated(clone!(@strong self.builder as builder => move |_| {
get_widget!(builder, gtk::Stack, headerbar_stack);
get_widget!(builder, gtk::Stack, main_stack);
main_stack.set_visible_child_name("in-app");
headerbar_stack.set_visible_child_name("in-app");
get_widget!(builder, libhandy::Deck, deck);
deck.set_visible_child_name("in-app");
}));
// Switch the view to Icon details
action!(
actions,
"details",
clone!(@strong self.builder as builder => move |_, _| {
get_widget!(builder, gtk::Stack, headerbar_stack);
get_widget!(builder, gtk::Stack, main_stack);
main_stack.set_visible_child_name("details");
headerbar_stack.set_visible_child_name("details");
get_widget!(builder, libhandy::Deck, deck);
deck.set_visible_child_name("details");
})
);
// Switch view to in-platform related stuff
get_widget!(self.builder, libhandy::ActionRow, as_system_row);
as_system_row.connect_activated(clone!(@strong self.builder as builder => move |_| {
get_widget!(builder, gtk::Stack, headerbar_stack);
get_widget!(builder, gtk::Stack, main_stack);
main_stack.set_visible_child_name("in-platform");
headerbar_stack.set_visible_child_name("in-platform");
get_widget!(builder, libhandy::Deck, deck);
deck.set_visible_child_name("in-platform");
}));
// Save GResource sample
action!(
......
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