mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-21 16:46:18 +00:00
added ui.current_view command
This commit is contained in:
@@ -466,6 +466,11 @@ cmd_ui_set_view(const torrent::Object::string_type& args) {
|
|||||||
return torrent::Object();
|
return torrent::Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
torrent::Object
|
||||||
|
cmd_ui_current_view() {
|
||||||
|
return control->ui()->download_list()->current_view()->name();
|
||||||
|
}
|
||||||
|
|
||||||
torrent::Object
|
torrent::Object
|
||||||
cmd_ui_unfocus_download(core::Download* download) {
|
cmd_ui_unfocus_download(core::Download* download) {
|
||||||
control->ui()->download_list()->unfocus_download(download);
|
control->ui()->download_list()->unfocus_download(download);
|
||||||
@@ -547,6 +552,7 @@ initialize_command_ui() {
|
|||||||
|
|
||||||
// Commands that affect the default rtorrent UI.
|
// Commands that affect the default rtorrent UI.
|
||||||
CMD2_DL ("ui.unfocus_download", std::bind(&cmd_ui_unfocus_download, std::placeholders::_1));
|
CMD2_DL ("ui.unfocus_download", std::bind(&cmd_ui_unfocus_download, std::placeholders::_1));
|
||||||
|
CMD2_ANY ("ui.current_view", std::bind(&cmd_ui_current_view));
|
||||||
CMD2_ANY_STRING("ui.current_view.set", std::bind(&cmd_ui_set_view, std::placeholders::_2));
|
CMD2_ANY_STRING("ui.current_view.set", std::bind(&cmd_ui_set_view, std::placeholders::_2));
|
||||||
|
|
||||||
// Move.
|
// Move.
|
||||||
|
|||||||
Reference in New Issue
Block a user