Minor home button change.
This commit is contained in:
parent
422e3fc638
commit
79fb8c2290
@ -95,6 +95,8 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
@ -119,6 +121,8 @@ Warn: This will delete downloaded content associated with this Podcast.</propert
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Mark all episodes as Played.</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
use gtk;
|
||||
use gtk::prelude::*;
|
||||
|
||||
use index_feed;
|
||||
use hammond_data::index_feed;
|
||||
use hammond_data::index_feed::Database;
|
||||
|
||||
use podcasts_view::update_podcasts_view;
|
||||
use utils;
|
||||
|
||||
// http://gtk-rs.org/tuto/closures
|
||||
@ -53,7 +55,16 @@ pub fn get_headerbar(db: &Database, stack: >k::Stack) -> gtk::HeaderBar {
|
||||
|
||||
// TODO: make it a back arrow button, that will hide when appropriate,
|
||||
// and add a StackSwitcher when more views are added.
|
||||
home_button.connect_clicked(clone!(stack => move |_| stack.set_visible_child_name("pd_grid")));
|
||||
home_button.connect_clicked(clone!(db, stack => move |_| {
|
||||
let vis = stack.get_visible_child_name().unwrap();
|
||||
if vis == "pd_grid" {
|
||||
// More conviniet way to reload podcasts_flowbox while trying out stuff.
|
||||
// Ideally, the functionality should be removed from final design.
|
||||
update_podcasts_view(&db, &stack);
|
||||
} else {
|
||||
stack.set_visible_child_name("pd_grid");
|
||||
}
|
||||
}));
|
||||
|
||||
// FIXME: There appears to be a memmory leak here.
|
||||
refresh_button.connect_clicked(clone!(stack, db => move |_| {
|
||||
|
||||
@ -14,7 +14,6 @@ extern crate loggerv;
|
||||
extern crate open;
|
||||
|
||||
use log::LogLevel;
|
||||
use hammond_data::index_feed;
|
||||
use hammond_data::dbcheckup;
|
||||
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user