diff --git a/Cargo.lock b/Cargo.lock
index cb937ea..e239798 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-version = 3
+version = 4
[[package]]
name = "ab_glyph"
@@ -1271,10 +1271,22 @@ dependencies = [
"libc",
]
+[[package]]
+name = "cosmic-client-toolkit"
+version = "0.1.0"
+source = "git+https://github.com/pop-os/cosmic-protocols?rev=d218c76#d218c76b58c7a3b20dd5e7943f93fc306a1b81b8"
+dependencies = [
+ "cosmic-protocols",
+ "libc",
+ "smithay-client-toolkit",
+ "wayland-client",
+ "wayland-protocols",
+]
+
[[package]]
name = "cosmic-config"
version = "0.1.0"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"atomicwrites",
"cosmic-config-derive",
@@ -1293,22 +1305,48 @@ dependencies = [
[[package]]
name = "cosmic-config-derive"
version = "0.1.0"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"quote",
"syn 1.0.109",
]
+[[package]]
+name = "cosmic-freedesktop-icons"
+version = "0.2.6"
+source = "git+https://github.com/pop-os/freedesktop-icons#5a3b4163148a9600a54cc846aa863f4e6389635d"
+dependencies = [
+ "dirs 5.0.1",
+ "once_cell",
+ "rust-ini",
+ "thiserror 1.0.63",
+ "tracing",
+ "xdg",
+]
+
+[[package]]
+name = "cosmic-protocols"
+version = "0.1.0"
+source = "git+https://github.com/pop-os/cosmic-protocols?rev=d218c76#d218c76b58c7a3b20dd5e7943f93fc306a1b81b8"
+dependencies = [
+ "bitflags 2.6.0",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-protocols",
+ "wayland-protocols-wlr",
+ "wayland-scanner",
+ "wayland-server",
+]
+
[[package]]
name = "cosmic-text"
version = "0.12.1"
-source = "git+https://github.com/pop-os/cosmic-text.git#1f4065c1c3399efad58841082212f7c039b58480"
+source = "git+https://github.com/pop-os/cosmic-text.git#166b59f560c551dab391a864f7c1f503c1e18446"
dependencies = [
"bitflags 2.6.0",
"fontdb 0.16.2",
"log",
"rangemap",
- "rayon",
"rustc-hash 1.1.0",
"rustybuzz",
"self_cell 1.0.4",
@@ -1325,7 +1363,7 @@ dependencies = [
[[package]]
name = "cosmic-theme"
version = "0.1.0"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"almost",
"cosmic-config",
@@ -2119,9 +2157,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "font-types"
-version = "0.6.0"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f0189ccb084f77c5523e08288d418cbaa09c451a08515678a0aa265df9a8b60"
+checksum = "11c3a23a5a151afb1f74ea797f8c300dee41eff9ee3cb1bf94ed316d860c46b3"
dependencies = [
"bytemuck",
]
@@ -2199,16 +2237,6 @@ dependencies = [
"percent-encoding",
]
-[[package]]
-name = "fraction"
-version = "0.15.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f158e3ff0a1b334408dc9fb811cd99b446986f4d8b741bb08f9df1604085ae7"
-dependencies = [
- "lazy_static",
- "num",
-]
-
[[package]]
name = "freedesktop-desktop-entry"
version = "0.5.2"
@@ -2222,19 +2250,6 @@ dependencies = [
"xdg",
]
-[[package]]
-name = "freedesktop-icons"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8ef34245e0540c9a3ce7a28340b98d2c12b75da0d446da4e8224923fcaa0c16"
-dependencies = [
- "dirs 5.0.1",
- "once_cell",
- "rust-ini",
- "thiserror 1.0.63",
- "xdg",
-]
-
[[package]]
name = "fsevent-sys"
version = "4.1.0"
@@ -2841,7 +2856,7 @@ dependencies = [
[[package]]
name = "iced"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"dnd",
"iced_accessibility",
@@ -2859,7 +2874,7 @@ dependencies = [
[[package]]
name = "iced_accessibility"
version = "0.1.0"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"accesskit",
"accesskit_winit",
@@ -2868,7 +2883,7 @@ dependencies = [
[[package]]
name = "iced_core"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"bitflags 2.6.0",
"bytes",
@@ -2891,7 +2906,7 @@ dependencies = [
[[package]]
name = "iced_futures"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"futures",
"iced_core",
@@ -2917,7 +2932,7 @@ dependencies = [
[[package]]
name = "iced_graphics"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"bitflags 2.6.0",
"bytemuck",
@@ -2939,7 +2954,7 @@ dependencies = [
[[package]]
name = "iced_renderer"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"iced_graphics",
"iced_tiny_skia",
@@ -2951,7 +2966,7 @@ dependencies = [
[[package]]
name = "iced_runtime"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"bytes",
"dnd",
@@ -2965,7 +2980,7 @@ dependencies = [
[[package]]
name = "iced_tiny_skia"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"bytemuck",
"cosmic-text",
@@ -2981,11 +2996,12 @@ dependencies = [
[[package]]
name = "iced_wgpu"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"as-raw-xcb-connection",
"bitflags 2.6.0",
"bytemuck",
+ "cosmic-client-toolkit",
"futures",
"glam",
"guillotiere",
@@ -2998,7 +3014,6 @@ dependencies = [
"resvg",
"rustc-hash 2.0.0",
"rustix 0.38.35",
- "smithay-client-toolkit",
"thiserror 1.0.63",
"tiny-xlib",
"wayland-backend",
@@ -3012,7 +3027,7 @@ dependencies = [
[[package]]
name = "iced_widget"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"dnd",
"iced_renderer",
@@ -3029,7 +3044,7 @@ dependencies = [
[[package]]
name = "iced_winit"
version = "0.14.0-dev"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"dnd",
"iced_futures",
@@ -3211,6 +3226,12 @@ dependencies = [
"windows-sys 0.48.0",
]
+[[package]]
+name = "io-lifetimes"
+version = "2.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06432fb54d3be7964ecd3649233cddf80db2832f47fec34c01f65b3d9d774983"
+
[[package]]
name = "ipnet"
version = "2.9.0"
@@ -3420,18 +3441,17 @@ checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]]
name = "libcosmic"
version = "0.1.0"
-source = "git+https://github.com/pop-os/libcosmic.git#aaadf7199ebed8a5a04ebed559f62455d622689e"
+source = "git+https://github.com/pop-os/libcosmic.git#aaa2ba3ad4239cb44ba01c10cbca57174d52a7da"
dependencies = [
"apply",
"ashpd 0.9.1",
"chrono",
"cosmic-config",
+ "cosmic-freedesktop-icons",
"cosmic-theme",
"css-color",
"derive_setters",
- "fraction",
"freedesktop-desktop-entry",
- "freedesktop-icons",
"iced",
"iced_core",
"iced_futures",
@@ -3457,7 +3477,6 @@ dependencies = [
"tracing",
"unicode-segmentation",
"url",
- "ustr",
"zbus 4.4.0",
]
@@ -3894,20 +3913,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "num"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23"
-dependencies = [
- "num-bigint",
- "num-complex",
- "num-integer",
- "num-iter",
- "num-rational",
- "num-traits",
-]
-
[[package]]
name = "num-bigint"
version = "0.4.6"
@@ -3935,15 +3940,6 @@ dependencies = [
"zeroize",
]
-[[package]]
-name = "num-complex"
-version = "0.4.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
-dependencies = [
- "num-traits",
-]
-
[[package]]
name = "num-conv"
version = "0.1.0"
@@ -3981,17 +3977,6 @@ dependencies = [
"num-traits",
]
-[[package]]
-name = "num-rational"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
-dependencies = [
- "num-bigint",
- "num-integer",
- "num-traits",
-]
-
[[package]]
name = "num-traits"
version = "0.2.19"
@@ -4974,9 +4959,9 @@ dependencies = [
[[package]]
name = "quick-xml"
-version = "0.34.0"
+version = "0.36.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f24d770aeca0eacb81ac29dfbc55ebcc09312fdd1f8bbecdc7e4a84e000e3b4"
+checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe"
dependencies = [
"memchr",
]
@@ -5072,9 +5057,9 @@ dependencies = [
[[package]]
name = "read-fonts"
-version = "0.20.0"
+version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c141b9980e1150201b2a3a32879001c8f975fe313ec3df5471a9b5c79a880cd"
+checksum = "f6f9e8a4f503e5c8750e4cd3b32a4e090035c46374b305a15c70bad833dca05f"
dependencies = [
"bytemuck",
"font-types",
@@ -5525,7 +5510,7 @@ checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2"
dependencies = [
"bitflags 1.3.2",
"errno",
- "io-lifetimes",
+ "io-lifetimes 1.0.11",
"libc",
"linux-raw-sys 0.3.8",
"windows-sys 0.48.0",
@@ -5949,9 +5934,9 @@ checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
[[package]]
name = "skrifa"
-version = "0.20.0"
+version = "0.26.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abea4738067b1e628c6ce28b2c216c19e9ea95715cdb332680e821c3bec2ef23"
+checksum = "6667e349abb2e6e850b31bc638a11f7fadd7e4cf113b71947c46bf6d5fe0dbc9"
dependencies = [
"bytemuck",
"read-fonts",
@@ -6230,9 +6215,9 @@ dependencies = [
[[package]]
name = "swash"
-version = "0.1.18"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93cdc334a50fcc2aa3f04761af3b28196280a6aaadb1ef11215c478ae32615ac"
+checksum = "f0e25b48fd1c222c9fdb61148e2203b750f9840c07922fd61b87c6015560b8f6"
dependencies = [
"skrifa",
"yazi",
@@ -6634,9 +6619,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]]
name = "tracing"
-version = "0.1.40"
+version = "0.1.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
+checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
dependencies = [
"pin-project-lite",
"tracing-attributes",
@@ -6645,9 +6630,9 @@ dependencies = [
[[package]]
name = "tracing-attributes"
-version = "0.1.27"
+version = "0.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
+checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
dependencies = [
"proc-macro2",
"quote",
@@ -6656,9 +6641,9 @@ dependencies = [
[[package]]
name = "tracing-core"
-version = "0.1.32"
+version = "0.1.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
+checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c"
dependencies = [
"once_cell",
"valuable",
@@ -6882,19 +6867,6 @@ version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
-[[package]]
-name = "ustr"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18b19e258aa08450f93369cf56dd78063586adf19e92a75b338a800f799a0208"
-dependencies = [
- "ahash",
- "byteorder",
- "lazy_static",
- "parking_lot 0.12.3",
- "serde",
-]
-
[[package]]
name = "usvg"
version = "0.42.0"
@@ -7088,9 +7060,9 @@ dependencies = [
[[package]]
name = "wayland-backend"
-version = "0.3.6"
+version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f90e11ce2ca99c97b940ee83edbae9da2d56a08f9ea8158550fd77fa31722993"
+checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6"
dependencies = [
"cc",
"downcast-rs",
@@ -7102,9 +7074,9 @@ dependencies = [
[[package]]
name = "wayland-client"
-version = "0.31.5"
+version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e321577a0a165911bdcfb39cf029302479d7527b517ee58ab0f6ad09edf0943"
+checksum = "b66249d3fc69f76fd74c82cc319300faa554e9d865dab1f7cd66cc20db10b280"
dependencies = [
"bitflags 2.6.0",
"rustix 0.38.35",
@@ -7136,14 +7108,15 @@ dependencies = [
[[package]]
name = "wayland-protocols"
-version = "0.32.3"
+version = "0.32.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62989625a776e827cc0f15d41444a3cea5205b963c3a25be48ae1b52d6b4daaa"
+checksum = "7cd0ade57c4e6e9a8952741325c30bf82f4246885dca8bf561898b86d0c1f58e"
dependencies = [
"bitflags 2.6.0",
"wayland-backend",
"wayland-client",
"wayland-scanner",
+ "wayland-server",
]
[[package]]
@@ -7170,24 +7143,39 @@ dependencies = [
"wayland-client",
"wayland-protocols",
"wayland-scanner",
+ "wayland-server",
]
[[package]]
name = "wayland-scanner"
-version = "0.31.4"
+version = "0.31.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7b56f89937f1cf2ee1f1259cf2936a17a1f45d8f0aa1019fae6d470d304cfa6"
+checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3"
dependencies = [
"proc-macro2",
- "quick-xml 0.34.0",
+ "quick-xml 0.36.2",
"quote",
]
+[[package]]
+name = "wayland-server"
+version = "0.31.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c89532cc712a2adb119eb4d09694b402576052254d0bb284f82ac1c47fb786ad"
+dependencies = [
+ "bitflags 2.6.0",
+ "downcast-rs",
+ "io-lifetimes 2.0.4",
+ "rustix 0.38.35",
+ "wayland-backend",
+ "wayland-scanner",
+]
+
[[package]]
name = "wayland-sys"
-version = "0.31.4"
+version = "0.31.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43676fe2daf68754ecf1d72026e4e6c15483198b5d24e888b74d3f22f887a148"
+checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09"
dependencies = [
"dlib",
"log",
@@ -7862,9 +7850,9 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049"
[[package]]
name = "yazi"
-version = "0.1.6"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1"
+checksum = "e01738255b5a16e78bbb83e7fbba0a1e7dd506905cfc53f4622d89015a03fbb5"
[[package]]
name = "zbus"
@@ -7992,9 +7980,9 @@ dependencies = [
[[package]]
name = "zeno"
-version = "0.2.3"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697"
+checksum = "cc0de2315dc13d00e5df3cd6b8d2124a6eaec6a2d4b6a1c5f37b7efad17fcc17"
[[package]]
name = "zerocopy"
diff --git a/res/com.github.ahoneybun.Stellarshot.desktop b/res/com.github.cosmic-utils.Stellarshot.desktop
similarity index 100%
rename from res/com.github.ahoneybun.Stellarshot.desktop
rename to res/com.github.cosmic-utils.Stellarshot.desktop
diff --git a/res/com.github.ahoneybun.Stellarshot.metainfo.xml b/res/com.github.cosmic-utils.Stellarshot.metainfo.xml
similarity index 95%
rename from res/com.github.ahoneybun.Stellarshot.metainfo.xml
rename to res/com.github.cosmic-utils.Stellarshot.metainfo.xml
index 6dcba78..0fda5ca 100644
--- a/res/com.github.ahoneybun.Stellarshot.metainfo.xml
+++ b/res/com.github.cosmic-utils.Stellarshot.metainfo.xml
@@ -4,7 +4,7 @@
CC0-1.0
GPL-3.0-only
COSMIC
- Aaron Honeycutt
+ Stellershot Developers
aaronhoneycutt@proton.me
https://github.com/cosmic-utils/stellarshot
https://github.com/cosmic-utils/stellarshot/issues
diff --git a/src/app.rs b/src/app.rs
index b2ace08..cf82336 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -69,6 +69,7 @@ pub enum Message {
DeleteRepositoryDialog,
RequestFilesForSnapshot,
OpenPasswordDialog(Repository),
+ CloseContextDrawer,
}
#[derive(Debug, Clone)]
@@ -201,7 +202,7 @@ impl Application for App {
.name(fl!("stellarshot"))
.icon(Self::APP_ID)
.version("0.1.0")
- .author("Aaron Honeycut")
+ .author("Stellarshot Developers")
.license("GPL-3.0")
.links([
(
@@ -214,7 +215,7 @@ impl Application for App {
),
])
.developers([
- ("Aaron Honeycutt", "aaronhoneycutt@protonmail.com"),
+ ("Aaron Honeycutt", "aaronhoneycutt@proton.me"),
("Eduardo Flores", "edfloreshz@proton.me"),
]);
let mut app = App {
@@ -240,14 +241,25 @@ impl Application for App {
(app, Task::none())
}
- fn context_drawer(&self) -> Option> {
+ fn context_drawer(&self) -> Option> {
if !self.core.window.show_context {
return None;
}
+ let title = self.context_page.title();
+
Some(match self.context_page {
- ContextPage::About => widget::about(&self.about, Message::LaunchUrl),
- ContextPage::Settings => self.settings(),
+ ContextPage::About => cosmic::app::context_drawer::about(
+ &self.about,
+ Message::LaunchUrl,
+ Message::CloseContextDrawer,
+ )
+ .title(title),
+ ContextPage::Settings => cosmic::app::context_drawer::context_drawer(
+ self.settings(),
+ Message::CloseContextDrawer,
+ )
+ .title(title),
})
}
@@ -487,7 +499,6 @@ impl Application for App {
self.context_page = context_page;
self.core.window.show_context = true;
}
- self.set_context_title(context_page.title());
}
Message::RequestFileForRepository => {
return Task::perform(
@@ -715,6 +726,9 @@ impl Application for App {
Message::SystemThemeModeChange(_) => {
return self.update_config();
}
+ Message::CloseContextDrawer => {
+ self.core.window.show_context = !self.core.window.show_context
+ }
}
Task::none()
diff --git a/src/app/menu.rs b/src/app/menu.rs
index 6aac30b..16b5477 100644
--- a/src/app/menu.rs
+++ b/src/app/menu.rs
@@ -20,10 +20,10 @@ pub fn menu_bar<'a>(key_binds: &HashMap) -> Element<'a, Message
items(
key_binds,
vec![
- Item::Button(fl!("new-repo"), Action::CreateRepository),
- Item::Button(fl!("new-snap"), Action::CreateSnapshot),
- Item::Button(fl!("new-window"), Action::WindowNew),
- Item::Button(fl!("quit"), Action::WindowClose),
+ Item::Button(fl!("new-repo"), None, Action::CreateRepository),
+ Item::Button(fl!("new-snap"), None, Action::CreateSnapshot),
+ Item::Button(fl!("new-window"), None, Action::WindowNew),
+ Item::Button(fl!("quit"), None, Action::WindowClose),
],
),
),
@@ -31,7 +31,11 @@ pub fn menu_bar<'a>(key_binds: &HashMap) -> Element<'a, Message
root(fl!("edit")),
items(
key_binds,
- vec![Item::Button(fl!("delete-repo"), Action::DeleteRepository)],
+ vec![Item::Button(
+ fl!("delete-repo"),
+ None,
+ Action::DeleteRepository,
+ )],
),
),
Tree::with_children(
@@ -39,9 +43,9 @@ pub fn menu_bar<'a>(key_binds: &HashMap) -> Element<'a, Message
items(
key_binds,
vec![
- Item::Button(fl!("menu-settings"), Action::Settings),
+ Item::Button(fl!("menu-settings"), None, Action::Settings),
Item::Divider,
- Item::Button(fl!("menu-about"), Action::About),
+ Item::Button(fl!("menu-about"), None, Action::About),
],
),
),