code: Reformat with group_imports=StdExternalCrate
This commit is contained in:
parent
81c9030288
commit
2648295a18
18 changed files with 86 additions and 90 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
format_code_in_doc_comments = true
|
format_code_in_doc_comments = true
|
||||||
|
group_imports = "StdExternalCrate"
|
||||||
imports_granularity = "Module"
|
imports_granularity = "Module"
|
||||||
wrap_comments = true
|
wrap_comments = true
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
// Copyright (c) 2020-2023 Christopher Davis
|
// Copyright (c) 2020-2023 Christopher Davis
|
||||||
// Copyright (c) 2022-2023 Sophie Herold
|
// Copyright (c) 2022-2023 Sophie Herold
|
||||||
// Copyright (c) 2022-2023 Sabri Ünal
|
// Copyright (c) 2022-2023 Sabri Ünal
|
||||||
|
// Copyright (c) 2023 Matteo Nardi
|
||||||
// Copyright (c) 2023 Julian Hofer
|
// Copyright (c) 2023 Julian Hofer
|
||||||
// Copyright (c) 2023 Huan Nguyen
|
// Copyright (c) 2023 Huan Nguyen
|
||||||
//
|
//
|
||||||
|
|
@ -19,14 +20,12 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
use crate::about;
|
|
||||||
use crate::deps::*;
|
|
||||||
|
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::subclass::prelude::*;
|
use adw::subclass::prelude::*;
|
||||||
|
|
||||||
use crate::config;
|
use crate::deps::*;
|
||||||
use crate::window::LpWindow;
|
use crate::window::LpWindow;
|
||||||
|
use crate::{about, config};
|
||||||
|
|
||||||
mod imp {
|
mod imp {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
|
||||||
|
|
@ -16,15 +16,15 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
//! Decode using glycin
|
//! Decode using glycin
|
||||||
use super::*;
|
use std::sync::Arc;
|
||||||
use crate::decoder::tiling::{self, FrameBufferExt};
|
|
||||||
use crate::deps::*;
|
|
||||||
use crate::metadata::{ImageFormat, Metadata};
|
|
||||||
|
|
||||||
use arc_swap::ArcSwap;
|
use arc_swap::ArcSwap;
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
|
|
||||||
use std::sync::Arc;
|
use super::*;
|
||||||
|
use crate::decoder::tiling::{self, FrameBufferExt};
|
||||||
|
use crate::deps::*;
|
||||||
|
use crate::metadata::{ImageFormat, Metadata};
|
||||||
|
|
||||||
pub const FRAME_BUFFER: usize = 3;
|
pub const FRAME_BUFFER: usize = 3;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,18 +16,18 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
//! Decode using librsvg
|
//! Decode using librsvg
|
||||||
use super::*;
|
use std::sync::Arc;
|
||||||
use crate::decoder::tiling::{self, FrameBufferExt};
|
|
||||||
use crate::decoder::TileRequest;
|
|
||||||
use crate::deps::*;
|
|
||||||
use crate::metadata::ImageFormat;
|
|
||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use arc_swap::ArcSwap;
|
use arc_swap::ArcSwap;
|
||||||
use async_channel as mpsc;
|
use async_channel as mpsc;
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
|
|
||||||
use std::sync::Arc;
|
use super::*;
|
||||||
|
use crate::decoder::tiling::{self, FrameBufferExt};
|
||||||
|
use crate::decoder::TileRequest;
|
||||||
|
use crate::deps::*;
|
||||||
|
use crate::metadata::ImageFormat;
|
||||||
|
|
||||||
/// Current librsvg limit on maximum dimensions. See
|
/// Current librsvg limit on maximum dimensions. See
|
||||||
/// <https://gitlab.gnome.org/GNOME/librsvg/-/issues/938>
|
/// <https://gitlab.gnome.org/GNOME/librsvg/-/issues/938>
|
||||||
|
|
|
||||||
|
|
@ -20,20 +20,17 @@
|
||||||
pub mod formats;
|
pub mod formats;
|
||||||
pub mod tiling;
|
pub mod tiling;
|
||||||
|
|
||||||
pub use formats::ImageDimensionDetails;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use crate::deps::*;
|
|
||||||
use crate::metadata::{ImageFormat, Metadata};
|
|
||||||
use formats::*;
|
|
||||||
use tiling::FrameBufferExt;
|
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use arc_swap::ArcSwap;
|
use arc_swap::ArcSwap;
|
||||||
|
use formats::*;
|
||||||
|
pub use formats::{ImageDimensionDetails, RSVG_MAX_SIZE};
|
||||||
use futures::channel::mpsc;
|
use futures::channel::mpsc;
|
||||||
|
use tiling::FrameBufferExt;
|
||||||
|
|
||||||
use std::sync::Arc;
|
use crate::deps::*;
|
||||||
|
use crate::metadata::{ImageFormat, Metadata};
|
||||||
pub use formats::RSVG_MAX_SIZE;
|
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
/// Renderer requests new tiles
|
/// Renderer requests new tiles
|
||||||
|
|
|
||||||
|
|
@ -26,15 +26,15 @@
|
||||||
//! be re-genearted for each zoom level. It can also be used to allow
|
//! be re-genearted for each zoom level. It can also be used to allow
|
||||||
//! showing large JPEGs etc where the complete decoded image would not
|
//! showing large JPEGs etc where the complete decoded image would not
|
||||||
//! even fit in the VRAM.
|
//! even fit in the VRAM.
|
||||||
use super::{DecoderUpdate, ImageDimensionDetails, UpdateSender};
|
use std::collections::{BTreeMap, VecDeque};
|
||||||
use crate::deps::*;
|
use std::sync::Arc;
|
||||||
|
use std::time::Duration;
|
||||||
|
|
||||||
use arc_swap::ArcSwap;
|
use arc_swap::ArcSwap;
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
|
|
||||||
use std::collections::{BTreeMap, VecDeque};
|
use super::{DecoderUpdate, ImageDimensionDetails, UpdateSender};
|
||||||
use std::sync::Arc;
|
use crate::deps::*;
|
||||||
use std::time::Duration;
|
|
||||||
|
|
||||||
const ZOOM_SIGNIFICANT_DIGITS: i32 = 6;
|
const ZOOM_SIGNIFICANT_DIGITS: i32 = 6;
|
||||||
pub const MIN_TILE_SIZE: u16 = 500;
|
pub const MIN_TILE_SIZE: u16 = 500;
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,7 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
use crate::deps::*;
|
use std::cell::{OnceCell, RefCell};
|
||||||
use crate::util;
|
|
||||||
use crate::util::gettext::*;
|
|
||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use gio::prelude::*;
|
use gio::prelude::*;
|
||||||
|
|
@ -29,7 +27,10 @@ use glib::subclass::Signal;
|
||||||
use glib::GString;
|
use glib::GString;
|
||||||
use indexmap::IndexMap;
|
use indexmap::IndexMap;
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use std::cell::{OnceCell, RefCell};
|
|
||||||
|
use crate::deps::*;
|
||||||
|
use crate::util;
|
||||||
|
use crate::util::gettext::*;
|
||||||
|
|
||||||
mod imp {
|
mod imp {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
|
||||||
|
|
@ -29,11 +29,10 @@ pub use file::FileInfo;
|
||||||
pub use format::ImageFormat;
|
pub use format::ImageFormat;
|
||||||
pub use gps::GPSLocation;
|
pub use gps::GPSLocation;
|
||||||
|
|
||||||
|
use crate::deps::*;
|
||||||
use crate::util;
|
use crate::util;
|
||||||
use crate::util::gettext::*;
|
use crate::util::gettext::*;
|
||||||
|
|
||||||
use crate::deps::*;
|
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Metadata {
|
pub struct Metadata {
|
||||||
exif: Option<exif::Exif>,
|
exif: Option<exif::Exif>,
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,15 @@
|
||||||
|
|
||||||
pub mod gettext;
|
pub mod gettext;
|
||||||
|
|
||||||
use crate::deps::*;
|
use std::fmt::{Debug, Write};
|
||||||
use crate::util::gettext::*;
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use anyhow::{anyhow, bail, Context};
|
use anyhow::{anyhow, bail, Context};
|
||||||
use gio::prelude::*;
|
use gio::prelude::*;
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
use std::fmt::{Debug, Write};
|
use crate::deps::*;
|
||||||
use std::path::{Path, PathBuf};
|
use crate::util::gettext::*;
|
||||||
|
|
||||||
/// Returns localized date + time format
|
/// Returns localized date + time format
|
||||||
pub fn datetime_fmt(datetime: &glib::DateTime) -> Option<String> {
|
pub fn datetime_fmt(datetime: &glib::DateTime) -> Option<String> {
|
||||||
|
|
|
||||||
|
|
@ -20,14 +20,14 @@
|
||||||
//!
|
//!
|
||||||
//! This implementation is inspired by [Amberol](https://gitlab.gnome.org/World/amberol)
|
//! This implementation is inspired by [Amberol](https://gitlab.gnome.org/World/amberol)
|
||||||
|
|
||||||
use crate::deps::*;
|
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
|
|
||||||
mod imp {
|
use crate::deps::*;
|
||||||
use once_cell::sync::OnceCell;
|
|
||||||
|
|
||||||
|
mod imp {
|
||||||
use adw::subclass::prelude::*;
|
use adw::subclass::prelude::*;
|
||||||
use glib::{ParamSpec, Properties, Value};
|
use glib::{ParamSpec, Properties, Value};
|
||||||
|
use once_cell::sync::OnceCell;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) 2021, 2023 Christopher Davis
|
// Copyright (c) 2021 Christopher Davis
|
||||||
// Copyright (c) 2022-2023 Sophie Herold
|
// Copyright (c) 2022-2023 Sophie Herold
|
||||||
// Copyright (c) 2023 Julian Hofer
|
// Copyright (c) 2023 Julian Hofer
|
||||||
// Copyright (c) 2023 Lubosz Sarnecki
|
// Copyright (c) 2023 Lubosz Sarnecki
|
||||||
|
|
@ -41,12 +41,10 @@ mod rotation;
|
||||||
mod scrollable;
|
mod scrollable;
|
||||||
mod zoom;
|
mod zoom;
|
||||||
|
|
||||||
use crate::deps::*;
|
use std::cell::{Cell, OnceCell, RefCell};
|
||||||
|
use std::marker::PhantomData;
|
||||||
use crate::decoder::tiling::FrameBufferExt;
|
use std::ops::Deref;
|
||||||
use crate::decoder::{self, tiling, Decoder, DecoderUpdate};
|
use std::sync::Arc;
|
||||||
use crate::metadata::Metadata;
|
|
||||||
use crate::util::Gesture;
|
|
||||||
|
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::subclass::prelude::*;
|
use adw::subclass::prelude::*;
|
||||||
|
|
@ -56,10 +54,11 @@ use glib::subclass::Signal;
|
||||||
use glib::{Properties, SignalGroup};
|
use glib::{Properties, SignalGroup};
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
use std::cell::{Cell, OnceCell, RefCell};
|
use crate::decoder::tiling::FrameBufferExt;
|
||||||
use std::marker::PhantomData;
|
use crate::decoder::{self, tiling, Decoder, DecoderUpdate};
|
||||||
use std::ops::Deref;
|
use crate::deps::*;
|
||||||
use std::sync::Arc;
|
use crate::metadata::Metadata;
|
||||||
|
use crate::util::Gesture;
|
||||||
|
|
||||||
/// Default background color around images and behind transparent images
|
/// Default background color around images and behind transparent images
|
||||||
/// `#242424`
|
/// `#242424`
|
||||||
|
|
|
||||||
|
|
@ -21,14 +21,14 @@
|
||||||
//!
|
//!
|
||||||
//! This widget also handles showing the context menu.
|
//! This widget also handles showing the context menu.
|
||||||
|
|
||||||
use crate::deps::*;
|
|
||||||
use crate::widgets::LpImage;
|
|
||||||
|
|
||||||
use adw::subclass::prelude::*;
|
use adw::subclass::prelude::*;
|
||||||
use glib::{clone, Properties};
|
use glib::{clone, Properties};
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
use gtk::CompositeTemplate;
|
use gtk::CompositeTemplate;
|
||||||
|
|
||||||
|
use crate::deps::*;
|
||||||
|
use crate::widgets::LpImage;
|
||||||
|
|
||||||
mod imp {
|
mod imp {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,8 @@
|
||||||
//! [`LpSlidingView`]: crate::widgets::LpSlidingView
|
//! [`LpSlidingView`]: crate::widgets::LpSlidingView
|
||||||
//! [`LpFileModel`]: crate::file_model::LpFileModel
|
//! [`LpFileModel`]: crate::file_model::LpFileModel
|
||||||
|
|
||||||
use crate::deps::*;
|
use std::cell::{Cell, OnceCell, RefCell};
|
||||||
use crate::file_model::LpFileModel;
|
use std::marker::PhantomData;
|
||||||
use crate::util::gettext::*;
|
|
||||||
use crate::util::{Direction, Position};
|
|
||||||
use crate::widgets::{LpImage, LpImagePage, LpPrint, LpSlidingView};
|
|
||||||
|
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::subclass::prelude::*;
|
use adw::subclass::prelude::*;
|
||||||
|
|
@ -45,8 +42,11 @@ use glib::translate::IntoGlib;
|
||||||
use glib::{clone, Properties};
|
use glib::{clone, Properties};
|
||||||
use gtk::CompositeTemplate;
|
use gtk::CompositeTemplate;
|
||||||
|
|
||||||
use std::cell::{Cell, OnceCell, RefCell};
|
use crate::deps::*;
|
||||||
use std::marker::PhantomData;
|
use crate::file_model::LpFileModel;
|
||||||
|
use crate::util::gettext::*;
|
||||||
|
use crate::util::{Direction, Position};
|
||||||
|
use crate::widgets::{LpImage, LpImagePage, LpPrint, LpSlidingView};
|
||||||
|
|
||||||
// The number of pages we want to buffer
|
// The number of pages we want to buffer
|
||||||
// on either side of the current page.
|
// on either side of the current page.
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,8 @@
|
||||||
|
|
||||||
//! The print layout widget that also coordinates the print process
|
//! The print layout widget that also coordinates the print process
|
||||||
|
|
||||||
use crate::decoder;
|
use std::cell::{Cell, RefCell};
|
||||||
use crate::deps::*;
|
use std::rc::Rc;
|
||||||
use crate::util::gettext::*;
|
|
||||||
use crate::widgets::{LpImage, LpPrintPreview};
|
|
||||||
|
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::subclass::prelude::*;
|
use adw::subclass::prelude::*;
|
||||||
|
|
@ -29,8 +27,10 @@ use glib::Properties;
|
||||||
use gtk::CompositeTemplate;
|
use gtk::CompositeTemplate;
|
||||||
use once_cell::sync::OnceCell;
|
use once_cell::sync::OnceCell;
|
||||||
|
|
||||||
use std::cell::{Cell, RefCell};
|
use crate::decoder;
|
||||||
use std::rc::Rc;
|
use crate::deps::*;
|
||||||
|
use crate::util::gettext::*;
|
||||||
|
use crate::widgets::{LpImage, LpPrintPreview};
|
||||||
|
|
||||||
#[derive(Default, Clone, Copy)]
|
#[derive(Default, Clone, Copy)]
|
||||||
struct PageAlignment {
|
struct PageAlignment {
|
||||||
|
|
|
||||||
|
|
@ -17,14 +17,14 @@
|
||||||
|
|
||||||
//! Print preview widget that shows a fake page with the image on it
|
//! Print preview widget that shows a fake page with the image on it
|
||||||
|
|
||||||
use crate::deps::*;
|
|
||||||
use crate::widgets::LpPrint;
|
|
||||||
|
|
||||||
use adw::subclass::prelude::*;
|
use adw::subclass::prelude::*;
|
||||||
use glib::Properties;
|
use glib::Properties;
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
use once_cell::sync::OnceCell;
|
use once_cell::sync::OnceCell;
|
||||||
|
|
||||||
|
use crate::deps::*;
|
||||||
|
use crate::widgets::LpPrint;
|
||||||
|
|
||||||
mod imp_page {
|
mod imp_page {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,17 +16,16 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
use crate::decoder::ImageDimensionDetails;
|
use std::cell::{OnceCell, RefCell};
|
||||||
use crate::deps::*;
|
|
||||||
use crate::util;
|
|
||||||
|
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::subclass::prelude::*;
|
use adw::subclass::prelude::*;
|
||||||
use glib::Properties;
|
use glib::Properties;
|
||||||
use gtk::CompositeTemplate;
|
use gtk::CompositeTemplate;
|
||||||
|
|
||||||
use std::cell::{OnceCell, RefCell};
|
use crate::decoder::ImageDimensionDetails;
|
||||||
|
use crate::deps::*;
|
||||||
|
use crate::util;
|
||||||
use crate::widgets::image::LpImage;
|
use crate::widgets::image::LpImage;
|
||||||
|
|
||||||
const FALLBACK: &str = "–";
|
const FALLBACK: &str = "–";
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,7 @@
|
||||||
//!
|
//!
|
||||||
//! This widget it similar to `AdwCarousel`.
|
//! This widget it similar to `AdwCarousel`.
|
||||||
|
|
||||||
use crate::deps::*;
|
use std::cell::{Cell, OnceCell, RefCell};
|
||||||
use crate::widgets::LpImagePage;
|
|
||||||
|
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::subclass::prelude::*;
|
use adw::subclass::prelude::*;
|
||||||
|
|
@ -31,7 +30,8 @@ use glib::Properties;
|
||||||
use indexmap::IndexMap;
|
use indexmap::IndexMap;
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
use std::cell::{Cell, OnceCell, RefCell};
|
use crate::deps::*;
|
||||||
|
use crate::widgets::LpImagePage;
|
||||||
|
|
||||||
static SCROLL_DAMPING_RATIO: f64 = 1.;
|
static SCROLL_DAMPING_RATIO: f64 = 1.;
|
||||||
static SCROLL_MASS: f64 = 0.5;
|
static SCROLL_MASS: f64 = 0.5;
|
||||||
|
|
@ -46,9 +46,10 @@ static PAGE_SPACING_FIXED: f32 = 25.;
|
||||||
const PAGE_SPACING_PERCENT: f32 = 0.02;
|
const PAGE_SPACING_PERCENT: f32 = 0.02;
|
||||||
|
|
||||||
mod imp {
|
mod imp {
|
||||||
use super::*;
|
|
||||||
use glib::subclass::Signal;
|
use glib::subclass::Signal;
|
||||||
|
|
||||||
|
use super::*;
|
||||||
|
|
||||||
#[derive(Default, Properties)]
|
#[derive(Default, Properties)]
|
||||||
#[properties(wrapper_type = super::LpSlidingView)]
|
#[properties(wrapper_type = super::LpSlidingView)]
|
||||||
pub struct LpSlidingView {
|
pub struct LpSlidingView {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
// Copyright (c) 2022-2023 Sophie Herold
|
// Copyright (c) 2022-2023 Sophie Herold
|
||||||
// Copyright (c) 2022 Elton A Rodrigues
|
// Copyright (c) 2022 Elton A Rodrigues
|
||||||
// Copyright (c) 2022 Maximiliano Sandoval R
|
// Copyright (c) 2022 Maximiliano Sandoval R
|
||||||
|
// Copyright (c) 2023 Matteo Nardi
|
||||||
// Copyright (c) 2023 Julian Hofer
|
// Copyright (c) 2023 Julian Hofer
|
||||||
// Copyright (c) 2023 FineFindus
|
// Copyright (c) 2023 FineFindus
|
||||||
// Copyright (c) 2023 qwel
|
// Copyright (c) 2023 qwel
|
||||||
|
|
@ -24,19 +25,18 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
use crate::deps::*;
|
use std::cell::{Cell, OnceCell, RefCell};
|
||||||
use crate::util::gettext::*;
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::subclass::prelude::*;
|
use adw::subclass::prelude::*;
|
||||||
use glib::clone;
|
use glib::clone;
|
||||||
use gtk::CompositeTemplate;
|
use gtk::CompositeTemplate;
|
||||||
|
|
||||||
use std::cell::{Cell, OnceCell, RefCell};
|
|
||||||
use std::path::{Path, PathBuf};
|
|
||||||
|
|
||||||
use crate::application::LpApplication;
|
use crate::application::LpApplication;
|
||||||
use crate::config;
|
use crate::config;
|
||||||
|
use crate::deps::*;
|
||||||
|
use crate::util::gettext::*;
|
||||||
use crate::util::{Direction, Position};
|
use crate::util::{Direction, Position};
|
||||||
use crate::widgets::{LpDragOverlay, LpImage, LpImageView, LpPropertiesView};
|
use crate::widgets::{LpDragOverlay, LpImage, LpImageView, LpPropertiesView};
|
||||||
|
|
||||||
|
|
@ -789,12 +789,12 @@ impl LpWindow {
|
||||||
imp.properties_button.set_sensitive(has_image);
|
imp.properties_button.set_sensitive(has_image);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// When the image-properties sidebar is displayed or hidden, we should update the
|
/// When the image-properties sidebar is displayed or hidden, we should
|
||||||
/// "show-properties" setting.
|
/// update the "show-properties" setting.
|
||||||
fn on_properties_button_toggled(&self) {
|
fn on_properties_button_toggled(&self) {
|
||||||
let imp = self.imp();
|
let imp = self.imp();
|
||||||
// When no image is shown, we skip this update as the sidebar should always be hidden.
|
// When no image is shown, we skip this update as the sidebar should always be
|
||||||
// This can happen when deleting a picture.
|
// hidden. This can happen when deleting a picture.
|
||||||
if imp.image_view.current_page().is_none() {
|
if imp.image_view.current_page().is_none() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue