Skip to content

Commit

Permalink
Revert "book: Go back to 4_8 for now"
Browse files Browse the repository at this point in the history
This reverts commit 0e0e059.

Closes #1467
  • Loading branch information
bilelmoussaoui committed Jan 21, 2024
1 parent 2011c0b commit e28d2fb
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
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

0 comments on commit e28d2fb

Please sign in to comment.