From 53316e4bada29f1392df2528d8616afde17f570b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 31 Oct 2022 22:54:59 +0100 Subject: Add ctrl+shift+s to download files without a dialog --- include/QuickMedia.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/QuickMedia.hpp') diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp index d2ca1f3..675fa0e 100644 --- a/include/QuickMedia.hpp +++ b/include/QuickMedia.hpp @@ -118,7 +118,7 @@ namespace QuickMedia { void set_clipboard(const std::string &str); private: - void init(mgl::WindowHandle parent_window, std::string &program_path); + void init(mgl::WindowHandle parent_window, std::string &program_path, bool no_dialog); void load_plugin_by_name(std::vector &tabs, int &start_tab_index, FileManagerMimeType fm_mime_type, FileSelectionHandler file_selection_handler, std::string instance); void common_event_handler(mgl::Event &event); void handle_x11_events(); @@ -134,7 +134,7 @@ namespace QuickMedia { bool page_loop(std::vector &tabs, int start_tab_index = 0, PageLoopSubmitHandler after_submit_handler = nullptr, bool go_to_previous_on_escape = true); void redirect_focus_to_video_player_window(mgl::WindowHandle video_player_window); void show_video_player_window(mgl::WindowHandle video_player_window); - void video_page_download_video(const std::string &url, const std::string &filename, mgl::WindowHandle video_player_window = 0); + void video_page_download_video(const std::string &url, const std::string &filename, mgl::WindowHandle video_player_window = 0, bool download_no_dialog = false); bool video_download_if_non_streamable(std::string &video_url, std::string &audio_url, bool &is_audio_only, bool &has_embedded_audio, PageType previous_page); int video_get_max_height(); void video_content_page(Page *parent_page, VideoPage *video_page, std::string video_title, bool download_if_streaming_fails, Body *parent_body, int play_index, int *parent_body_page = nullptr, const std::string &parent_page_search = ""); @@ -147,7 +147,7 @@ namespace QuickMedia { void chat_login_page(); bool chat_page(MatrixChatPage *matrix_chat_page, RoomData *current_room); void after_matrix_login_page(); - void download_page(std::string url, std::string download_filename); + void download_page(std::string url, std::string download_filename, bool no_dialog); // Returns the full path where the file should be saved, or an empty string if the operation was cancelled std::string file_save_page(const std::string &filename); -- cgit v1.2.3