Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gautam Chitnis
web-ui-redesign
Commits
c17969a0
Commit
c17969a0
authored
Aug 03, 2006
by
zorglub
Browse files
Handle blocking errors, fix layout for login
parent
669d2f81
Changes
3
Hide whitespace changes
Inline
Side-by-side
modules/gui/qt4/dialogs/interaction.cpp
View file @
c17969a0
...
...
@@ -35,13 +35,18 @@ InteractionDialog::InteractionDialog( intf_thread_t *_p_intf,
uiLogin
=
NULL
;
uiProgress
=
NULL
;
uiInput
=
NULL
;
panel
=
NULL
;
if
(
p_dialog
->
i_flags
&
DIALOG_BLOCKING_ERROR
)
{
i_ret
=
QMessageBox
::
critical
(
this
,
qfu
(
p_dialog
->
psz_title
),
qfu
(
p_dialog
->
psz_description
),
QMessageBox
::
Ok
,
0
,
0
);
}
else
if
(
p_dialog
->
i_flags
&
DIALOG_NONBLOCKING_ERROR
)
{
// Create instance of the errors dialog
// QApplication::style()->standardPixmap(QStyle::SP_MessageBoxCritical)
}
else
if
(
p_dialog
->
i_flags
&
DIALOG_YES_NO_CANCEL
)
{
...
...
@@ -57,13 +62,14 @@ InteractionDialog::InteractionDialog( intf_thread_t *_p_intf,
}
else
if
(
p_dialog
->
i_flags
&
DIALOG_LOGIN_PW_OK_CANCEL
)
{
panel
=
new
QWidget
(
0
);
uiLogin
=
new
Ui
::
LoginDialog
;
uiLogin
->
setupUi
(
this
);
uiLogin
->
setupUi
(
panel
);
uiLogin
->
description
->
setText
(
qfu
(
p_dialog
->
psz_description
)
);
layout
->
addWidget
(
panel
);
}
else
if
(
p_dialog
->
i_flags
&
DIALOG_USER_PROGRESS
)
{
}
else
if
(
p_dialog
->
i_flags
&
DIALOG_PSZ_INPUT_OK_CANCEL
)
{
...
...
@@ -103,6 +109,7 @@ void InteractionDialog::Update()
InteractionDialog
::~
InteractionDialog
()
{
if
(
panel
)
delete
panel
;
if
(
uiInput
)
delete
uiInput
;
if
(
uiProgress
)
delete
uiProgress
;
if
(
uiLogin
)
delete
uiLogin
;
...
...
modules/gui/qt4/dialogs/interaction.hpp
View file @
c17969a0
...
...
@@ -43,6 +43,7 @@ public:
void
Update
();
private:
QWidget
*
panel
;
intf_thread_t
*
p_intf
;
interaction_dialog_t
*
p_dialog
;
Ui
::
LoginDialog
*
uiLogin
;
...
...
modules/gui/qt4/menus.cpp
View file @
c17969a0
...
...
@@ -459,8 +459,6 @@ QMenu * QVLCMenu::Populate( intf_thread_t *p_intf, QMenu *current,
* Private methods.
*****************************************************************************/
#define FREE(x) if(x) { free(x);x=NULL;}
static
bool
IsMenuEmpty
(
const
char
*
psz_var
,
vlc_object_t
*
p_object
,
bool
b_root
=
TRUE
)
{
...
...
@@ -548,7 +546,7 @@ void QVLCMenu::CreateItem( QMenu *menu, const char *psz_var,
}
else
CreateChoicesMenu
(
menu
,
psz_var
,
p_object
,
true
);
FREE
(
text
.
psz_string
);
FREE
NULL
(
text
.
psz_string
);
return
;
}
...
...
@@ -569,7 +567,7 @@ void QVLCMenu::CreateItem( QMenu *menu, const char *psz_var,
p_object
->
i_object_id
,
val
,
i_type
,
val
.
b_bool
);
break
;
}
FREE
(
text
.
psz_string
);
FREE
NULL
(
text
.
psz_string
);
}
...
...
Write
Preview
Supports
Markdown
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