diff --git a/gpxsee.pro b/gpxsee.pro
index 804443af..050c860d 100644
--- a/gpxsee.pro
+++ b/gpxsee.pro
@@ -34,3 +34,4 @@ SOURCES += src/main.cpp \
src/markeritem.cpp
RESOURCES += gpxsee.qrc
TRANSLATIONS = lang/gpxsee_cs.ts
+macx:ICON = icons/gpxsee.icns
diff --git a/gpxsee.qrc b/gpxsee.qrc
index d9ad1373..2655794b 100644
--- a/gpxsee.qrc
+++ b/gpxsee.qrc
@@ -6,6 +6,7 @@
icons/document-save.png
icons/flag.png
icons/gpxsee.png
+ icons/application-exit.png
diff --git a/src/gui.cpp b/src/gui.cpp
index 9c97e4df..ca89536e 100644
--- a/src/gui.cpp
+++ b/src/gui.cpp
@@ -58,7 +58,8 @@ void GUI::createActions()
// General actions
- _exitAction = new QAction(tr("Exit"), this);
+ _exitAction = new QAction(QIcon(QPixmap(QUIT_ICON)), tr("Quit"), this);
+ _exitAction->setShortcut(QKeySequence::Quit);
connect(_exitAction, SIGNAL(triggered()), this, SLOT(close()));
_aboutAction = new QAction(QIcon(QPixmap(APP_ICON)),
@@ -70,17 +71,21 @@ void GUI::createActions()
// File related actions
_openFileAction = new QAction(QIcon(QPixmap(OPEN_FILE_ICON)),
tr("Open"), this);
+ _openFileAction->setShortcut(QKeySequence::Open);
connect(_openFileAction, SIGNAL(triggered()), this, SLOT(openFile()));
_saveFileAction = new QAction(QIcon(QPixmap(SAVE_FILE_ICON)),
tr("Save"), this);
+ _saveFileAction->setShortcut(QKeySequence::Save);
_saveFileAction->setActionGroup(_fileActionGroup);
connect(_saveFileAction, SIGNAL(triggered()), this, SLOT(saveFile()));
_saveAsAction = new QAction(QIcon(QPixmap(SAVE_AS_ICON)),
tr("Save as"), this);
+ _saveAsAction->setShortcut(QKeySequence::SaveAs);
_saveAsAction->setActionGroup(_fileActionGroup);
connect(_saveAsAction, SIGNAL(triggered()), this, SLOT(saveAs()));
_closeFileAction = new QAction(QIcon(QPixmap(CLOSE_FILE_ICON)),
tr("Close"), this);
+ _closeFileAction->setShortcut(QKeySequence::Close);
_closeFileAction->setActionGroup(_fileActionGroup);
connect(_closeFileAction, SIGNAL(triggered()), this, SLOT(closeFile()));
@@ -98,9 +103,12 @@ void GUI::createMenus()
{
_fileMenu = menuBar()->addMenu(tr("File"));
_fileMenu->addAction(_openFileAction);
+ _fileMenu->addSeparator();
_fileMenu->addAction(_saveFileAction);
_fileMenu->addAction(_saveAsAction);
+ _fileMenu->addSeparator();
_fileMenu->addAction(_closeFileAction);
+ _fileMenu->addSeparator();
_fileMenu->addAction(_exitAction);
_poiMenu = menuBar()->addMenu(tr("POI"));
@@ -118,9 +126,15 @@ void GUI::createToolBars()
_fileToolBar->addAction(_openFileAction);
_fileToolBar->addAction(_saveFileAction);
_fileToolBar->addAction(_closeFileAction);
+#ifdef __APPLE__
+ _fileToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
+#endif // __APPLE__
_poiToolBar = addToolBar(tr("POI"));
_poiToolBar->addAction(_showPOIAction);
+#ifdef __APPLE__
+ _poiToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
+#endif // __APPLE__
}
void GUI::createTrackView()
diff --git a/src/icons.h b/src/icons.h
index e1b78fbc..650e05c0 100644
--- a/src/icons.h
+++ b/src/icons.h
@@ -7,5 +7,6 @@
#define SAVE_AS_ICON ":/icons/document-save-as.png"
#define CLOSE_FILE_ICON ":/icons/dialog-close.png"
#define SHOW_POI_ICON ":/icons/flag.png"
+#define QUIT_ICON ":/icons/application-exit.png"
#endif /* ICONS_H */
diff --git a/src/main.cpp b/src/main.cpp
index b4ac18f7..4c03ba00 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -13,6 +13,9 @@ int main(int argc, char *argv[])
QTranslator translator;
translator.load(QString(":/lang/gpxsee_") + locale);
app.installTranslator(&translator);
+#ifdef __APPLE__
+ app.setAttribute(Qt::AA_DontShowIconsInMenus);
+#endif // __APPLE__
GUI gui;
gui.setWindowIcon(QIcon(QPixmap(APP_ICON)));