meli/ui/src/execute/actions.rs

56 lines
1.4 KiB
Rust
Raw Normal View History

2018-08-07 15:01:15 +03:00
/*
* meli - ui crate.
*
* Copyright 2017-2018 Manos Pitsidianakis
*
* This file is part of meli.
*
* meli is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* meli is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with meli. If not, see <http://www.gnu.org/licenses/>.
*/
2018-08-06 22:20:34 +03:00
/*!
* User actions that need to be handled by the UI
*/
2018-08-23 15:36:52 +03:00
pub use melib::mailbox::{SortField, SortOrder};
2019-02-26 10:55:22 +02:00
use components::Entity;
extern crate uuid;
use uuid::Uuid;
2019-02-26 10:55:22 +02:00
#[derive(Debug, )]
pub enum ListingAction {
SetPlain,
SetThreaded,
SetCompact,
}
2019-02-26 10:55:22 +02:00
#[derive(Debug, )]
pub enum TabAction {
2019-02-26 10:55:22 +02:00
EntityOpen(Entity),
2018-09-04 02:10:37 +03:00
NewDraft,
Reply((usize, usize, usize), usize), // thread coordinates (account, mailbox, root_set idx) and message idx
Close,
Kill(Uuid),
}
2019-02-26 10:55:22 +02:00
#[derive(Debug, )]
pub enum Action {
Listing(ListingAction),
ViewMailbox(usize),
Sort(SortField, SortOrder),
SubSort(SortField, SortOrder),
Tab(TabAction),
}