* Refactoring to change the DownloadList events to commands.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1046 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2008-03-23 12:16:18 +00:00
parent 199bd1985c
commit 8fbaca61b1
11 changed files with 127 additions and 48 deletions
+12
View File
@@ -378,6 +378,13 @@ apply_if(int flags, rpc::target_type target, const torrent::Object& rawArgs) {
}
}
torrent::Object
cmd_ui_unfocus_download(core::Download* download, const torrent::Object& rawArgs) {
control->ui()->download_list()->unfocus_download(download);
return torrent::Object();
}
void
initialize_command_ui() {
ADD_VARIABLE_STRING("key_layout", "qwerty");
@@ -396,6 +403,11 @@ initialize_command_ui() {
ADD_COMMAND_LIST("view_event_added", rak::bind_ptr_fn(&apply_view_cfilter, &core::ViewManager::set_event_added));
ADD_COMMAND_LIST("view_event_removed", rak::bind_ptr_fn(&apply_view_cfilter, &core::ViewManager::set_event_removed));
// Commands that affect the default rtorrent UI.
// ADD_ANY_NONE("ui.focus", rak::ptr_fn(&cmd_ui_focus));
CMD_D_ANY_NONE("ui.unfocus_download", rak::ptr_fn(&cmd_ui_unfocus_download));
// Move.
ADD_ANY_NONE("print", rak::ptr_fn(&apply_print));