summaryrefslogtreecommitdiff
path: root/RealtimeSync/application.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:28:01 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:28:01 +0200
commitfe9eb89ebc1b3c33cbac00a3fa095a14faef9113 (patch)
tree8a3bb620a9acb83fe0057061a86e8f2cb91a9fe1 /RealtimeSync/application.cpp
parent5.21 (diff)
downloadFreeFileSync-fe9eb89ebc1b3c33cbac00a3fa095a14faef9113.tar.gz
FreeFileSync-fe9eb89ebc1b3c33cbac00a3fa095a14faef9113.tar.bz2
FreeFileSync-fe9eb89ebc1b3c33cbac00a3fa095a14faef9113.zip
5.22
Diffstat (limited to 'RealtimeSync/application.cpp')
-rw-r--r--RealtimeSync/application.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/RealtimeSync/application.cpp b/RealtimeSync/application.cpp
index c2ed4078..a0d693d6 100644
--- a/RealtimeSync/application.cpp
+++ b/RealtimeSync/application.cpp
@@ -10,9 +10,10 @@
#include <zen/thread.h>
#include <wx/event.h>
#include <wx/log.h>
-#include <wx/msgdlg.h>
+#include <wx/tooltip.h>
#include <wx+/string_conv.h>
-//#include "resources.h"
+#include <wx+/popup_dlg.h>
+#include <wx+/image_resources.h>
#include "xml_ffs.h"
#include "../lib/localization.h"
#include "../lib/ffs_paths.h"
@@ -71,7 +72,15 @@ bool Application::OnInit()
::gtk_rc_parse((zen::getResourceDir() + "styles.gtk_rc").c_str()); //remove inner border from bitmap buttons
#endif
- SetAppName(L"FreeFileSync"); //reuse FFS's name, to have "GetUserDataDir()/GetResourcesDir()" return the same directory in ffs_paths.cpp
+#ifdef ZEN_WIN
+ wxToolTip::SetMaxWidth(-1); //disable tooltip wrapping -> Windows only
+#endif
+ //Windows User Experience Interaction Guidelines: tool tips should have 5s timeout, info tips no timeout => compromise:
+ wxToolTip::SetAutoPop(7000); //http://msdn.microsoft.com/en-us/library/windows/desktop/aa511495.aspx
+
+ SetAppName(L"RealtimeSync");
+
+ initResourceImages(getResourceDir() + Zstr("Resources.zip"));
//do not call wxApp::OnInit() to avoid using default commandline parser
@@ -101,7 +110,7 @@ void Application::onEnterEventLoop(wxEvent& event)
}
catch (const FileError& e)
{
- wxMessageBox(e.toString(), L"RealtimeSync" + _("Error"), wxOK | wxICON_ERROR);
+ showNotificationDialog(nullptr, DialogInfoType::ERROR2, PopupDialogCfg().setDetailInstructions(e.toString()));
//continue!
}
@@ -119,7 +128,7 @@ void Application::onEnterEventLoop(wxEvent& event)
filename += Zstr(".ffs_batch");
else
{
- wxMessageBox(replaceCpy(_("Cannot open file %x."), L"%x", fmtFileName(filename)), L"RealtimeSync" + _("Error"), wxOK | wxICON_ERROR);
+ showNotificationDialog(nullptr, DialogInfoType::ERROR2, PopupDialogCfg().setMainInstructions(replaceCpy(_("Cannot open file %x."), L"%x", fmtFileName(filename))));
return;
}
}
bgstack15