[RAPPS] Move database source URL to settings dialog (#2792)

- Add download source in settings dialog, and apply it when download .cab file
- Now user should specify full rappmgr.cab URL
- Check if URL is vaild in settings dialog
- Move source settings to the end of struct (will refactor settings to one value per option later)
This commit is contained in:
He Yang 2020-05-20 01:06:10 +08:00 committed by GitHub
parent fb2a9bb60d
commit a21d959e90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 515 additions and 283 deletions

View file

@ -12,6 +12,6 @@ VOID CreateSettingsDlg(HWND hwnd);
VOID ShowMainWindow(INT nShowCmd);
// Download dialogs
VOID DownloadApplicationsDB(LPCWSTR lpUrl);
VOID DownloadApplicationsDB(LPCWSTR lpUrl, BOOL IsOfficial);
BOOL DownloadApplication(CAvailableApplicationInfo* pAppInfo, BOOL bIsModal);
BOOL DownloadListOfApplications(const ATL::CSimpleArray<CAvailableApplicationInfo>& AppsList, BOOL bIsModal);

View file

@ -54,6 +54,9 @@
#define IDC_USE_PROXY 1015
#define IDC_PROXY_SERVER 1016
#define IDC_NO_PROXY_FOR 1017
#define IDC_SOURCE_DEFAULT 1018
#define IDC_USE_SOURCE 1019
#define IDC_SOURCE_URL 1020
/* Dialogs */
#define IDD_SETTINGS_DIALOG 300
@ -97,6 +100,7 @@
#define IDS_APPLICATIONS 112
#define IDS_CHOOSE_FOLDER_TEXT 113
#define IDS_CHOOSE_FOLDER_ERROR 114
#define IDS_URL_INVALID 115
#define IDS_APP_REG_REMOVE 116
#define IDS_INFORMATION 117
#define IDS_UNABLE_TO_REMOVE 118
@ -207,6 +211,7 @@
/* Dialog related entries */
#define IDS_DL_DIALOG_DB_DISP 950
#define IDS_DL_DIALOG_DB_DOWNLOAD_DISP 951
#define IDS_DL_DIALOG_DB_UNOFFICIAL_DOWNLOAD_DISP 952
/* Accelerators */
#define HOTKEYS 715

View file

@ -1,5 +1,6 @@
#pragma once
#include <windef.h>
#include <wininet.h>
//TODO: Separate main and settings related definitions
struct SETTINGS_INFO
@ -19,6 +20,9 @@ struct SETTINGS_INFO
INT Proxy;
WCHAR szProxyServer[MAX_PATH];
WCHAR szNoProxyFor[MAX_PATH];
/* Software source settings */
BOOL bUseSource;
WCHAR szSourceURL[INTERNET_MAX_URL_LENGTH];
};
typedef SETTINGS_INFO *PSETTINGS_INFO;