diff options
21 files changed, 0 insertions, 1020 deletions
@@ -207,29 +207,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] -name = "cairo-rs" -version = "0.20.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7fa699e1d7ae691001a811dda5ef0e3e42e1d4119b26426352989df9e94e3e6" -dependencies = [ - "bitflags", - "cairo-sys-rs", - "glib", - "libc", -] - -[[package]] -name = "cairo-sys-rs" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428290f914b9b86089f60f5d8a9f6e440508e1bcff23b25afd51502b0a2da88f" -dependencies = [ - "glib-sys", - "libc", - "system-deps", -] - -[[package]] name = "cc" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -239,16 +216,6 @@ dependencies = [ ] [[package]] -name = "cfg-expr" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d4ba6e40bd1184518716a6e1a781bf9160e286d219ccdb8ab2612e74cfe4789" -dependencies = [ - "smallvec", - "target-lexicon", -] - -[[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -491,16 +458,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] -name = "field-offset" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" -dependencies = [ - "memoffset", - "rustc_version", -] - -[[package]] name = "figment" version = "0.10.19" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -551,34 +508,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] name = "futures-io" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] name = "futures-sink" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -599,7 +534,6 @@ dependencies = [ "futures-channel", "futures-core", "futures-io", - "futures-macro", "futures-sink", "futures-task", "memchr", @@ -609,63 +543,6 @@ dependencies = [ ] [[package]] -name = "gdk-pixbuf" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4c29071a9e92337d8270a85cb0510cda4ac478be26d09ad027cc1d081911b19" -dependencies = [ - "gdk-pixbuf-sys", - "gio", - "glib", - "libc", -] - -[[package]] -name = "gdk-pixbuf-sys" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687343b059b91df5f3fbd87b4307038fa9e647fcc0461d0d3f93e94fee20bf3d" -dependencies = [ - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "gdk4" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75933c4a86e8a2428814d367e22c733304fdfabc87f415750fd2f55409b6ee48" -dependencies = [ - "cairo-rs", - "gdk-pixbuf", - "gdk4-sys", - "gio", - "glib", - "libc", - "pango", -] - -[[package]] -name = "gdk4-sys" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20af0656d543aed3e57ac4120ef76d091c3c42ab1e0507a8febde7cd005640e2" -dependencies = [ - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "pkg-config", - "system-deps", -] - -[[package]] name = "generator" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -696,212 +573,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] -name = "gio" -version = "0.20.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8826d2a9ad56ce3de1f04bea0bea0daff6f5f1c913cc834996cfea1f9401361c" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "gio-sys", - "glib", - "libc", - "pin-project-lite", - "smallvec", -] - -[[package]] -name = "gio-sys" -version = "0.20.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b965df6f3534c84816b5c1a7d9efcb5671ae790822de5abe8e299797039529bc" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", - "windows-sys 0.52.0", -] - -[[package]] -name = "glib" -version = "0.20.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86bd3e4ee7998ab5a135d900db56930cc19ad16681adf245daff54f618b9d5e1" -dependencies = [ - "bitflags", - "futures-channel", - "futures-core", - "futures-executor", - "futures-task", - "futures-util", - "gio-sys", - "glib-macros", - "glib-sys", - "gobject-sys", - "libc", - "memchr", - "smallvec", -] - -[[package]] -name = "glib-build-tools" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7029c2651d9b5d5a3eea93ec8a1995665c6d3a69ce9bf6042ad9064d134736d8" -dependencies = [ - "gio", -] - -[[package]] -name = "glib-macros" -version = "0.20.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d21ca27acfc3e91da70456edde144b4ac7c36f78ee77b10189b3eb4901c156" -dependencies = [ - "heck", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "glib-sys" -version = "0.20.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d0b1827e8621fc42c0dfb228e5d57ff6a71f9699e666ece8113f979ad87c2de" -dependencies = [ - "libc", - "system-deps", -] - -[[package]] name = "glob" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] -name = "gobject-sys" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c674d2ff8478cf0ec29d2be730ed779fef54415a2fb4b565c52def62696462" -dependencies = [ - "glib-sys", - "libc", - "system-deps", -] - -[[package]] -name = "graphene-rs" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f53144c7fe78292705ff23935f1477d511366fb2f73c43d63b37be89076d2fe" -dependencies = [ - "glib", - "graphene-sys", - "libc", -] - -[[package]] -name = "graphene-sys" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e741797dc5081e59877a4d72c442c72d61efdd99161a0b1c1b29b6b988934b99" -dependencies = [ - "glib-sys", - "libc", - "pkg-config", - "system-deps", -] - -[[package]] -name = "gsk4" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b36933c1e79df378aa6e606576e680358a9582ed8c16f33e94899636e6fa6df6" -dependencies = [ - "cairo-rs", - "gdk4", - "glib", - "graphene-rs", - "gsk4-sys", - "libc", - "pango", -] - -[[package]] -name = "gsk4-sys" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0877a9d485bd9ba5262b0c9bce39e63750e525e3aebeb359d271ca1f0e111f1d" -dependencies = [ - "cairo-sys-rs", - "gdk4-sys", - "glib-sys", - "gobject-sys", - "graphene-sys", - "libc", - "pango-sys", - "system-deps", -] - -[[package]] -name = "gtk4" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9376d14d7e33486c54823a42bef296e882b9f25cb4c52b52f4d1d57bbadb5b6d" -dependencies = [ - "cairo-rs", - "field-offset", - "futures-channel", - "gdk-pixbuf", - "gdk4", - "gio", - "glib", - "graphene-rs", - "gsk4", - "gtk4-macros", - "gtk4-sys", - "libc", - "pango", -] - -[[package]] -name = "gtk4-macros" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c518d5dd41c57385c7cd30af52e261820c897fc1144e558bb88c303d048ae2" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "gtk4-sys" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e653b0a9001ba9be1ffddb9373bfe9a111f688222f5aeee2841481300d91b55a" -dependencies = [ - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gdk4-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "graphene-sys", - "gsk4-sys", - "libc", - "pango-sys", - "system-deps", -] - -[[package]] name = "h2" version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1170,15 +847,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - -[[package]] name = "migrations_internals" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1302,30 +970,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] -name = "pango" -version = "0.20.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e34e7ca2c52e3933d7e5251409a82b83725fa9d6d48fbdaacec056b3a0554a" -dependencies = [ - "gio", - "glib", - "libc", - "pango-sys", -] - -[[package]] -name = "pango-sys" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84fd65917bf12f06544ae2bbc200abf9fc0a513a5a88a0fa81013893aef2b838" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] name = "parking_lot" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1411,15 +1055,6 @@ dependencies = [ ] [[package]] -name = "proc-macro-crate" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" -dependencies = [ - "toml_edit", -] - -[[package]] name = "proc-macro2" version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1678,15 +1313,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - -[[package]] name = "rustix" version = "0.38.40" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1745,14 +1371,6 @@ dependencies = [ ] [[package]] -name = "schist_gtk4_gui" -version = "0.1.0" -dependencies = [ - "glib-build-tools", - "gtk4", -] - -[[package]] name = "schist_models" version = "0.1.0" dependencies = [ @@ -1806,12 +1424,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "semver" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" - -[[package]] name = "serde" version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1943,25 +1555,6 @@ dependencies = [ ] [[package]] -name = "system-deps" -version = "7.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d23aaf9f331227789a99e8de4c91bf46703add012bdfd45fdecdfb2975a005" -dependencies = [ - "cfg-expr", - "heck", - "pkg-config", - "toml", - "version-compare", -] - -[[package]] -name = "target-lexicon" -version = "0.12.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" - -[[package]] name = "tempfile" version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2218,12 +1811,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] -name = "version-compare" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" - -[[package]] name = "version_check" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -7,7 +7,6 @@ members = [ "actualbudget_to_schist_transformer", "schist_backend", "schist_fakes", - "schist_gtk4_gui", "schist_models", "schist_queries", "schist_schema", diff --git a/schist_gtk4_gui/Cargo.toml b/schist_gtk4_gui/Cargo.toml deleted file mode 100644 index a5884cb..0000000 --- a/schist_gtk4_gui/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -name = "schist_gtk4_gui" -version = "0.1.0" -edition = "2021" - -[dependencies] -gtk = { version = "0.9.4", package = "gtk4", features = ["v4_8"] } - -[build-dependencies] -glib-build-tools = "0.20.0" diff --git a/schist_gtk4_gui/build.rs b/schist_gtk4_gui/build.rs deleted file mode 100644 index 6c2f68b..0000000 --- a/schist_gtk4_gui/build.rs +++ /dev/null @@ -1,7 +0,0 @@ -fn main() { - glib_build_tools::compile_resources( - &["resources"], - "resources/resources.gresource.xml", - "resources.gresource", - ); -} diff --git a/schist_gtk4_gui/resources/css/styles.css b/schist_gtk4_gui/resources/css/styles.css deleted file mode 100644 index b42e2df..0000000 --- a/schist_gtk4_gui/resources/css/styles.css +++ /dev/null @@ -1 +0,0 @@ -@import 'window.css'; diff --git a/schist_gtk4_gui/resources/css/window.css b/schist_gtk4_gui/resources/css/window.css deleted file mode 100644 index c07e199..0000000 --- a/schist_gtk4_gui/resources/css/window.css +++ /dev/null @@ -1,4 +0,0 @@ -.window { - background-color: #011120; - color: #e1f9ff; -} diff --git a/schist_gtk4_gui/resources/resources.gresource.xml b/schist_gtk4_gui/resources/resources.gresource.xml deleted file mode 100644 index c4b9e10..0000000 --- a/schist_gtk4_gui/resources/resources.gresource.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<gresources> - <gresource prefix="/net/joeac/schist/"> - <file compressed="true" preprocess="xml-stripblanks">ui/balances_histogram.ui</file> - <file compressed="true" preprocess="xml-stripblanks">ui/balances_view.ui</file> - <file compressed="true" preprocess="xml-stripblanks">ui/categories_view.ui</file> - <file compressed="true" preprocess="xml-stripblanks">ui/category_transfers_view.ui</file> - <file compressed="true" preprocess="xml-stripblanks">ui/transactions_view.ui</file> - <file compressed="true" preprocess="xml-stripblanks">ui/window.ui</file> - <file compressed="true">css/styles.css</file> - <file compressed="true">css/window.css</file> - </gresource> -</gresources> diff --git a/schist_gtk4_gui/resources/ui/balances_histogram.ui b/schist_gtk4_gui/resources/ui/balances_histogram.ui deleted file mode 100644 index b6306b9..0000000 --- a/schist_gtk4_gui/resources/ui/balances_histogram.ui +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<interface> - <template class="SchistBalancesHistogram" parent="GtkBox"> - <child> - <object class="GtkListBox" id="balances_list"> - <child> - <object class="GtkListBoxRow"> - <child> - <object class="GtkLabel"> - <property name="label">I am a balance</property> - </object> - </child> - </object> - </child> - - <child> - <object class="GtkListBoxRow"> - <child> - <object class="GtkLabel"> - <property name="label">I am another balance</property> - </object> - </child> - </object> - </child> - </object> - </child> - </template> -</interface> diff --git a/schist_gtk4_gui/resources/ui/balances_view.ui b/schist_gtk4_gui/resources/ui/balances_view.ui deleted file mode 100644 index a8f7d7e..0000000 --- a/schist_gtk4_gui/resources/ui/balances_view.ui +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<interface> - <template class="SchistBalancesView" parent="GtkBox"> - <child type="sidebar"> - <object class="GtkStackSidebar"> - <child> - <object class="GtkStackSwitcher"> - <property name="stack">balances_stack</property> - </object> - </child> - </object> - </child> - - <child> - <object class="GtkStack" id="balances_stack"> - <child> - <object class="GtkStackPage"> - <property name="name">overview</property> - <property name="title">Overview</property> - <property name="child"> - <object class="SchistBalancesHistogram" id="balances_histogram" /> - </property> - </object> - </child> - </object> - </child> - </template> -</interface> diff --git a/schist_gtk4_gui/resources/ui/categories_view.ui b/schist_gtk4_gui/resources/ui/categories_view.ui deleted file mode 100644 index 197fcb3..0000000 --- a/schist_gtk4_gui/resources/ui/categories_view.ui +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<interface> - <template class="SchistCategoriesView" parent="GtkBox"> - <child> - <object class="GtkLabel"> - <property name="label">Hello, categories!</property> - </object> - </child> - </template> -</interface> diff --git a/schist_gtk4_gui/resources/ui/category_transfers_view.ui b/schist_gtk4_gui/resources/ui/category_transfers_view.ui deleted file mode 100644 index 5a31335..0000000 --- a/schist_gtk4_gui/resources/ui/category_transfers_view.ui +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<interface> - <template class="SchistCategoryTransfersView" parent="GtkBox"> - <child> - <object class="GtkLabel"> - <property name="label">Hello, category transfers!</property> - </object> - </child> - </template> -</interface> diff --git a/schist_gtk4_gui/resources/ui/transactions_view.ui b/schist_gtk4_gui/resources/ui/transactions_view.ui deleted file mode 100644 index ca864f2..0000000 --- a/schist_gtk4_gui/resources/ui/transactions_view.ui +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<interface> - <template class="SchistTransactionsView" parent="GtkBox"> - <child> - <object class="GtkLabel"> - <property name="label">Hello, transactions!</property> - </object> - </child> - </template> -</interface> diff --git a/schist_gtk4_gui/resources/ui/window.ui b/schist_gtk4_gui/resources/ui/window.ui deleted file mode 100644 index 54ce2a5..0000000 --- a/schist_gtk4_gui/resources/ui/window.ui +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<interface> - <template class="SchistWindow" parent="GtkApplicationWindow"> - <property name="title">schist</property> - <property name="default-height">560</property> - <property name="default-width">1080</property> - <child type="titlebar"> - <object class="GtkHeaderBar" id="header_bar"> - <property name="title-widget"> - <object class="GtkStackSwitcher"> - <property name="stack">view_stack</property> - </object> - </property> - </object> - </child> - - <child> - <object class="GtkStack" id="view_stack"> - <child> - <object class="GtkStackPage"> - <property name="name">categories</property> - <property name="title">Categories</property> - <property name="child"> - <object - class="SchistCategoriesView" - id="categories_view" - /> - </property> - </object> - </child> - - <child> - <object class="GtkStackPage"> - <property name="name">balances</property> - <property name="title">Balances</property> - <property name="child"> - <object - class="SchistBalancesView" - id="balances_view" - /> - </property> - </object> - </child> - - <child> - <object class="GtkStackPage"> - <property name="name">transactions</property> - <property name="title">Transactions</property> - <property name="child"> - <object - class="SchistTransactionsView" - id="transactions_view" - /> - </property> - </object> - </child> - - <child> - <object class="GtkStackPage"> - <property name="name">category_transfers</property> - <property name="title">Category Transfers</property> - <property name="child"> - <object - class="SchistCategoryTransfersView" - id="category_transfers_view" - /> - </property> - </object> - </child> - </object> - </child> - </template> -</interface> diff --git a/schist_gtk4_gui/src/balances_histogram.rs b/schist_gtk4_gui/src/balances_histogram.rs deleted file mode 100644 index d258ae4..0000000 --- a/schist_gtk4_gui/src/balances_histogram.rs +++ /dev/null @@ -1,59 +0,0 @@ -use gtk::{ - glib::{ - self, - subclass::{ - object::{ObjectImpl, ObjectImplExt}, - types::ObjectSubclass, - InitializingObject, - }, - Object, - }, - subclass::{box_::BoxImpl, widget::{ - CompositeTemplateClass, CompositeTemplateInitializingExt, WidgetClassExt, WidgetImpl, - }}, - TemplateChild, -}; - -glib::wrapper! { - pub struct SchistBalancesHistogram(ObjectSubclass<SchistBalancesHistogramImpl>) - @extends gtk::Box, gtk::Widget, - @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget; -} - -impl SchistBalancesHistogram { - pub fn new() -> Self { - Object::builder().build() - } -} - -#[derive(gtk::CompositeTemplate, Default)] -#[template(resource = "/net/joeac/schist/ui/balances_histogram.ui")] -pub struct SchistBalancesHistogramImpl { - #[template_child] - balances_list: TemplateChild<gtk::ListBox>, -} - -#[glib::object_subclass] -impl ObjectSubclass for SchistBalancesHistogramImpl { - const NAME: &'static str = "SchistBalancesHistogram"; - type Type = SchistBalancesHistogram; - type ParentType = gtk::Box; - - fn class_init(klass: &mut Self::Class) { - klass.bind_template(); - } - - fn instance_init(obj: &InitializingObject<Self>) { - obj.init_template(); - } -} - -impl ObjectImpl for SchistBalancesHistogramImpl { - fn constructed(&self) { - self.parent_constructed(); - } -} - -impl WidgetImpl for SchistBalancesHistogramImpl {} - -impl BoxImpl for SchistBalancesHistogramImpl {} diff --git a/schist_gtk4_gui/src/balances_view.rs b/schist_gtk4_gui/src/balances_view.rs deleted file mode 100644 index 28dfba1..0000000 --- a/schist_gtk4_gui/src/balances_view.rs +++ /dev/null @@ -1,64 +0,0 @@ -use gtk::{ - glib::{ - self, - subclass::{ - object::{ObjectImpl, ObjectImplExt}, - types::ObjectSubclass, - InitializingObject, - }, - Object, - }, - subclass::{ - box_::BoxImpl, - widget::{ - CompositeTemplateClass, CompositeTemplateInitializingExt, WidgetClassExt, WidgetImpl, - }, - }, - TemplateChild, -}; - -use crate::balances_histogram::SchistBalancesHistogram; - -glib::wrapper! { - pub struct SchistBalancesView(ObjectSubclass<SchistBalancesViewImpl>) - @extends gtk::Box, gtk::Widget, - @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget, gtk::Orientable; -} - -impl SchistBalancesView { - pub fn new() -> Self { - Object::builder().build() - } -} - -#[derive(gtk::CompositeTemplate, Default)] -#[template(resource = "/net/joeac/schist/ui/balances_view.ui")] -pub struct SchistBalancesViewImpl { - #[template_child] - balances_histogram: TemplateChild<SchistBalancesHistogram>, -} - -#[glib::object_subclass] -impl ObjectSubclass for SchistBalancesViewImpl { - const NAME: &'static str = "SchistBalancesView"; - type Type = SchistBalancesView; - type ParentType = gtk::Box; - - fn class_init(klass: &mut Self::Class) { - klass.bind_template(); - } - - fn instance_init(obj: &InitializingObject<Self>) { - obj.init_template(); - } -} - -impl ObjectImpl for SchistBalancesViewImpl { - fn constructed(&self) { - self.parent_constructed(); - } -} - -impl WidgetImpl for SchistBalancesViewImpl {} - -impl BoxImpl for SchistBalancesViewImpl {} diff --git a/schist_gtk4_gui/src/categories_view.rs b/schist_gtk4_gui/src/categories_view.rs deleted file mode 100644 index efad621..0000000 --- a/schist_gtk4_gui/src/categories_view.rs +++ /dev/null @@ -1,56 +0,0 @@ -use gtk::{ - glib::{ - self, - subclass::{ - object::{ObjectImpl, ObjectImplExt}, - types::ObjectSubclass, - InitializingObject, - }, - Object, - }, - subclass::{ - box_::BoxImpl, - widget::{CompositeTemplateClass, CompositeTemplateInitializingExt, WidgetImpl}, - }, -}; - -glib::wrapper! { - pub struct SchistCategoriesView(ObjectSubclass<SchistCategoriesViewImpl>) - @extends gtk::Box, gtk::Widget, - @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget, gtk::Orientable; -} - -impl SchistCategoriesView { - pub fn new() -> Self { - Object::builder().build() - } -} - -#[derive(gtk::CompositeTemplate, Default)] -#[template(resource = "/net/joeac/schist/ui/categories_view.ui")] -pub struct SchistCategoriesViewImpl {} - -#[glib::object_subclass] -impl ObjectSubclass for SchistCategoriesViewImpl { - const NAME: &'static str = "SchistCategoriesView"; - type Type = SchistCategoriesView; - type ParentType = gtk::Box; - - fn class_init(klass: &mut Self::Class) { - klass.bind_template(); - } - - fn instance_init(obj: &InitializingObject<Self>) { - obj.init_template(); - } -} - -impl ObjectImpl for SchistCategoriesViewImpl { - fn constructed(&self) { - self.parent_constructed(); - } -} - -impl WidgetImpl for SchistCategoriesViewImpl {} - -impl BoxImpl for SchistCategoriesViewImpl {} diff --git a/schist_gtk4_gui/src/category_transfers_view.rs b/schist_gtk4_gui/src/category_transfers_view.rs deleted file mode 100644 index 286a20c..0000000 --- a/schist_gtk4_gui/src/category_transfers_view.rs +++ /dev/null @@ -1,56 +0,0 @@ -use gtk::{ - glib::{ - self, - subclass::{ - object::{ObjectImpl, ObjectImplExt}, - types::ObjectSubclass, - InitializingObject, - }, - Object, - }, - subclass::{ - box_::BoxImpl, - widget::{CompositeTemplateClass, CompositeTemplateInitializingExt, WidgetImpl}, - }, -}; - -glib::wrapper! { - pub struct SchistCategoryTransfersView(ObjectSubclass<SchistCategoryTransfersViewImpl>) - @extends gtk::Box, gtk::Widget, - @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget, gtk::Orientable; -} - -impl SchistCategoryTransfersView { - pub fn new() -> Self { - Object::builder().build() - } -} - -#[derive(gtk::CompositeTemplate, Default)] -#[template(resource = "/net/joeac/schist/ui/category_transfers_view.ui")] -pub struct SchistCategoryTransfersViewImpl {} - -#[glib::object_subclass] -impl ObjectSubclass for SchistCategoryTransfersViewImpl { - const NAME: &'static str = "SchistCategoryTransfersView"; - type Type = SchistCategoryTransfersView; - type ParentType = gtk::Box; - - fn class_init(klass: &mut Self::Class) { - klass.bind_template(); - } - - fn instance_init(obj: &InitializingObject<Self>) { - obj.init_template(); - } -} - -impl ObjectImpl for SchistCategoryTransfersViewImpl { - fn constructed(&self) { - self.parent_constructed(); - } -} - -impl WidgetImpl for SchistCategoryTransfersViewImpl {} - -impl BoxImpl for SchistCategoryTransfersViewImpl {} diff --git a/schist_gtk4_gui/src/lib.rs b/schist_gtk4_gui/src/lib.rs deleted file mode 100644 index d418ba0..0000000 --- a/schist_gtk4_gui/src/lib.rs +++ /dev/null @@ -1,36 +0,0 @@ -mod balances_histogram; -mod balances_view; -mod categories_view; -mod category_transfers_view; -mod transactions_view; -mod window; - -use gtk::{gdk::Display, gio, glib, prelude::*, Application, CssProvider}; - -const APP_ID: &str = "net.joeac.schist"; - -pub fn run() -> glib::ExitCode { - gio::resources_register_include!("resources.gresource") - .expect("failed to register resources"); - - let app = Application::builder().application_id(APP_ID).build(); - app.connect_startup(|_| load_css()); - app.connect_activate(build_window); - app.run() -} - -fn build_window(app: &Application) { - let window = window::SchistWindow::new(app); - window.present() -} - -fn load_css() { - let css_provider = CssProvider::new(); - css_provider.load_from_resource("/net/joeac/schist/css/styles.css"); - - gtk::style_context_add_provider_for_display( - &Display::default().expect("failed to connect to a display"), - &css_provider, - gtk::STYLE_PROVIDER_PRIORITY_APPLICATION, - ); -} diff --git a/schist_gtk4_gui/src/main.rs b/schist_gtk4_gui/src/main.rs deleted file mode 100644 index dc9cfb8..0000000 --- a/schist_gtk4_gui/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() -> gtk::glib::ExitCode { - schist_gtk4_gui::run() -} diff --git a/schist_gtk4_gui/src/transactions_view.rs b/schist_gtk4_gui/src/transactions_view.rs deleted file mode 100644 index 39a2a98..0000000 --- a/schist_gtk4_gui/src/transactions_view.rs +++ /dev/null @@ -1,56 +0,0 @@ -use gtk::{ - glib::{ - self, - subclass::{ - object::{ObjectImpl, ObjectImplExt}, - types::ObjectSubclass, - InitializingObject, - }, - Object, - }, - subclass::{ - box_::BoxImpl, - widget::{CompositeTemplateClass, CompositeTemplateInitializingExt, WidgetImpl}, - }, -}; - -glib::wrapper! { - pub struct SchistTransactionsView(ObjectSubclass<SchistTransactionsViewImpl>) - @extends gtk::Box, gtk::Widget, - @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget, gtk::Orientable; -} - -impl SchistTransactionsView { - pub fn new() -> Self { - Object::builder().build() - } -} - -#[derive(gtk::CompositeTemplate, Default)] -#[template(resource = "/net/joeac/schist/ui/transactions_view.ui")] -pub struct SchistTransactionsViewImpl {} - -#[glib::object_subclass] -impl ObjectSubclass for SchistTransactionsViewImpl { - const NAME: &'static str = "SchistTransactionsView"; - type Type = SchistTransactionsView; - type ParentType = gtk::Box; - - fn class_init(klass: &mut Self::Class) { - klass.bind_template(); - } - - fn instance_init(obj: &InitializingObject<Self>) { - obj.init_template(); - } -} - -impl ObjectImpl for SchistTransactionsViewImpl { - fn constructed(&self) { - self.parent_constructed(); - } -} - -impl WidgetImpl for SchistTransactionsViewImpl {} - -impl BoxImpl for SchistTransactionsViewImpl {} diff --git a/schist_gtk4_gui/src/window.rs b/schist_gtk4_gui/src/window.rs deleted file mode 100644 index b3cea35..0000000 --- a/schist_gtk4_gui/src/window.rs +++ /dev/null @@ -1,82 +0,0 @@ -use gtk::{ - gio, - glib::{ - self, - object::IsA, - subclass::{ - object::{ObjectImpl, ObjectImplExt}, - types::ObjectSubclass, - InitializingObject, - }, - }, - subclass::{ - application_window::ApplicationWindowImpl, - widget::{ - CompositeTemplateClass, CompositeTemplateInitializingExt, WidgetClassExt, WidgetImpl, - }, - window::WindowImpl, - }, - TemplateChild, -}; - -use crate::{ - balances_view::SchistBalancesView, categories_view::SchistCategoriesView, - category_transfers_view::SchistCategoryTransfersView, - transactions_view::SchistTransactionsView, -}; - -gtk::glib::wrapper! { - pub struct SchistWindow(ObjectSubclass<SchistWindowSubclass>) - @extends gtk::ApplicationWindow, gtk::Window, gtk::Widget, - @implements gio::ActionGroup, gio::ActionMap, gtk::Accessible, gtk::Buildable, - gtk::ConstraintTarget, gtk::Native, gtk::Root, gtk::ShortcutManager; -} - -impl SchistWindow { - pub fn new<A: IsA<gtk::Application>>(app: &A) -> Self { - glib::Object::builder().property("application", app).build() - } -} - -#[derive(gtk::CompositeTemplate, Default)] -#[template(resource = "/net/joeac/schist/ui/window.ui")] -pub struct SchistWindowSubclass { - #[template_child] - pub balances_view: TemplateChild<SchistBalancesView>, - - #[template_child] - pub categories_view: TemplateChild<SchistCategoriesView>, - - #[template_child] - pub category_transfers_view: TemplateChild<SchistCategoryTransfersView>, - - #[template_child] - pub transactions_view: TemplateChild<SchistTransactionsView>, -} - -#[glib::object_subclass] -impl ObjectSubclass for SchistWindowSubclass { - const NAME: &'static str = "SchistWindow"; - type Type = SchistWindow; - type ParentType = gtk::ApplicationWindow; - - fn class_init(klass: &mut Self::Class) { - klass.bind_template(); - } - - fn instance_init(obj: &InitializingObject<Self>) { - obj.init_template(); - } -} - -impl ObjectImpl for SchistWindowSubclass { - fn constructed(&self) { - self.parent_constructed(); - } -} - -impl WidgetImpl for SchistWindowSubclass {} - -impl WindowImpl for SchistWindowSubclass {} - -impl ApplicationWindowImpl for SchistWindowSubclass {} |
