8 Commits

Author SHA1 Message Date
f3511ec71a fix button sizing 2022-11-08 10:00:31 +00:00
2de60286b5 update interface.ui for LibHandy 1.0+
new properties are shown here:
- <https://gnome.pages.gitlab.gnome.org/libhandy/doc/1.4/HdyKeypad.html>
2022-11-08 08:22:45 +00:00
bd2138f630 nix: update libhandy_0 -> libhandy (i.e. libhandy 1) 2022-11-07 22:37:19 -08:00
baf9aa4c2d update libhandy 0.5 -> 0.9, gdk 0.12 -> 0.15, gtk 0.8 -> 0.15
these are the latest versions, and notably libhandy 0.9 rust bindings
are compatible with the libhandy1.so runtime, whereas libhand 0.5 was not.
2022-11-07 22:27:14 -08:00
3c74003c19 cargo update
```
    Adding autocfg v1.1.0
    Updating bitflags v1.2.1 -> v1.3.2
    Updating cc v1.0.52 -> v1.0.74
    Updating futures-channel v0.3.4 -> v0.3.25
    Updating futures-core v0.3.4 -> v0.3.25
    Updating futures-executor v0.3.4 -> v0.3.25
    Updating futures-io v0.3.4 -> v0.3.25
    Updating futures-macro v0.3.4 -> v0.3.25
    Updating futures-task v0.3.4 -> v0.3.25
    Updating futures-util v0.3.4 -> v0.3.25
    Updating libc v0.2.69 -> v0.2.137
    Updating once_cell v1.3.1 -> v1.16.0
      Adding pin-project-lite v0.2.9
    Updating pkg-config v0.3.17 -> v0.3.26
    Removing proc-macro-hack v0.5.15
    Removing proc-macro-nested v0.1.4
    Updating proc-macro2 v1.0.10 -> v1.0.47
    Updating quote v1.0.3 -> v1.0.21
    Updating slab v0.4.2 -> v0.4.7
    Updating syn v1.0.17 -> v1.0.103
      Adding unicode-ident v1.0.5
    Removing unicode-xid v0.2.0
```
2022-11-07 05:09:55 -08:00
99286eeca6 create a flake.nix for nix usage 2022-11-07 04:56:19 -08:00
raatty
8c8d6dfce6 Update 'Cargo.toml' 2022-10-30 11:09:54 +13:00
Raatty
e3872c0a69 update lightdm-rs urls 2022-10-30 11:03:43 +13:00
7 changed files with 571 additions and 193 deletions

617
Cargo.lock generated
View File

@@ -1,88 +1,112 @@
# This file is automatically @generated by Cargo. # This file is automatically @generated by Cargo.
# It is not intended for manual editing. # It is not intended for manual editing.
version = 3
[[package]]
name = "anyhow"
version = "1.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6"
[[package]] [[package]]
name = "atk" name = "atk"
version = "0.8.0" version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "444daefa55f229af145ea58d77efd23725024ee1f6f3102743709aa6b18c663e" checksum = "2c3d816ce6f0e2909a96830d6911c2aff044370b1ef92d7f267b43bae5addedd"
dependencies = [ dependencies = [
"atk-sys", "atk-sys",
"bitflags", "bitflags",
"glib", "glib 0.15.12",
"glib-sys",
"gobject-sys",
"libc", "libc",
] ]
[[package]] [[package]]
name = "atk-sys" name = "atk-sys"
version = "0.9.1" version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e552c1776737a4c80110d06b36d099f47c727335f9aaa5d942a72b6863a8ec6f" checksum = "58aeb089fb698e06db8089971c7ee317ab9644bade33383f63631437b03aafb6"
dependencies = [ dependencies = [
"glib-sys", "glib-sys 0.15.10",
"gobject-sys", "gobject-sys 0.15.10",
"libc", "libc",
"pkg-config", "system-deps",
] ]
[[package]] [[package]]
name = "bitflags" name = "autocfg"
version = "1.2.1" version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]] [[package]]
name = "cairo-rs" name = "cairo-rs"
version = "0.8.1" version = "0.15.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "157049ba9618aa3a61c39d5d785102c04d3b1f40632a706c621a9aedc21e6084" checksum = "c76ee391b03d35510d9fa917357c7f1855bd9a6659c95a1b392e33f49b3369bc"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"cairo-sys-rs", "cairo-sys-rs",
"glib", "glib 0.15.12",
"glib-sys",
"gobject-sys",
"libc", "libc",
"thiserror",
] ]
[[package]] [[package]]
name = "cairo-sys-rs" name = "cairo-sys-rs"
version = "0.9.2" version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff65ba02cac715be836f63429ab00a767d48336efc5497c5637afb53b4f14d63" checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8"
dependencies = [ dependencies = [
"glib-sys", "glib-sys 0.15.10",
"libc", "libc",
"pkg-config", "system-deps",
] ]
[[package]] [[package]]
name = "cc" name = "cfg-expr"
version = "1.0.52" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3d87b23d6a92cd03af510a5ade527033f6aa6fa92161e2d5863a907d4c5e31d" checksum = "b0357a6402b295ca3a86bc148e84df46c02e41f41fef186bda662557ef6328aa"
dependencies = [
"smallvec",
]
[[package]]
name = "field-offset"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e1c54951450cbd39f3dbcf1005ac413b49487dabf18a720ad2383eccfeffb92"
dependencies = [
"memoffset",
"rustc_version",
]
[[package]] [[package]]
name = "futures-channel" name = "futures-channel"
version = "0.3.4" version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed"
dependencies = [ dependencies = [
"futures-core", "futures-core",
] ]
[[package]] [[package]]
name = "futures-core" name = "futures-core"
version = "0.3.4" version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac"
[[package]] [[package]]
name = "futures-executor" name = "futures-executor"
version = "0.3.4" version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba" checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-task", "futures-task",
@@ -91,17 +115,16 @@ dependencies = [
[[package]] [[package]]
name = "futures-io" name = "futures-io"
version = "0.3.4" version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb"
[[package]] [[package]]
name = "futures-macro" name = "futures-macro"
version = "0.3.4" version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d"
dependencies = [ dependencies = [
"proc-macro-hack",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn", "syn",
@@ -109,87 +132,81 @@ dependencies = [
[[package]] [[package]]
name = "futures-task" name = "futures-task"
version = "0.3.4" version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea"
[[package]] [[package]]
name = "futures-util" name = "futures-util"
version = "0.3.4" version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-macro", "futures-macro",
"futures-task", "futures-task",
"pin-project-lite",
"pin-utils", "pin-utils",
"proc-macro-hack",
"proc-macro-nested",
"slab", "slab",
] ]
[[package]] [[package]]
name = "gdk" name = "gdk"
version = "0.12.1" version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbe5e8772fc0865c52460cdd7a59d7d47700f44d9809d1dd00eecceb769a7589" checksum = "a6e05c1f572ab0e1f15be94217f0dc29088c248b14f792a5ff0af0d84bcda9e8"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"cairo-rs", "cairo-rs",
"cairo-sys-rs",
"gdk-pixbuf", "gdk-pixbuf",
"gdk-sys", "gdk-sys",
"gio", "gio 0.15.12",
"gio-sys", "glib 0.15.12",
"glib",
"glib-sys",
"gobject-sys",
"libc", "libc",
"pango", "pango",
] ]
[[package]] [[package]]
name = "gdk-pixbuf" name = "gdk-pixbuf"
version = "0.8.0" version = "0.15.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e248220c46b329b097d4b158d2717f8c688f16dd76d0399ace82b3e98062bdd7" checksum = "ad38dd9cc8b099cceecdf41375bb6d481b1b5a7cd5cd603e10a69a9383f8619a"
dependencies = [ dependencies = [
"bitflags",
"gdk-pixbuf-sys", "gdk-pixbuf-sys",
"gio", "gio 0.15.12",
"gio-sys", "glib 0.15.12",
"glib",
"glib-sys",
"gobject-sys",
"libc", "libc",
] ]
[[package]] [[package]]
name = "gdk-pixbuf-sys" name = "gdk-pixbuf-sys"
version = "0.9.1" version = "0.15.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8991b060a9e9161bafd09bf4a202e6fd404f5b4dd1a08d53a1e84256fb34ab0" checksum = "140b2f5378256527150350a8346dbdb08fadc13453a7a2d73aecd5fab3c402a7"
dependencies = [ dependencies = [
"gio-sys", "gio-sys 0.15.10",
"glib-sys", "glib-sys 0.15.10",
"gobject-sys", "gobject-sys 0.15.10",
"libc", "libc",
"pkg-config", "system-deps",
] ]
[[package]] [[package]]
name = "gdk-sys" name = "gdk-sys"
version = "0.9.1" version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6adf679e91d1bff0c06860287f80403e7db54c2d2424dce0a470023b56c88fbb" checksum = "32e7a08c1e8f06f4177fb7e51a777b8c1689f743a7bc11ea91d44d2226073a88"
dependencies = [ dependencies = [
"cairo-sys-rs", "cairo-sys-rs",
"gdk-pixbuf-sys", "gdk-pixbuf-sys",
"gio-sys", "gio-sys 0.15.10",
"glib-sys", "glib-sys 0.15.10",
"gobject-sys", "gobject-sys 0.15.10",
"libc", "libc",
"pango-sys", "pango-sys",
"pkg-config", "pkg-config",
"system-deps",
] ]
[[package]] [[package]]
@@ -203,26 +220,56 @@ dependencies = [
"futures-core", "futures-core",
"futures-io", "futures-io",
"futures-util", "futures-util",
"gio-sys", "gio-sys 0.9.1",
"glib", "glib 0.9.3",
"glib-sys", "glib-sys 0.9.1",
"gobject-sys", "gobject-sys 0.9.1",
"lazy_static", "lazy_static",
"libc", "libc",
] ]
[[package]]
name = "gio"
version = "0.15.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68fdbc90312d462781a395f7a16d96a2b379bb6ef8cd6310a2df272771c4283b"
dependencies = [
"bitflags",
"futures-channel",
"futures-core",
"futures-io",
"gio-sys 0.15.10",
"glib 0.15.12",
"libc",
"once_cell",
"thiserror",
]
[[package]] [[package]]
name = "gio-sys" name = "gio-sys"
version = "0.9.1" version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fad225242b9eae7ec8a063bb86974aca56885014672375e5775dc0ea3533911" checksum = "4fad225242b9eae7ec8a063bb86974aca56885014672375e5775dc0ea3533911"
dependencies = [ dependencies = [
"glib-sys", "glib-sys 0.9.1",
"gobject-sys", "gobject-sys 0.9.1",
"libc", "libc",
"pkg-config", "pkg-config",
] ]
[[package]]
name = "gio-sys"
version = "0.15.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32157a475271e2c4a023382e9cab31c4584ee30a97da41d3c4e9fdd605abcf8d"
dependencies = [
"glib-sys 0.15.10",
"gobject-sys 0.15.10",
"libc",
"system-deps",
"winapi",
]
[[package]] [[package]]
name = "glib" name = "glib"
version = "0.9.3" version = "0.9.3"
@@ -235,12 +282,47 @@ dependencies = [
"futures-executor", "futures-executor",
"futures-task", "futures-task",
"futures-util", "futures-util",
"glib-sys", "glib-sys 0.9.1",
"gobject-sys", "gobject-sys 0.9.1",
"lazy_static", "lazy_static",
"libc", "libc",
] ]
[[package]]
name = "glib"
version = "0.15.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edb0306fbad0ab5428b0ca674a23893db909a98582969c9b537be4ced78c505d"
dependencies = [
"bitflags",
"futures-channel",
"futures-core",
"futures-executor",
"futures-task",
"glib-macros",
"glib-sys 0.15.10",
"gobject-sys 0.15.10",
"libc",
"once_cell",
"smallvec",
"thiserror",
]
[[package]]
name = "glib-macros"
version = "0.15.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25a68131a662b04931e71891fb14aaf65ee4b44d08e8abc10f49e77418c86c64"
dependencies = [
"anyhow",
"heck",
"proc-macro-crate",
"proc-macro-error",
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "glib-sys" name = "glib-sys"
version = "0.9.1" version = "0.9.1"
@@ -251,62 +333,99 @@ dependencies = [
"pkg-config", "pkg-config",
] ]
[[package]]
name = "glib-sys"
version = "0.15.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4"
dependencies = [
"libc",
"system-deps",
]
[[package]] [[package]]
name = "gobject-sys" name = "gobject-sys"
version = "0.9.1" version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31d1a804f62034eccf370006ccaef3708a71c31d561fee88564abe71177553d9" checksum = "31d1a804f62034eccf370006ccaef3708a71c31d561fee88564abe71177553d9"
dependencies = [ dependencies = [
"glib-sys", "glib-sys 0.9.1",
"libc", "libc",
"pkg-config", "pkg-config",
] ]
[[package]] [[package]]
name = "gtk" name = "gobject-sys"
version = "0.8.1" version = "0.15.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87e1e8d70290239c668594002d1b174fcc7d7ef5d26670ee141490ede8facf8f" checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a"
dependencies = [
"glib-sys 0.15.10",
"libc",
"system-deps",
]
[[package]]
name = "gtk"
version = "0.15.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92e3004a2d5d6d8b5057d2b57b3712c9529b62e82c77f25c1fecde1fd5c23bd0"
dependencies = [ dependencies = [
"atk", "atk",
"bitflags", "bitflags",
"cairo-rs", "cairo-rs",
"cairo-sys-rs", "field-offset",
"cc", "futures-channel",
"gdk", "gdk",
"gdk-pixbuf", "gdk-pixbuf",
"gdk-pixbuf-sys", "gio 0.15.12",
"gdk-sys", "glib 0.15.12",
"gio",
"gio-sys",
"glib",
"glib-sys",
"gobject-sys",
"gtk-sys", "gtk-sys",
"lazy_static", "gtk3-macros",
"libc", "libc",
"once_cell",
"pango", "pango",
"pango-sys", "pkg-config",
] ]
[[package]] [[package]]
name = "gtk-sys" name = "gtk-sys"
version = "0.9.2" version = "0.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53def660c7b48b00b510c81ef2d2fbd3c570f1527081d8d7947f471513e1a4c1" checksum = "d5bc2f0587cba247f60246a0ca11fe25fb733eabc3de12d1965fc07efab87c84"
dependencies = [ dependencies = [
"atk-sys", "atk-sys",
"cairo-sys-rs", "cairo-sys-rs",
"gdk-pixbuf-sys", "gdk-pixbuf-sys",
"gdk-sys", "gdk-sys",
"gio-sys", "gio-sys 0.15.10",
"glib-sys", "glib-sys 0.15.10",
"gobject-sys", "gobject-sys 0.15.10",
"libc", "libc",
"pango-sys", "pango-sys",
"pkg-config", "system-deps",
] ]
[[package]]
name = "gtk3-macros"
version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24f518afe90c23fba585b2d7697856f9e6a7bbc62f65588035e66f6afb01a2e9"
dependencies = [
"anyhow",
"proc-macro-crate",
"proc-macro-error",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "heck"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
[[package]] [[package]]
name = "lazy_static" name = "lazy_static"
version = "1.4.0" version = "1.4.0"
@@ -315,26 +434,22 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.69" version = "0.2.137"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89"
[[package]] [[package]]
name = "libhandy" name = "libhandy"
version = "0.5.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2aa9f5620e4143358bcd645fe7d7d27b974ed9148cbdd490bc811813899afa07" checksum = "3c4a9a0bc88fb8ba74c1cc8ff6b8c34dfb6dc0e97bc62cd96cc2fdc9a47aebe2"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"gdk", "gdk",
"gdk-sys", "gdk-pixbuf",
"gio", "gio 0.15.12",
"gio-sys", "glib 0.15.12",
"glib",
"glib-sys",
"gobject-sys",
"gtk", "gtk",
"gtk-sys",
"lazy_static", "lazy_static",
"libc", "libc",
"libhandy-sys", "libhandy-sys",
@@ -343,30 +458,30 @@ dependencies = [
[[package]] [[package]]
name = "libhandy-sys" name = "libhandy-sys"
version = "0.5.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d707af842e918719b71af0ac6cf31d1843f6e8a4d1e9c733b998d8d482e60446" checksum = "fcb7c1c11d53e8a2a0c19742f23f36ff0ccf39d9a1e96c7f44054db217adc609"
dependencies = [ dependencies = [
"gdk", "gdk-pixbuf-sys",
"gdk-sys", "gdk-sys",
"gio", "gio-sys 0.15.10",
"gio-sys", "glib-sys 0.15.10",
"glib-sys", "gobject-sys 0.15.10",
"gobject-sys",
"gtk-sys", "gtk-sys",
"libc", "libc",
"pango-sys", "pango-sys",
"pkg-config", "pkg-config",
"system-deps",
] ]
[[package]] [[package]]
name = "light-dm-sys" name = "light-dm-sys"
version = "0.0.1" version = "0.0.1"
source = "git+https://raatty.club:3000/raatty/lightdm-rs.git#a3c669583bb932e2b25372048b1e9dbda1f10e11" source = "git+https://git.raatty.club/raatty/lightdm-rs.git#a3c669583bb932e2b25372048b1e9dbda1f10e11"
dependencies = [ dependencies = [
"gio-sys", "gio-sys 0.9.1",
"glib-sys", "glib-sys 0.9.1",
"gobject-sys", "gobject-sys 0.9.1",
"libc", "libc",
"pkg-config", "pkg-config",
] ]
@@ -374,13 +489,13 @@ dependencies = [
[[package]] [[package]]
name = "lightdm" name = "lightdm"
version = "0.1.0" version = "0.1.0"
source = "git+https://raatty.club:3000/raatty/lightdm-rs.git#a3c669583bb932e2b25372048b1e9dbda1f10e11" source = "git+https://git.raatty.club/raatty/lightdm-rs.git#a3c669583bb932e2b25372048b1e9dbda1f10e11"
dependencies = [ dependencies = [
"gio", "gio 0.8.1",
"gio-sys", "gio-sys 0.9.1",
"glib", "glib 0.9.3",
"glib-sys", "glib-sys 0.9.1",
"gobject-sys", "gobject-sys 0.9.1",
"libc", "libc",
"light-dm-sys", "light-dm-sys",
"once_cell", "once_cell",
@@ -397,38 +512,61 @@ dependencies = [
] ]
[[package]] [[package]]
name = "once_cell" name = "memoffset"
version = "1.3.1" version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1c601810575c99596d4afc46f78a678c80105117c379eb3650cf99b8a21ce5b" checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
dependencies = [
"autocfg",
]
[[package]]
name = "once_cell"
version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
[[package]] [[package]]
name = "pango" name = "pango"
version = "0.8.0" version = "0.15.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e9c6b728f1be8edb5f9f981420b651d5ea30bdb9de89f1f1262d0084a020577" checksum = "22e4045548659aee5313bde6c582b0d83a627b7904dd20dc2d9ef0895d414e4f"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"glib", "glib 0.15.12",
"glib-sys",
"gobject-sys",
"lazy_static",
"libc", "libc",
"once_cell",
"pango-sys", "pango-sys",
] ]
[[package]] [[package]]
name = "pango-sys" name = "pango-sys"
version = "0.9.1" version = "0.15.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86b93d84907b3cf0819bff8f13598ba72843bee579d5ebc2502e4b0367b4be7d" checksum = "d2a00081cde4661982ed91d80ef437c20eacaf6aa1a5962c0279ae194662c3aa"
dependencies = [ dependencies = [
"glib-sys", "glib-sys 0.15.10",
"gobject-sys", "gobject-sys 0.15.10",
"libc", "libc",
"pkg-config", "system-deps",
] ]
[[package]]
name = "pest"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a528564cc62c19a7acac4d81e01f39e53e25e17b934878f4c6d25cc2836e62f8"
dependencies = [
"thiserror",
"ucd-trie",
]
[[package]]
name = "pin-project-lite"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
[[package]] [[package]]
name = "pin-utils" name = "pin-utils"
version = "0.1.0" version = "0.1.0"
@@ -437,59 +575,206 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]] [[package]]
name = "pkg-config" name = "pkg-config"
version = "0.3.17" version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
[[package]] [[package]]
name = "proc-macro-hack" name = "proc-macro-crate"
version = "0.5.15" version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63" checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9"
dependencies = [
"once_cell",
"thiserror",
"toml",
]
[[package]] [[package]]
name = "proc-macro-nested" name = "proc-macro-error"
version = "0.1.4" version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr",
"proc-macro2",
"quote",
"syn",
"version_check",
]
[[package]]
name = "proc-macro-error-attr"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [
"proc-macro2",
"quote",
"version_check",
]
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.10" version = "1.0.47"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3" checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725"
dependencies = [ dependencies = [
"unicode-xid", "unicode-ident",
] ]
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.3" version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
] ]
[[package]]
name = "rustc_version"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee"
dependencies = [
"semver",
]
[[package]]
name = "semver"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6"
dependencies = [
"semver-parser",
]
[[package]]
name = "semver-parser"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7"
dependencies = [
"pest",
]
[[package]]
name = "serde"
version = "1.0.147"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965"
[[package]] [[package]]
name = "slab" name = "slab"
version = "0.4.2" version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef"
[[package]]
name = "syn"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0df0eb663f387145cab623dea85b09c2c5b4b0aef44e945d928e682fce71bb03"
dependencies = [ dependencies = [
"proc-macro2", "autocfg",
"quote",
"unicode-xid",
] ]
[[package]] [[package]]
name = "unicode-xid" name = "smallvec"
version = "0.2.0" version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
[[package]]
name = "syn"
version = "1.0.103"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "system-deps"
version = "6.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2955b1fe31e1fa2fbd1976b71cc69a606d7d4da16f6de3333d0c92d51419aeff"
dependencies = [
"cfg-expr",
"heck",
"pkg-config",
"toml",
"version-compare",
]
[[package]]
name = "thiserror"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "toml"
version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7"
dependencies = [
"serde",
]
[[package]]
name = "ucd-trie"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81"
[[package]]
name = "unicode-ident"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
[[package]]
name = "version-compare"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe88247b92c1df6b6de80ddc290f3976dbdf2f5f5d3fd049a9fb598c6dd5ca73"
[[package]]
name = "version_check"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"

View File

@@ -6,9 +6,9 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
libhandy = "0.5.0" libhandy = "0.9"
gdk = "0.12.1" gdk = "0.15"
gtk = "0.8.1" gtk = "0.15"
lightdm = { git = "https://git.raatty.club/raatty/lightdm-rs.git"} lightdm = { git = "https://git.raatty.club/raatty/lightdm-rs.git"}
[profile.release] [profile.release]

42
flake.lock generated Normal file
View File

@@ -0,0 +1,42 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1666610816,
"narHash": "sha256-q4F2VNe5bpxXOvp16DyLwE1SgNZMbNO29ZQJPIomedg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6107f97012a0c134c5848125b5aa1b149b76d2c9",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-22.05",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

51
flake.nix Normal file
View File

@@ -0,0 +1,51 @@
{
description = "A simple log in screen for use on touch screens.";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05";
flake-utils.url = github:numtide/flake-utils;
};
outputs = { self, nixpkgs, flake-utils }:
with flake-utils.lib; eachSystem allSystems (system:
let
pkgs = import nixpkgs { inherit system; };
buildInputs = with pkgs; [ gtk3 libhandy lightdm ];
nativeBuildInputs = with pkgs; [ pkg-config ];
in
rec {
packages = {
# docs: <nixpkgs>/doc/languages-frameworks/rust.section.md
# docs: https://github.com/oxalica/rust-overlay
lightdm-mobile-greeter = pkgs.rustPlatform.buildRustPackage {
pname = "lightdm-mobile-greeter";
version = "6";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"light-dm-sys-0.0.1" = "sha256-91MZhbO/Or0QOt0yVAUhtorpMBBzElFg6U59mF7WB0k=";
};
};
inherit buildInputs nativeBuildInputs;
postInstall = ''
mkdir -p $out/share/applications
substitute lightdm-mobile-greeter.desktop \
$out/share/applications/lightdm-mobile-greeter.desktop \
--replace lightdm-mobile-greeter $out/bin/lightdm-mobile-greeter
'';
};
};
defaultPackage = packages.lightdm-mobile-greeter;
devShells.default = with pkgs; mkShell {
# Allow cargo to download crates.
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
# include both build and runtime deps in the shell so once can build and run the result.
buildInputs = buildInputs ++ nativeBuildInputs ++ [ cargo ];
};
});
}

View File

@@ -54,10 +54,10 @@
<property name="valign">fill</property> <property name="valign">fill</property>
<property name="margin_top">12</property> <property name="margin_top">12</property>
<property name="margin_bottom">12</property> <property name="margin_bottom">12</property>
<property name="only_digits">True</property> <property name="letters_visible">False</property>
<property name="show_symbols">False</property> <property name="symbols_visible">False</property>
<property name="right_action">delete_btn</property> <property name="end_action">delete_btn</property>
<property name="left_action">settings_btn</property> <property name="start_action">settings_btn</property>
<property name="entry">pin_entry</property> <property name="entry">pin_entry</property>
<style> <style>
<class name="keypad"/> <class name="keypad"/>

View File

@@ -16,7 +16,7 @@ fn main() {
return; return;
} }
libhandy::Keypad::new(true, true); libhandy::Keypad::new(true, true);
let builder = gtk::Builder::new_from_string(include_str!("../interface.ui")); let builder = gtk::Builder::from_string(include_str!("../interface.ui"));
let handler = Rc::new(RefCell::new(Handler::new())); let handler = Rc::new(RefCell::new(Handler::new()));
{ {
let mut handler_borrowed = handler.borrow_mut(); let mut handler_borrowed = handler.borrow_mut();
@@ -58,7 +58,7 @@ fn main() {
.greeter .greeter
.as_ref() .as_ref()
.expect("no greeter") .expect("no greeter")
.respond(&pin_entry.get_text()) .respond(&pin_entry.text())
.ok(); .ok();
pin_entry.set_text(""); pin_entry.set_text("");
None None
@@ -66,7 +66,7 @@ fn main() {
"backspace" => Box::new(move |_| { "backspace" => Box::new(move |_| {
let handler = h_backspace_clone.borrow(); let handler = h_backspace_clone.borrow();
let pin_entry = handler.pin_entry.as_ref().expect("no pin_entry"); let pin_entry = handler.pin_entry.as_ref().expect("no pin_entry");
let length = pin_entry.get_length(); let length = pin_entry.length();
if length <= 0 { if length <= 0 {
return None; return None;
} }
@@ -86,20 +86,20 @@ fn main() {
} }
}); });
let window: gtk::Window = builder let window: gtk::Window = builder
.get_object("greeter_window") .object("greeter_window")
.expect("window not found"); .expect("window not found");
{ {
let display = gdk::Display::get_default().expect("cant get display"); let display = gdk::Display::default().expect("cant get display");
let monitor = display.get_monitor(0).expect("cant get monitor"); let monitor = display.monitor(0).expect("cant get monitor");
let screen_size = monitor.get_geometry(); let screen_size = monitor.geometry();
window.set_size_request(screen_size.width, screen_size.height); window.set_size_request(screen_size.width(), screen_size.height());
let container: gtk::Box = builder.get_object("container").expect("cant get container"); let container: gtk::Box = builder.object("container").expect("cant get container");
container.set_size_request( container.set_size_request(
(screen_size.width as f32 * 0.8) as i32, (screen_size.width() as f32 * 0.8) as i32,
(screen_size.height as f32 * 0.8) as i32, (screen_size.height() as f32 * 0.8) as i32,
); );
let style = gtk::CssProvider::new(); let style = gtk::CssProvider::new();
let screen = gdk::Screen::get_default().expect("cant get screen"); let screen = gdk::Screen::default().expect("cant get screen");
style style
.load_from_data(include_bytes!("../style.css")) .load_from_data(include_bytes!("../style.css"))
.expect("failed to load style"); .expect("failed to load style");
@@ -141,10 +141,10 @@ impl Handler {
Default::default() Default::default()
} }
fn get_objects(&mut self, builder: &gtk::Builder) { fn get_objects(&mut self, builder: &gtk::Builder) {
self.pin_entry = builder.get_object("entry_buffer"); self.pin_entry = builder.object("entry_buffer");
self.pmpt_label = builder.get_object("prompt_label"); self.pmpt_label = builder.object("prompt_label");
self.msg_label = builder.get_object("message_label"); self.msg_label = builder.object("message_label");
self.de_select = builder.get_object("de_select"); self.de_select = builder.object("de_select");
} }
fn set_username(&mut self) { fn set_username(&mut self) {
@@ -203,7 +203,7 @@ impl Handler {
.expect("no default session"); .expect("no default session");
self.session = Some(String::from(session)); self.session = Some(String::from(session));
} }
let vbox = gtk::BoxBuilder::new() let vbox = gtk::builders::BoxBuilder::new()
.orientation(gtk::Orientation::Vertical) .orientation(gtk::Orientation::Vertical)
.visible(true) .visible(true)
.build(); .build();
@@ -215,7 +215,7 @@ impl Handler {
) )
}); });
let (name, key) = sessions.next().expect("no session"); let (name, key) = sessions.next().expect("no session");
let first = gtk::RadioButtonBuilder::new().label(&name).build(); let first = gtk::builders::RadioButtonBuilder::new().label(&name).build();
let mut keys = Vec::new(); let mut keys = Vec::new();
let mut rbs = Vec::new(); let mut rbs = Vec::new();
keys.push(key); keys.push(key);
@@ -223,7 +223,7 @@ impl Handler {
vbox.add(&first); vbox.add(&first);
for (name, key) in sessions { for (name, key) in sessions {
let key_clone = key.clone(); let key_clone = key.clone();
let rb = gtk::RadioButton::new_with_label_from_widget(&first, &name); let rb = gtk::RadioButton::with_label_from_widget(&first, &name);
keys.push(key); keys.push(key);
rbs.push(rb.clone()); rbs.push(rb.clone());
vbox.add(&rb); vbox.add(&rb);

View File

@@ -27,7 +27,7 @@ button:active label {
color: black; color: black;
} }
hdykeypad > button label{ .keypad > grid > button label {
font-size: 5em; font-size: 5em;
font-weight: bold; font-weight: bold;
padding: 10px; padding: 10px;