summaryrefslogtreecommitdiff
path: root/plugingui/mainwindow.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-07-29 15:07:07 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-07-29 15:07:07 +0200
commit220e36f0f54dcb0342ba32b6325e9add2f47347c (patch)
tree9c11327d6d7661887e611a8e999f7e443a553a45 /plugingui/mainwindow.cc
parent20c9cd497cef9fab46f1e24eebe5fa98dc04a444 (diff)
Add embedded gettext support from resource.
Diffstat (limited to 'plugingui/mainwindow.cc')
-rw-r--r--plugingui/mainwindow.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/plugingui/mainwindow.cc b/plugingui/mainwindow.cc
index a625bc3..932e8f3 100644
--- a/plugingui/mainwindow.cc
+++ b/plugingui/mainwindow.cc
@@ -26,11 +26,13 @@
*/
#include "mainwindow.h"
+#include <string>
+
#include <config.h>
-#include "painter.h"
+#include <translation.h>
-#include <string>
+#include "painter.h"
namespace GUI
{
@@ -46,14 +48,14 @@ MainWindow::MainWindow(Settings& settings, void* native_window)
CONNECT(this, sizeChangeNotifier, this, &MainWindow::sizeChanged);
CONNECT(eventHandler(), closeNotifier, this, &MainWindow::closeEventHandler);
- setCaption("DrumGizmo v" VERSION);
+ setCaption(std::string(_("DrumGizmo v")) + VERSION);
tabs.setTabWidth(100);
tabs.move(16, 0); // x-offset to make room for the left side bar.
- tabs.addTab("Main", &main_tab);
- drumkit_tab_id = tabs.addTab("Drumkit", &drumkit_tab);
+ tabs.addTab(_("Main"), &main_tab);
+ drumkit_tab_id = tabs.addTab(_("Drumkit"), &drumkit_tab);
changeDrumkitTabVisibility(false); // Hide while no kit is loaded
- tabs.addTab("About", &about_tab);
+ tabs.addTab(_("About"), &about_tab);
CONNECT(&drumkit_tab, imageChangeNotifier,
this, &MainWindow::changeDrumkitTabVisibility);