[gtk-web: 1/2] Use gtk::Button::with_label() in Rust Example
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-web: 1/2] Use gtk::Button::with_label() in Rust Example
- Date: Wed, 16 Dec 2020 13:38:52 +0000 (UTC)
commit 374c7d94b5fb270599b6052afb07e69389dde09b
Author: Chris Mayo <aklhfex gmail com>
Date: Thu Oct 22 19:37:58 2020 +0100
Use gtk::Button::with_label() in Rust Example
gtk::Button::with_label() calls gtk_sys::gtk_button_new_with_label().
_docs/language-bindings/rust.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/_docs/language-bindings/rust.md b/_docs/language-bindings/rust.md
index 8b11dec0..e4dd403f 100644
--- a/_docs/language-bindings/rust.md
+++ b/_docs/language-bindings/rust.md
@@ -27,7 +27,7 @@ fn on_activate(application: >k::Application) {
// … create a new window …
let window = gtk::ApplicationWindow::new(application);
// … with a button in it …
- let button = gtk::Button::new_with_label("Hello World!");
+ let button = gtk::Button::with_label("Hello World!");
// … which closes the window when clicked
button.connect_clicked(clone!(@weak window => move |_| window.close()));
window.add(&button);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]