summaryrefslogtreecommitdiffstats
path: root/qt-gui.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-13 20:44:02 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-13 20:44:02 -0700
commitf5c958ad73db696e473aaa35e144f4c9d8ae24de (patch)
treeef693cc0bbcaea533d007132897c32a7f9e8ea98 /qt-gui.cpp
parent14e133321f4ac2cff9eb0b84ba9687e5d42e3e46 (diff)
downloadsubsurface-f5c958ad73db696e473aaa35e144f4c9d8ae24de.tar.gz
Add Qtr_ macros that uses gettext in a tr() compatible manner
This should wrap gettext nicely and replace the "_()" macros we use in C code. Also added comments to the top of all the new files. Suggested-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r--qt-gui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp
index 745457763..1621317c2 100644
--- a/qt-gui.cpp
+++ b/qt-gui.cpp
@@ -25,6 +25,7 @@
#include "version.h"
#include "libdivecomputer.h"
#include "qt-ui/mainwindow.h"
+#include "qt-ui/common.h"
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk-pixbuf/gdk-pixdata.h>
@@ -1784,7 +1785,7 @@ void MainWindow::setCurrentFileName(const QString &fileName)
if (fileName == m_currentFileName) return;
m_currentFileName = fileName;
- QString title = tr("Subsurface");
+ QString title = Qtr_("Subsurface");
if (!m_currentFileName.isEmpty()) {
QFileInfo fileInfo(m_currentFileName);
title += " - " + fileInfo.fileName();
@@ -1797,7 +1798,7 @@ void MainWindow::on_actionOpen_triggered()
QString defaultFileName = QString::fromUtf8(prefs.default_filename);
QFileInfo fileInfo(defaultFileName);
- QFileDialog dialog(this, tr("Open File"), fileInfo.path());
+ QFileDialog dialog(this, Qtr_("Open File"), fileInfo.path());
dialog.setFileMode(QFileDialog::ExistingFile);
dialog.selectFile(defaultFileName);
dialog.setNameFilters(fileNameFilters());