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
9deb4cb1
Commit
9deb4cb1
authored
Mar 08, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: remove interaction support
parent
c3103fe4
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
0 additions
and
312 deletions
+0
-312
modules/gui/qt4/Modules.am
modules/gui/qt4/Modules.am
+0
-3
modules/gui/qt4/dialogs/interaction.cpp
modules/gui/qt4/dialogs/interaction.cpp
+0
-162
modules/gui/qt4/dialogs/interaction.hpp
modules/gui/qt4/dialogs/interaction.hpp
+0
-71
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+0
-51
modules/gui/qt4/dialogs_provider.hpp
modules/gui/qt4/dialogs_provider.hpp
+0
-1
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+0
-23
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+0
-1
No files found.
modules/gui/qt4/Modules.am
View file @
9deb4cb1
...
...
@@ -30,7 +30,6 @@ nodist_SOURCES_qt4 = \
dialogs/external.moc.cpp \
dialogs/plugins.moc.cpp \
dialogs/preferences.moc.cpp \
dialogs/interaction.moc.cpp \
dialogs/sout.moc.cpp \
dialogs/convert.moc.cpp \
dialogs/help.moc.cpp \
...
...
@@ -204,7 +203,6 @@ SOURCES_qt4 = qt4.cpp \
dialogs/errors.cpp \
dialogs/external.cpp \
dialogs/plugins.cpp \
dialogs/interaction.cpp \
dialogs/sout.cpp \
dialogs/convert.cpp \
dialogs/help.cpp \
...
...
@@ -251,7 +249,6 @@ noinst_HEADERS = \
dialogs/external.hpp \
dialogs/plugins.hpp \
dialogs/preferences.hpp \
dialogs/interaction.hpp \
dialogs/sout.hpp \
dialogs/convert.hpp \
dialogs/help.hpp \
...
...
modules/gui/qt4/dialogs/interaction.cpp
deleted
100644 → 0
View file @
c3103fe4
/*****************************************************************************
* interaction.cpp : Interaction stuff
****************************************************************************
* Copyright (C) 2006 the VideoLAN team
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "dialogs/errors.hpp"
#include "dialogs/interaction.hpp"
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QProgressBar>
#include <QMessageBox>
#include <QDialogButtonBox>
#include <assert.h>
InteractionDialog
::
InteractionDialog
(
intf_thread_t
*
_p_intf
,
interaction_dialog_t
*
_p_dialog
)
:
QObject
(
0
),
p_intf
(
_p_intf
),
p_dialog
(
_p_dialog
)
{
QVBoxLayout
*
layout
=
NULL
;
description
=
NULL
;
panel
=
NULL
;
dialog
=
NULL
;
altButton
=
NULL
;
if
(
(
p_dialog
->
i_flags
&
DIALOG_INTF_PROGRESS
)
||
(
p_dialog
->
i_flags
&
DIALOG_USER_PROGRESS
)
)
{
dialog
=
new
QWidget
;
layout
=
new
QVBoxLayout
(
dialog
);
layout
->
setMargin
(
2
);
description
=
new
QLabel
(
qfu
(
p_dialog
->
psz_description
)
);
layout
->
addWidget
(
description
);
progressBar
=
new
QProgressBar
;
progressBar
->
setMaximum
(
1000
);
progressBar
->
setTextVisible
(
true
);
progressBar
->
setOrientation
(
Qt
::
Horizontal
);
layout
->
addWidget
(
progressBar
);
}
else
{
msg_Err
(
p_intf
,
"Unknown dialog type %i"
,
p_dialog
->
i_flags
);
return
;
}
/* Custom dialog, finish it */
{
assert
(
dialog
);
/* Start the DialogButtonBox config */
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
;
if
(
p_dialog
->
psz_alternate_button
)
{
altButton
=
new
QPushButton
;
altButton
->
setText
(
"&"
+
qfu
(
p_dialog
->
psz_alternate_button
)
);
buttonBox
->
addButton
(
altButton
,
QDialogButtonBox
::
RejectRole
);
}
layout
->
addWidget
(
buttonBox
);
/* End the DialogButtonBox */
/* CONNECTs */
if
(
p_dialog
->
psz_alternate_button
)
BUTTONACT
(
altButton
,
altB
()
);
/* set the layouts and thte title */
dialog
->
setLayout
(
layout
);
dialog
->
setWindowTitle
(
qfu
(
p_dialog
->
psz_title
)
);
}
}
void
InteractionDialog
::
update
()
{
if
(
p_dialog
->
i_flags
&
DIALOG_USER_PROGRESS
||
p_dialog
->
i_flags
&
DIALOG_INTF_PROGRESS
)
{
assert
(
progressBar
);
progressBar
->
setValue
(
(
int
)(
p_dialog
->
val
.
f_float
*
10
)
);
if
(
description
)
description
->
setText
(
qfu
(
p_dialog
->
psz_description
)
);
}
else
return
;
if
(
(
p_dialog
->
i_flags
&
DIALOG_INTF_PROGRESS
)
&&
(
p_dialog
->
val
.
f_float
>=
100.0
)
)
{
progressBar
->
hide
();
msg_Dbg
(
p_intf
,
"Progress Done"
);
}
if
(
(
p_dialog
->
i_flags
&
DIALOG_USER_PROGRESS
)
&&
(
p_dialog
->
val
.
f_float
>=
100.0
)
)
{
assert
(
altButton
);
altButton
->
setText
(
qtr
(
"&Close"
)
);
}
}
InteractionDialog
::~
InteractionDialog
()
{
delete
dialog
;
}
void
InteractionDialog
::
defaultB
()
{
Finish
(
DIALOG_OK_YES
);
}
void
InteractionDialog
::
altB
()
{
Finish
(
DIALOG_NO
);
}
void
InteractionDialog
::
otherB
()
{
Finish
(
DIALOG_CANCELLED
);
}
void
InteractionDialog
::
Finish
(
int
i_ret
)
{
vlc_mutex_lock
(
p_dialog
->
p_lock
);
/* Special cases when we have to return psz to the core */
if
(
p_dialog
->
i_flags
&
DIALOG_PSZ_INPUT_OK_CANCEL
)
{
p_dialog
->
psz_returned
[
0
]
=
strdup
(
qtu
(
inputEdit
->
text
()
)
);
}
/* We finished the dialog, answer it */
p_dialog
->
i_status
=
ANSWERED_DIALOG
;
p_dialog
->
i_return
=
i_ret
;
/* Alert the Dialog_*_Progress that the user had clicked on "cancel" */
if
(
p_dialog
->
i_flags
&
DIALOG_USER_PROGRESS
||
p_dialog
->
i_flags
&
DIALOG_INTF_PROGRESS
)
p_dialog
->
b_cancelled
=
true
;
vlc_mutex_unlock
(
p_dialog
->
p_lock
);
hide
();
}
modules/gui/qt4/dialogs/interaction.hpp
deleted
100644 → 0
View file @
c3103fe4
/*****************************************************************************
* interaction.hpp : Interaction dialogs
****************************************************************************
* Copyright (C) 2006 the VideoLAN team
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef _INTERACTION_H_
#define _INTERACTION_H_
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_interface.h>
#include <QWidget>
class
QPushButton
;
class
QLabel
;
class
QProgressBar
;
class
QLineEdit
;
class
InteractionDialog
:
public
QObject
{
Q_OBJECT
public:
InteractionDialog
(
intf_thread_t
*
,
interaction_dialog_t
*
);
virtual
~
InteractionDialog
();
void
update
();
void
show
()
{
if
(
dialog
)
dialog
->
show
();
}
void
hide
()
{
if
(
dialog
)
dialog
->
hide
();
}
private:
QWidget
*
panel
;
QWidget
*
dialog
;
intf_thread_t
*
p_intf
;
interaction_dialog_t
*
p_dialog
;
QPushButton
*
defaultButton
,
*
otherButton
,
*
altButton
;
QLabel
*
description
;
QProgressBar
*
progressBar
;
QLineEdit
*
inputEdit
,
*
loginEdit
,
*
passwordEdit
;
void
Finish
(
int
);
private
slots
:
void
defaultB
();
void
altB
();
void
otherB
();
};
#endif
modules/gui/qt4/dialogs_provider.cpp
View file @
9deb4cb1
...
...
@@ -52,7 +52,6 @@
#include "dialogs/podcast_configuration.hpp"
#include "dialogs/toolbar.hpp"
#include "dialogs/plugins.hpp"
#include "dialogs/interaction.hpp"
#include <QEvent>
#include <QApplication>
...
...
@@ -140,8 +139,6 @@ void DialogsProvider::customEvent( QEvent *event )
case
INTF_DIALOG_VLM
:
vlmDialog
();
break
;
#endif
case
INTF_DIALOG_INTERACTION
:
doInteraction
(
de
->
p_arg
);
break
;
case
INTF_DIALOG_POPUPMENU
:
QVLCMenu
::
PopupMenu
(
p_intf
,
(
de
->
i_arg
!=
0
)
);
break
;
case
INTF_DIALOG_AUDIOPOPUPMENU
:
...
...
@@ -672,51 +669,3 @@ void DialogsProvider::playMRL( const QString &mrl )
RecentsMRL
::
getInstance
(
p_intf
)
->
addRecent
(
mrl
);
}
/*************************************
* Interactions
*************************************/
void
DialogsProvider
::
doInteraction
(
intf_dialog_args_t
*
p_arg
)
{
InteractionDialog
*
qdialog
;
interaction_dialog_t
*
p_dialog
=
p_arg
->
p_dialog
;
switch
(
p_dialog
->
i_action
)
{
case
INTERACT_NEW
:
qdialog
=
new
InteractionDialog
(
p_intf
,
p_dialog
);
p_dialog
->
p_private
=
(
void
*
)
qdialog
;
if
(
!
(
p_dialog
->
i_status
==
ANSWERED_DIALOG
)
)
qdialog
->
show
();
break
;
case
INTERACT_UPDATE
:
qdialog
=
(
InteractionDialog
*
)(
p_dialog
->
p_private
);
if
(
qdialog
)
qdialog
->
update
();
else
{
/* The INTERACT_NEW message was forgotten
so we must create the dialog and update it*/
qdialog
=
new
InteractionDialog
(
p_intf
,
p_dialog
);
p_dialog
->
p_private
=
(
void
*
)
qdialog
;
if
(
!
(
p_dialog
->
i_status
==
ANSWERED_DIALOG
)
)
qdialog
->
show
();
if
(
qdialog
)
qdialog
->
update
();
}
break
;
case
INTERACT_HIDE
:
msg_Dbg
(
p_intf
,
"Hide the Interaction Dialog"
);
qdialog
=
(
InteractionDialog
*
)(
p_dialog
->
p_private
);
if
(
qdialog
)
qdialog
->
hide
();
p_dialog
->
i_status
=
HIDDEN_DIALOG
;
break
;
case
INTERACT_DESTROY
:
msg_Dbg
(
p_intf
,
"Destroy the Interaction Dialog"
);
qdialog
=
(
InteractionDialog
*
)(
p_dialog
->
p_private
);
delete
qdialog
;
p_dialog
->
i_status
=
DESTROYED_DIALOG
;
break
;
}
}
modules/gui/qt4/dialogs_provider.hpp
View file @
9deb4cb1
...
...
@@ -133,7 +133,6 @@ private:
void
addFromSimple
(
bool
,
bool
);
public
slots
:
void
doInteraction
(
intf_dialog_args_t
*
);
void
playMRL
(
const
QString
&
);
void
playlistDialog
();
...
...
modules/gui/qt4/main_interface.cpp
View file @
9deb4cb1
...
...
@@ -68,8 +68,6 @@ static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
vlc_value_t
old_val
,
vlc_value_t
new_val
,
void
*
param
);
static
int
IntfShowCB
(
vlc_object_t
*
p_this
,
const
char
*
psz_variable
,
vlc_value_t
old_val
,
vlc_value_t
new_val
,
void
*
param
);
static
int
InteractCallback
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
MainInterface
::
MainInterface
(
intf_thread_t
*
_p_intf
)
:
QVLCMW
(
_p_intf
)
{
...
...
@@ -201,10 +199,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/************
* Callbacks
************/
var_Create
(
p_intf
,
"interaction"
,
VLC_VAR_ADDRESS
);
var_AddCallback
(
p_intf
,
"interaction"
,
InteractCallback
,
this
);
interaction_Register
(
p_intf
);
var_AddCallback
(
p_intf
->
p_libvlc
,
"intf-show"
,
IntfShowCB
,
p_intf
);
/* Register callback for the intf-popupmenu variable */
...
...
@@ -323,9 +317,6 @@ MainInterface::~MainInterface()
var_DelCallback
(
p_intf
->
p_libvlc
,
"intf-show"
,
IntfShowCB
,
p_intf
);
var_DelCallback
(
p_intf
->
p_libvlc
,
"intf-popupmenu"
,
PopupMenuCB
,
p_intf
);
interaction_Unregister
(
p_intf
);
var_DelCallback
(
p_intf
,
"interaction"
,
InteractCallback
,
this
);
p_intf
->
p_sys
->
p_mi
=
NULL
;
}
...
...
@@ -1211,20 +1202,6 @@ void MainInterface::toggleFullScreen( void )
}
/*****************************************************************************
* Callbacks
*****************************************************************************/
static
int
InteractCallback
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
old_val
,
vlc_value_t
new_val
,
void
*
param
)
{
intf_dialog_args_t
*
p_arg
=
new
intf_dialog_args_t
;
p_arg
->
p_dialog
=
(
interaction_dialog_t
*
)(
new_val
.
p_address
);
DialogEvent
*
event
=
new
DialogEvent
(
INTF_DIALOG_INTERACTION
,
0
,
p_arg
);
QApplication
::
postEvent
(
THEDP
,
event
);
return
VLC_SUCCESS
;
}
/*****************************************************************************
* PopupMenuCB: callback triggered by the intf-popupmenu playlist variable.
* We don't show the menu directly here because we don't want the
...
...
modules/gui/qt4/main_interface.hpp
View file @
9deb4cb1
...
...
@@ -68,7 +68,6 @@ class MainInterface : public QVLCMW
{
Q_OBJECT
;
friend
class
InteractionDialog
;
friend
class
PlaylistWidget
;
public:
...
...
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