some improvements

This commit is contained in:
leca 2024-05-11 13:45:32 +03:00
parent a2c4dbcb8e
commit ebe6cd42be
2 changed files with 5 additions and 10 deletions

View File

@ -1,6 +1,3 @@
// There's no way to pack an appinage with gtk 4.12 as there's no way to put glibc inside an appimage according to https://github.com/AppImageCommunity/pkg2appimage/blob/master/excludelist
// The only way to do that is rollback to gtk 4.8 and rewrite neccesary parts of the program.
#![windows_subsystem = "windows"] #![windows_subsystem = "windows"]
mod db; mod db;

View File

@ -4,7 +4,7 @@ use std::fs;
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use std::io::ErrorKind; use std::io::ErrorKind;
use std::path::{Path, PathBuf}; use std::path::Path;
use std::rc::Rc; use std::rc::Rc;
use crate::card::Card; use crate::card::Card;
@ -12,16 +12,14 @@ use crate::db::*;
use crate::ui::cards::new::*; use crate::ui::cards::new::*;
use crate::widgets::card_entry::CardEntry; use crate::widgets::card_entry::CardEntry;
use glib::subclass::InitializingObject; use glib::subclass::InitializingObject;
use gtk::ffi::GtkFileChooserDialog;
use gtk::gio::ListStore; use gtk::gio::ListStore;
use gtk::glib::closure::IntoClosureReturnValue;
use gtk::glib::object::ObjectExt; use gtk::glib::object::ObjectExt;
use gtk::glib::{clone, closure_local, Object}; use gtk::glib::{clone, closure_local, Object};
use gtk::prelude::WidgetExt; use gtk::prelude::WidgetExt;
use gtk::prelude::*; use gtk::prelude::*;
use gtk::subclass::prelude::*; use gtk::subclass::prelude::*;
use gtk::{ use gtk::{
gio, glib, ApplicationWindow, Button, CompositeTemplate, FileChooserAction, ListView, gio, glib, Button, CompositeTemplate, FileChooserAction, ListView,
NoSelection, ResponseType, ScrolledWindow, SearchEntry, Switch, Window, NoSelection, ResponseType, ScrolledWindow, SearchEntry, Switch, Window,
}; };
use gtk::{ListItem, SignalListItemFactory}; use gtk::{ListItem, SignalListItemFactory};
@ -65,9 +63,9 @@ impl ObjectImpl for MemoryCardsEditScene {
self.parent_constructed(); self.parent_constructed();
let binding = self.obj(); let binding = self.obj();
glib::spawn_future_local(clone!(@weak binding => async move { // glib::spawn_future_local(clone!(@weak binding => async move {
binding.imp().query_cards(None); // binding.imp().query_cards(None);
})); // }));
self.add_button.connect_closure("clicked", self.add_button.connect_closure("clicked",
false, false,