diff --git a/gui/manager.cpp b/gui/manager.cpp index c5a6b219..669f33c4 100644 --- a/gui/manager.cpp +++ b/gui/manager.cpp @@ -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() diff --git a/include/lib/lib.h b/include/lib/lib.h index d7f1c7f4..64e6321f 100644 --- a/include/lib/lib.h +++ b/include/lib/lib.h @@ -14,7 +14,6 @@ namespace lib const std::string share_file(const std::string &); Glib::RefPtr &get_builder(); const std::string key_name(GdkEventKey *); - void idle(bool (*)()); void schedule(bool (*)(), unsigned int); template