summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-08-08 20:22:07 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-08-08 20:22:07 +0000
commit71f9ef9ded15566ee811508a6c9b8eee21facfa8 (patch)
tree57e5de5cb549b3d83475306c09897e27a5cf47ec
parent1f0a5302f57c29d538d6633c080458df0ac3d5f7 (diff)
- reminder removed;
- double "Update" click fixed; - "once a day" option is enabled by default git-svn-id: http://svn.miranda-ng.org/main/trunk@1410 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/PluginUpdater/res/Resource.rc8
-rw-r--r--plugins/PluginUpdater/src/Common.h5
-rw-r--r--plugins/PluginUpdater/src/Events.cpp4
-rw-r--r--plugins/PluginUpdater/src/Notifications.cpp5
-rw-r--r--plugins/PluginUpdater/src/Options.cpp4
-rw-r--r--plugins/PluginUpdater/src/Utils.cpp1
-rw-r--r--plugins/PluginUpdater/src/resource.h1
7 files changed, 11 insertions, 17 deletions
diff --git a/plugins/PluginUpdater/res/Resource.rc b/plugins/PluginUpdater/res/Resource.rc
index 768f348f9f..97d9995539 100644
--- a/plugins/PluginUpdater/res/Resource.rc
+++ b/plugins/PluginUpdater/res/Resource.rc
@@ -56,7 +56,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
END
-IDD_OPT_UPDATENOTIFY DIALOGEX 0, 0, 262, 107
+IDD_OPT_UPDATENOTIFY DIALOGEX 0, 0, 262, 92
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
@@ -64,16 +64,14 @@ BEGIN
GROUPBOX "Hotkey",IDC_STATIC,2,0,253,26
CONTROL "Go to Customize -> Hotkeys to change the hotkey",IDC_LINK_HOTKEY,
"Hyperlink",WS_TABSTOP,9,11,199,10
- GROUPBOX "Plugin updates options",IDC_STATIC,1,27,253,74
+ GROUPBOX "Plugin updates options",IDC_STATIC,1,27,253,60
CONTROL "On startup",IDC_UPDATEONSTARTUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,44,52,10
CONTROL "(but only once a day)",IDC_ONLYONCEADAY,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,92,44,161,10
CONTROL "Every",IDC_UPDATEONPERIOD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,58,52,10
EDITTEXT IDC_PERIOD,65,56,28,14,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
CONTROL "",IDC_PERIODSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_DISABLED,92,56,10,15
COMBOBOX IDC_PERIODMEASURE,114,56,58,30,CBS_DROPDOWNLIST | CBS_SORT | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
- CONTROL "Remind about not installed plugin updates",IDC_REMINDER,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,72,198,10
- CONTROL "Update icons",IDC_UPDATEICONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,86,198,10
+ CONTROL "Update icons",IDC_UPDATEICONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,72,198,10
END
IDD_POPUP DIALOGEX 0, 0, 316, 182
diff --git a/plugins/PluginUpdater/src/Common.h b/plugins/PluginUpdater/src/Common.h
index d61a75ac2c..9cb0a418be 100644
--- a/plugins/PluginUpdater/src/Common.h
+++ b/plugins/PluginUpdater/src/Common.h
@@ -87,17 +87,16 @@ struct PopupDataText
struct PlugOptions
{
- BYTE bReminder, bUpdateOnStartup, bUpdateOnPeriod, bOnlyOnceADay, bUpdateIcons;
+ BYTE bUpdateOnStartup, bUpdateOnPeriod, bOnlyOnceADay, bUpdateIcons;
BOOL bSilent, bDlgDld;
BYTE bPeriodMeasure;
INT Period;
};
-#define DEFAULT_REMINDER 1
#define DEFAULT_UPDATEICONS 0
#define DEFAULT_UPDATEONSTARTUP 1
-#define DEFAULT_ONLYONCEADAY 0
+#define DEFAULT_ONLYONCEADAY 1
#define DEFAULT_UPDATEONPERIOD 0
#define DEFAULT_PERIOD 1
#define DEFAULT_PERIODMEASURE 1
diff --git a/plugins/PluginUpdater/src/Events.cpp b/plugins/PluginUpdater/src/Events.cpp
index 295b9288cb..23d6fb26ca 100644
--- a/plugins/PluginUpdater/src/Events.cpp
+++ b/plugins/PluginUpdater/src/Events.cpp
@@ -25,9 +25,9 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
{
opts.bSilent = true;
- int iRestartCount = DBGetContactSettingByte(NULL, MODULEA, "RestartCount", 2);
+ int iRestartCount = DBGetContactSettingByte(NULL, MODNAME, "RestartCount", 2);
if (iRestartCount > 0)
- DBWriteContactSettingByte(NULL, MODULEA, "RestartCount", iRestartCount-1);
+ DBWriteContactSettingByte(NULL, MODNAME, "RestartCount", iRestartCount-1);
else
EmptyFolder(0, TRUE); // silently
diff --git a/plugins/PluginUpdater/src/Notifications.cpp b/plugins/PluginUpdater/src/Notifications.cpp
index 22086497b5..59a2b57735 100644
--- a/plugins/PluginUpdater/src/Notifications.cpp
+++ b/plugins/PluginUpdater/src/Notifications.cpp
@@ -285,7 +285,7 @@ static void ApplyUpdates(void* param)
DeleteFile(p.File.tszDiskPath);
}
- DBWriteContactSettingByte(NULL, MODULEA, "RestartCount", 2);
+ DBWriteContactSettingByte(NULL, MODNAME, "RestartCount", 2);
DestroyWindow(hDlg);
CallFunctionAsync(RestartMe, 0);
}
@@ -400,6 +400,9 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
if (HIWORD( wParam ) == BN_CLICKED) {
switch(LOWORD(wParam)) {
case IDOK:
+ EnableWindow( GetDlgItem(hDlg, IDOK), FALSE);
+ EnableWindow( GetDlgItem(hDlg, IDC_SELALL), FALSE);
+ EnableWindow( GetDlgItem(hDlg, IDC_SELNONE), FALSE);
mir_forkthread(ApplyUpdates, hDlg);
return TRUE;
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp
index f26a351977..011692e5ae 100644
--- a/plugins/PluginUpdater/src/Options.cpp
+++ b/plugins/PluginUpdater/src/Options.cpp
@@ -55,7 +55,6 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
ComboBox_InsertString(GetDlgItem(hwndDlg, IDC_PERIODMEASURE), 1, TranslateT("days"));
ComboBox_SetCurSel(GetDlgItem(hwndDlg, IDC_PERIODMEASURE), opts.bPeriodMeasure);
- CheckDlgButton(hwndDlg, IDC_REMINDER, opts.bReminder);
CheckDlgButton(hwndDlg, IDC_UPDATEICONS, opts.bUpdateIcons);
return TRUE;
@@ -86,7 +85,6 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
break;
case IDC_UPDATEICONS:
- case IDC_REMINDER:
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -127,8 +125,6 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
DBWriteContactSettingByte(NULL, MODNAME, "UpdateOnPeriod", opts.bUpdateOnPeriod);
DBWriteContactSettingByte(NULL, MODNAME, "PeriodMeasure", opts.bPeriodMeasure);
DBWriteContactSettingDword(NULL, MODNAME, "Period", opts.Period);
- opts.bReminder = IsDlgButtonChecked(hwndDlg, IDC_REMINDER);
- DBWriteContactSettingByte(NULL, MODNAME, "Reminder", opts.bReminder);
opts.bUpdateIcons = IsDlgButtonChecked(hwndDlg, IDC_UPDATEICONS);
DBWriteContactSettingByte(NULL, MODNAME, "UpdateIcons", opts.bUpdateIcons);
}
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp
index c3863552dc..a4ad93525b 100644
--- a/plugins/PluginUpdater/src/Utils.cpp
+++ b/plugins/PluginUpdater/src/Utils.cpp
@@ -119,7 +119,6 @@ VOID LoadOptions()
opts.bUpdateOnPeriod = DBGetContactSettingByte(NULL, MODNAME, "UpdateOnPeriod", DEFAULT_UPDATEONPERIOD);
opts.Period = DBGetContactSettingDword(NULL, MODNAME, "Period", DEFAULT_PERIOD);
opts.bPeriodMeasure = DBGetContactSettingByte(NULL, MODNAME, "PeriodMeasure", DEFAULT_PERIODMEASURE);
- opts.bReminder = DBGetContactSettingByte(NULL, MODNAME, "Reminder", DEFAULT_REMINDER);
opts.bUpdateIcons = DBGetContactSettingByte(NULL, MODNAME, "UpdateIcons", DEFAULT_UPDATEICONS);
}
diff --git a/plugins/PluginUpdater/src/resource.h b/plugins/PluginUpdater/src/resource.h
index c5d64e2b7f..aa0c81abbf 100644
--- a/plugins/PluginUpdater/src/resource.h
+++ b/plugins/PluginUpdater/src/resource.h
@@ -31,7 +31,6 @@
#define IDC_TIMEOUT_VALUE 1017
#define IDC_USEOWNCOLORS 1018
#define IDC_ENABLEUPDATES 1019
-#define IDC_REMINDER 1020
#define IDC_LIST_UPDATES 1021
#define IDC_MESSAGE 1022
#define IDC_DESCR 1023