Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLMC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
21
Issues
21
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
VLMC
Commits
97ab2b5e
Commit
97ab2b5e
authored
Apr 20, 2010
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding a preference to disable the clip deletion confirmation dialog.
parent
636e307a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
17 deletions
+26
-17
src/Gui/MainWindow.cpp
src/Gui/MainWindow.cpp
+3
-0
src/Gui/timeline/TracksScene.cpp
src/Gui/timeline/TracksScene.cpp
+23
-17
No files found.
src/Gui/MainWindow.cpp
View file @
97ab2b5e
...
...
@@ -239,6 +239,9 @@ MainWindow::initVlmcPreferences()
LanguageHelper
::
getInstance
(),
SLOT
(
languageChanged
(
const
QVariant
&
)
),
SettingsManager
::
Vlmc
);
VLMC_CREATE_PREFERENCE_BOOL
(
"general/ConfirmDeletion"
,
true
,
QT_TRANSLATE_NOOP
(
"PreferenceWidget"
,
"Confirm deletion"
),
QT_TRANSLATE_NOOP
(
"PreferenceWidget"
,
"Ask for confirmation before deleting a clip from the timeline"
)
);
//Load saved preferences :
QSettings
s
;
...
...
src/Gui/timeline/TracksScene.cpp
View file @
97ab2b5e
...
...
@@ -20,16 +20,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <QMessageBox>
#include <QKeyEvent>
#include <QGraphicsSceneContextMenuEvent>
#include "TracksScene.h"
#include "Commands.h"
#include "GraphicsMovieItem.h"
#include "GraphicsAudioItem.h"
#include "SettingsManager.h"
#include "Timeline.h"
#include "UndoStack.h"
#include <QMessageBox>
#include <QKeyEvent>
#include <QGraphicsSceneContextMenuEvent>
TracksScene
::
TracksScene
(
QObject
*
parent
)
:
QGraphicsScene
(
parent
)
{
}
...
...
@@ -67,20 +70,23 @@ TracksScene::askRemoveSelectedItems()
if
(
!
tv
)
return
;
QString
message
;
if
(
selectedItems
().
size
()
==
1
)
message
=
tr
(
"Confirm the deletion of the region?"
);
else
message
=
tr
(
"Confirm the deletion of those regions?"
);
QMessageBox
::
StandardButton
b
=
QMessageBox
::
warning
(
tv
,
"Object deletion"
,
message
,
QMessageBox
::
Yes
|
QMessageBox
::
No
,
QMessageBox
::
No
);
// Skip the deletion process
if
(
b
==
QMessageBox
::
No
)
return
;
if
(
VLMC_GET_BOOL
(
"general/ConfirmDeletion"
)
==
true
)
{
QString
message
;
if
(
selectedItems
().
size
()
==
1
)
message
=
tr
(
"Confirm the deletion of the region?"
);
else
message
=
tr
(
"Confirm the deletion of those regions?"
);
QMessageBox
::
StandardButton
b
=
QMessageBox
::
warning
(
tv
,
"Object deletion"
,
message
,
QMessageBox
::
Yes
|
QMessageBox
::
No
,
QMessageBox
::
No
);
// Skip the deletion process
if
(
b
==
QMessageBox
::
No
)
return
;
}
UndoStack
::
getInstance
()
->
beginMacro
(
"Remove clip(s)"
);
...
...
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