Skip to content
This repository has been archived by the owner on Feb 13, 2021. It is now read-only.

Update examples for the latest regen #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: rust
rust:
- nightly
- beta
- 1.36.0 # stable
- 1.39.0 # stable
- stable
addons:
apt:
Expand Down
7 changes: 1 addition & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ autobins = false
[dependencies]
chrono = "0.4"
url = "1.4"
futures-preview = { version = "0.3.0-alpha.15", optional = true}
futures = "0.3"

[dependencies.atk]
git = "https://github.com/gtk-rs/atk"
Expand Down Expand Up @@ -42,9 +42,6 @@ git = "https://github.com/gtk-rs/gdk4"
package = "gtk4"
git = "https://github.com/gtk-rs/gtk4"

[features]
futures = ["futures-preview", "glib/futures", "gio/futures"]

[[bin]]
name = "accessibility"

Expand Down Expand Up @@ -86,11 +83,9 @@ name = "drag_and_drop_textview"

[[bin]]
name = "gio_futures"
required-features = ["futures"]

[[bin]]
name = "gio_futures_await"
required-features = ["futures"]
edition = "2018"

[[bin]]
Expand Down
6 changes: 1 addition & 5 deletions build_travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ set -e

if [ "$GTK" = latest -o "$GTK" = "3.96" ]; then
BUNDLE="gtk-3.96.0-1"
if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
FEATURES=futures,gio/v2_44
else
FEATURES=gio/v2_44
fi
FEATURES=gio/v2_44
fi

if [ -n "$BUNDLE" ]; then
Expand Down
4 changes: 2 additions & 2 deletions src/bin/css.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ fn build_ui(application: &gtk::Application) {
let label = gtk::Button::new_with_label("hover me!");
// We need to name it in order to be able to use its name as a CSS label to
// apply CSS on it.
gtk::WidgetExtManual::set_name(&label, "label1");
WidgetExtManual::set_name(&label, "label1");

let entry = gtk::Entry::new();
// We need to name it in order to apply CSS on it.
gtk::WidgetExtManual::set_name(&entry, "entry1");
WidgetExtManual::set_name(&entry, "entry1");
entry.set_text("Some text");

let combo = gtk::ComboBoxText::new();
Expand Down
2 changes: 0 additions & 2 deletions src/bin/gio_futures_await.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(async_await)]

extern crate gio;
extern crate glib;
use gio::prelude::*;
Expand Down
3 changes: 1 addition & 2 deletions src/bin/overlay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ extern crate glib;
extern crate gtk;

use gio::prelude::*;
use glib::prelude::*;
use gtk::prelude::*;

use std::env::args;
Expand Down Expand Up @@ -52,7 +51,7 @@ fn build_ui(application: &gtk::Application) {
// The overlay label.
let overlay_text = gtk::Label::new(Some("0"));
// We need to name it in order to apply CSS on it.
gtk::WidgetExtManual::set_name(&overlay_text, "overlay-label");
WidgetExtManual::set_name(&overlay_text, "overlay-label");
// We put the overlay in the top-right corner of the window.
overlay_text.set_halign(gtk::Align::End);
overlay_text.set_valign(gtk::Align::Start);
Expand Down
2 changes: 1 addition & 1 deletion src/bin/progress_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ extern crate gtk;
use gio::prelude::*;
use gtk::prelude::*;

use gio::signal::Inhibit;
use glib::signal::Inhibit;
use std::cell::{Cell, RefCell};
use std::env::args;
use std::rc::Rc;
Expand Down
2 changes: 1 addition & 1 deletion src/bin/tree_model_sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ extern crate gio;
extern crate glib;
extern crate gtk;

use gio::prelude::ApplicationExtManual;
use gio::ApplicationExt;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Should we also use gio::prelude::ApplicationExt; here, for consistency?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we should use gio::prelude::* here for both :)

use gio::ApplicationExtManual;
use gtk::prelude::*;
use std::env::args;

Expand Down