summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Linke <kain88@mixxx.org>2014-09-08 14:39:22 +0200
committerMax Linke <kain88@mixxx.org>2014-09-11 11:56:56 +0200
commit03306d5bd104406836c67c8deecf97716ed34ced (patch)
treea02f642d826fd86c711e4f9406b9d4fbf15b9aee
parent79084ed1a4176a8af2175e84db30708b71f087cd (diff)
REF: write string directly into tr call and remove &
We try do avoid formatting symbols like the ampersand for strings that have to be translated. This also removes a memory leak because the char* string were not being deleted with the coverartmenu widget.
-rw-r--r--src/widget/wcoverartmenu.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/widget/wcoverartmenu.cpp b/src/widget/wcoverartmenu.cpp
index 74eaf34c7b..85fc5d0996 100644
--- a/src/widget/wcoverartmenu.cpp
+++ b/src/widget/wcoverartmenu.cpp
@@ -21,27 +21,28 @@ WCoverArtMenu::~WCoverArtMenu() {
}
void WCoverArtMenu::createActions() {
- char* title;
- char* context; // to help translators
-
- context = (char*) "change cover art location";
- title = (char*) "&Choose new cover";
- m_pChange = new QAction(tr(title, context), this);
+ m_pChange = new QAction(QIcon(":/images/library/ic_cover_change.png"),
+ tr("Choose new cover",
+ "change cover art location"),
+ this);
connect(m_pChange, SIGNAL(triggered()), this, SLOT(slotChange()));
- context = (char*) "show full size cover in a new window";
- title = (char*) "&Show Full Size";
- m_pFullSize = new QAction(tr(title, context), this);
+ m_pFullSize = new QAction(QIcon(":/images/library/ic_cover_fullsize.png"),
+ tr("Show Full Size",
+ "show full size cover in a new window"),
+ this);
connect(m_pFullSize, SIGNAL(triggered()), this, SLOT(slotShowFullSize()));
- context = (char*) "unset cover art - load default";
- title = (char*) "Unset cover";
- m_pUnset = new QAction(tr(title, context), this);
+ m_pUnset = new QAction(QIcon(":/images/library/ic_cover_unset.png"),
+ tr("Unset cover",
+ "unset cover art - load default"),
+ this);
connect(m_pUnset, SIGNAL(triggered()), this, SLOT(slotUnset()));
- context = (char*) "reload just cover art, using the search algorithm";
- title = (char*) "&Reload from track/folder";
- m_pReload = new QAction(tr(title, context), this);
+ m_pReload = new QAction(QIcon(":/images/library/ic_cover_reload.png"),
+ tr("Reload from track/folder",
+ "reload just cover art, using the search algorithm"),
+ this);
connect(m_pReload, SIGNAL(triggered()), this, SLOT(slotReload()));
}