Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
ce552f98
Commit
ce552f98
authored
Dec 01, 2022
by
Jean-Baptiste Mardelle
Browse files
Ensure add selection to library appears in the list of actions
parent
cd8c64cc
Pipeline
#278321
passed with stage
in 15 minutes and 12 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/core.cpp
View file @
ce552f98
...
...
@@ -1073,6 +1073,11 @@ const QString Core::actionText(const QString &name)
return
QString
();
}
void
Core
::
addActionToCollection
(
const
QString
&
name
,
QAction
*
action
)
{
m_mainWindow
->
actionCollection
()
->
addAction
(
name
,
action
);
}
void
Core
::
clean
()
{
m_self
.
reset
();
...
...
src/core.h
View file @
ce552f98
...
...
@@ -345,6 +345,8 @@ public slots:
void
triggerAction
(
const
QString
&
name
);
/** @brief Get an action's descriptive text by its actionCollection name */
const
QString
actionText
(
const
QString
&
name
);
/** @brief Add an action to the app's actionCollection */
void
addActionToCollection
(
const
QString
&
name
,
QAction
*
action
);
/** @brief display a user info/warning message in the project bin */
void
displayBinMessage
(
const
QString
&
text
,
int
type
,
const
QList
<
QAction
*>
&
actions
=
QList
<
QAction
*>
(),
bool
showClose
=
false
,
BinMessage
::
BinCategory
messageCategory
=
BinMessage
::
BinCategory
::
NoMessage
);
void
displayBinLogMessage
(
const
QString
&
text
,
int
type
,
const
QString
logInfo
);
...
...
src/library/librarywidget.cpp
View file @
ce552f98
...
...
@@ -235,6 +235,7 @@ void LibraryWidget::setupActions()
m_toolBar
->
addAction
(
addFolder
);
QAction
*
sentToLibrary
=
new
QAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"bookmark-new"
)),
i18n
(
"Add Timeline Selection to Library"
),
this
);
connect
(
sentToLibrary
,
&
QAction
::
triggered
,
this
,
&
LibraryWidget
::
slotAddToLibrary
);
pCore
->
addActionToCollection
(
QStringLiteral
(
"send_library"
),
sentToLibrary
);
sentToLibrary
->
setEnabled
(
false
);
m_toolBar
->
addAction
(
sentToLibrary
);
menuList
<<
sentToLibrary
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment