From 0c61c2982851725abebf555c35efd1684b64d61c Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 28 Feb 2025 09:30:45 +0100 Subject: [PATCH] Remove gtk3-hello-world It's gtk4 now, which is much better supported. --- gtk3-hello-world/Cargo.toml | 9 -------- gtk3-hello-world/src/main.rs | 41 ------------------------------------ 2 files changed, 50 deletions(-) delete mode 100644 gtk3-hello-world/Cargo.toml delete mode 100644 gtk3-hello-world/src/main.rs diff --git a/gtk3-hello-world/Cargo.toml b/gtk3-hello-world/Cargo.toml deleted file mode 100644 index 0d0f585..0000000 --- a/gtk3-hello-world/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "gtk3-hello-world" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -gtk = "0.15" diff --git a/gtk3-hello-world/src/main.rs b/gtk3-hello-world/src/main.rs deleted file mode 100644 index a44bc62..0000000 --- a/gtk3-hello-world/src/main.rs +++ /dev/null @@ -1,41 +0,0 @@ -use gtk::prelude::*; -use gtk::{ - Application, ApplicationWindow, - Button, - Widget, -}; - -fn build_ui(app: &Application) { - let button = Button::builder() - .label("Click me!") - .margin_top(12) - .margin_bottom(12) - .margin_start(12) - .margin_end(12) - .build(); - - button.connect_clicked(move |button| { - button.set_label("Hello world!"); - }); - - let button_w: &Widget = button.upcast_ref::(); - - println!("button visible: {}", button_w.is_visible()); - - let window = ApplicationWindow::builder() - .application(app) - .title("Hello GTK") - .child(&button) - .build(); - - window.show_all(); -} - -fn main() { - let app = Application::builder() - .application_id("ork.gtk-rs.example") - .build(); - - app.connect_activate(build_ui); - app.run(); -} -- 2.39.5