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
3de7f18a
Commit
3de7f18a
authored
Sep 27, 2010
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: standardbuttons are bad for win32 and translation. Only use custom
buttons in the managed layout.
parent
7e6beb9e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
24 deletions
+27
-24
modules/gui/qt4/dialogs/errors.cpp
modules/gui/qt4/dialogs/errors.cpp
+3
-3
modules/gui/qt4/dialogs/extended.cpp
modules/gui/qt4/dialogs/extended.cpp
+4
-2
modules/gui/qt4/dialogs/help.cpp
modules/gui/qt4/dialogs/help.cpp
+16
-16
modules/gui/qt4/ui/about.ui
modules/gui/qt4/ui/about.ui
+2
-1
modules/gui/qt4/ui/update.ui
modules/gui/qt4/ui/update.ui
+2
-2
No files found.
modules/gui/qt4/dialogs/errors.cpp
View file @
3de7f18a
...
...
@@ -43,10 +43,10 @@ ErrorsDialog::ErrorsDialog( intf_thread_t *_p_intf )
QGridLayout
*
layout
=
new
QGridLayout
(
this
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Close
,
Qt
::
Horizontal
,
this
);
QPushButton
*
clearButton
=
new
QPushButton
(
qtr
(
"&Clear"
)
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
Qt
::
Horizontal
,
this
);
QPushButton
*
clearButton
=
new
QPushButton
(
qtr
(
"Cl&ear"
),
this
);
buttonBox
->
addButton
(
clearButton
,
QDialogButtonBox
::
ActionRole
);
buttonBox
->
addButton
(
new
QPushButton
(
qtr
(
"&Close"
),
this
),
QDialogButtonBox
::
RejectRole
);
messages
=
new
QTextEdit
();
messages
->
setReadOnly
(
true
);
...
...
modules/gui/qt4/dialogs/extended.cpp
View file @
3de7f18a
...
...
@@ -33,6 +33,7 @@
#include <QTabWidget>
#include <QGridLayout>
#include <QDialogButtonBox>
#include <QPushButton>
#include <vlc_modules.h>
ExtendedDialog
::
ExtendedDialog
(
intf_thread_t
*
_p_intf
)
:
QVLCFrame
(
_p_intf
)
...
...
@@ -87,8 +88,9 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
layout
->
addWidget
(
mainTabW
);
QDialogButtonBox
*
closeButtonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Close
,
Qt
::
Horizontal
,
this
);
QDialogButtonBox
*
closeButtonBox
=
new
QDialogButtonBox
(
Qt
::
Horizontal
,
this
);
closeButtonBox
->
addButton
(
new
QPushButton
(
qtr
(
"&Close"
),
this
),
QDialogButtonBox
::
RejectRole
);
layout
->
addWidget
(
closeButtonBox
);
CONNECT
(
closeButtonBox
,
rejected
(),
this
,
close
()
);
...
...
modules/gui/qt4/dialogs/help.cpp
View file @
3de7f18a
...
...
@@ -59,8 +59,9 @@ HelpDialog::HelpDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
QTextBrowser
*
helpBrowser
=
new
QTextBrowser
(
this
);
helpBrowser
->
setOpenExternalLinks
(
true
);
helpBrowser
->
setHtml
(
qtr
(
I_LONGHELP
)
);
QDialogButtonBox
*
closeButtonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Close
,
Qt
::
Horizontal
,
this
);
QDialogButtonBox
*
closeButtonBox
=
new
QDialogButtonBox
(
Qt
::
Horizontal
,
this
);
closeButtonBox
->
addButton
(
new
QPushButton
(
qtr
(
"&Close"
),
this
),
QDialogButtonBox
::
RejectRole
);
closeButtonBox
->
setFocus
();
layout
->
addWidget
(
helpBrowser
);
...
...
@@ -85,6 +86,8 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf)
{
/* Build UI */
ui
.
setupUi
(
this
);
ui
.
closeButtonBox
->
addButton
(
new
QPushButton
(
qtr
(
"&Close"
),
this
),
QDialogButtonBox
::
RejectRole
);
setWindowTitle
(
qtr
(
"About"
)
);
setWindowRole
(
"vlc-about"
);
...
...
@@ -161,23 +164,20 @@ UpdateDialog::UpdateDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
{
/* build Ui */
ui
.
setupUi
(
this
);
ui
.
updateDialogButtonBox
->
addButton
(
new
QPushButton
(
qtr
(
"&Close"
),
this
),
QDialogButtonBox
::
RejectRole
);
QPushButton
*
recheckButton
=
new
QPushButton
(
qtr
(
"&Recheck version"
),
this
);
ui
.
updateDialogButtonBox
->
addButton
(
recheckButton
,
QDialogButtonBox
::
ActionRole
);
ui
.
updateNotifyButtonBox
->
addButton
(
new
QPushButton
(
qtr
(
"&Yes"
),
this
),
QDialogButtonBox
::
AcceptRole
);
ui
.
updateNotifyButtonBox
->
addButton
(
new
QPushButton
(
qtr
(
"&No"
),
this
),
QDialogButtonBox
::
RejectRole
);
setWindowTitle
(
qtr
(
"VLC media player updates"
)
);
setWindowRole
(
"vlc-update"
);
QList
<
QAbstractButton
*>
buttonsList
=
ui
.
updateDialogButtonBox
->
buttons
();
QAbstractButton
*
currentButton
;
for
(
int
i
=
0
;
i
<
buttonsList
.
size
()
;
++
i
)
{
currentButton
=
buttonsList
.
at
(
i
);
if
(
ui
.
updateDialogButtonBox
->
standardButton
(
currentButton
)
==
QDialogButtonBox
::
Retry
)
{
currentButton
->
setText
(
qtr
(
"&Recheck version"
)
);
qobject_cast
<
QPushButton
*>
(
currentButton
)
->
setDefault
(
true
);
}
}
CONNECT
(
ui
.
updateDialogButtonBox
,
accepted
(),
this
,
UpdateOrDownload
()
);
BUTTONACT
(
recheckButton
,
UpdateOrDownload
()
);
CONNECT
(
ui
.
updateDialogButtonBox
,
rejected
(),
this
,
close
()
);
CONNECT
(
ui
.
updateNotifyButtonBox
,
accepted
(),
this
,
UpdateOrDownload
()
);
...
...
modules/gui/qt4/ui/about.ui
View file @
3de7f18a
...
...
@@ -149,6 +149,7 @@ p, li { white-space: pre-wrap; }
<
tr
>
<
td style=
"
border: none;
">
<
p style=
"
-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
/p
>
<
p style=
"
-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
/p
>
<
p style=
"
-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;
"><
/p
>
<
p style=
"
-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;
"><
/p
><
/td
><
/tr
><
/table
><
/body
><
/html
>
</string>
</property>
...
...
@@ -167,7 +168,7 @@ p, li { white-space: pre-wrap; }
<item
row=
"1"
column=
"0"
>
<widget
class=
"QDialogButtonBox"
name=
"closeButtonBox"
>
<property
name=
"standardButtons"
>
<set>
QDialogButtonBox::
Close
</set>
<set>
QDialogButtonBox::
NoButton
</set>
</property>
</widget>
</item>
...
...
modules/gui/qt4/ui/update.ui
View file @
3de7f18a
...
...
@@ -34,7 +34,7 @@
<item>
<widget
class=
"QDialogButtonBox"
name=
"updateDialogButtonBox"
>
<property
name=
"standardButtons"
>
<set>
QDialogButtonBox::
Close|QDialogButtonBox::Retry
</set>
<set>
QDialogButtonBox::
NoButton
</set>
</property>
</widget>
</item>
...
...
@@ -122,7 +122,7 @@
<item>
<widget
class=
"QDialogButtonBox"
name=
"updateNotifyButtonBox"
>
<property
name=
"standardButtons"
>
<set>
QDialogButtonBox::No
|QDialogButtonBox::Yes
</set>
<set>
QDialogButtonBox::No
Button
</set>
</property>
</widget>
</item>
...
...
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