Commit b48e3d28 authored by Clément Stenac's avatar Clément Stenac

Fix a bunch of bugs

parent 2dcdfb68
......@@ -63,9 +63,16 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
setIconSize( QSize( ITEM_HEIGHT,ITEM_HEIGHT ) );
setAlternatingRowColors( true );
#ifndef WIN32
// Fixme - A bit UGLY
QFont f = font();
f.setPointSize( f.pointSize() + 1 );
int pSize = f.pointSize();
if( pSize > 0 )
f.setPointSize( pSize + 1 );
else
f.setPixelSize( f.pixelSize() + 1 );
setFont( f );
#endif
#define BI( a,b) QIcon a##_icon = QIcon( QPixmap( b##_xpm ))
BI( audio, audio );
......
......@@ -46,7 +46,7 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) :
SLOT(menuAction( QObject *)) );
menusUpdateMapper = new QSignalMapper();
connect( menusMapper, SIGNAL( mapped(QObject *) ), this,
connect( menusUpdateMapper, SIGNAL( mapped(QObject *) ), this,
SLOT(menuUpdateAction( QObject *)) );
}
......@@ -132,6 +132,12 @@ void DialogsProvider::doInteraction( intf_dialog_args_t *p_arg )
}
}
void DialogsProvider::quit()
{
p_intf->b_die = VLC_TRUE;
QApplication::quit();
}
void DialogsProvider::streaminfoDialog()
{
StreamInfoDialog::getInstance( p_intf, true )->toggleVisible();
......@@ -164,6 +170,11 @@ void DialogsProvider::menuUpdateAction( QObject *data )
void DialogsProvider::simpleOpenDialog()
{
}
void DialogsProvider::bookmarksDialog()
{
}
void DialogsProvider::popupMenu( int i_dialog )
{
......
......@@ -65,6 +65,7 @@ private:
public slots:
void playlistDialog();
void bookmarksDialog();
void streaminfoDialog();
void prefsDialog();
void messagesDialog();
......@@ -76,6 +77,7 @@ public slots:
void menuAction( QObject *);
void menuUpdateAction( QObject *);
void streamingDialog();
void quit();
};
......
......@@ -62,8 +62,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
QVLCMenu::createMenuBar( menuBar(), p_intf );
timeLabel = new QLabel( this );
nameLabel = new QLabel( this );
timeLabel = new QLabel( 0 );
nameLabel = new QLabel( 0 );
statusBar()->addWidget( nameLabel, 4 );
statusBar()->addPermanentWidget( timeLabel, 1 );
......@@ -122,12 +122,12 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
THEMIM->getIM(),SLOT( sliderUpdate( float ) ) );
/* Actions */
connect( ui.playButton, SLOT( clicked() ), this, SLOT( play() ) );
connect( ui.stopButton, SLOT( clicked() ), this, SLOT( stop() ) );
connect( ui.nextButton, SLOT( clicked() ), this, SLOT( next() ) );
connect( ui.prevButton, SLOT( clicked() ), this, SLOT( prev() ) );
connect( ui.playButton, SIGNAL( clicked() ), this, SLOT( play() ) );
connect( ui.stopButton, SIGNAL( clicked() ), this, SLOT( stop() ) );
connect( ui.nextButton, SIGNAL( clicked() ), this, SLOT( next() ) );
connect( ui.prevButton, SIGNAL( clicked() ), this, SLOT( prev() ) );
connect( ui.playlistButton, SLOT(clicked()),
connect( ui.playlistButton, SIGNAL(clicked()),
THEDP, SLOT( playlistDialog() ) );
var_Create( p_intf, "interaction", VLC_VAR_ADDRESS );
......
......@@ -26,12 +26,13 @@
#include <QSlider>
#include <QMouseEvent>
#include <QLayout>
class DirectSlider : public QSlider
{
public:
DirectSlider( QWidget *_parent ) : QSlider( _parent ) {};
DirectSlider( Qt::Orientation q,QWidget *_parent ) : QSlider( q,_parent )
DirectSlider( QWidget *_parent ) : QSlider( _parent ) {};
DirectSlider( Qt::Orientation q,QWidget *_parent ) : QSlider( q,_parent )
{};
virtual ~DirectSlider() {};
......@@ -39,8 +40,14 @@ public:
{
if(event->button() == Qt::LeftButton)
{
#ifdef WIN32
int width = qobject_cast<QWidget*>(parent())->sizeHint().width() -
2 * qobject_cast<QWidget*>(parent())->layout()->margin();
#else
int width = width();
#endif
int pos = (int)(minimum() +
(double)(event->x())/width()*(maximum()-minimum()) );
(double)(event->x())/width*(maximum()-minimum()) );
setSliderPosition( pos );
QSlider::mousePressEvent(event);
}
......
......@@ -36,6 +36,7 @@ public:
static void fixStyle( QWidget *w)
{
QStyle *style = qApp->style();
#if 0
// Plastique is too dark.
/// theming ? getting KDE data ? ?
if( qobject_cast<QPlastiqueStyle *>(style) )
......@@ -49,6 +50,7 @@ public:
plt.setColor( QPalette::Inactive, QPalette::Window, vlg );
w->setPalette( plt );
}
#endif
}
QVLCFrame( intf_thread_t *_p_intf ) : QWidget( NULL ), p_intf( _p_intf )
......
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