mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
apply new fmt version
This commit is contained in:
parent
e4eecb3489
commit
cc7df23f39
94 changed files with 139 additions and 155 deletions
|
|
@ -1,6 +1,6 @@
|
|||
mod column;
|
||||
|
||||
use gtk::{gio::File, ScrolledWindow};
|
||||
use gtk::{ScrolledWindow, gio::File};
|
||||
|
||||
pub struct Directory; // @TODO save settings
|
||||
|
||||
|
|
@ -15,8 +15,7 @@ impl Directory {
|
|||
use gtk::gio::FileInfo;
|
||||
|
||||
// Init model
|
||||
const ATTRIBUTES: &str =
|
||||
"standard::type,standard::display-name,standard::symbolic-icon,standard::size,standard::content-type,time::modified,time::created,time::access";
|
||||
const ATTRIBUTES: &str = "standard::type,standard::display-name,standard::symbolic-icon,standard::size,standard::content-type,time::modified,time::created,time::access";
|
||||
|
||||
let directory_list = gtk::DirectoryList::builder()
|
||||
.file(file)
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ use display::Display;
|
|||
use format::Format;
|
||||
|
||||
use gtk::{
|
||||
ColumnViewColumn, Label, ListItem, SignalListItemFactory,
|
||||
gio::{File, FileInfo, FileQueryInfoFlags},
|
||||
glib::{GString, Priority},
|
||||
ColumnViewColumn, Label, ListItem, SignalListItemFactory,
|
||||
};
|
||||
|
||||
pub trait Column {
|
||||
|
|
@ -23,9 +23,9 @@ pub trait Column {
|
|||
impl Column for ColumnViewColumn {
|
||||
fn icon() -> Self {
|
||||
use gtk::{
|
||||
Align, ColumnViewColumn, ListItem, SignalListItemFactory,
|
||||
gio::FileInfo,
|
||||
prelude::{BoxExt, Cast, ListItemExt, WidgetExt},
|
||||
Align, ColumnViewColumn, ListItem, SignalListItemFactory,
|
||||
};
|
||||
|
||||
ColumnViewColumn::builder()
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use gtk::{
|
||||
ContentFit, Picture,
|
||||
gdk::Paintable,
|
||||
prelude::{IsA, WidgetExt},
|
||||
ContentFit, Picture,
|
||||
};
|
||||
|
||||
pub struct Image {
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ use status::Status;
|
|||
|
||||
use adw::StatusPage;
|
||||
use gtk::{
|
||||
Box, FileDialog, FileLauncher, Orientation, Window,
|
||||
gio::{Cancellable, File},
|
||||
prelude::{BoxExt, CancellableExt, WidgetExt},
|
||||
Box, FileDialog, FileLauncher, Orientation, Window,
|
||||
};
|
||||
use std::rc::Rc;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use gtk::{
|
||||
gio::SimpleAction,
|
||||
glib::{uuid_string_random, SignalHandlerId},
|
||||
glib::{SignalHandlerId, uuid_string_random},
|
||||
prelude::{ActionExt, StaticVariantType, ToVariant},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use gtk::{
|
||||
gio::SimpleAction,
|
||||
glib::{uuid_string_random, SignalHandlerId},
|
||||
glib::{SignalHandlerId, uuid_string_random},
|
||||
prelude::{ActionExt, StaticVariantType, ToVariant},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use gtk::{
|
||||
gio::SimpleAction,
|
||||
glib::{uuid_string_random, SignalHandlerId},
|
||||
glib::{SignalHandlerId, uuid_string_random},
|
||||
prelude::{ActionExt, StaticVariantType, ToVariant},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use gtk::{glib::SignalHandlerId, prelude::ButtonExt, Align, Button};
|
||||
use gtk::{Align, Button, glib::SignalHandlerId, prelude::ButtonExt};
|
||||
|
||||
// Defaults
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use gtk::{
|
||||
Align, Button,
|
||||
glib::SignalHandlerId,
|
||||
prelude::{ButtonExt, WidgetExt},
|
||||
Align, Button,
|
||||
};
|
||||
|
||||
// Defaults
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use gtk::{glib::SignalHandlerId, prelude::ButtonExt, Align, Button};
|
||||
use gtk::{Align, Button, glib::SignalHandlerId, prelude::ButtonExt};
|
||||
|
||||
// Defaults
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use gtk::{prelude::WidgetExt, Spinner}; // use adw::Spinner; @TODO adw 1.6 / ubuntu 24.10+
|
||||
use gtk::{Spinner, prelude::WidgetExt}; // use adw::Spinner; @TODO adw 1.6 / ubuntu 24.10+
|
||||
|
||||
// Defaults
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use gtk::{prelude::WidgetExt, Label};
|
||||
use gtk::{Label, prelude::WidgetExt};
|
||||
|
||||
// Defaults
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use super::{ItemAction, TabAction};
|
||||
use adw::StatusPage;
|
||||
use gtk::{prelude::ActionExt, Align, Button};
|
||||
use gtk::{Align, Button, prelude::ActionExt};
|
||||
use std::rc::Rc;
|
||||
|
||||
// Defaults
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use adw::StatusPage;
|
||||
use gtk::{
|
||||
glib::{timeout_add_local, ControlFlow},
|
||||
prelude::WidgetExt,
|
||||
Spinner, // use adw::Spinner; @TODO adw 1.6 / ubuntu 24.10+
|
||||
glib::{ControlFlow, timeout_add_local},
|
||||
prelude::WidgetExt,
|
||||
};
|
||||
use std::time::Duration;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use super::ItemAction;
|
||||
use adw::StatusPage;
|
||||
use gtk::{glib::Uri, prelude::ButtonExt, Align, Button};
|
||||
use gtk::{Align, Button, glib::Uri, prelude::ButtonExt};
|
||||
use std::rc::Rc;
|
||||
|
||||
/// Create new default `GObject` preset for mime issue
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ mod source;
|
|||
use super::{ItemAction, WindowAction};
|
||||
use adw::ClampScrollable;
|
||||
use gemini::Gemini;
|
||||
use gtk::{glib::Uri, ScrolledWindow, TextView};
|
||||
use gtk::{ScrolledWindow, TextView, glib::Uri};
|
||||
use plain::Plain;
|
||||
use source::Source;
|
||||
use std::rc::Rc;
|
||||
|
|
@ -72,7 +72,7 @@ impl Text {
|
|||
|
||||
// Grab focus into the `TextView` on click empty `ClampScrollable` area
|
||||
fn grab_focus_patch(clamp_scrollable: &ClampScrollable, text_view: &TextView) {
|
||||
use gtk::{prelude::WidgetExt, GestureClick};
|
||||
use gtk::{GestureClick, prelude::WidgetExt};
|
||||
let controller = GestureClick::new();
|
||||
|
||||
controller.connect_pressed({
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ use ggemtext::line::{
|
|||
link::Link,
|
||||
};
|
||||
use gtk::{
|
||||
EventControllerMotion, GestureClick, TextBuffer, TextTag, TextView, TextWindowType,
|
||||
UriLauncher, Window, WrapMode,
|
||||
gdk::{BUTTON_MIDDLE, BUTTON_PRIMARY, RGBA},
|
||||
gio::Cancellable,
|
||||
glib::{TimeZone, Uri},
|
||||
prelude::{TextBufferExt, TextBufferExtManual, TextTagExt, TextViewExt, WidgetExt},
|
||||
EventControllerMotion, GestureClick, TextBuffer, TextTag, TextView, TextWindowType,
|
||||
UriLauncher, Window, WrapMode,
|
||||
};
|
||||
use std::{cell::Cell, collections::HashMap, rc::Rc};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ mod tag;
|
|||
use tag::Tag;
|
||||
|
||||
use ansi_parser::{AnsiParser, AnsiSequence, Output};
|
||||
use gtk::{prelude::TextTagExt, TextTag};
|
||||
use gtk::{TextTag, prelude::TextTagExt};
|
||||
|
||||
/// Apply ANSI/SGR format to new buffer
|
||||
pub fn format(source_code: &str) -> Vec<(TextTag, String)> {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use gtk::{
|
||||
glib::{timeout_add_local_once, Uri},
|
||||
Align, Label, TextView, TextWindowType,
|
||||
glib::{Uri, timeout_add_local_once},
|
||||
pango::EllipsizeMode,
|
||||
prelude::{TextViewExt, WidgetExt},
|
||||
Align, Label, TextView, TextWindowType,
|
||||
};
|
||||
use std::{cell::Cell, rc::Rc, time::Duration};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use gtk::{gdk::Display, IconLookupFlags, IconPaintable, IconTheme, TextDirection};
|
||||
use gtk::{IconLookupFlags, IconPaintable, IconTheme, TextDirection, gdk::Display};
|
||||
|
||||
const SIZE: i32 = 16;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ use tag::Tag;
|
|||
|
||||
use adw::StyleManager;
|
||||
use gtk::{
|
||||
TextTag,
|
||||
gdk::RGBA,
|
||||
pango::{Style, Underline},
|
||||
prelude::TextTagExt,
|
||||
TextTag,
|
||||
};
|
||||
use syntect::{
|
||||
easy::HighlightLines,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue