Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "book: Go back to 4_8 for now" #1571

Merged
merged 1 commit into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion book/listings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"


[dependencies]
gtk = { version = "*", package = "gtk4", features = ["v4_8"] }
gtk = { version = "*", package = "gtk4", features = ["v4_12"] }
adw = { version = ">= 0.3.1", package = "libadwaita", features = ["v1_4"] }
once_cell = "1.0"
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion book/listings/css/1/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn main() -> glib::ExitCode {
fn load_css() {
// Load the CSS file and add it to the provider
let provider = CssProvider::new();
provider.load_from_data(include_str!("style.css"));
provider.load_from_string(include_str!("style.css"));

// Add the provider to the default screen
gtk::style_context_add_provider_for_display(
Expand Down
2 changes: 1 addition & 1 deletion book/listings/css/2/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn main() -> glib::ExitCode {
fn load_css() {
// Load the CSS file and add it to the provider
let provider = CssProvider::new();
provider.load_from_data(include_str!("style.css"));
provider.load_from_string(include_str!("style.css"));

// Add the provider to the default screen
gtk::style_context_add_provider_for_display(
Expand Down
2 changes: 1 addition & 1 deletion book/listings/css/3/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn main() -> glib::ExitCode {
fn load_css() {
// Load the CSS file and add it to the provider
let provider = CssProvider::new();
provider.load_from_data(include_str!("style.css"));
provider.load_from_string(include_str!("style.css"));

// Add the provider to the default screen
gtk::style_context_add_provider_for_display(
Expand Down
2 changes: 1 addition & 1 deletion book/listings/css/4/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn main() -> glib::ExitCode {
fn load_css() {
// Load the CSS file and add it to the provider
let provider = CssProvider::new();
provider.load_from_data(include_str!("style.css"));
provider.load_from_string(include_str!("style.css"));

// Add the provider to the default screen
gtk::style_context_add_provider_for_display(
Expand Down
2 changes: 1 addition & 1 deletion book/listings/css/7/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn main() -> glib::ExitCode {
fn load_css() {
// Load the CSS file and add it to the provider
let provider = CssProvider::new();
provider.load_from_data(include_str!("style.css"));
provider.load_from_string(include_str!("style.css"));

// Add the provider to the default screen
gtk::style_context_add_provider_for_display(
Expand Down
2 changes: 1 addition & 1 deletion book/listings/css/8/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn main() -> glib::ExitCode {
fn load_css() {
// Load the CSS file and add it to the provider
let provider = CssProvider::new();
provider.load_from_data(include_str!("style.css"));
provider.load_from_string(include_str!("style.css"));

// Add the provider to the default screen
gtk::style_context_add_provider_for_display(
Expand Down
2 changes: 1 addition & 1 deletion book/listings/css/9/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn main() -> glib::ExitCode {
fn load_css() {
// Load the CSS file and add it to the provider
let provider = CssProvider::new();
provider.load_from_data(include_str!("style.css"));
provider.load_from_string(include_str!("style.css"));

// Add the provider to the default screen
gtk::style_context_add_provider_for_display(
Expand Down
4 changes: 2 additions & 2 deletions book/src/project_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ pkg-config --modversion gtk4
```

Use this information to add the [gtk4 crate](https://crates.io/crates/gtk4) to your dependencies in `Cargo.toml`.
At the time of this writing the newest version is `4.8`.
At the time of this writing the newest version is `4.12`.

```
cargo add gtk4 --rename gtk --features v4_8
cargo add gtk4 --rename gtk --features v4_12
```

By specifying this feature you opt-in to API that was added with minor releases of GTK 4.
Expand Down
Loading