summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-08-21 14:34:36 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-08-21 14:34:36 +0300
commitc4fab6727381c5d89b377aa1c4dc2e3a037c1738 (patch)
treea3c120b20f875abe5c3ba85f855330b33aeb0c4e /plugins/PluginUpdater
parentedf31a838b2e8b28f78765670e99f2efbee45f2f (diff)
PluginUpdater:
- fixes #2547 (PluginUpdater: "Restart Miranda automatically" with "Silent mode" requires clicking on a pop-up); - fixes #2548 (PluginUpdater: Use DBAutoBackuper for "Backup database before update")
Diffstat (limited to 'plugins/PluginUpdater')
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index dc563cbcba..66f83c9287 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -464,7 +464,15 @@ static void DlgUpdateSilent(void *param)
g_plugin.setByte(DB_SETTING_RESTART_COUNT, 5);
g_plugin.setByte(DB_SETTING_NEED_RESTART, 1);
+ if (g_plugin.bBackup)
+ CallService(MS_AB_BACKUP, 0, 0);
+
// 5) Prepare Restart
+ if (g_plugin.bAutoRestart) {
+ RestartPrompt(0);
+ return;
+ }
+
wchar_t tszTitle[100];
mir_snwprintf(tszTitle, TranslateT("%d component(s) was updated"), count);