Skip to content

Commit

Permalink
improve context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Feb 25, 2015
1 parent 0f1681f commit 003e0dc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#define APP_INSTALLER_FILENAME "installer.exe"
#define APP_LOG_FILENAME "debug.log"

#define APP_MIN_WIDTH 505
#define APP_MIN_HEIGHT 260
#define APP_MIN_WIDTH 450
#define APP_MIN_HEIGHT 250

#endif // VERSION_H
15 changes: 6 additions & 9 deletions src/gui/setcontextmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,21 @@ SetContextMenu::SetContextMenu(MainWindow* _parent, Controller *_ctrl, const QLi
}

addSeparator();
}

QAction* actionAdd = addAction(QIcon(":/icon/add"), tr("Add set"));
connect(actionAdd, SIGNAL(triggered()), _parent, SLOT(addSet()));

if (m_sets.size() > 0)
{
QAction* actionEdit = addAction(QIcon(":/icon/edit"), tr("Edit"));
connect(actionEdit, SIGNAL(triggered()), this, SLOT(editSets()));

QAction* actionClearCache = addAction(QIcon(":/icon/clear"), tr("Clear cache"));
connect(actionClearCache, SIGNAL(triggered()), this, SLOT(clearCache()));

addSeparator();

QAction* actionDelete = addAction(QIcon(":/icon/delete"), tr("Delete"));
connect(actionDelete, SIGNAL(triggered()), this, SLOT(deleteSets()));

QAction* actionClearCache = addAction(QIcon(":/icon/clear"), tr("Clear cache"));
connect(actionClearCache, SIGNAL(triggered()), this, SLOT(clearCache()));
}

QAction* actionAdd = addAction(QIcon(":/icon/add"), tr("Add set"));
connect(actionAdd, SIGNAL(triggered()), _parent, SLOT(addSet()));
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/gui/seteditdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ SetEditDialog::SetEditDialog(QWidget* _parent, Settings* _settings, const QList<

setWindowFlags(SimpleDialogFlag);

ui->inputName->setFocus();

if (m_sets.size() > 1)
{
ui->selectType->addItem(tr("[keep]"), UM::W_NONE);
Expand Down

0 comments on commit 003e0dc

Please sign in to comment.