Commit b07d0fbb authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui
Browse files

bump gtk-rs

parent 4ce4557d
Pipeline #195555 failed with stage
in 22 minutes and 38 seconds
This diff is collapsed.
......@@ -5,15 +5,15 @@ authors = ["Bilal Elmoussaoui <bilal.elmoussaoui@gnome.org>"]
edition = "2018"
[dependencies]
gtk = { version = "0.8", features = ["v3_24"] }
glib = "0.9"
gio = "0.8"
gdk = "0.12"
pangocairo = "0.9"
gtk = { version = "0.9", features = ["v3_24"] }
glib = "0.10"
gio = "0.9"
gdk = "0.13"
pangocairo = "0.10"
log = "0.4"
gettext-rs = { version = "0.4", features = ["gettext-system"] }
libhandy = "0.5"
pango = "0.8"
libhandy = "0.6"
pango = "0.9"
sass-rs = "0.2"
pretty_env_logger = "0.4"
dbus = "0.8"
......
......@@ -28,7 +28,6 @@
"--share=network"
],
"env": {
"RUSTFLAGS": "--remap-path-prefix =../",
"CARGO_HOME": "/run/build/contrast/cargo",
"RUST_BACKTRACE": "1",
"RUST_LOG": "contrast=info"
......@@ -51,7 +50,7 @@
],
"sources": [{
"type": "git",
"url": "https://source.puri.sm/Librem5/libhandy.git",
"url": "https://gitlab.gnome.org/GNOME/libhandy.git",
"branch": "libhandy-0-0"
}]
},
......
......@@ -143,11 +143,11 @@ impl Application {
self,
"about",
clone!(@strong window => move |_, _| {
let builder = gtk::Builder::new_from_resource("/org/gnome/design/Contrast/about_dialog.ui");
let builder = gtk::Builder::from_resource("/org/gnome/design/Contrast/about_dialog.ui");
get_widget!(builder, gtk::AboutDialog, about_dialog);
about_dialog.set_transient_for(window.as_ref());
about_dialog.connect_response(|dialog, _| dialog.destroy());
about_dialog.connect_response(|dialog, _| dialog.close());
about_dialog.show();
})
);
......
......@@ -54,7 +54,7 @@ impl ObjectImpl for ColourEntryPrivate {
let icon_rectangle = entry.get_icon_area(gtk::EntryIconPosition::Primary);
colour_popover.widget.set_pointing_to(&icon_rectangle);
let colour = entry.get_text().unwrap();
let colour = entry.get_text();
if let Ok(rgba) = gdk::RGBA::from_str(&colour) {
colour_popover.color_chooser.set_rgba(&rgba);
}
......@@ -74,7 +74,7 @@ impl ObjectImpl for ColourEntryPrivate {
self_.pack_start(&self.entry, false, false, 0);
let colour_selector = gtk::Button::new();
let colour_selector_img = gtk::Image::new_from_icon_name(Some("color-select-symbolic"), gtk::IconSize::Button);
let colour_selector_img = gtk::Image::from_icon_name(Some("color-select-symbolic"), gtk::IconSize::Button);
colour_selector_img.show();
colour_selector.set_image(Some(&colour_selector_img));
colour_selector.show();
......@@ -123,7 +123,7 @@ impl ColourEntry {
pub fn get_text(&self) -> String {
let self_ = ColourEntryPrivate::from_instance(self);
self_.entry.get_text().unwrap().to_string()
self_.entry.get_text().to_string()
}
pub fn set_text(&self, colour: Option<String>) {
......
......@@ -72,7 +72,7 @@ impl ColourPopover {
let back_btn = gtk::Button::new();
back_btn.set_halign(gtk::Align::Start);
back_btn.set_valign(gtk::Align::Center);
let back_img = gtk::Image::new_from_icon_name(Some("go-previous-symbolic"), gtk::IconSize::Button);
let back_img = gtk::Image::from_icon_name(Some("go-previous-symbolic"), gtk::IconSize::Button);
back_img.show();
back_btn.set_image(Some(&back_img));
self.color_chooser.set_property_show_editor(false);
......
......@@ -54,7 +54,7 @@ impl ChartBarWidget {
drawing_area.connect_draw(clone!(@strong self.markers as markers => move |widget, context| {
let style_context = widget.get_style_context();
let pango_context = widget.get_pango_context().unwrap();
let pango_context = widget.get_pango_context();
let allocation = widget.get_allocation();
let block_width: f64 = (allocation.width as f64) / n_blocks;
......
......@@ -26,6 +26,7 @@ fn main() {
pretty_env_logger::init();
gtk::init().expect("Unable to start GTK3");
libhandy::init().expect("Failed to initialize libhandy-0.0");
// Prepare i18n
setlocale(LocaleCategory::LcAll, "");
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
......
......@@ -66,7 +66,7 @@ impl ObjectImpl for WindowPrivate {
}
self_.set_icon_name(Some(APP_ID));
// Keyboard Shortcuts
let builder = gtk::Builder::new_from_resource("/org/gnome/design/Contrast/shortcuts.ui");
let builder = gtk::Builder::from_resource("/org/gnome/design/Contrast/shortcuts.ui");
get_widget!(builder, gtk::ShortcutsWindow, shortcuts_dialog);
self_.set_help_overlay(Some(&shortcuts_dialog));
......@@ -83,7 +83,7 @@ impl ObjectImpl for WindowPrivate {
reverse_btn.set_tooltip_text(Some(&gettext("Reverse Colours")));
reverse_btn.set_halign(gtk::Align::Center);
reverse_btn.set_action_name(Some("win.reverse-colors"));
let reverse_img = gtk::Image::new_from_icon_name(Some("network-transmit-receive-symbolic"), gtk::IconSize::Button);
let reverse_img = gtk::Image::from_icon_name(Some("network-transmit-receive-symbolic"), gtk::IconSize::Button);
reverse_btn.set_image(Some(&reverse_img));
let entries_container = gtk::Box::new(gtk::Orientation::Horizontal, 0);
......@@ -98,9 +98,9 @@ impl ObjectImpl for WindowPrivate {
primary_menu.append(Some(&gettext("_About Contrast")), Some("app.about"));
let primary_btn = gtk::MenuButton::new();
let primary_popover = gtk::Popover::new_from_model(Some(&primary_btn), &primary_menu);
let primary_popover = gtk::Popover::from_model(Some(&primary_btn), &primary_menu);
let primary_img = gtk::Image::new_from_icon_name(Some("open-menu-symbolic"), gtk::IconSize::Button);
let primary_img = gtk::Image::from_icon_name(Some("open-menu-symbolic"), gtk::IconSize::Button);
primary_btn.add(&primary_img);
primary_btn.set_popover(Some(&primary_popover));
headerbar.pack_end(&primary_btn);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment