diff --git a/gui/collection_mgr.cpp b/gui/collection_mgr.cpp index 580c34fd..f8f2dce9 100644 --- a/gui/collection_mgr.cpp +++ b/gui/collection_mgr.cpp @@ -11,26 +11,26 @@ static Gtk::FileChooserWidget *c_chooser; static Gtk::TreeView *c_treeview; -static void on_collection_ok() +static void on_ok() { colmgr :: add_path(c_chooser->get_filename()); enable_idle(); } -static void on_collection_update() +static void on_update() { library :: update_all(); enable_idle(); } -static void on_collection_row_activated(const Gtk::TreePath &path, - Gtk::TreeViewColumn *col) +static void on_row_activated(const Gtk::TreePath &path, Gtk::TreeViewColumn *col) { + //c_chooser->set_current_folder(colmgr :: get_path(path)); colmgr :: update_path(path); enable_idle(); } -static void do_collection_delete() +static void on_delete() { Gtk::TreePath path; Gtk::TreeViewColumn *col; @@ -40,17 +40,17 @@ static void do_collection_delete() colmgr :: del_path(path); } -static bool on_collection_key_pressed(GdkEventKey *event) +static bool on_key_pressed(GdkEventKey *event) { std::string key = gdk_keyval_name(event->keyval); if (key == "Delete") { - do_collection_delete(); + on_delete(); return true; } return false; } -static void on_collection_toggled(const Glib::ustring &path) +static void on_toggled(const Glib::ustring &path) { colmgr :: toggle_path_enabled(Gtk::TreePath(path)); } @@ -63,12 +63,12 @@ void collection_mgr_init() c_chooser = lib :: get_widget("o_collection_chooser"); toggle = lib :: get_object("o_collection_toggle"); - connect_button("o_collection_ok", on_collection_ok); - connect_button("o_collection_update", on_collection_update); + connect_button("o_collection_ok", on_ok); + connect_button("o_collection_update", on_update); - c_treeview->signal_row_activated().connect(sigc::ptr_fun(on_collection_row_activated)); - c_treeview->signal_key_press_event().connect(sigc::ptr_fun(on_collection_key_pressed)); - toggle->signal_toggled().connect(sigc::ptr_fun(on_collection_toggled)); + c_treeview->signal_row_activated().connect(sigc::ptr_fun(on_row_activated)); + c_treeview->signal_key_press_event().connect(sigc::ptr_fun(on_key_pressed)); + toggle->signal_toggled().connect(sigc::ptr_fun(on_toggled)); colmgr :: init(); }