gui: Start idle callbacks directly from the collection manager
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
0f61114e15
commit
2824ac33eb
|
@ -115,22 +115,27 @@ static bool on_idle()
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void idle_enable()
|
||||
{
|
||||
Glib :: signal_idle().connect(sigc::ptr_fun(on_idle));
|
||||
}
|
||||
|
||||
static void on_add()
|
||||
{
|
||||
list_path(library :: add(c_chooser->get_filename()));
|
||||
lib :: idle(on_idle);
|
||||
idle_enable();
|
||||
}
|
||||
|
||||
static void on_update()
|
||||
{
|
||||
library :: update_all();
|
||||
lib :: idle(on_idle);
|
||||
idle_enable();
|
||||
}
|
||||
|
||||
static void on_row_activated(const Gtk::TreePath &path, Gtk::TreeViewColumn *col)
|
||||
{
|
||||
library :: update(get_library(path));
|
||||
lib :: idle(on_idle);
|
||||
idle_enable();
|
||||
}
|
||||
|
||||
static void on_cursor_changed()
|
||||
|
|
|
@ -14,7 +14,6 @@ namespace lib
|
|||
const std::string share_file(const std::string &);
|
||||
Glib::RefPtr<Gtk::Builder> &get_builder();
|
||||
const std::string key_name(GdkEventKey *);
|
||||
void idle(bool (*)());
|
||||
void schedule(bool (*)(), unsigned int);
|
||||
|
||||
template <class T>
|
||||
|
|
Loading…
Reference in New Issue