summaryrefslogtreecommitdiff
path: root/ui/tray_icon.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:14 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:14 +0200
commit01eb8253196672c969a39587e90b49321a182428 (patch)
tree4a3b71d7913de519744466c9227fda6461c4f0b5 /ui/tray_icon.cpp
parent5.0 (diff)
downloadFreeFileSync-01eb8253196672c969a39587e90b49321a182428.tar.gz
FreeFileSync-01eb8253196672c969a39587e90b49321a182428.tar.bz2
FreeFileSync-01eb8253196672c969a39587e90b49321a182428.zip
5.1
Diffstat (limited to 'ui/tray_icon.cpp')
-rw-r--r--ui/tray_icon.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/tray_icon.cpp b/ui/tray_icon.cpp
index 26556742..51441e36 100644
--- a/ui/tray_icon.cpp
+++ b/ui/tray_icon.cpp
@@ -162,20 +162,20 @@ class FfsTrayIcon::TaskBarImpl : public wxTaskBarIcon
public:
TaskBarImpl(FfsTrayIcon& parent) : parent_(&parent) {}
- void parentHasDied() { parent_ = NULL; }
+ void parentHasDied() { parent_ = nullptr; }
private:
virtual wxMenu* CreatePopupMenu()
{
if (!parent_)
- return NULL;
+ return nullptr;
wxMenu* contextMenu = new wxMenu;
contextMenu->Append(CONTEXT_ABOUT, _("&About..."));
contextMenu->AppendSeparator();
contextMenu->Append(CONTEXT_RESTORE, _("&Restore"));
//event handling
- contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(FfsTrayIcon::OnContextMenuSelection), NULL, parent_);
+ contextMenu->Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(FfsTrayIcon::OnContextMenuSelection), nullptr, parent_);
return contextMenu; //ownership transferred to caller
}
@@ -188,14 +188,14 @@ FfsTrayIcon::FfsTrayIcon() :
trayIcon(new TaskBarImpl(*this))
{
trayIcon->SetIcon(generateIcon(0), wxT("FreeFileSync"));
- trayIcon->Connect(wxEVT_TASKBAR_LEFT_DCLICK, wxCommandEventHandler(FfsTrayIcon::OnDoubleClick), NULL, this); //register double-click
+ trayIcon->Connect(wxEVT_TASKBAR_LEFT_DCLICK, wxCommandEventHandler(FfsTrayIcon::OnDoubleClick), nullptr, this); //register double-click
}
FfsTrayIcon::~FfsTrayIcon()
{
trayIcon->RemoveIcon(); //hide icon until final deletion takes place
- trayIcon->Disconnect(wxEVT_TASKBAR_LEFT_DCLICK, wxCommandEventHandler(FfsTrayIcon::OnDoubleClick), NULL, this);
+ trayIcon->Disconnect(wxEVT_TASKBAR_LEFT_DCLICK, wxCommandEventHandler(FfsTrayIcon::OnDoubleClick), nullptr, this);
trayIcon->parentHasDied(); //TaskBarImpl (potentially) has longer lifetime than FfsTrayIcon: avoid callback!
//use wxWidgets delayed destruction: delete during next idle loop iteration (handle late window messages, e.g. when double-clicking)
@@ -204,7 +204,7 @@ FfsTrayIcon::~FfsTrayIcon()
}
-void FfsTrayIcon::setToolTip2(const wxString& toolTipText, double fraction)
+void FfsTrayIcon::setToolTip(const wxString& toolTipText, double fraction)
{
trayIcon->SetIcon(generateIcon(fraction), toolTipText);
}
bgstack15