Commit b879f3e1 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - renaming functions cosmetic and KDE/GNome/Windows button fight.

parent ef805923
......@@ -5,6 +5,7 @@
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Baptiste Kempf <jb@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
......@@ -27,6 +28,7 @@
#include <QTextEdit>
#include <QCheckBox>
#include <QGridLayout>
#include <QDialogButtonBox>
#include <QPushButton>
ErrorsDialog *ErrorsDialog::instance = NULL;
......@@ -34,13 +36,18 @@ ErrorsDialog *ErrorsDialog::instance = NULL;
ErrorsDialog::ErrorsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
{
setWindowTitle( qtr( "Errors" ) );
resize( 500 , 200 );
resize( 500 , 300 );
setWindowModality( Qt::ApplicationModal );
QGridLayout *layout = new QGridLayout( this );
QDialogButtonBox *buttonBox = new QDialogButtonBox;
QPushButton *closeButton = new QPushButton( qtr( "&Close" ) );
QPushButton *clearButton = new QPushButton( qtr( "&Clear" ) );
buttonBox->addButton( closeButton, QDialogButtonBox::AcceptRole );
buttonBox->addButton( clearButton, QDialogButtonBox::ActionRole );
messages = new QTextEdit();
messages->setReadOnly( true );
messages->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
......@@ -49,10 +56,9 @@ ErrorsDialog::ErrorsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
layout->addWidget( messages, 0, 0, 1, 3 );
layout->addWidget( stopShowing, 1, 0 );
layout->addItem( new QSpacerItem( 200, 20, QSizePolicy::Expanding ), 2,0 );
layout->addWidget( clearButton, 2, 1 );
layout->addWidget( closeButton, 2, 2 );
layout->addWidget( buttonBox, 2, 2 );
BUTTONACT( closeButton, close() );
CONNECT( buttonBox, accepted(), this, close() );
BUTTONACT( clearButton, clear() );
BUTTONACT( stopShowing, dontShow() );
}
......
......@@ -5,6 +5,7 @@
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Baptiste Kempf <jb@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
......@@ -34,7 +35,6 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
{
setWindowFlags( Qt::Tool );
setWindowOpacity( config_GetFloat( p_intf, "qt-opacity" ) );
setWindowTitle( qtr( "Adjustments and Effects" ) );
QGridLayout *layout = new QGridLayout( this );
......@@ -42,7 +42,7 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
QTabWidget *mainTab = new QTabWidget( this );
mainTab->setTabPosition( QTabWidget::West );
QWidget *audioWidget = new QWidget( this );
QWidget *audioWidget = new QWidget;
QHBoxLayout *audioLayout = new QHBoxLayout( audioWidget );
QTabWidget *audioTab = new QTabWidget( mainTab );
......
......@@ -146,6 +146,7 @@ void DialogsProvider::prefsDialog()
{
PrefsDialog::getInstance( p_intf )->toggleVisible();
}
void DialogsProvider::extendedDialog()
{
ExtendedDialog::getInstance( p_intf )->toggleVisible();
......@@ -278,6 +279,11 @@ QStringList DialogsProvider::showSimpleOpen( QString help,
fileTypes );
}
/**
* Open a file,
* pl helps you to choose from playlist or media library,
* go to start or enqueue
**/
void DialogsProvider::addFromSimple( bool pl, bool go)
{
QStringList files = DialogsProvider::showSimpleOpen();
......@@ -295,6 +301,11 @@ void DialogsProvider::addFromSimple( bool pl, bool go)
}
}
void DialogsProvider::simpleOpenDialog()
{
addFromSimple( true, true ); /* Playlist and Go */
}
void DialogsProvider::simplePLAppendDialog()
{
addFromSimple( true, false );
......@@ -305,13 +316,7 @@ void DialogsProvider::simpleMLAppendDialog()
addFromSimple( false, false );
}
void DialogsProvider::simpleOpenDialog()
{
addFromSimple( true, true );
}
/* Directory */
/**
* Open a directory,
* pl helps you to choose from playlist or media library,
......@@ -344,7 +349,7 @@ void DialogsProvider::MLAppendDir()
/****************
* Playlist *
****************/
void DialogsProvider::openPlaylist()
void DialogsProvider::openAPlaylist()
{
QStringList files = showSimpleOpen( qtr( "Open playlist file" ),
EXT_FILTER_PLAYLIST );
......@@ -354,7 +359,7 @@ void DialogsProvider::openPlaylist()
}
}
void DialogsProvider::savePlaylist()
void DialogsProvider::saveAPlaylist()
{
QFileDialog *qfd = new QFileDialog( NULL,
qtr("Choose a filename to save playlist"),
......@@ -458,7 +463,6 @@ void DialogsProvider::streamingDialog()
}*/
/****************************************************************************
* Menus / Interaction
****************************************************************************/
......
......@@ -147,6 +147,7 @@ public slots:
void updateDialog();
void aboutDialog();
void gotoTimeDialog();
void podcastConfigureDialog();
void simpleOpenDialog();
void simplePLAppendDialog();
......@@ -168,10 +169,8 @@ public slots:
void openThenStreamingDialogs();
void openThenTranscodingDialogs();
void openPlaylist();
void savePlaylist();
void podcastConfigureDialog();
void openAPlaylist();
void saveAPlaylist();
void switchToSkins();
void quit();
......
......@@ -217,8 +217,8 @@ QMenu *QVLCMenu::PlaylistMenu( intf_thread_t *p_intf, MainInterface *mi )
qtr( "Show Playlist" ), mi, SLOT( togglePlaylist() ) );
menu->addSeparator();
DP_SADD( menu, qtr( I_PL_LOAD ), "", "", openPlaylist(), "Ctrl+X" );
DP_SADD( menu, qtr( I_PL_SAVE ), "", "", savePlaylist(), "Ctrl+Y" );
DP_SADD( menu, qtr( I_PL_LOAD ), "", "", openAPlaylist(), "Ctrl+X" );
DP_SADD( menu, qtr( I_PL_SAVE ), "", "", saveAPlaylist(), "Ctrl+Y" );
menu->addSeparator();
menu->addAction( qtr( "Undock from interface" ), mi,
SLOT( undockPlaylist() ), qtr( "Ctrl+U" ) );
......
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