set up shortcut for "manage favourite tools"
This commit is contained in:
parent
8b0852dddc
commit
f9774ecdab
|
@ -295,18 +295,18 @@ MainWindow::MainWindow(QWidget* parent)
|
||||||
connect(mTabWidget, SIGNAL(tabMovedTabWidget(int, int)), this, SLOT(tabMovedSlot(int, int)));
|
connect(mTabWidget, SIGNAL(tabMovedTabWidget(int, int)), this, SLOT(tabMovedSlot(int, int)));
|
||||||
connect(Config(), SIGNAL(shortcutsUpdated()), this, SLOT(refreshShortcuts()));
|
connect(Config(), SIGNAL(shortcutsUpdated()), this, SLOT(refreshShortcuts()));
|
||||||
|
|
||||||
|
// Setup favourite tools menu
|
||||||
|
updateFavouriteTools();
|
||||||
|
|
||||||
// Set default setttings (when not set)
|
// Set default setttings (when not set)
|
||||||
SettingsDialog defaultSettings;
|
SettingsDialog defaultSettings;
|
||||||
lastException = 0;
|
lastException = 0;
|
||||||
defaultSettings.SaveSettings();
|
defaultSettings.SaveSettings();
|
||||||
|
// Don't need to set shortcuts because the code above will signal refreshShortcuts()
|
||||||
|
|
||||||
// Create updatechecker
|
// Create updatechecker
|
||||||
mUpdateChecker = new UpdateChecker(this);
|
mUpdateChecker = new UpdateChecker(this);
|
||||||
|
|
||||||
updateFavouriteTools();
|
|
||||||
|
|
||||||
refreshShortcuts();
|
|
||||||
|
|
||||||
// Setup close thread and dialog
|
// Setup close thread and dialog
|
||||||
bCanClose = false;
|
bCanClose = false;
|
||||||
mCloseThread = new MainWindowCloseThread(this);
|
mCloseThread = new MainWindowCloseThread(this);
|
||||||
|
@ -475,7 +475,7 @@ void MainWindow::refreshShortcuts()
|
||||||
|
|
||||||
setGlobalShortcut(ui->actionScylla, ConfigShortcut("PluginsScylla"));
|
setGlobalShortcut(ui->actionScylla, ConfigShortcut("PluginsScylla"));
|
||||||
|
|
||||||
setGlobalShortcut(ui->actionManageFavourite, ConfigShortcut("FavouritesManage"));
|
setGlobalShortcut(actionManageFavourites, ConfigShortcut("FavouritesManage"));
|
||||||
|
|
||||||
setGlobalShortcut(ui->actionSettings, ConfigShortcut("OptionsPreferences"));
|
setGlobalShortcut(ui->actionSettings, ConfigShortcut("OptionsPreferences"));
|
||||||
setGlobalShortcut(ui->actionAppearance, ConfigShortcut("OptionsAppearance"));
|
setGlobalShortcut(ui->actionAppearance, ConfigShortcut("OptionsAppearance"));
|
||||||
|
@ -1496,9 +1496,9 @@ void MainWindow::updateFavouriteTools()
|
||||||
}
|
}
|
||||||
if(isanythingexists)
|
if(isanythingexists)
|
||||||
ui->menuFavourites->addSeparator();
|
ui->menuFavourites->addSeparator();
|
||||||
QAction* manageFavTools = new QAction(QIcon(":/icons/images/star.png"), tr("Manage Favourite Tools"), this);
|
actionManageFavourites = new QAction(QIcon(":/icons/images/star.png"), tr("Manage Favourite Tools"), this);
|
||||||
ui->menuFavourites->addAction(manageFavTools);
|
ui->menuFavourites->addAction(actionManageFavourites);
|
||||||
setGlobalShortcut(manageFavTools, ConfigShortcut("FavouritesManage"));
|
setGlobalShortcut(actionManageFavourites, ConfigShortcut("FavouritesManage"));
|
||||||
connect(ui->menuFavourites->actions().last(), SIGNAL(triggered()), this, SLOT(manageFavourites()));
|
connect(ui->menuFavourites->actions().last(), SIGNAL(triggered()), this, SLOT(manageFavourites()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -180,6 +180,8 @@ private:
|
||||||
int mMaxMRU;
|
int mMaxMRU;
|
||||||
unsigned int lastException;
|
unsigned int lastException;
|
||||||
|
|
||||||
|
QAction* actionManageFavourites;
|
||||||
|
|
||||||
void loadMRUList(int maxItems);
|
void loadMRUList(int maxItems);
|
||||||
void saveMRUList();
|
void saveMRUList();
|
||||||
void addMRUEntry(QString entry);
|
void addMRUEntry(QString entry);
|
||||||
|
|
Loading…
Reference in New Issue