From ebe6cd42be36ee3de3a1b7b49dcca44e6d33713d Mon Sep 17 00:00:00 2001 From: leca Date: Sat, 11 May 2024 13:45:32 +0300 Subject: [PATCH] some improvements --- src/main.rs | 3 --- src/ui/cards/edit/imp.rs | 12 +++++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/main.rs b/src/main.rs index 68bafee..66a9c35 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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"] mod db; diff --git a/src/ui/cards/edit/imp.rs b/src/ui/cards/edit/imp.rs index baf6037..15a5b34 100644 --- a/src/ui/cards/edit/imp.rs +++ b/src/ui/cards/edit/imp.rs @@ -4,7 +4,7 @@ use std::fs; use std::sync::{Arc, Mutex}; use std::io::ErrorKind; -use std::path::{Path, PathBuf}; +use std::path::Path; use std::rc::Rc; use crate::card::Card; @@ -12,16 +12,14 @@ use crate::db::*; use crate::ui::cards::new::*; use crate::widgets::card_entry::CardEntry; use glib::subclass::InitializingObject; -use gtk::ffi::GtkFileChooserDialog; use gtk::gio::ListStore; -use gtk::glib::closure::IntoClosureReturnValue; use gtk::glib::object::ObjectExt; use gtk::glib::{clone, closure_local, Object}; use gtk::prelude::WidgetExt; use gtk::prelude::*; use gtk::subclass::prelude::*; use gtk::{ - gio, glib, ApplicationWindow, Button, CompositeTemplate, FileChooserAction, ListView, + gio, glib, Button, CompositeTemplate, FileChooserAction, ListView, NoSelection, ResponseType, ScrolledWindow, SearchEntry, Switch, Window, }; use gtk::{ListItem, SignalListItemFactory}; @@ -65,9 +63,9 @@ impl ObjectImpl for MemoryCardsEditScene { self.parent_constructed(); let binding = self.obj(); - glib::spawn_future_local(clone!(@weak binding => async move { - binding.imp().query_cards(None); - })); + // glib::spawn_future_local(clone!(@weak binding => async move { + // binding.imp().query_cards(None); + // })); self.add_button.connect_closure("clicked", false,