kmediaplayer: use standard actions where possible

for icons consistency, translations, etc.

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-08-27 00:53:33 +03:00
parent fe7f483647
commit dc2e1859df

View file

@ -113,28 +113,18 @@ KMediaWindow::KMediaWindow(QWidget *parent, Qt::WindowFlags flags)
setCentralWidget(m_player); setCentralWidget(m_player);
KAction *action = actionCollection()->addAction("file_open_path", this, SLOT(slotOpenPath())); KAction *action = actionCollection()->addAction(KStandardAction::Open, "file_open_path", this, SLOT(slotOpenPath()));
action->setText(i18n("Open"));
action->setIcon(KIcon("document-open"));
action->setShortcut(KStandardShortcut::open());
action->setWhatsThis(i18n("Open a path.")); action->setWhatsThis(i18n("Open a path."));
action = actionCollection()->addAction("file_open_url", this, SLOT(slotOpenURL())); action = actionCollection()->addAction("file_open_url", this, SLOT(slotOpenURL()));
action->setText(i18n("Open URL")); action->setText(i18n("Open URL..."));
action->setIcon(KIcon("document-open-remote")); action->setIcon(KIcon("document-open-remote"));
action->setWhatsThis(i18n("Open a URL.")); action->setWhatsThis(i18n("Open a URL."));
action = actionCollection()->addAction("file_close", this, SLOT(slotClosePath())); action = actionCollection()->addAction(KStandardAction::Close, "file_close", this, SLOT(slotClosePath()));
action->setText(i18n("Close"));
action->setIcon(KIcon("document-close"));
action->setShortcut(KStandardShortcut::close());
action->setWhatsThis(i18n("Close the current path/URL.")); action->setWhatsThis(i18n("Close the current path/URL."));
action = actionCollection()->addAction("file_quit", this, SLOT(slotQuit())); action = actionCollection()->addAction(KStandardAction::Quit, "file_quit", this, SLOT(slotQuit()));
action->setText(i18n("Quit"));
action->setIcon(KIcon("application-exit"));
action->setShortcut(KStandardShortcut::quit());
action->setWhatsThis(i18n("Close the application."));
action = actionCollection()->addAction("settings_player", this, SLOT(slotConfigure())); action = actionCollection()->addAction("settings_player", this, SLOT(slotConfigure()));
action->setText(i18n("Configure KMediaPlayer")); action->setText(i18n("Configure KMediaPlayer"));