Commit 7f83b412 authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Rename the File menu as Archive menu

Since an archive is a file that contains other files, the current Ark menu
structure can be confusing. The File menu currently contains actions regarding the
archive, while the Action menu contains actions regarding the files within the
archive.

This patch renames the File menu as Archive menu, to reduce this ambiguity.

Task: T915

Differential Revision: D788

GUI:
parent 5414cb2f
<!DOCTYPE kpartgui>
<kpartgui name="ark" version="12">
<kpartgui name="ark" version="13">
<MenuBar>
<Menu name="file">
<Menu name="archive">
<text>&amp;Archive</text>
<Action name="ark_file_new"/>
<Action name="ark_file_open"/>
<Action name="ark_file_open_recent"/>
<Separator/>
<DefineGroup name="file_save" append="save_merge"/>
<Separator/>
<Action name="ark_quit"/>
</Menu>
<Merge/>
<Menu name="settings">
......@@ -11,7 +18,7 @@
</MenuBar>
<ToolBar noMerge="1" name="mainToolBar">
<text>Main Toolbar</text>
<Action name="file_new"/>
<Action name="file_open"/>
<Action name="ark_file_new"/>
<Action name="ark_file_open"/>
</ToolBar>
</kpartgui>
......@@ -162,11 +162,13 @@ bool MainWindow::loadPart()
void MainWindow::setupActions()
{
m_newAction = KStandardAction::openNew(this, SLOT(newArchive()), actionCollection());
m_openAction = KStandardAction::open(this, SLOT(openArchive()), actionCollection());
KStandardAction::quit(this, SLOT(quit()), actionCollection());
m_newAction = actionCollection()->addAction(KStandardAction::New, QStringLiteral("ark_file_new"), this, SLOT(newArchive()));
m_openAction = actionCollection()->addAction(KStandardAction::Open, QStringLiteral("ark_file_open"), this, SLOT(openArchive()));
actionCollection()->addAction(KStandardAction::Quit, QStringLiteral("ark_quit"), this, SLOT(quit()));
m_recentFilesAction = KStandardAction::openRecent(this, SLOT(openUrl(QUrl)), Q_NULLPTR);
actionCollection()->addAction(QStringLiteral("ark_file_open_recent"), m_recentFilesAction);
m_recentFilesAction = KStandardAction::openRecent(this, SLOT(openUrl(QUrl)), actionCollection());
m_recentFilesAction->setToolBarMode(KRecentFilesAction::MenuMode);
m_recentFilesAction->setToolButtonPopupMode(QToolButton::DelayedPopup);
m_recentFilesAction->setIconText(i18nc("action, to open an archive", "Open"));
......
<!DOCTYPE kpartgui>
<kpartgui name="ark_part" version="3">
<kpartgui name="ark_part" version="4">
<MenuBar>
<Menu name="file">
<text>&amp;File</text>
<Action name="file_save_as" group="file_save"/>
<Menu name="archive">
<text>&amp;Archive</text>
<Action name="ark_file_save_as" group="file_save"/>
</Menu>
<Menu name="action">
<text>&amp;Action</text>
......
......@@ -286,7 +286,7 @@ void Part::setupActions()
connect(m_showInfoPanelAction, &QAction::triggered,
this, &Part::slotToggleInfoPanel);
m_saveAsAction = KStandardAction::saveAs(this, SLOT(slotSaveAs()), actionCollection());
actionCollection()->addAction(KStandardAction::SaveAs, QStringLiteral("ark_file_save_as"), this, SLOT(slotSaveAs()));
m_openFileAction = actionCollection()->addAction(QStringLiteral("openfile"));
m_openFileAction->setText(i18nc("open a file with external program", "&Open File"));
......
......@@ -131,7 +131,6 @@ private:
QAction *m_addFilesAction;
QAction *m_addDirAction;
QAction *m_deleteFilesAction;
QAction *m_saveAsAction;
KToggleAction *m_showInfoPanelAction;
InfoPanel *m_infoPanel;
QSplitter *m_splitter;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment