Verified Commit e879cd52 authored by Carl Schwan's avatar Carl Schwan 🚴

Small collection of minor improvements

Summary:
* Search -> Search.. (KDE HIG)
* renameAction in Clip Menu and not only in right click menu from the project bin
* Typos

Test Plan:
Compile and run

For the moment the renameAction still don't appear in the clip menu
Could need some help figuring it out.

Differential Revision: https://phabricator.kde.org/D20971
parent 885959d9
Pipeline #3047 passed with stage
in 15 minutes and 44 seconds
......@@ -608,7 +608,7 @@ Bin::Bin(std::shared_ptr<ProjectItemModel> model, QWidget *parent)
m_searchLine = new QLineEdit(this);
m_searchLine->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
// m_searchLine->setClearButtonEnabled(true);
m_searchLine->setPlaceholderText(i18n("Search"));
m_searchLine->setPlaceholderText(i18n("Search..."));
m_searchLine->setFocusPolicy(Qt::ClickFocus);
connect(m_searchLine, &QLineEdit::textChanged, m_proxyModel, &ProjectSortProxyModel::slotSetSearchString);
......@@ -685,11 +685,6 @@ Bin::Bin(std::shared_ptr<ProjectItemModel> model, QWidget *parent)
disableEffects->setChecked(false);
pCore->window()->actionCollection()->addAction(QStringLiteral("disable_bin_effects"), disableEffects);
m_renameAction = KStandardAction::renameFile(this, SLOT(slotRenameItem()), this);
m_renameAction->setText(i18n("Rename"));
m_renameAction->setData("rename");
pCore->window()->actionCollection()->addAction(QStringLiteral("rename"), m_renameAction);
listType->setToolBarMode(KSelectAction::MenuMode);
connect(listType, static_cast<void (KSelectAction::*)(QAction *)>(&KSelectAction::triggered), this, &Bin::slotInitView);
......@@ -973,7 +968,7 @@ void Bin::slotDeleteClip()
usedFolder = usedFolder || item->childCount() > 0;
items.push_back(item);
}
if (included && (KMessageBox::warningContinueCancel(this, i18n("This will delete all selected clips from timeline")) != KMessageBox::Continue)) {
if (included && (KMessageBox::warningContinueCancel(this, i18n("This will delete all selected clips from the timeline")) != KMessageBox::Continue)) {
return;
}
if (usedFolder && (KMessageBox::warningContinueCancel(this, i18n("This will delete all folder content")) != KMessageBox::Continue)) {
......@@ -1536,6 +1531,8 @@ void Bin::contextMenuEvent(QContextMenuEvent *event)
m_reloadAction->setEnabled(enableClipActions);
m_locateAction->setEnabled(enableClipActions);
m_duplicateAction->setEnabled(enableClipActions);
m_renameAction->setEnabled(true);
m_editAction->setVisible(!isFolder);
m_clipsActionsMenu->setEnabled(enableClipActions);
m_extractAudioAction->setEnabled(enableClipActions);
......@@ -1543,6 +1540,8 @@ void Bin::contextMenuEvent(QContextMenuEvent *event)
m_reloadAction->setVisible(itemType != AbstractProjectItem::FolderItem);
m_duplicateAction->setVisible(itemType != AbstractProjectItem::FolderItem);
m_inTimelineAction->setVisible(itemType != AbstractProjectItem::FolderItem);
m_renameAction->setVisible(true);
if (m_transcodeAction) {
m_transcodeAction->setEnabled(enableClipActions);
m_transcodeAction->menuAction()->setVisible(itemType != AbstractProjectItem::FolderItem && clipService.contains(QStringLiteral("avformat")));
......@@ -1922,6 +1921,7 @@ void Bin::setupMenu(QMenu *addMenu, QAction *defaultAction, const QHash<QString,
m_duplicateAction = actions.value(QStringLiteral("duplicate"));
m_locateAction = actions.value(QStringLiteral("locate"));
m_proxyAction = actions.value(QStringLiteral("proxy"));
m_renameAction = actions.value(QStringLiteral("rename"));
auto *m = new QMenu(this);
m->addActions(addMenu->actions());
......
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="kdenlive" version="159" translationDomain="kdenlive">
<kpartgui name="kdenlive" version="160" translationDomain="kdenlive">
<MenuBar>
<Menu name="file" >
<Action name="dvd_wizard" />
......@@ -70,6 +70,7 @@
</Menu>
<Action name="clip_properties" />
<Action name="edit_clip" />
<Action name="rename_clip" />
<Action name="delete_clip" />
</Menu>
......
......@@ -1456,6 +1456,11 @@ void MainWindow::setupActions()
deleteClip->setData("delete_clip");
deleteClip->setEnabled(false);
QAction *renameClip =
addAction(QStringLiteral("rename_clip"), i18n("Rename Clip"), pCore->bin(), SLOT(slotRenameItem()), QIcon::fromTheme(QStringLiteral("document-edit")));
renameClip->setData("rename_clip");
renameClip->setEnabled(false);
QAction *reloadClip =
addAction(QStringLiteral("reload_clip"), i18n("Reload Clip"), pCore->bin(), SLOT(slotReloadClip()), QIcon::fromTheme(QStringLiteral("view-refresh")));
reloadClip->setData("reload_clip");
......@@ -1500,6 +1505,7 @@ void MainWindow::setupActions()
{QStringLiteral("proxy"), proxyClip},
{QStringLiteral("properties"), clipProperties},
{QStringLiteral("open"), openClip},
{QStringLiteral("rename"), renameClip},
{QStringLiteral("delete"), deleteClip},
{QStringLiteral("folder"), addFolder}});
......
......@@ -312,7 +312,7 @@ ClipPropertiesController::ClipPropertiesController(ClipController *controller, Q
m_originalProperties.insert(QStringLiteral("force_aspect_den"), (force_ar_den == 0) ? QString() : QString::number(force_ar_den));
m_originalProperties.insert(QStringLiteral("force_aspect_num"), (force_ar_num == 0) ? QString() : QString::number(force_ar_num));
auto *hlay = new QHBoxLayout;
QCheckBox *box = new QCheckBox(i18n("Aspect Ratio"), this);
QCheckBox *box = new QCheckBox(i18n("Aspect ratio"), this);
box->setObjectName(QStringLiteral("force_ar"));
vbox->addWidget(box);
connect(box, &QCheckBox::stateChanged, this, &ClipPropertiesController::slotEnableForce);
......
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