* Used different ncurses calls in the file list so that UTF8 filenames

should show up properly.

* More cleanup of Views.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1050 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2008-04-02 17:11:44 +00:00
parent 03c544d07d
commit aab493caad
11 changed files with 119 additions and 19 deletions
+18
View File
@@ -179,6 +179,11 @@ apply_not(rpc::target_type target, const torrent::Object& rawArgs) {
return (int64_t)!as_boolean(rawArgs);
}
torrent::Object
apply_false(rpc::target_type target, const torrent::Object& rawArgs) {
return (int64_t)0;
}
torrent::Object
apply_and(rpc::target_type target, const torrent::Object& rawArgs) {
if (rawArgs.type() != torrent::Object::TYPE_LIST)
@@ -378,6 +383,16 @@ apply_if(int flags, rpc::target_type target, const torrent::Object& rawArgs) {
}
}
torrent::Object
cmd_view_size(__UNUSED rpc::target_type target, const torrent::Object& rawArgs) {
return (*control->view_manager()->find_throw(rawArgs.as_string()))->size_visible();
}
torrent::Object
cmd_view_size_not_visible(__UNUSED rpc::target_type target, const torrent::Object& rawArgs) {
return (*control->view_manager()->find_throw(rawArgs.as_string()))->size_not_visible();
}
torrent::Object
cmd_ui_unfocus_download(core::Download* download, const torrent::Object& rawArgs) {
control->ui()->download_list()->unfocus_download(download);
@@ -426,6 +441,8 @@ initialize_command_ui() {
// Cleanup and add . to view.
CMD_G_STRING("view.size", rak::ptr_fn(&cmd_view_size));
CMD_G_STRING("view.size_not_visible", rak::ptr_fn(&cmd_view_size_not_visible));
CMD_D_STRING("view.filter_download", rak::ptr_fn(&cmd_view_filter_download));
CMD_D_STRING("view.set_visible", rak::ptr_fn(&cmd_view_set_visible));
CMD_D_STRING("view.set_not_visible", rak::ptr_fn(&cmd_view_set_not_visible));
@@ -441,6 +458,7 @@ initialize_command_ui() {
ADD_ANY_NONE("cat", rak::ptr_fn(&apply_cat));
ADD_ANY_NONE("if", rak::bind_ptr_fn(&apply_if, 0));
ADD_ANY_NONE("not", rak::ptr_fn(&apply_not));
ADD_ANY_NONE("false", rak::ptr_fn(&apply_false));
ADD_ANY_NONE("and", rak::ptr_fn(&apply_and));
ADD_ANY_NONE("or", rak::ptr_fn(&apply_or));