[NEW] Add warning text if settings on cloud option has been changed.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1243 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
bad9b9dbbf
commit
e402928e45
@ -377,5 +377,6 @@ BEGIN
|
||||
GROUPBOX "Settings on cloud",IDC_SETTINGSONCLOUD_GB_STATIC,89,44,268,89,BS_CENTER
|
||||
CONTROL "Dropbox",IDD_SETTINGSONCLOUD_DROPBOX_CHECK,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,60,160,10
|
||||
LTEXT "",IDC_SETTINGSONCLOUD_WARNING_STATIC,132,75,135,8
|
||||
END
|
||||
|
||||
|
@ -2795,6 +2795,12 @@ BOOL CALLBACK SettingsOnCloudDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARA
|
||||
case WM_INITDIALOG :
|
||||
{
|
||||
CloudChoice cloudChoice = nppGUI._cloudChoice;
|
||||
initialCloudChoice = nppGUI._cloudChoice;
|
||||
/*
|
||||
COLORREF bgColor = getCtrlBgColor(_hSelf);
|
||||
SetTextColor(hdcStatic, RGB(255, 0, 0));
|
||||
SetBkColor(hdcStatic, RGB(GetRValue(bgColor) - 30, GetGValue(bgColor) - 30, GetBValue(bgColor) - 30));
|
||||
*/
|
||||
::SendDlgItemMessage(_hSelf, IDD_SETTINGSONCLOUD_DROPBOX_CHECK, BM_SETCHECK, cloudChoice == dropbox?BST_CHECKED:BST_UNCHECKED, 0);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDD_SETTINGSONCLOUD_DROPBOX_CHECK), (nppGUI._availableClouds & DROPBOX_AVAILABLE) != 0);
|
||||
}
|
||||
@ -2810,26 +2816,13 @@ BOOL CALLBACK SettingsOnCloudDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARA
|
||||
if (nppGUI._cloudChoice == dropbox)
|
||||
{
|
||||
setCloudChoice("dropbox");
|
||||
/*
|
||||
// files on cloud can never be erased or modified while setting cloud
|
||||
if (!hasSettingsFilesInDropBox())
|
||||
{
|
||||
// it's the first time to set Notepad++ settings on cloud
|
||||
changeSettingsFilesPath();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// Notepad++ settings are already on cloud
|
||||
askForRestarting();
|
||||
}
|
||||
*/
|
||||
}
|
||||
else
|
||||
{
|
||||
removeCloudChoice();
|
||||
//changeSettingsFilesPath();
|
||||
}
|
||||
generic_string message = initialCloudChoice != nppGUI._cloudChoice?TEXT("Please restart Notepad++ to take effect."):TEXT("");
|
||||
::SetDlgItemText(_hSelf, IDC_SETTINGSONCLOUD_WARNING_STATIC, message.c_str());
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -216,9 +216,11 @@ private :
|
||||
class SettingsOnCloudDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
SettingsOnCloudDlg() {};
|
||||
SettingsOnCloudDlg(): initialCloudChoice(noCloud) {};
|
||||
|
||||
private :
|
||||
CloudChoice initialCloudChoice;
|
||||
|
||||
BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam);
|
||||
void setCloudChoice(const char *choice);
|
||||
void removeCloudChoice();
|
||||
|
@ -124,8 +124,9 @@
|
||||
#define IDD_STATIC_BLABLA2NDLINE (IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 8)
|
||||
|
||||
#define IDD_PREFERENCE_SETTINGSONCLOUD_BOX 6260 //(IDD_PREFERENCE_BOX + 250)
|
||||
#define IDC_SETTINGSONCLOUD_GB_STATIC (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 1)
|
||||
#define IDD_SETTINGSONCLOUD_DROPBOX_CHECK (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 2)
|
||||
#define IDC_SETTINGSONCLOUD_WARNING_STATIC (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 1)
|
||||
#define IDC_SETTINGSONCLOUD_GB_STATIC (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 2)
|
||||
#define IDD_SETTINGSONCLOUD_DROPBOX_CHECK (IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 3)
|
||||
|
||||
#define IDD_PREFERENCE_SETTING_BOX 6300 //(IDD_PREFERENCE_BOX + 300)
|
||||
#define IDC_TABSETTING_GB_STATIC (IDD_PREFERENCE_SETTING_BOX + 1)
|
||||
|
Loading…
Reference in New Issue
Block a user