Commit 97971b7f authored by Daniel García Moreno's avatar Daniel García Moreno

Dependencies update

parent 3f45856f
...@@ -5,16 +5,16 @@ version = "0.1.0" ...@@ -5,16 +5,16 @@ version = "0.1.0"
workspace = "../" workspace = "../"
[dependencies] [dependencies]
gdk = "0.7.0" gdk = "0.8.0"
gdk-pixbuf = "0.3.0" gdk-pixbuf = "0.4.0"
#gdk-pixbuf-sys = "0.5.0" #gdk-pixbuf-sys = "0.5.0"
glib = "0.4.1" glib = "0.5.0"
mime = "0.3.5" mime = "0.3.5"
regex = "0.2.6" regex = "0.2.10"
reqwest = "0.8.5" reqwest = "0.8.5"
serde = "1.0.27" serde = "1.0.33"
serde_derive = "1.0.27" serde_derive = "1.0.33"
serde_json = "1.0.9" serde_json = "1.0.13"
time = "0.1.39" time = "0.1.39"
tree_magic = "0.2.0" tree_magic = "0.2.0"
url = "1.7.0" url = "1.7.0"
...@@ -23,7 +23,7 @@ urlencoding = "1.0.0" ...@@ -23,7 +23,7 @@ urlencoding = "1.0.0"
[dependencies.cairo-rs] [dependencies.cairo-rs]
features = ["png"] features = ["png"]
version = "0.3.0" version = "0.4.1"
[dependencies.chrono] [dependencies.chrono]
features = ["serde"] features = ["serde"]
......
...@@ -15,6 +15,7 @@ extern crate unicode_segmentation; ...@@ -15,6 +15,7 @@ extern crate unicode_segmentation;
use self::unicode_segmentation::UnicodeSegmentation; use self::unicode_segmentation::UnicodeSegmentation;
use self::gdk_pixbuf::Pixbuf; use self::gdk_pixbuf::Pixbuf;
use self::gdk_pixbuf::PixbufExt;
use self::gdk::ContextExt; use self::gdk::ContextExt;
use self::regex::Regex; use self::regex::Regex;
......
...@@ -7,24 +7,24 @@ workspace = "../" ...@@ -7,24 +7,24 @@ workspace = "../"
[dependencies] [dependencies]
failure = "0.1.1" failure = "0.1.1"
gdk = "0.7.0" gdk = "0.8.0"
gdk-pixbuf = "0.3.0" gdk-pixbuf = "0.4.0"
gdk-pixbuf-sys = "0.5.0" gdk-pixbuf-sys = "0.6.0"
gio = "0.3.0" gio = "0.4.0"
glib = "0.4.1" glib = "0.5.0"
notify-rust = "3.4.2" notify-rust = "3.4.2"
pango = "0.3.0" pango = "0.4.0"
regex = "0.2.6" regex = "0.2.10"
secret-service = "0.4.0" secret-service = "0.4.0"
serde = "1.0.27" serde = "1.0.33"
serde_derive = "1.0.27" serde_derive = "1.0.33"
serde_json = "1.0.9" serde_json = "1.0.13"
url = "1.7.0" url = "1.7.0"
rand = "0.4.2" rand = "0.4.2"
[dependencies.cairo-rs] [dependencies.cairo-rs]
features = ["png"] features = ["png"]
version = "0.3.0" version = "0.4.1"
[dependencies.chrono] [dependencies.chrono]
features = ["serde"] features = ["serde"]
...@@ -35,4 +35,4 @@ path = "../fractal-api" ...@@ -35,4 +35,4 @@ path = "../fractal-api"
[dependencies.gtk] [dependencies.gtk]
features = ["v3_22"] features = ["v3_22"]
version = "0.3.0" version = "0.4.0"
extern crate gtk; extern crate gtk;
extern crate gdk_pixbuf; extern crate gdk_pixbuf;
extern crate gdk_pixbuf_sys;
extern crate secret_service; extern crate secret_service;
extern crate chrono; extern crate chrono;
extern crate gdk; extern crate gdk;
...@@ -34,6 +33,7 @@ use gio::ActionMapExt; ...@@ -34,6 +33,7 @@ use gio::ActionMapExt;
use glib; use glib;
use gio; use gio;
use self::gdk_pixbuf::Pixbuf; use self::gdk_pixbuf::Pixbuf;
use self::gdk_pixbuf::PixbufExt;
use self::gio::prelude::*; use self::gio::prelude::*;
use self::gtk::prelude::*; use self::gtk::prelude::*;
...@@ -2232,12 +2232,12 @@ impl AppOp { ...@@ -2232,12 +2232,12 @@ impl AppOp {
let h = pixb.get_height(); let h = pixb.get_height();
let scaled; let scaled;
if w > 600 { if w > 600 {
scaled = pixb.scale_simple(600, h*600/w, gdk_pixbuf_sys::GDK_INTERP_BILINEAR); scaled = pixb.scale_simple(600, h*600/w, gdk_pixbuf::InterpType::Bilinear);
} else { } else {
scaled = Ok(pixb.clone()); scaled = Some(pixb.clone());
} }
if let Ok(pb) = scaled { if let Some(pb) = scaled {
let window: gtk::ApplicationWindow = self.gtk_builder let window: gtk::ApplicationWindow = self.gtk_builder
.get_object("main_window") .get_object("main_window")
.expect("Can't find main_window in ui file."); .expect("Can't find main_window in ui file.");
......
...@@ -5,6 +5,7 @@ extern crate gdk_pixbuf; ...@@ -5,6 +5,7 @@ extern crate gdk_pixbuf;
use self::regex::Regex; use self::regex::Regex;
use self::gdk_pixbuf::Pixbuf; use self::gdk_pixbuf::Pixbuf;
use self::gdk_pixbuf::PixbufExt;
use failure::Error; use failure::Error;
use self::gdk::ContextExt; use self::gdk::ContextExt;
......
...@@ -6,6 +6,7 @@ extern crate cairo; ...@@ -6,6 +6,7 @@ extern crate cairo;
use self::gtk::prelude::*; use self::gtk::prelude::*;
pub use self::gtk::DrawingArea; pub use self::gtk::DrawingArea;
use self::gdk_pixbuf::Pixbuf; use self::gdk_pixbuf::Pixbuf;
use self::gdk_pixbuf::PixbufExt;
use self::gdk::ContextExt; use self::gdk::ContextExt;
......
...@@ -42,7 +42,8 @@ impl<'a> MemberBox<'a> { ...@@ -42,7 +42,8 @@ impl<'a> MemberBox<'a> {
let v = gtk::Box::new(gtk::Orientation::Vertical, 0); let v = gtk::Box::new(gtk::Orientation::Vertical, 0);
uid.set_text(&self.member.uid); uid.set_text(&self.member.uid);
uid.set_alignment(0.0, 0.0); uid.set_valign(gtk::Align::Start);
uid.set_halign(gtk::Align::Start);
if let Some(style) = uid.get_style_context() { if let Some(style) = uid.get_style_context() {
style.add_class("member-uid"); style.add_class("member-uid");
} }
...@@ -51,7 +52,8 @@ impl<'a> MemberBox<'a> { ...@@ -51,7 +52,8 @@ impl<'a> MemberBox<'a> {
username.set_tooltip_text(&self.member.get_alias().unwrap_or_default()[..]); username.set_tooltip_text(&self.member.get_alias().unwrap_or_default()[..]);
username.set_margin_end(5); username.set_margin_end(5);
username.set_ellipsize(pango::EllipsizeMode::End); username.set_ellipsize(pango::EllipsizeMode::End);
username.set_alignment(0.0, 0.5); username.set_valign(gtk::Align::Center);
username.set_halign(gtk::Align::Start);
if let Some(style) = username.get_style_context() { if let Some(style) = username.get_style_context() {
style.add_class("member"); style.add_class("member");
} }
......
...@@ -202,8 +202,8 @@ impl<'a> MessageBox<'a> { ...@@ -202,8 +202,8 @@ impl<'a> MessageBox<'a> {
w.set_line_wrap(true); w.set_line_wrap(true);
w.set_line_wrap_mode(pango::WrapMode::WordChar); w.set_line_wrap_mode(pango::WrapMode::WordChar);
w.set_justify(gtk::Justification::Left); w.set_justify(gtk::Justification::Left);
w.set_valign(gtk::Align::Start);
w.set_halign(gtk::Align::Start); w.set_halign(gtk::Align::Start);
w.set_alignment(0.0, 0.0);
w.set_selectable(true); w.set_selectable(true);
} }
...@@ -278,8 +278,8 @@ impl<'a> MessageBox<'a> { ...@@ -278,8 +278,8 @@ impl<'a> MessageBox<'a> {
date.set_markup(&format!("<span alpha=\"60%\">{}</span>", d.trim())); date.set_markup(&format!("<span alpha=\"60%\">{}</span>", d.trim()));
date.set_line_wrap(true); date.set_line_wrap(true);
date.set_justify(gtk::Justification::Right); date.set_justify(gtk::Justification::Right);
date.set_valign(gtk::Align::Start);
date.set_halign(gtk::Align::End); date.set_halign(gtk::Align::End);
date.set_alignment(1.0, 0.0);
if let Some(style) = date.get_style_context() { if let Some(style) = date.get_style_context() {
style.add_class("timestamp"); style.add_class("timestamp");
} }
......
...@@ -73,7 +73,7 @@ impl<'a> RoomBox<'a> { ...@@ -73,7 +73,7 @@ impl<'a> RoomBox<'a> {
msg.set_line_wrap_mode(pango::WrapMode::WordChar); msg.set_line_wrap_mode(pango::WrapMode::WordChar);
msg.set_justify(gtk::Justification::Left); msg.set_justify(gtk::Justification::Left);
msg.set_halign(gtk::Align::Start); msg.set_halign(gtk::Align::Start);
msg.set_alignment(0.0, 0.0); msg.set_valign(gtk::Align::Start);
let topic = gtk::Label::new(""); let topic = gtk::Label::new("");
topic.set_line_wrap(true); topic.set_line_wrap(true);
...@@ -81,13 +81,13 @@ impl<'a> RoomBox<'a> { ...@@ -81,13 +81,13 @@ impl<'a> RoomBox<'a> {
topic.set_markup(&util::markup(&r.topic.clone().unwrap_or_default())); topic.set_markup(&util::markup(&r.topic.clone().unwrap_or_default()));
topic.set_justify(gtk::Justification::Left); topic.set_justify(gtk::Justification::Left);
topic.set_halign(gtk::Align::Start); topic.set_halign(gtk::Align::Start);
topic.set_alignment(0.0, 0.0); topic.set_valign(gtk::Align::Start);
let idw = gtk::Label::new(""); let idw = gtk::Label::new("");
idw.set_markup(&format!("<span alpha=\"60%\">{}</span>", r.alias.clone().unwrap_or_default())); idw.set_markup(&format!("<span alpha=\"60%\">{}</span>", r.alias.clone().unwrap_or_default()));
idw.set_justify(gtk::Justification::Left); idw.set_justify(gtk::Justification::Left);
idw.set_halign(gtk::Align::Start); idw.set_halign(gtk::Align::Start);
idw.set_alignment(0.0, 0.0); idw.set_valign(gtk::Align::Start);
let joinbtn = gtk::Button::new_with_label("Join"); let joinbtn = gtk::Button::new_with_label("Join");
let rid = r.id.clone(); let rid = r.id.clone();
......
...@@ -99,7 +99,8 @@ impl RoomListGroup { ...@@ -99,7 +99,8 @@ impl RoomListGroup {
rev.set_reveal_child(true); rev.set_reveal_child(true);
let title = gtk::Label::new(name); let title = gtk::Label::new(name);
title.set_alignment(0.0, 0.0); title.set_halign(gtk::Align::Start);
title.set_valign(gtk::Align::Start);
let arrow = gtk::Image::new_from_icon_name("pan-down-symbolic", 2); let arrow = gtk::Image::new_from_icon_name("pan-down-symbolic", 2);
let expanded = Arc::new(Mutex::new(true)); let expanded = Arc::new(Mutex::new(true));
let title_eb = gtk::EventBox::new(); let title_eb = gtk::EventBox::new();
......
...@@ -50,7 +50,8 @@ impl RoomRow { ...@@ -50,7 +50,8 @@ impl RoomRow {
let text = gtk::Label::new(name.clone().as_str()); let text = gtk::Label::new(name.clone().as_str());
let baseu = url.clone(); let baseu = url.clone();
text.set_alignment(0.0, 0.0); text.set_valign(gtk::Align::Start);
text.set_halign(gtk::Align::Start);
text.set_ellipsize(pango::EllipsizeMode::End); text.set_ellipsize(pango::EllipsizeMode::End);
let n = room.notifications; let n = room.notifications;
......
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