Upgrade gtk-rs crates.
This commit is contained in:
@@ -7,10 +7,10 @@ workspace = "../"
|
||||
|
||||
[dependencies]
|
||||
dissolve = "0.2.2"
|
||||
gdk = "0.6.0"
|
||||
gdk-pixbuf = "0.2.0"
|
||||
gio = "0.2.0"
|
||||
glib = "0.3.1"
|
||||
gdk = "0.7.0"
|
||||
gdk-pixbuf = "0.3.0"
|
||||
gio = "0.3.0"
|
||||
glib = "0.4.0"
|
||||
log = "0.3.8"
|
||||
loggerv = "0.5.1"
|
||||
open = "1.2.1"
|
||||
@@ -26,7 +26,7 @@ git = "https://github.com/diesel-rs/diesel.git"
|
||||
|
||||
[dependencies.gtk]
|
||||
features = ["v3_22"]
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
|
||||
[dependencies.hammond-data]
|
||||
path = "../hammond-data"
|
||||
|
||||
@@ -102,6 +102,8 @@ fn build_ui(app: >k::Application) {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
use gio::ApplicationExtManual;
|
||||
|
||||
// TODO: make the the logger a cli -vv option
|
||||
loggerv::init_with_level(LogLevel::Info).unwrap();
|
||||
static_resource::init().expect("Something went wrong with the resource file initialization.");
|
||||
@@ -113,5 +115,6 @@ fn main() {
|
||||
build_ui(app);
|
||||
});
|
||||
|
||||
application.run(&[]);
|
||||
// application.run(&[]);
|
||||
ApplicationExtManual::run(&application, &[]);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,8 @@ fn create_flowbox_child(pd: &Podcast) -> gtk::FlowBoxChild {
|
||||
|
||||
let fbc = gtk::FlowBoxChild::new();
|
||||
// There's probably a better way to store the id somewhere.
|
||||
fbc.set_name(&pd.id().to_string());
|
||||
// fbc.set_name(&pd.id().to_string());
|
||||
WidgetExt::set_name(&fbc, &pd.id().to_string());
|
||||
fbc.add(&box_);
|
||||
fbc
|
||||
}
|
||||
@@ -136,10 +137,13 @@ pub fn update_podcasts_view(stack: >k::Stack) {
|
||||
}
|
||||
|
||||
fn init_flowbox(stack: >k::Stack, flowbox: >k::FlowBox) {
|
||||
use gtk::WidgetExt;
|
||||
|
||||
// TODO: handle unwraps.
|
||||
flowbox.connect_child_activated(clone!(stack => move |_, child| {
|
||||
// This is such an ugly hack...
|
||||
let id = child.get_name().unwrap().parse::<i32>().unwrap();
|
||||
// let id = child.get_name().unwrap().parse::<i32>().unwrap();
|
||||
let id = WidgetExt::get_name(child).unwrap().parse::<i32>().unwrap();
|
||||
let parent = dbqueries::get_podcast_from_id(id).unwrap();
|
||||
on_flowbox_child_activate(&stack, &parent);
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user