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