summaryrefslogtreecommitdiff
path: root/wx+/popup_dlg.cpp
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-05-17 17:14:47 +0000
committerB Stack <bgstack15@gmail.com>2020-05-17 17:14:47 +0000
commitcca3f71f16f85f5d506bf4bb7b3ec38fda31516a (patch)
tree1f52055b2f26fc2389d3ab4eb8d8d1e234a6316a /wx+/popup_dlg.cpp
parentMerge branch '10.23' into 'master' (diff)
parentadd upstream 10.24 (diff)
downloadFreeFileSync-cca3f71f16f85f5d506bf4bb7b3ec38fda31516a.tar.gz
FreeFileSync-cca3f71f16f85f5d506bf4bb7b3ec38fda31516a.tar.bz2
FreeFileSync-cca3f71f16f85f5d506bf4bb7b3ec38fda31516a.zip
Merge branch '10.24' into 'master'
add upstream 10.24 See merge request opensource-tracking/FreeFileSync!21
Diffstat (limited to 'wx+/popup_dlg.cpp')
-rw-r--r--wx+/popup_dlg.cpp34
1 files changed, 28 insertions, 6 deletions
diff --git a/wx+/popup_dlg.cpp b/wx+/popup_dlg.cpp
index c677cf57..2011a228 100644
--- a/wx+/popup_dlg.cpp
+++ b/wx+/popup_dlg.cpp
@@ -7,10 +7,11 @@
#include "popup_dlg.h"
#include <wx/app.h>
#include <wx/display.h>
-#include <wx+/std_button_layout.h>
-#include <wx+/font_size.h>
-#include <wx+/image_resources.h>
+#include "font_size.h"
+#include "image_resources.h"
#include "popup_dlg_generated.h"
+#include "std_button_layout.h"
+#include "taskbar.h"
using namespace zen;
@@ -75,6 +76,26 @@ public:
buttonToDisableWhenChecked_(cfg.buttonToDisableWhenChecked)
{
+
+ if (type != DialogInfoType::info)
+ try
+ {
+ taskbar_ = std::make_unique<Taskbar>(parent); //throw TaskbarNotAvailable
+ switch (type)
+ {
+ case DialogInfoType::info:
+ break;
+ case DialogInfoType::warning:
+ taskbar_->setStatus(Taskbar::STATUS_WARNING);
+ break;
+ case DialogInfoType::error:
+ taskbar_->setStatus(Taskbar::STATUS_ERROR);
+ break;
+ }
+ }
+ catch (const TaskbarNotAvailable&) {}
+
+
wxBitmap iconTmp;
wxString titleTmp;
switch (type)
@@ -82,14 +103,14 @@ public:
case DialogInfoType::info:
//"Information" is meaningless as caption text!
//confirmation doesn't use info icon
- //iconTmp = getResourceImage(L"msg_info");
+ //iconTmp = getResourceImage("msg_info");
break;
case DialogInfoType::warning:
- iconTmp = getResourceImage(L"msg_warning");
+ iconTmp = getResourceImage("msg_warning");
titleTmp = _("Warning");
break;
case DialogInfoType::error:
- iconTmp = getResourceImage(L"msg_error");
+ iconTmp = getResourceImage("msg_error");
titleTmp = _("Error");
break;
}
@@ -267,6 +288,7 @@ private:
bool* checkBoxValue_;
const QuestionButton2 buttonToDisableWhenChecked_;
+ std::unique_ptr<Taskbar> taskbar_;
};
//########################################################################################
bgstack15