decoder: Use GFile instead of PathBuf
This allows to show images from locations that don't have a representation with path. This also works around not being able to read files in trash:/// Closes #56 Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/174>
This commit is contained in:
parent
032707a210
commit
fad8bb7939
15 changed files with 119 additions and 107 deletions
|
|
@ -678,9 +678,9 @@ impl LpWindow {
|
|||
// have multiple `match` or `if let` branches, and without needing
|
||||
// to unwrap.
|
||||
#[template_callback]
|
||||
fn window_title(&self, path: glib::variant::Variant) -> String {
|
||||
fn window_title(&self, file: Option<&gio::File>) -> String {
|
||||
// ensure that templates are initialized
|
||||
if path.as_maybe().is_none() {
|
||||
if file.is_none() {
|
||||
gettext("Loupe")
|
||||
} else {
|
||||
self.imp()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue