-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
delegate status info to widget implementation
- Loading branch information
yggverse
committed
Dec 12, 2024
1 parent
d752fe1
commit 549c3fd
Showing
4 changed files
with
15 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 4 additions & 6 deletions
10
src/app/browser/window/tab/item/page/content/status/mime.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
use adw::StatusPage; | ||
|
||
const DEFAULT_TITLE: &str = "Oops"; | ||
const DEFAULT_ICON_NAME: &str = "dialog-question-symbolic"; | ||
|
||
/// Create new default `GObject` preset for mime issue | ||
/// [StatusPage](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.StatusPage.html) | ||
pub fn new_gobject() -> StatusPage { | ||
pub fn new_gobject(mime: &str) -> StatusPage { | ||
StatusPage::builder() | ||
.title(DEFAULT_TITLE) | ||
.icon_name(DEFAULT_ICON_NAME) | ||
.title("Oops") | ||
.description(format!("Content type `{mime}` not supported!")) | ||
.icon_name("dialog-question-symbolic") | ||
.build() | ||
} |