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
268289cf
Commit
268289cf
authored
Sep 01, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable verbosity setting
parent
0c6ddb9b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
42 deletions
+36
-42
modules/gui/qt4/dialogs/messages.cpp
modules/gui/qt4/dialogs/messages.cpp
+30
-26
modules/gui/qt4/dialogs/messages.hpp
modules/gui/qt4/dialogs/messages.hpp
+4
-15
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+2
-1
No files found.
modules/gui/qt4/dialogs/messages.cpp
View file @
268289cf
...
@@ -21,16 +21,22 @@
...
@@ -21,16 +21,22 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
*****************************************************************************/
#include "input_manager.hpp"
#include "dialogs/messages.hpp"
#include "dialogs/messages.hpp"
#include "dialogs_provider.hpp"
#include "dialogs_provider.hpp"
#include "util/qvlcframe.hpp"
#include "util/qvlcframe.hpp"
#include "qt4.hpp"
#include "qt4.hpp"
#include <QSpacerItem>
#include <QSpinBox>
#include <QLabel>
#include <QTextEdit>
#include <QTextCursor>
#include <QFileDialog>
#include <QTextStream>
#include <QMessageBox>
MessagesDialog
*
MessagesDialog
::
instance
=
NULL
;
MessagesDialog
*
MessagesDialog
::
instance
=
NULL
;
MessagesDialog
::
MessagesDialog
(
intf_thread_t
*
_p_intf
,
bool
_main_input
)
:
MessagesDialog
::
MessagesDialog
(
intf_thread_t
*
_p_intf
)
:
QVLCFrame
(
_p_intf
)
QVLCFrame
(
_p_intf
),
main_input
(
_main_input
)
{
{
setWindowTitle
(
_
(
"Messages"
)
);
setWindowTitle
(
_
(
"Messages"
)
);
resize
(
600
,
400
);
resize
(
600
,
400
);
...
@@ -39,10 +45,11 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf, bool _main_input ) :
...
@@ -39,10 +45,11 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf, bool _main_input ) :
QPushButton
*
closeButton
=
new
QPushButton
(
qtr
(
"&Close"
));
QPushButton
*
closeButton
=
new
QPushButton
(
qtr
(
"&Close"
));
QPushButton
*
clearButton
=
new
QPushButton
(
qtr
(
"&Clear"
));
QPushButton
*
clearButton
=
new
QPushButton
(
qtr
(
"&Clear"
));
QPushButton
*
saveLogButton
=
new
QPushButton
(
qtr
(
"&Save as..."
));
QPushButton
*
saveLogButton
=
new
QPushButton
(
qtr
(
"&Save as..."
));
QSpinBox
*
verbosityBox
=
new
QSpinBox
();
verbosityBox
=
new
QSpinBox
();
verbosityBox
->
setRange
(
0
,
2
);
verbosityBox
->
setRange
(
0
,
2
);
verbosityBox
->
setValue
(
config_GetInt
(
p_intf
,
"verbose"
));
verbosityBox
->
setValue
(
config_GetInt
(
p_intf
,
"verbose"
));
verbosityBox
->
setWrapping
(
true
);
verbosityBox
->
setWrapping
(
true
);
verbosityBox
->
setMaximumWidth
(
50
);
QLabel
*
verbosityLabel
=
new
QLabel
(
qtr
(
"Verbosity Level"
));
QLabel
*
verbosityLabel
=
new
QLabel
(
qtr
(
"Verbosity Level"
));
messages
=
new
QTextEdit
();
messages
=
new
QTextEdit
();
messages
->
setReadOnly
(
true
);
messages
->
setReadOnly
(
true
);
...
@@ -50,11 +57,12 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf, bool _main_input ) :
...
@@ -50,11 +57,12 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf, bool _main_input ) :
messages
->
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOff
);
messages
->
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOff
);
layout
->
addWidget
(
messages
,
0
,
0
,
1
,
0
);
layout
->
addWidget
(
messages
,
0
,
0
,
1
,
0
);
layout
->
addWidget
(
verbosityLabel
,
1
,
0
,
1
,
1
);
layout
->
addWidget
(
verbosityLabel
,
1
,
0
,
1
,
1
);
layout
->
addWidget
(
verbosityBox
,
1
,
2
);
layout
->
addWidget
(
verbosityBox
,
1
,
1
);
layout
->
addWidget
(
saveLogButton
,
2
,
0
);
layout
->
addItem
(
new
QSpacerItem
(
20
,
20
,
QSizePolicy
::
Expanding
),
1
,
2
);
layout
->
addWidget
(
clearButton
,
2
,
1
);
layout
->
addWidget
(
saveLogButton
,
1
,
3
);
layout
->
addWidget
(
closeButton
,
2
,
2
);
layout
->
addWidget
(
clearButton
,
1
,
4
);
layout
->
addWidget
(
closeButton
,
1
,
5
);
connect
(
closeButton
,
SIGNAL
(
clicked
()
)
,
connect
(
closeButton
,
SIGNAL
(
clicked
()
)
,
this
,
SLOT
(
onCloseButton
()));
this
,
SLOT
(
onCloseButton
()));
...
@@ -62,12 +70,8 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf, bool _main_input ) :
...
@@ -62,12 +70,8 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf, bool _main_input ) :
this
,
SLOT
(
onClearButton
()));
this
,
SLOT
(
onClearButton
()));
connect
(
saveLogButton
,
SIGNAL
(
clicked
()
)
,
connect
(
saveLogButton
,
SIGNAL
(
clicked
()
)
,
this
,
SLOT
(
onSaveButton
()));
this
,
SLOT
(
onSaveButton
()));
connect
(
verbosityBox
,
SIGNAL
(
valueChanged
(
int
)
),
this
,
SLOT
(
onVerbosityChanged
(
int
)));
connect
(
DialogsProvider
::
getInstance
(
NULL
)
->
fixed_timer
,
connect
(
DialogsProvider
::
getInstance
(
NULL
)
->
fixed_timer
,
SIGNAL
(
timeout
()
),
this
,
SLOT
(
updateLog
()
)
);
SIGNAL
(
timeout
()
),
this
,
SLOT
(
updateLog
()
)
);
p_input
=
NULL
;
}
}
MessagesDialog
::~
MessagesDialog
()
MessagesDialog
::~
MessagesDialog
()
...
@@ -100,10 +104,19 @@ void MessagesDialog::updateLog()
...
@@ -100,10 +104,19 @@ void MessagesDialog::updateLog()
/* Append all messages to log window */
/* Append all messages to log window */
if
(
p_sub
->
p_msg
[
i_start
].
i_type
==
VLC_MSG_INFO
||
messages
->
setFontItalic
(
true
);
p_sub
->
p_msg
[
i_start
].
i_type
==
VLC_MSG_ERR
||
messages
->
setTextColor
(
"darkBlue"
);
p_sub
->
p_msg
[
i_start
].
i_type
==
VLC_MSG_WARN
&&
messages
->
insertPlainText
(
p_sub
->
p_msg
[
i_start
].
psz_module
);
verbosityBox
->
value
()
>=
1
||
p_sub
->
p_msg
[
i_start
].
i_type
==
VLC_MSG_DBG
&&
verbosityBox
->
value
()
>=
2
)
{
messages
->
setFontItalic
(
true
);
messages
->
setTextColor
(
"darkBlue"
);
messages
->
insertPlainText
(
p_sub
->
p_msg
[
i_start
].
psz_module
);
}
else
continue
;
switch
(
p_sub
->
p_msg
[
i_start
].
i_type
)
switch
(
p_sub
->
p_msg
[
i_start
].
i_type
)
{
{
...
@@ -176,12 +189,3 @@ bool MessagesDialog::onSaveButton()
...
@@ -176,12 +189,3 @@ bool MessagesDialog::onSaveButton()
}
}
return
false
;
return
false
;
}
}
void
MessagesDialog
::
onVerbosityChanged
(
int
verbosityLevel
)
{
//FIXME: Does not seems to work.
vlc_value_t
val
;
val
.
i_int
=
verbosityLevel
-
1
;
var_Set
(
p_intf
->
p_vlc
,
"verbose"
,
val
);
}
modules/gui/qt4/dialogs/messages.hpp
View file @
268289cf
...
@@ -24,13 +24,6 @@
...
@@ -24,13 +24,6 @@
#define _MESSAGES_DIALOG_H_
#define _MESSAGES_DIALOG_H_
#include "util/qvlcframe.hpp"
#include "util/qvlcframe.hpp"
#include <QSpinBox>
#include <QLabel>
#include <QTextEdit>
#include <QTextCursor>
#include <QFileDialog>
#include <QTextStream>
#include <QMessageBox>
class
QPushButton
;
class
QPushButton
;
class
QSpinBox
;
class
QSpinBox
;
...
@@ -42,28 +35,24 @@ class MessagesDialog : public QVLCFrame
...
@@ -42,28 +35,24 @@ class MessagesDialog : public QVLCFrame
{
{
Q_OBJECT
;
Q_OBJECT
;
public:
public:
static
MessagesDialog
*
getInstance
(
intf_thread_t
*
p_intf
,
bool
a
)
static
MessagesDialog
*
getInstance
(
intf_thread_t
*
p_intf
)
{
{
if
(
!
instance
)
if
(
!
instance
)
instance
=
new
MessagesDialog
(
p_intf
,
a
);
instance
=
new
MessagesDialog
(
p_intf
);
return
instance
;
return
instance
;
}
}
virtual
~
MessagesDialog
();
virtual
~
MessagesDialog
();
private:
private:
MessagesDialog
(
intf_thread_t
*
,
bool
);
MessagesDialog
(
intf_thread_t
*
);
input_thread_t
*
p_input
;
bool
main_input
;
static
MessagesDialog
*
instance
;
static
MessagesDialog
*
instance
;
QSpinBox
*
verbosityBox
;
QTextEdit
*
messages
;
QTextEdit
*
messages
;
public
slots
:
public
slots
:
void
updateLog
();
void
updateLog
();
void
onCloseButton
();
void
onCloseButton
();
void
onClearButton
();
void
onClearButton
();
bool
onSaveButton
();
bool
onSaveButton
();
void
onVerbosityChanged
(
int
verbosityLevel
);
};
};
#endif
#endif
modules/gui/qt4/dialogs_provider.cpp
View file @
268289cf
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include <QSignalMapper>
#include <QSignalMapper>
#include "menus.hpp"
#include "menus.hpp"
#include <vlc_intf_strings.h>
#include <vlc_intf_strings.h>
#include <QFileDialog>
DialogsProvider
*
DialogsProvider
::
instance
=
NULL
;
DialogsProvider
*
DialogsProvider
::
instance
=
NULL
;
...
@@ -164,7 +165,7 @@ void DialogsProvider::prefsDialog()
...
@@ -164,7 +165,7 @@ void DialogsProvider::prefsDialog()
void
DialogsProvider
::
messagesDialog
()
void
DialogsProvider
::
messagesDialog
()
{
{
MessagesDialog
::
getInstance
(
p_intf
,
true
)
->
toggleVisible
();
MessagesDialog
::
getInstance
(
p_intf
)
->
toggleVisible
();
}
}
void
DialogsProvider
::
menuAction
(
QObject
*
data
)
void
DialogsProvider
::
menuAction
(
QObject
*
data
)
...
...
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