Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
5e674f08
Commit
5e674f08
authored
Aug 18, 2012
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: BookMarks dialog: correctly handle deleting selection
parent
1debd199
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
modules/gui/qt4/dialogs/bookmarks.cpp
modules/gui/qt4/dialogs/bookmarks.cpp
+18
-4
modules/gui/qt4/dialogs/bookmarks.hpp
modules/gui/qt4/dialogs/bookmarks.hpp
+1
-0
No files found.
modules/gui/qt4/dialogs/bookmarks.cpp
View file @
5e674f08
...
@@ -31,9 +31,11 @@
...
@@ -31,9 +31,11 @@
#include <QSpacerItem>
#include <QSpacerItem>
#include <QPushButton>
#include <QPushButton>
#include <QDialogButtonBox>
#include <QDialogButtonBox>
#include <QModelIndexList>
BookmarksDialog
::
BookmarksDialog
(
intf_thread_t
*
_p_intf
)
:
QVLCFrame
(
_p_intf
)
BookmarksDialog
::
BookmarksDialog
(
intf_thread_t
*
_p_intf
)
:
QVLCFrame
(
_p_intf
)
{
{
b_ignore_updates
=
false
;
setWindowFlags
(
Qt
::
Tool
);
setWindowFlags
(
Qt
::
Tool
);
setWindowOpacity
(
var_InheritFloat
(
p_intf
,
"qt-opacity"
)
);
setWindowOpacity
(
var_InheritFloat
(
p_intf
,
"qt-opacity"
)
);
setWindowTitle
(
qtr
(
"Edit Bookmarks"
)
);
setWindowTitle
(
qtr
(
"Edit Bookmarks"
)
);
...
@@ -118,6 +120,7 @@ void BookmarksDialog::updateButtons()
...
@@ -118,6 +120,7 @@ void BookmarksDialog::updateButtons()
void
BookmarksDialog
::
update
()
void
BookmarksDialog
::
update
()
{
{
if
(
b_ignore_updates
)
return
;
input_thread_t
*
p_input
=
THEMIM
->
getInput
();
input_thread_t
*
p_input
=
THEMIM
->
getInput
();
if
(
!
p_input
)
return
;
if
(
!
p_input
)
return
;
...
@@ -176,11 +179,22 @@ void BookmarksDialog::del()
...
@@ -176,11 +179,22 @@ void BookmarksDialog::del()
input_thread_t
*
p_input
=
THEMIM
->
getInput
();
input_thread_t
*
p_input
=
THEMIM
->
getInput
();
if
(
!
p_input
)
return
;
if
(
!
p_input
)
return
;
int
i_focused
=
bookmarksList
->
currentIndex
().
row
();
QModelIndexList
selected
=
bookmarksList
->
selectionModel
()
->
selectedIndexes
();
if
(
!
selected
.
empty
()
)
if
(
i_focused
>=
0
)
{
{
input_Control
(
p_input
,
INPUT_DEL_BOOKMARK
,
i_focused
);
b_ignore_updates
=
true
;
QModelIndexList
::
Iterator
it
=
selected
.
end
();
for
(
--
it
;
it
!=
selected
.
begin
();
it
--
)
{
/* FIXME: Find out why selectedIndexes() doesn't follow the
SelectRows selectionBehavior() and returns all columns */
if
(
(
*
it
).
column
()
==
0
)
input_Control
(
p_input
,
INPUT_DEL_BOOKMARK
,
(
*
it
).
row
()
);
}
if
(
(
*
it
).
column
()
==
0
)
input_Control
(
p_input
,
INPUT_DEL_BOOKMARK
,
(
*
it
).
row
()
);
b_ignore_updates
=
false
;
update
();
}
}
}
}
...
...
modules/gui/qt4/dialogs/bookmarks.hpp
View file @
5e674f08
...
@@ -42,6 +42,7 @@ private:
...
@@ -42,6 +42,7 @@ private:
QTreeWidget
*
bookmarksList
;
QTreeWidget
*
bookmarksList
;
QPushButton
*
clearButton
;
QPushButton
*
clearButton
;
QPushButton
*
delButton
;
QPushButton
*
delButton
;
bool
b_ignore_updates
;
private
slots
:
private
slots
:
void
update
();
void
update
();
...
...
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