Skip to content

Commit

Permalink
cargo: Update gtk and libadwaita deps
Browse files Browse the repository at this point in the history
Fix warnings
  • Loading branch information
rafaelmardojai committed Aug 29, 2023
1 parent a099031 commit f69c702
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 98 deletions.
186 changes: 99 additions & 87 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ authors = ["Rafael Mardojai CM <email@rafaelmardojai.com>"]
edition = "2018"

[dependencies]
adw = { package = "libadwaita", version = "0.3", features = ["v1_2"] }
adw = { package = "libadwaita", version = "0.5", features = ["v1_4"] }
image = "0.24"
log = "0.4"
im-rc = "15.1.0"
pretty_env_logger = "0.4"
gettext-rs = { version = "0.6", features = ["gettext-system"] }
gtk = { package = "gtk4", version = "0.6", features = ["v4_8"] }
gtk = { package = "gtk4", version = "0.7", features = ["v4_10"] }
gtk-macros = "0.3"
once_cell = "1.5"
url = "2.2"
scraper = "0.12"
surf = "2.2"
async-std = "1.12"
human_bytes = { version = "0.4", default-features = false }
human_bytes = { version = "0.4", default-features = false }
2 changes: 1 addition & 1 deletion src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl SharePreviewApplication {
.modal(true)
.build();

dialog.show();
dialog.present();
}

fn create_window(&self) -> SharePreviewWindow {
Expand Down
1 change: 0 additions & 1 deletion src/models/log_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

use std::cell::RefCell;
use std::convert::TryFrom;

use glib::subclass::prelude::*;
use gtk::{
Expand Down
1 change: 0 additions & 1 deletion src/models/metadata_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

use std::cell::RefCell;
use std::convert::TryFrom;

use glib::subclass::prelude::*;
use gtk::{
Expand Down
6 changes: 3 additions & 3 deletions src/widgets/card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl CardBox {
self.imp().textbox.reorder_child_after(&*self.imp().site, None::<&gtk::Widget>);
self.imp().title.set_lines(2);
self.imp().title.set_wrap(true);
self.imp().title.style_context().add_class("title-4");
self.imp().title.add_css_class("title-4");
if let Some(_) = &card.description {
if &card.title.len() <= &65 {
self.imp().description.set_visible(true);
Expand All @@ -134,10 +134,10 @@ impl CardBox {
}
Social::Mastodon => {
self.imp().cardbox.set_orientation(gtk::Orientation::Horizontal);
self.imp().title.style_context().add_class("heading");
self.imp().title.add_css_class("heading");
}
Social::Twitter => {
self.imp().title.style_context().add_class("heading");
self.imp().title.add_css_class("heading");
if let Some(_) = &card.description {
self.imp().description.set_visible(true);
self.imp().description.set_wrap(true);
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/data_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ mod imp {

fn new() -> Self {
Self {
model: gio::ListStore::new(MetadataItem::static_type()),
model: gio::ListStore::new::<MetadataItem>(),
images_model: gtk::StringList::default(),
search: TemplateChild::default(),
images_search: TemplateChild::default(),
Expand Down
2 changes: 1 addition & 1 deletion src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ mod imp {

// Devel Profile
if PROFILE == "Devel" {
obj.style_context().add_class("devel");
obj.add_css_class("devel");
}
}
}
Expand Down

0 comments on commit f69c702

Please sign in to comment.