Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
8462c96d
Commit
8462c96d
authored
Jul 29, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate the label and the message in update dialog to fix the confusion created before.
parent
8152480b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
15 deletions
+35
-15
modules/gui/qt4/dialogs/help.cpp
modules/gui/qt4/dialogs/help.cpp
+31
-14
modules/gui/qt4/dialogs/help.hpp
modules/gui/qt4/dialogs/help.hpp
+4
-1
No files found.
modules/gui/qt4/dialogs/help.cpp
View file @
8462c96d
...
...
@@ -215,11 +215,24 @@ UpdateDialog::UpdateDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
buttonBox
->
addButton
(
updateButton
,
QDialogButtonBox
::
ActionRole
);
buttonBox
->
addButton
(
closeButton
,
QDialogButtonBox
::
AcceptRole
);
updateLabel
=
new
QLabel
(
qtr
(
"Checking for an update..."
)
);
updateLabel
->
setWordWrap
(
true
);
updateLabelTop
=
new
QLabel
(
qtr
(
"Checking for an update..."
)
);
updateLabelTop
->
setWordWrap
(
true
);
updateLabelTop
->
setMargin
(
8
);
layout
->
addWidget
(
updateLabel
,
0
,
0
,
Qt
::
AlignTop
);
layout
->
addWidget
(
buttonBox
,
1
,
0
);
updateLabelDown
=
new
QLabel
(
qtr
(
"
\n
Do you want to download it?
\n
"
)
);
updateLabelDown
->
setWordWrap
(
true
);
updateLabelDown
->
hide
();
updateText
=
new
QTextEdit
;
updateText
->
setAcceptRichText
(
false
);
updateText
->
setTextInteractionFlags
(
Qt
::
TextSelectableByKeyboard
|
Qt
::
TextSelectableByMouse
);
updateText
->
setEnabled
(
false
);
layout
->
addWidget
(
updateLabelTop
,
0
,
0
);
layout
->
addWidget
(
updateText
,
1
,
0
);
layout
->
addWidget
(
updateLabelDown
,
2
,
0
);
layout
->
addWidget
(
buttonBox
,
3
,
0
);
BUTTONACT
(
updateButton
,
UpdateOrDownload
()
);
BUTTONACT
(
closeButton
,
close
()
);
...
...
@@ -228,8 +241,10 @@ UpdateDialog::UpdateDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
p_update
=
update_New
(
p_intf
);
b_checked
=
false
;
setMinimumSize
(
200
,
100
);
readSettings
(
"Update"
,
QSize
(
200
,
100
)
);
setMinimumSize
(
300
,
100
);
setMaximumSize
(
400
,
300
);
readSettings
(
"Update"
,
QSize
(
300
,
100
)
);
/* Check for updates */
UpdateOrDownload
();
...
...
@@ -252,7 +267,7 @@ void UpdateDialog::UpdateOrDownload()
if
(
!
b_checked
)
{
updateButton
->
setEnabled
(
false
);
updateLabel
->
setText
(
qtr
(
"Launching an update request..."
)
);
updateLabel
Top
->
setText
(
qtr
(
"Launching an update request..."
)
);
update_Check
(
p_update
,
UpdateCallback
,
this
);
}
else
...
...
@@ -296,30 +311,32 @@ void UpdateDialog::updateNotify( bool b_result )
update_release_t
*
p_release
=
update_GetRelease
(
p_update
);
assert
(
p_release
);
b_checked
=
true
;
updateButton
->
setText
(
"
Ok
"
);
updateButton
->
setText
(
"
Yes
"
);
QString
message
=
qtr
(
"A new version of VLC("
)
+
QString
::
number
(
p_release
->
i_major
)
+
"."
+
QString
::
number
(
p_release
->
i_minor
)
+
"."
+
QString
::
number
(
p_release
->
i_revision
);
if
(
p_release
->
extra
)
message
+=
p_release
->
extra
;
message
+=
qtr
(
") is available.
\n
Do you want to download it?
\n
"
)
+
qfu
(
p_release
->
psz_desc
);
message
+=
qtr
(
") is available."
);
updateLabelTop
->
setText
(
message
);
updateText
->
setText
(
qfu
(
p_release
->
psz_desc
)
);
updateText
->
setEnabled
(
true
);
updateLabel
->
setText
(
message
);
updateLabel
Down
->
show
(
);
/* Force the dialog to be shown */
this
->
show
();
}
else
updateLabel
->
setText
(
updateLabel
Top
->
setText
(
qtr
(
"You have the latest version of VLC media player."
)
);
}
else
updateLabel
->
setText
(
updateLabel
Top
->
setText
(
qtr
(
"An error occurred while checking for updates..."
)
);
adjustSize
();
updateButton
->
setEnabled
(
true
);
}
...
...
modules/gui/qt4/dialogs/help.hpp
View file @
8462c96d
...
...
@@ -37,6 +37,7 @@ class QTextBrowser;
class
QLabel
;
class
QEvent
;
class
QPushButton
;
class
QTextEdit
;
class
HelpDialog
:
public
QVLCFrame
{
...
...
@@ -110,7 +111,9 @@ private:
update_t
*
p_update
;
QPushButton
*
updateButton
;
QLabel
*
updateLabel
;
QLabel
*
updateLabelTop
;
QLabel
*
updateLabelDown
;
QTextEdit
*
updateText
;
void
customEvent
(
QEvent
*
);
bool
b_checked
;
...
...
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