diff options
author | Andrew <forkk@forkk.net> | 2013-01-31 14:31:16 -0600 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-01-31 14:31:16 -0600 |
commit | de2632af0dcd7e6a1c3c763c9f7cf38c67ead441 (patch) | |
tree | 3fc6dd755ca34e07ee6b335dbca70785c5ada201 /gui/mainwindow.cpp | |
parent | 90764f97d94a52517d735ed96d26bb52a2d75de1 (diff) | |
download | MultiMC-de2632af0dcd7e6a1c3c763c9f7cf38c67ead441.tar MultiMC-de2632af0dcd7e6a1c3c763c9f7cf38c67ead441.tar.gz MultiMC-de2632af0dcd7e6a1c3c763c9f7cf38c67ead441.tar.lz MultiMC-de2632af0dcd7e6a1c3c763c9f7cf38c67ead441.tar.xz MultiMC-de2632af0dcd7e6a1c3c763c9f7cf38c67ead441.zip |
Added instance context menu and status tips.
Diffstat (limited to 'gui/mainwindow.cpp')
-rw-r--r-- | gui/mainwindow.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index e257f5ae..dc8f77fe 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -16,6 +16,8 @@ #include "mainwindow.h" #include "ui_mainwindow.h" +#include <QMenu> + #include <QDesktopServices> #include <QUrl> @@ -104,3 +106,13 @@ void MainWindow::closeEvent(QCloseEvent *event) settings->getConfig().setValue("MainWindowState", saveState()); QMainWindow::closeEvent(event); } + +void MainWindow::on_instanceView_customContextMenuRequested(const QPoint &pos) +{ + QMenu *instContextMenu = new QMenu("Instance", this); + + // Add the actions from the toolbar to the context menu. + instContextMenu->addActions(ui->instanceToolBar->actions()); + + instContextMenu->exec(ui->instanceView->mapToGlobal(pos)); +} |