Skip to content

Commit

Permalink
Document message dialogs like the rest
Browse files Browse the repository at this point in the history
  • Loading branch information
cassaundra committed Jan 8, 2025
1 parent 9707d69 commit 7a035ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub trait FolderPickerDialogImpl {
fn pick_folders(self) -> Option<Vec<PathBuf>>;
}

/// Dialog used to display messages
pub trait MessageDialogImpl {
fn show(self) -> MessageDialogResult;
}
Expand Down Expand Up @@ -98,6 +99,7 @@ pub trait AsyncFileSaveDialogImpl {
fn save_file_async(self) -> DialogFutureType<Option<FileHandle>>;
}

/// Dialog used to display messages
pub trait AsyncMessageDialogImpl {
fn show_async(self) -> DialogFutureType<MessageDialogResult>;
}
4 changes: 4 additions & 0 deletions src/backend/xdg_desktop_portal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ impl AsyncFileSaveDialogImpl for FileDialog {
}
}

//
// Message
//

use crate::backend::{AsyncMessageDialogImpl, MessageDialogImpl};

impl MessageDialogImpl for MessageDialog {
Expand Down

0 comments on commit 7a035ad

Please sign in to comment.