From 1a1741ae141fd86634dc35df7e630a3fc1cbaca5 Mon Sep 17 00:00:00 2001 From: altart Date: Thu, 15 Jul 2021 20:26:48 -0300 Subject: [PATCH] Update gtk-rs to 0.14.0 --- Cargo.lock | 285 +++++++++++++++++++------------------ Cargo.toml | 10 +- src/main.rs | 23 ++- src/resources/lorem.glade~ | 204 -------------------------- 4 files changed, 165 insertions(+), 357 deletions(-) delete mode 100644 src/resources/lorem.glade~ diff --git a/Cargo.lock b/Cargo.lock index db21460..c79e8bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "anyhow" version = "1.0.38" @@ -8,23 +10,21 @@ checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" [[package]] name = "atk" -version = "0.9.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812b4911e210bd51b24596244523c856ca749e6223c50a7fbbba3f89ee37c426" +checksum = "a83b21d2aa75e464db56225e1bda2dd5993311ba1095acaa8fa03d1ae67026ba" dependencies = [ "atk-sys", "bitflags", "glib", - "glib-sys", - "gobject-sys", "libc", ] [[package]] name = "atk-sys" -version = "0.10.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f530e4af131d94cc4fa15c5c9d0348f0ef28bac64ba660b6b2a1cf2605dedfce" +checksum = "badcf670157c84bb8b1cf6b5f70b650fed78da2033c9eed84c4e49b11cbe83ea" dependencies = [ "glib-sys", "gobject-sys", @@ -32,6 +32,12 @@ dependencies = [ "system-deps", ] +[[package]] +name = "autocfg" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" + [[package]] name = "bitflags" version = "1.2.1" @@ -40,24 +46,22 @@ checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "cairo-rs" -version = "0.9.1" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5c0f2e047e8ca53d0ff249c54ae047931d7a6ebe05d00af73e0ffeb6e34bdb8" +checksum = "a408c13bbc04c3337b94194c1a4d04067097439b79dbc1dcbceba299d828b9ea" dependencies = [ "bitflags", "cairo-sys-rs", "glib", - "glib-sys", - "gobject-sys", "libc", "thiserror", ] [[package]] name = "cairo-sys-rs" -version = "0.10.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ed2639b9ad5f1d6efa76de95558e11339e7318426d84ac4890b86c03e828ca7" +checksum = "d7c9c3928781e8a017ece15eace05230f04b647457d170d2d9641c94a444ff80" dependencies = [ "glib-sys", "libc", @@ -65,10 +69,13 @@ dependencies = [ ] [[package]] -name = "cc" -version = "1.0.66" +name = "cfg-expr" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" +checksum = "30aa9e2ffbb838c6b451db14f3cd8e63ed622bf859f9956bc93845a10fafc26a" +dependencies = [ + "smallvec", +] [[package]] name = "cfg-if" @@ -83,18 +90,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] -name = "futures" -version = "0.3.12" +name = "field-offset" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9052a1a50244d8d5aa9bf55cbc2fb6f357c86cc52e46c62ed390a7180cf150" +checksum = "1e1c54951450cbd39f3dbcf1005ac413b49487dabf18a720ad2383eccfeffb92" dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", + "memoffset", + "rustc_version", ] [[package]] @@ -104,7 +106,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846" dependencies = [ "futures-core", - "futures-sink", ] [[package]] @@ -130,24 +131,6 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28be053525281ad8259d47e4de5de657b25e7bac113458555bb4b70bc6870500" -[[package]] -name = "futures-macro" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c287d25add322d9f9abdcdc5927ca398917996600182178774032e9f8258fedd" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6" - [[package]] name = "futures-task" version = "0.3.12" @@ -163,60 +146,46 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b" dependencies = [ - "futures-channel", "futures-core", - "futures-io", - "futures-macro", - "futures-sink", "futures-task", - "memchr", "pin-project-lite", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] [[package]] name = "gdk" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db00839b2a68a7a10af3fa28dfb3febaba3a20c3a9ac2425a33b7df1f84a6b7d" +checksum = "679e22651cd15888e7acd01767950edca2ee9fcd6421fbf5b3c3b420d4e88bb0" dependencies = [ "bitflags", "cairo-rs", - "cairo-sys-rs", "gdk-pixbuf", "gdk-sys", "gio", - "gio-sys", "glib", - "glib-sys", - "gobject-sys", "libc", "pango", ] [[package]] name = "gdk-pixbuf" -version = "0.9.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6dae3cb99dd49b758b88f0132f8d401108e63ae8edd45f432d42cdff99998a" +checksum = "534192cb8f01daeb8fab2c8d4baa8f9aae5b7a39130525779f5c2608e235b10f" dependencies = [ "gdk-pixbuf-sys", "gio", - "gio-sys", "glib", - "glib-sys", - "gobject-sys", "libc", ] [[package]] name = "gdk-pixbuf-sys" -version = "0.10.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bfe468a7f43e97b8d193a762b6c5cf67a7d36cacbc0b9291dbcae24bfea1e8f" +checksum = "f097c0704201fbc8f69c1762dc58c6947c8bb188b8ed0bc7e65259f1894fe590" dependencies = [ "gio-sys", "glib-sys", @@ -227,9 +196,9 @@ dependencies = [ [[package]] name = "gdk-sys" -version = "0.10.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a9653cfc500fd268015b1ac055ddbc3df7a5c9ea3f4ccef147b3957bd140d69" +checksum = "0e091b3d3d6696949ac3b3fb3c62090e5bfd7bd6850bef5c3c5ea701de1b1f1e" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -255,20 +224,16 @@ dependencies = [ [[package]] name = "gio" -version = "0.9.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb60242bfff700772dae5d9e3a1f7aa2e4ebccf18b89662a16acb2822568561" +checksum = "86c6823b39d46d22cac2466de261f28d7f049ebc18f7b35296a42c7ed8a88325" dependencies = [ "bitflags", - "futures", "futures-channel", "futures-core", "futures-io", - "futures-util", "gio-sys", "glib", - "glib-sys", - "gobject-sys", "libc", "once_cell", "thiserror", @@ -276,9 +241,9 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.10.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e24fb752f8f5d2cf6bbc2c606fd2bc989c81c5e2fe321ab974d54f8b6344eac" +checksum = "c0a41df66e57fcc287c4bcf74fc26b884f31901ea9792ec75607289b456f48fa" dependencies = [ "glib-sys", "gobject-sys", @@ -289,32 +254,31 @@ dependencies = [ [[package]] name = "glib" -version = "0.10.3" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c685013b7515e668f1b57a165b009d4d28cb139a8a989bbd699c10dad29d0c5" +checksum = "dbecad7a3a898ee749d491ce2ae0decb0bce9e736f9747bc49159b1cea5d37f4" dependencies = [ "bitflags", "futures-channel", "futures-core", "futures-executor", "futures-task", - "futures-util", "glib-macros", "glib-sys", "gobject-sys", "libc", "once_cell", + "smallvec", ] [[package]] name = "glib-macros" -version = "0.10.1" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41486a26d1366a8032b160b59065a59fb528530a46a49f627e7048fb8c064039" +checksum = "2aad66361f66796bfc73f530c51ef123970eb895ffba991a234fcf7bea89e518" dependencies = [ "anyhow", "heck", - "itertools", "proc-macro-crate", "proc-macro-error", "proc-macro2", @@ -324,9 +288,9 @@ dependencies = [ [[package]] name = "glib-sys" -version = "0.10.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e9b997a66e9a23d073f2b1abb4dbfc3925e0b8952f67efd8d9b6e168e4cdc1" +checksum = "1c1d60554a212445e2a858e42a0e48cece1bd57b311a19a9468f70376cf554ae" dependencies = [ "libc", "system-deps", @@ -334,9 +298,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.10.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "952133b60c318a62bf82ee75b93acc7e84028a093e06b9e27981c2b6fe68218c" +checksum = "aa92cae29759dae34ab5921d73fff5ad54b3d794ab842c117e36cafc7994c3f5" dependencies = [ "glib-sys", "libc", @@ -345,37 +309,32 @@ dependencies = [ [[package]] name = "gtk" -version = "0.9.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f022f2054072b3af07666341984562c8e626a79daa8be27b955d12d06a5ad6a" +checksum = "10ae864e5eab8bc8b6b8544ed259eb02dd61b25323b20e777a77aa289c05fd0c" dependencies = [ "atk", "bitflags", "cairo-rs", - "cairo-sys-rs", - "cc", + "field-offset", + "futures-channel", "gdk", "gdk-pixbuf", - "gdk-pixbuf-sys", - "gdk-sys", "gio", - "gio-sys", "glib", - "glib-sys", - "gobject-sys", "gtk-sys", + "gtk3-macros", "libc", "once_cell", "pango", - "pango-sys", "pkg-config", ] [[package]] name = "gtk-sys" -version = "0.10.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89acda6f084863307d948ba64a4b1ef674e8527dddab147ee4cdcc194c880457" +checksum = "8c14c8d3da0545785a7c5a120345b3abb534010fb8ae0f2ef3f47c027fba303e" dependencies = [ "atk-sys", "cairo-sys-rs", @@ -389,6 +348,21 @@ dependencies = [ "system-deps", ] +[[package]] +name = "gtk3-macros" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21de1da96dc117443fb03c2e270b2d34b7de98d0a79a19bbb689476173745b79" +dependencies = [ + "anyhow", + "heck", + "proc-macro-crate", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "heck" version = "0.3.2" @@ -400,9 +374,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf" dependencies = [ "either", ] @@ -425,10 +399,13 @@ dependencies = [ ] [[package]] -name = "memchr" -version = "2.3.4" +name = "memoffset" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +dependencies = [ + "autocfg", +] [[package]] name = "once_cell" @@ -438,14 +415,12 @@ checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" [[package]] name = "pango" -version = "0.9.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9937068580bebd8ced19975938573803273ccbcbd598c58d4906efd4ac87c438" +checksum = "415823a4fb9f1789785cd6e2d2413816f2ecff92380382969aaca9c400e13a19" dependencies = [ "bitflags", "glib", - "glib-sys", - "gobject-sys", "libc", "once_cell", "pango-sys", @@ -453,9 +428,9 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.10.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d2650c8b62d116c020abd0cea26a4ed96526afda89b1c4ea567131fdefc890" +checksum = "2367099ca5e761546ba1d501955079f097caa186bb53ce0f718dca99ac1942fe" dependencies = [ "glib-sys", "gobject-sys", @@ -463,6 +438,15 @@ dependencies = [ "system-deps", ] +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + [[package]] name = "pin-project-lite" version = "0.2.4" @@ -489,10 +473,11 @@ checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "proc-macro-crate" -version = "0.1.5" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +checksum = "41fdbd1df62156fbc5945f4762632564d7d038153091c3fcf1067f6aef7cff92" dependencies = [ + "thiserror", "toml", ] @@ -520,18 +505,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - [[package]] name = "proc-macro2" version = "1.0.24" @@ -552,9 +525,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" dependencies = [ "libc", "rand_chacha", @@ -590,6 +563,33 @@ dependencies = [ "rand_core", ] +[[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.123" @@ -602,17 +602,23 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +[[package]] +name = "smallvec" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" + [[package]] name = "strum" -version = "0.18.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" +checksum = "aaf86bbcfd1fa9670b7a129f64fc0c9fcbbfe4f1bc4210e9e98fe71ffc12cde2" [[package]] name = "strum_macros" -version = "0.18.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" +checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec" dependencies = [ "heck", "proc-macro2", @@ -633,11 +639,14 @@ dependencies = [ [[package]] name = "system-deps" -version = "1.3.2" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3ecc17269a19353b3558b313bba738b25d82993e30d62a18406a24aba4649b" +checksum = "7ab7dbd121ce66af2176147a48c7e01aaf1f001837a18a7cf4317858606bbdf8" dependencies = [ + "anyhow", + "cfg-expr", "heck", + "itertools", "pkg-config", "strum", "strum_macros", @@ -648,18 +657,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.23" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146" +checksum = "93119e4feac1cbe6c798c34d3a53ea0026b0b1de6a120deef895137c0529bfe2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.23" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1" +checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745" dependencies = [ "proc-macro2", "quote", @@ -675,6 +684,12 @@ dependencies = [ "serde", ] +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + [[package]] name = "unicode-segmentation" version = "1.7.1" @@ -689,9 +704,9 @@ checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" [[package]] name = "version-compare" -version = "0.0.10" +version = "0.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d63556a25bae6ea31b52e640d7c41d1ab27faba4ccb600013837a3d0b3994ca1" +checksum = "1c18c859eead79d8b95d09e4678566e8d70105c4e7b251f707a03df32442661b" [[package]] name = "version_check" diff --git a/Cargo.toml b/Cargo.toml index 106445f..ed7a841 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,11 +11,11 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -rand = "0.8.3" -glib = "0.10.2" -gtk = "0.9.2" -gdk = "0.13.2" -gio = "0.9.1" +rand = "0.8.4" +glib = "0.14.2" +gtk = "0.14.0" +gdk = "0.14.0" +gio = "0.14.0" [package.metadata.deb] maintainer = "Pedro Mendes " diff --git a/src/main.rs b/src/main.rs index c3bdd97..cf96f1b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,13 +4,10 @@ extern crate gdk; extern crate glib; use gtk::prelude::*; -use gio::prelude::*; use glib::clone; use gtk::{ApplicationWindow, Builder, Label, Button, Adjustment, Clipboard}; -use std::env::args; - mod lorem; use lorem::Lorem; @@ -24,18 +21,18 @@ fn build_ui(application: >k::Application) { let glade_src = include_str!("./resources/lorem.glade"); let builder = Builder::from_string(glade_src); - let window: ApplicationWindow = builder.get_object("window").expect("Cound't get ApplicationWindow"); - let label: Label = builder.get_object("label").expect("Cound't get Label"); - let min_adjustment: Adjustment = builder.get_object("min_adjust").expect("Cound't get Adjustment"); - let max_adjustment: Adjustment = builder.get_object("max_adjust").expect("Cound't get Adjustment"); - let gen_button: Button = builder.get_object("gen").expect("Cound't get Button"); + let window: ApplicationWindow = builder.object("window").expect("Cound't get ApplicationWindow"); + let label: Label = builder.object("label").expect("Cound't get Label"); + let min_adjustment: Adjustment = builder.object("min_adjust").expect("Cound't get Adjustment"); + let max_adjustment: Adjustment = builder.object("max_adjust").expect("Cound't get Adjustment"); + let gen_button: Button = builder.object("gen").expect("Cound't get Button"); gen_button.connect_clicked(clone!(@weak label => move |_| { - generate(label, min_adjustment.get_value() as u32, max_adjustment.get_value() as u32); + generate(label, min_adjustment.value() as u32, max_adjustment.value() as u32); })); - let copy_button: Button = builder.get_object("copy").expect("Cound't get Button"); + let copy_button: Button = builder.object("copy").expect("Cound't get Button"); copy_button.connect_clicked(clone!(@weak label => move |_| { let clipboard = Clipboard::get(&gdk::SELECTION_CLIPBOARD); - clipboard.set_text(&label.get_text()); + clipboard.set_text(&label.text()); })); generate(label, 2, 3); window.set_application(Some(application)); @@ -46,10 +43,10 @@ fn main() { let application = gtk::Application::new( Some("com.github.altart.lorem"), Default::default(), - ).expect("Initialization failed"); + ); application.connect_activate(|app| { build_ui(app) }); - application.run(&args().collect::>()); + application.run(); } diff --git a/src/resources/lorem.glade~ b/src/resources/lorem.glade~ deleted file mode 100644 index 0b92757..0000000 --- a/src/resources/lorem.glade~ +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - - - True - False - gtk-copy - - - 1 - 200 - 3 - 1 - 10 - - - 1 - 200 - 2 - 1 - 10 - - - False - center - 623 - 394 - lorem - - - True - False - True - - - Generate - True - True - False - True - Generate an paragraph of Lorem ipsum - - - Generate - Generate an paragraph of Lorem ipsum - - - - - - - True - True - False - True - Copy - copy_icon - - - Copy - Copy - - - - - 1 - - - - - True - False - 6 - - - True - False - Min: - - - False - False - 0 - - - - - True - True - Minimum number of paragraphs - 2 - min_adjust - 2 - - - Min - Minimum number of paragraphs - - - - - False - True - 1 - - - - - True - False - Max: - - - False - False - 2 - - - - - True - True - Maximum number of paragraphs - 3 - max_adjust - 3 - - - Max - Maximum number of paragraphs - - - - - False - True - 3 - - - - - - - - - True - True - never - in - - - True - False - - - True - False - start - start - True - True - False - - - - - - - - - - -