Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved recent files to "Open Recent" submenu (#216) #221

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions common/lc_mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,11 @@ void lcMainWindow::CreateMenus()
QMenu* FileMenu = menuBar()->addMenu(tr("&File"));
FileMenu->addAction(mActions[LC_FILE_NEW]);
FileMenu->addAction(mActions[LC_FILE_OPEN]);
QMenu* RecentMenu = FileMenu->addMenu(tr("Open Recent"));
RecentMenu->addAction(mActions[LC_FILE_RECENT1]);
RecentMenu->addAction(mActions[LC_FILE_RECENT2]);
RecentMenu->addAction(mActions[LC_FILE_RECENT3]);
RecentMenu->addAction(mActions[LC_FILE_RECENT4]);
FileMenu->addAction(mActions[LC_FILE_MERGE]);
FileMenu->addSeparator();
FileMenu->addAction(mActions[LC_FILE_SAVE]);
Expand All @@ -443,11 +448,6 @@ void lcMainWindow::CreateMenus()
FileMenu->addAction(mActions[LC_FILE_PRINT_PREVIEW]);
// FileMenu->addAction(mActions[LC_FILE_PRINT_BOM]);
FileMenu->addSeparator();
FileMenu->addAction(mActions[LC_FILE_RECENT1]);
FileMenu->addAction(mActions[LC_FILE_RECENT2]);
FileMenu->addAction(mActions[LC_FILE_RECENT3]);
FileMenu->addAction(mActions[LC_FILE_RECENT4]);
mActionFileRecentSeparator = FileMenu->addSeparator();
FileMenu->addAction(mActions[LC_FILE_EXIT]);

QMenu* EditMenu = menuBar()->addMenu(tr("&Edit"));
Expand Down Expand Up @@ -2076,8 +2076,6 @@ void lcMainWindow::UpdateRecentFiles()
else
Action->setVisible(false);
}

mActionFileRecentSeparator->setVisible(!mRecentFiles[0].isEmpty());
}

void lcMainWindow::UpdateShortcuts()
Expand Down
2 changes: 0 additions & 2 deletions common/lc_mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,6 @@ protected slots:
lcSelectionMode mSelectionMode;
int mModelTabWidgetContextMenuIndex;

QAction* mActionFileRecentSeparator;

lcTabWidget* mModelTabWidget;
QToolBar* mStandardToolBar;
QToolBar* mToolsToolBar;
Expand Down