remove template for dock_item
This commit is contained in:
parent
e48f501b0d
commit
71273ec430
16 changed files with 82 additions and 87 deletions
|
|
@ -142,7 +142,7 @@ impl ObjectImpl for AppGroup {
|
|||
.get::<Variant>()
|
||||
.expect("The icon needs to be a Variant"),
|
||||
)
|
||||
.expect("The icon variant needs to be a Vec<String>");
|
||||
.expect("The icon variant needs to be a Vec<String>");
|
||||
self.data.borrow_mut().app_names = appnames;
|
||||
}
|
||||
_ => unimplemented!(),
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ impl AppGroup {
|
|||
("icon", &data.icon),
|
||||
("category", &data.category),
|
||||
])
|
||||
.expect("Failed to create `ApplicationObject`.");
|
||||
.expect("Failed to create `ApplicationObject`.");
|
||||
if let Err(e) = self_.set_property("appnames", data.app_names.to_variant()) {
|
||||
println!("failed to set category icon property");
|
||||
dbg!(e);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
use std::cell::Cell;
|
||||
|
||||
use gtk4::CompositeTemplate;
|
||||
use gtk4::glib;
|
||||
use gtk4::prelude::*;
|
||||
use gtk4::subclass::prelude::*;
|
||||
use gtk4::CompositeTemplate;
|
||||
|
||||
#[derive(Debug, Default, CompositeTemplate)]
|
||||
#[template(file = "grid_item.ui")]
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ use gdk4::ContentProvider;
|
|||
use gdk4::Display;
|
||||
use gio::File;
|
||||
use gio::Icon;
|
||||
use gtk4::{gio, glib};
|
||||
use gtk4::DragSource;
|
||||
use gtk4::IconTheme;
|
||||
use gtk4::prelude::*;
|
||||
use gtk4::subclass::prelude::*;
|
||||
use gtk4::traits::WidgetExt;
|
||||
use gtk4::DragSource;
|
||||
use gtk4::IconTheme;
|
||||
use gtk4::{gio, glib};
|
||||
|
||||
use crate::app_group::AppGroup;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use gtk4::CssProvider;
|
||||
use gtk4::gdk::Display;
|
||||
use gtk4::prelude::*;
|
||||
use gtk4::CssProvider;
|
||||
use gtk4::StyleContext;
|
||||
use once_cell::sync::OnceCell;
|
||||
use x11rb::rust_connection::RustConnection;
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@ use gdk4_x11::X11Surface;
|
|||
use glib::FromVariant;
|
||||
use glib::Object;
|
||||
use glib::Variant;
|
||||
use gtk4::{gio, glib};
|
||||
use gtk4::{Application, SignalListItemFactory};
|
||||
use gtk4::prelude::*;
|
||||
use gtk4::subclass::prelude::*;
|
||||
use gtk4::Dialog;
|
||||
use gtk4::Entry;
|
||||
use gtk4::Label;
|
||||
use gtk4::prelude::*;
|
||||
use gtk4::subclass::prelude::*;
|
||||
use gtk4::{gio, glib};
|
||||
use gtk4::{Application, SignalListItemFactory};
|
||||
use x11rb::connection::Connection;
|
||||
use x11rb::protocol::xproto;
|
||||
use x11rb::protocol::xproto::ConnectionExt;
|
||||
|
|
@ -171,10 +171,10 @@ impl Window {
|
|||
category: "".to_string(),
|
||||
}),
|
||||
]
|
||||
.iter()
|
||||
.for_each(|group| {
|
||||
group_model.append(group);
|
||||
});
|
||||
.iter()
|
||||
.for_each(|group| {
|
||||
group_model.append(group);
|
||||
});
|
||||
let group_selection = gtk4::SingleSelection::new(Some(&group_model));
|
||||
imp.group_grid_view.set_model(Some(&group_selection));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue