also fix gtk branch

This commit is contained in:
Alexander Kjäll 2024-03-10 17:14:30 +01:00
parent 348574c9de
commit bc0c41473e
No known key found for this signature in database
GPG Key ID: 1D108E6C07CBC406
3 changed files with 5 additions and 5 deletions

View File

@ -111,7 +111,7 @@ impl CollectionObject {
.map(|p| PasswordObject::from_password_entry(p, store.clone()))
.collect();
let passwords = gio::ListStore::new(PasswordObject::static_type());
let passwords = gio::ListStore::new::<PasswordObject>();
passwords.extend_from_slice(&passwords_to_extend);
Self::new(&title, passwords, store, user_config_dir)

View File

@ -1,7 +1,7 @@
use std::{cell::RefCell, path::PathBuf};
use adw::{subclass::prelude::*, Leaflet};
use glib::{signal::Inhibit, subclass::InitializingObject};
use glib::{subclass::InitializingObject, Propagation};
use gtk::{
gio, glib, glib::SignalHandlerId, Button, CompositeTemplate, Entry, FilterListModel, ListBox,
Stack,
@ -87,7 +87,7 @@ impl WidgetImpl for Window {}
// Trait shared by all windows
impl WindowImpl for Window {
fn close_request(&self) -> Inhibit {
fn close_request(&self) -> Propagation {
// Pass close request on to the parent
self.parent_close_request()
}

View File

@ -73,7 +73,7 @@ impl Window {
}
fn setup_collections(&self) {
let collections = gio::ListStore::new(CollectionObject::static_type());
let collections = gio::ListStore::new::<CollectionObject>();
self.imp()
.collections
.set(collections.clone())
@ -421,7 +421,7 @@ impl Window {
}
// Create a new list store
let passwords = gio::ListStore::new(PasswordObject::static_type());
let passwords = gio::ListStore::new::<PasswordObject>();
// Create a new collection object from the title the user provided
let title = entry.text().to_string();