Commit 8d3702d5 authored by Sam Hocevar's avatar Sam Hocevar

* ./plugins/kde/*: the KDE interface now works again.

parent 6d58f12a
......@@ -2,7 +2,7 @@
* kde.cpp : KDE plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: kde.cpp,v 1.13 2002/06/01 12:31:59 sam Exp $
* $Id: kde.cpp,v 1.14 2002/07/01 17:39:27 sam Exp $
*
* Authors: Andres Krapf <dae@chez.com> Sun Mar 25 2001
*
......@@ -116,9 +116,12 @@ KThread::KThread(intf_thread_t *p_intf)
this->p_intf = p_intf;
p_intf->p_sys->p_about =
new KAboutData( "VideoLAN Client", I18N_NOOP("Kvlc"), VERSION,
"This is the VideoLAN client, a DVD and MPEG player. It can play MPEG and MPEG 2 files from a file or from a network source.", KAboutData::License_GPL,
"(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - the VideoLAN Team", 0, 0, "dae@chez.com");
new KAboutData( "VideoLAN Client", I18N_NOOP("Kvlc"), VERSION,
_("This is the VideoLAN client, a DVD and MPEG player. It can play "
"MPEG and MPEG 2 files from a file or from a network source."),
KAboutData::License_GPL,
_("(C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 - the VideoLAN Team"),
0, 0, "");
char *authors[][2] = {
{ "the VideoLAN Team", "<videolan@videolan.org>" },
......@@ -136,6 +139,8 @@ KThread::KThread(intf_thread_t *p_intf)
p_intf->p_sys->p_app = new KApplication();
p_intf->p_sys->p_window = new KInterface(p_intf);
p_intf->p_sys->p_window->setCaption( VOUT_TITLE " (KDE interface)" );
p_intf->p_sys->p_input = NULL;
}
/*****************************************************************************
......@@ -143,6 +148,11 @@ KThread::KThread(intf_thread_t *p_intf)
*****************************************************************************/
KThread::~KThread()
{
if( p_intf->p_sys->p_input )
{
vlc_object_release( p_intf->p_sys->p_input );
}
/* XXX: can be deleted if the user closed the window ! */
//delete p_intf->p_sys->p_window;
......
......@@ -37,14 +37,14 @@ KDiskDialog::KDiskDialog( QWidget *parent, const char *name )
QVGroupBox *startVBox = new QVGroupBox( "Starting position", deviceSelectHBox );
QHBox *titleHBox = new QHBox( startVBox );
QLabel *titleLabel = new QLabel( "Title ", titleHBox );
new QLabel( "Title ", titleHBox );
fTitle = new QSpinBox( titleHBox );
QHBox *chapterHBox = new QHBox( startVBox );
QLabel *chapterLabel = new QLabel( "Chapter ", chapterHBox );
new QLabel( "Chapter ", chapterHBox );
fChapter = new QSpinBox( chapterHBox );
QHBox *deviceNameHBox = new QHBox( pageVBox );
QLabel *deviceNameLabel = new QLabel( "Device name ", deviceNameHBox );
new QLabel( "Device name ", deviceNameHBox );
fLineEdit = new KLineEdit( "/dev/dvd", deviceNameHBox );
}
......
This diff is collapsed.
......@@ -143,6 +143,8 @@ struct intf_sys_s
KApplication *p_app;
KInterface *p_window;
KAboutData *p_about;
input_thread_t *p_input;
};
#endif /* _KDE_INTERFACE_H_ */
......@@ -6,6 +6,7 @@
email : dae@chez.com
***************************************************************************/
#include "kde_interface.h"
#include "kde_menu.h"
#include <kaction.h>
......@@ -29,14 +30,14 @@ void KTitleMenu::regenerateSlot()
fLanguageList = new KActionMenu( "Language", 0, this );
int i_item = 0;
vlc_mutex_lock( &fInterfaceThread->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock );
vlc_mutex_lock( &fInterfaceThread->p_sys->p_input->stream.stream_lock );
for( int i = 0 ; i < fInterfaceThread->p_vlc->p_input_bank->pp_input[0]->stream.i_es_number ; i++ )
for( int i = 0 ; i < fInterfaceThread->p_sys->p_input->stream.i_es_number ; i++ )
{
if( fInterfaceThread->p_vlc->p_input_bank->pp_input[0]->stream.pp_es[i]->i_cat /* == i_cat */ )
if( fInterfaceThread->p_sys->p_input->stream.pp_es[i]->i_cat /* == i_cat */ )
{
i_item++;
QString language( fInterfaceThread->p_vlc->p_input_bank->pp_input[0]->stream.pp_es[i]->psz_desc );
QString language( fInterfaceThread->p_sys->p_input->stream.pp_es[i]->psz_desc );
if ( QString::null == language )
{
language += i18n( "Language" );
......@@ -45,7 +46,7 @@ void KTitleMenu::regenerateSlot()
KRadioAction *action = new KRadioAction( language, 0, this, "language_action" );
fLanguageList->insert( action );
if( /* p_es == */ fInterfaceThread->p_vlc->p_input_bank->pp_input[0]->stream.pp_es[i] )
if( /* p_es == */ fInterfaceThread->p_sys->p_input->stream.pp_es[i] )
{
/* don't lose p_item when we append into menu */
//p_item_active = p_item;
......@@ -53,7 +54,7 @@ void KTitleMenu::regenerateSlot()
}
}
vlc_mutex_unlock( &fInterfaceThread->p_vlc->p_input_bank->pp_input[0]->stream.stream_lock );
vlc_mutex_unlock( &fInterfaceThread->p_sys->p_input->stream.stream_lock );
#if 0
/* link the new menu to the menubar item */
......
......@@ -39,10 +39,10 @@ KNetDialog::KNetDialog( QWidget *parent, const char *name )
QVGroupBox *serverVBox = new QVGroupBox( "Starting position", layout );
QHBox *titleHBox = new QHBox( serverVBox );
QLabel *titleLabel = new QLabel( "Address ", titleHBox );
new QLabel( "Address ", titleHBox );
fAddress = new KLineEdit( "vls", titleHBox );
QHBox *portHBox = new QHBox( serverVBox );
QLabel *portLabel = new QLabel( "Port ", portHBox );
new QLabel( "Port ", portHBox );
fPort = new QSpinBox( 0, 65535, 1, portHBox );
}
......
......@@ -41,7 +41,7 @@ KPreferences::KPreferences(intf_thread_t *p_intf, const char *psz_module_name,
p_module = p_module->next )
{
if( psz_module_name && !strcmp( psz_module_name, p_module->psz_name ) )
if( psz_module_name && !strcmp( psz_module_name, p_module->psz_object_name ) )
break;
}
if( !p_module ) return;
......@@ -100,7 +100,7 @@ KPreferences::KPreferences(intf_thread_t *p_intf, const char *psz_module_name,
p_module_bis = p_module_bis->next ) {
if( p_module_bis->i_capabilities & (1 << p_item->i_value)){
new QListViewItem(item_frame->getListView(),
p_module_bis->psz_name,
p_module_bis->psz_object_name,
p_module_bis->psz_longname);
}
}
......@@ -211,7 +211,7 @@ bool KPreferences::isConfigureable(QString module)
for( p_module = p_intf->p_vlc->module_bank.first ;
p_module != NULL ;
p_module = p_module->next ) {
if( !module.compare( p_module->psz_name ) ) {
if( !module.compare( p_module->psz_object_name ) ) {
return p_module->i_config_items != 0;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment