Shows the list of addons on the server. More...
#include <manager.hpp>
Classes | |
struct | addon_order |
Public Member Functions | |
addon_manager (addons_client &client) | |
bool | get_need_wml_cache_refresh () const |
![]() | |
modal_dialog () | |
virtual | ~modal_dialog () |
bool | show (const unsigned auto_close_time=0) |
Shows the window. More... | |
window * | get_window () const |
Returns a pointer to the dialog's window. More... | |
int | get_retval () const |
void | set_always_save_fields (const bool always_save_fields) |
void | set_restore (const bool restore) |
void | set_allow_plugin_skip (const bool allow_plugin_skip) |
void | set_show_even_without_video (const bool show_even_without_video) |
Private Attributes | |
std::vector< selectable_item * > | orders_ |
config | cfg_ |
Config which contains the list with the campaigns. More... | |
addons_client & | client_ |
addons_list | addons_ |
addons_tracking_list | tracking_info_ |
bool | need_wml_cache_refresh_ |
Static Private Attributes | |
static const std::vector< std::pair< ADDON_STATUS_FILTER, std::string > > | status_filter_types_ |
static const std::vector< std::pair< ADDON_TYPE, std::string > > | type_filter_types_ |
static const std::vector< addon_order > | all_orders_ |
Additional Inherited Members | |
![]() | |
field_bool * | register_bool (const std::string &id, const bool mandatory, const std::function< bool()> callback_load_value=nullptr, const std::function< void(bool)> callback_save_value=nullptr, const std::function< void(widget &)> callback_change=nullptr, const bool initial_fire=false) |
Creates a new boolean field. More... | |
field_bool * | register_bool (const std::string &id, const bool mandatory, bool &linked_variable, const std::function< void(widget &)> callback_change=nullptr, const bool initial_fire=false) |
Creates a new boolean field. More... | |
field_integer * | register_integer (const std::string &id, const bool mandatory, const std::function< int()> callback_load_value=nullptr, const std::function< void(int)> callback_save_value=nullptr) |
Creates a new integer field. More... | |
field_integer * | register_integer (const std::string &id, const bool mandatory, int &linked_variable) |
Creates a new integer field. More... | |
field_text * | register_text (const std::string &id, const bool mandatory, const std::function< std::string()> callback_load_value=nullptr, const std::function< void(const std::string &)> callback_save_value=nullptr, const bool capture_focus=false) |
Creates a new text field. More... | |
field_text * | register_text (const std::string &id, const bool mandatory, std::string &linked_variable, const bool capture_focus=false) |
Creates a new text field. More... | |
field_label * | register_label (const std::string &id, const bool mandatory, const std::string &text, const bool use_markup=false) |
Registers a new styled_widget as a label. More... | |
field_label * | register_image (const std::string &id, const bool mandatory, const std::string &filename) |
Registers a new styled_widget as image. More... | |
![]() | |
std::unique_ptr< window > | window_ |
The window object build for this dialog. More... | |
Shows the list of addons on the server.
Definition at line 39 of file manager.hpp.
|
explicit |
Definition at line 232 of file manager.cpp.
|
private |
Definition at line 599 of file manager.cpp.
References get_name_filter_visibility(), get_status_filter_visibility(), and get_type_filter_visibility().
Referenced by execute_default_action_on_selected_addon(), load_addon_list(), on_filtertext_changed(), and pre_show().
|
private |
Definition at line 827 of file manager.cpp.
References gui2::text_box_base::get_value(), and desktop::open_object().
Referenced by execute_default_action_on_selected_addon(), and pre_show().
|
private |
Definition at line 833 of file manager.cpp.
References desktop::clipboard::copy_to_clipboard(), and gui2::text_box_base::get_value().
Referenced by execute_default_action_on_selected_addon(), and pre_show().
|
private |
Performs all backend and UI actions for taking down the specified add-on.
Definition at line 767 of file manager.cpp.
References _(), client_, addons_client::delete_remote_addon(), fetch_addons_list(), addons_client::get_last_server_error(), addon_info::id, make_addon_title(), gui2::OK, reload_list_and_reselect_item(), gui2::show_error_message(), gui2::show_message(), gui2::show_transient_message(), VGETTEXT, and gui2::dialogs::message::yes_no_buttons.
Referenced by pre_show(), and publish_selected_addon().
|
inlineprivate |
Definition at line 123 of file manager.hpp.
References execute_default_action().
Referenced by pre_show().
|
private |
Definition at line 636 of file manager.cpp.
References _().
|
private |
Called when the player double-clicks an add-on.
Definition at line 793 of file manager.cpp.
References _(), ADDON_INSTALLED, ADDON_INSTALLED_LOCAL_ONLY, ADDON_INSTALLED_OUTDATED, ADDON_INSTALLED_UPGRADABLE, ADDON_NONE, addon_info::display_title(), addon_info::id, install_addon(), gui2::OK, gui2::dialogs::message::ok_cancel_buttons, publish_addon(), gui2::show_message(), tracking_info_, uninstall_addon(), update_addon(), and VGETTEXT.
Referenced by delete_selected_addon().
|
inlineprivate |
Definition at line 129 of file manager.hpp.
References apply_filters(), browse_url_callback(), copy_url_callback(), exit_hook(), get_name_filter_visibility(), get_status_filter_visibility(), get_type_filter_visibility(), on_order_changed(), order_addons(), show_help(), and update_all_addons().
Referenced by exit_hook().
|
private |
Definition at line 939 of file manager.cpp.
References gui2::addon_list::DEFAULT_ACTION_RETVAL, execute_default_action_on_selected_addon(), and gui2::window::get_retval().
Referenced by execute_default_action_on_selected_addon(), and pre_show().
|
private |
Definition at line 459 of file manager.cpp.
References _(), cfg_, client_, gui2::window::close(), addons_client::request_addons_list(), and gui2::show_error_message().
Referenced by delete_addon(), pre_show(), and publish_addon().
|
private |
Definition at line 528 of file manager.cpp.
References a, addons_, cfg_, config::child_range(), gui2::text_box_base::get_value(), and utils::split().
Referenced by apply_filters(), and execute_default_action_on_selected_addon().
|
inline |
Definition at line 44 of file manager.hpp.
References need_wml_cache_refresh_.
|
private |
Definition at line 552 of file manager.cpp.
References a, ADDON_INSTALLED_UPGRADABLE, ADDON_NONE, addons_, addon_tracking_info::can_publish, FILTER_ALL, FILTER_INSTALLED, FILTER_NOT_INSTALLED, FILTER_PUBLISHABLE, FILTER_UPGRADABLE, gui2::menu_button::get_value(), lg::info(), is_installed_addon_status(), addon_tracking_info::state, status_filter_types_, and tracking_info_.
Referenced by apply_filters(), and execute_default_action_on_selected_addon().
|
private |
Definition at line 573 of file manager.cpp.
References a, addons_, gui2::multimenu_button::get_toggle_states(), utf8::index(), and type_filter_types_.
Referenced by apply_filters(), and execute_default_action_on_selected_addon().
|
private |
Definition at line 658 of file manager.cpp.
References addons_client::abort, addons_, client_, addon_info::id, addons_client::install_addon_with_checks(), need_wml_cache_refresh_, addons_client::install_result::outcome, reload_list_and_reselect_item(), and addons_client::install_result::wml_changed.
Referenced by execute_default_action(), pre_show(), and update_addon().
|
inlineprivate |
|
private |
Definition at line 468 of file manager.cpp.
References _(), a, config::add_child(), ADDON_INSTALLED_UPGRADABLE, addons_, apply_filters(), available_addons(), cfg_, get_addon_pbl_info(), get_addon_tracking_info(), need_wml_cache_refresh_, read_addons_list(), refresh_addon_version_info_cache(), gui2::addon_list::set_addons(), gui2::show_transient_message(), and tracking_info_.
Referenced by pre_show(), reload_list_and_reselect_item(), and update_all_addons().
|
private |
Definition at line 855 of file manager.cpp.
References _(), ADDON_INSTALLED_UPGRADABLE, addons_, addon_info::author, addon_info::created, addon_info::depends, gui2::dialogs::describe_status_verbose(), addon_info::description, addon_info::display_icon(), addon_info::display_title(), addon_info::display_type(), addon_info::downloads, addon_info::feedback_url, gui2::dialogs::format_addon_time(), addon_info::id, lg::info(), is_installed_addon_status(), addon_info::local_only, addon_info::locales, gui2::stacked_widget::select_layer(), gui2::styled_widget::set_label(), addon_info::size, size_display_string(), version_info::str(), tracking_info_, addon_info::updated, and addon_info::version.
Referenced by pre_show(), and reload_list_and_reselect_item().
|
private |
Definition at line 242 of file manager.cpp.
References apply_filters(), and gui2::widget::get_window().
Referenced by gui2::dialogs::addon_manager::addon_order::addon_order(), and pre_show().
|
private |
Definition at line 623 of file manager.cpp.
References all_orders_, utf8::index(), gui2::menu_button::set_value(), and gui2::listbox::SORT_DESCENDING.
Referenced by execute_default_action_on_selected_addon(), and pre_show().
|
private |
Definition at line 608 of file manager.cpp.
References all_orders_, gui2::menu_button::get_value(), gui2::listbox::SORT_ASCENDING, and gui2::listbox::SORT_DESCENDING.
Referenced by execute_default_action_on_selected_addon(), and pre_show().
|
overrideprivatevirtual |
Inherited from modal_dialog.
Reimplemented from gui2::dialogs::modal_dialog.
Definition at line 302 of file manager.cpp.
References _(), gui2::addon_list::add_list_to_keyboard_chain(), all_orders_, apply_filters(), desktop::clipboard::available(), browse_url_callback(), gui2::event::connect_signal_mouse_left_click(), gui2::event::connect_signal_notify_modified(), copy_url_callback(), delete_addon(), delete_selected_addon(), exit_hook(), f, fetch_addons_list(), GETTEXT_DOMAIN, install_addon(), install_selected_addon(), gui2::widget::invisible, load_addon_list(), on_addon_select(), on_filtertext_changed(), on_order_changed(), desktop::open_object_is_supported(), order_addons(), publish_addon(), publish_selected_addon(), gui2::text_box_base::set_active(), gui2::addon_list::set_callback_order_change(), gui2::addon_list::set_delete_function(), gui2::window::set_escape_disabled(), gui2::addon_list::set_install_function(), gui2::addon_list::set_modified_signal_handler(), gui2::addon_list::set_publish_function(), gui2::text_box_base::set_text_changed_callback(), gui2::addon_list::set_uninstall_function(), gui2::addon_list::set_update_function(), gui2::menu_button::set_values(), gui2::multimenu_button::set_values(), gui2::widget::set_visible(), show_help(), status_filter_types_, toggle_details(), type_filter_types_, uninstall_addon(), uninstall_selected_addon(), update_addon(), update_all_addons(), update_selected_addon(), and VGETTEXT.
|
private |
Performs all backend and UI actions for publishing the specified add-on.
Definition at line 718 of file manager.cpp.
References _(), client_, image::exists(), fetch_addons_list(), get_addon_pbl_info(), addons_client::get_last_server_error(), addons_client::get_last_server_error_data(), addon_info::id, wfl::msg(), gui2::OK, gui2::dialogs::message::ok_cancel_buttons, reload_list_and_reselect_item(), addons_client::request_distribution_terms(), gui2::show_error_message(), gui2::show_message(), gui2::show_transient_message(), tracking_info_, addons_client::upload_addon(), and gui2::dialogs::message::yes_no_buttons.
Referenced by execute_default_action(), pre_show(), and update_selected_addon().
|
inlineprivate |
|
private |
Definition at line 519 of file manager.cpp.
References load_addon_list(), and on_addon_select().
Referenced by delete_addon(), install_addon(), publish_addon(), and uninstall_addon().
|
private |
Definition at line 822 of file manager.cpp.
References help::show_help().
Referenced by execute_default_action_on_selected_addon(), and pre_show().
|
private |
Definition at line 448 of file manager.cpp.
References _(), gui2::stacked_widget::current_layer(), gui2::stacked_widget::select_layer(), and gui2::styled_widget::set_label().
Referenced by pre_show().
|
private |
Definition at line 670 of file manager.cpp.
References _(), addon_info::display_title(), have_addon_in_vcs_tree(), have_addon_pbl_info(), addon_info::id, need_wml_cache_refresh_, reload_list_and_reselect_item(), remove_local_addon(), and gui2::show_error_message().
Referenced by execute_default_action(), install_selected_addon(), and pre_show().
|
inlineprivate |
|
private |
Definition at line 690 of file manager.cpp.
References install_addon().
Referenced by execute_default_action(), pre_show(), and uninstall_selected_addon().
|
private |
Definition at line 701 of file manager.cpp.
References a, ADDON_INSTALLED_UPGRADABLE, addons_, client_, addons_client::install_addon_with_checks(), load_addon_list(), need_wml_cache_refresh_, tracking_info_, and addons_client::install_result::wml_changed.
Referenced by execute_default_action_on_selected_addon(), and pre_show().
|
inlineprivate |
|
overrideprivatevirtual |
Inherited from modal_dialog, implemented by REGISTER_DIALOG.
Implements gui2::dialogs::modal_dialog.
|
private |
Definition at line 85 of file manager.hpp.
Referenced by get_name_filter_visibility(), get_status_filter_visibility(), get_type_filter_visibility(), install_addon(), load_addon_list(), on_addon_select(), and update_all_addons().
|
staticprivate |
Definition at line 91 of file manager.hpp.
Referenced by on_order_changed(), order_addons(), and pre_show().
|
private |
Config which contains the list with the campaigns.
Definition at line 81 of file manager.hpp.
Referenced by fetch_addons_list(), get_name_filter_visibility(), and load_addon_list().
|
private |
Definition at line 83 of file manager.hpp.
Referenced by delete_addon(), fetch_addons_list(), install_addon(), publish_addon(), and update_all_addons().
|
private |
Definition at line 93 of file manager.hpp.
Referenced by get_need_wml_cache_refresh(), install_addon(), load_addon_list(), uninstall_addon(), and update_all_addons().
|
private |
Definition at line 64 of file manager.hpp.
|
staticprivate |
Definition at line 89 of file manager.hpp.
Referenced by get_status_filter_visibility(), and pre_show().
|
private |
Definition at line 87 of file manager.hpp.
Referenced by execute_default_action(), get_status_filter_visibility(), load_addon_list(), on_addon_select(), publish_addon(), and update_all_addons().
|
staticprivate |
Definition at line 90 of file manager.hpp.
Referenced by get_type_filter_visibility(), and pre_show().