Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nate Graham
Kid3
Commits
3f6a5566
Commit
3f6a5566
authored
Apr 09, 2012
by
Urs Fleisch
Browse files
Allow removal of all user commands, Ubuntu bug #913725.
parent
0692fc7c
Changes
2
Show whitespace changes
Inline
Side-by-side
src/core/model/commandstablemodel.cpp
View file @
3f6a5566
...
@@ -282,5 +282,10 @@ QList<MiscConfig::MenuCommand> CommandsTableModel::getCommandList() const
...
@@ -282,5 +282,10 @@ QList<MiscConfig::MenuCommand> CommandsTableModel::getCommandList() const
cmdList
.
append
(
*
it
);
cmdList
.
append
(
*
it
);
}
}
}
}
if
(
cmdList
.
isEmpty
())
{
// Make sure that their is at least one entry, so that new entries can
// be added.
cmdList
.
append
(
MiscConfig
::
MenuCommand
());
}
return
cmdList
;
return
cmdList
;
}
}
src/gui/forms/filelist.cpp
View file @
3f6a5566
...
@@ -131,7 +131,7 @@ void FileList::updateCurrentSelection()
...
@@ -131,7 +131,7 @@ void FileList::updateCurrentSelection()
*/
*/
void
FileList
::
contextMenu
(
const
QModelIndex
&
index
,
const
QPoint
&
pos
)
void
FileList
::
contextMenu
(
const
QModelIndex
&
index
,
const
QPoint
&
pos
)
{
{
if
(
index
.
isValid
()
&&
!
ConfigStore
::
s_miscCfg
.
m_contextMenuCommands
.
empty
()
)
{
if
(
index
.
isValid
())
{
QMenu
menu
(
this
);
QMenu
menu
(
this
);
menu
.
addAction
(
i18n
(
"&Expand all"
),
this
,
SLOT
(
expandAll
()));
menu
.
addAction
(
i18n
(
"&Expand all"
),
this
,
SLOT
(
expandAll
()));
menu
.
addAction
(
i18n
(
"&Collapse all"
),
this
,
SLOT
(
collapseAll
()));
menu
.
addAction
(
i18n
(
"&Collapse all"
),
this
,
SLOT
(
collapseAll
()));
...
@@ -145,7 +145,10 @@ void FileList::contextMenu(const QModelIndex& index, const QPoint& pos)
...
@@ -145,7 +145,10 @@ void FileList::contextMenu(const QModelIndex& index, const QPoint& pos)
it
=
ConfigStore
::
s_miscCfg
.
m_contextMenuCommands
.
begin
();
it
=
ConfigStore
::
s_miscCfg
.
m_contextMenuCommands
.
begin
();
it
!=
ConfigStore
::
s_miscCfg
.
m_contextMenuCommands
.
end
();
it
!=
ConfigStore
::
s_miscCfg
.
m_contextMenuCommands
.
end
();
++
it
)
{
++
it
)
{
menu
.
addAction
((
*
it
).
getName
());
QString
name
((
*
it
).
getName
());
if
(
!
name
.
isEmpty
())
{
menu
.
addAction
(
name
);
}
++
id
;
++
id
;
}
}
connect
(
&
menu
,
SIGNAL
(
triggered
(
QAction
*
)),
this
,
SLOT
(
executeAction
(
QAction
*
)));
connect
(
&
menu
,
SIGNAL
(
triggered
(
QAction
*
)),
this
,
SLOT
(
executeAction
(
QAction
*
)));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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