]> git.sesse.net Git - vlc/blobdiff - plugins/qt/intf_qt.cpp
* Fixed the BeOS compile typo.
[vlc] / plugins / qt / intf_qt.cpp
index 5aeff867ae9b56be87e40b4d6c23c314a8b43b07..3168bc1dc19b3a8cb57c2858305aaead6622f201 100644 (file)
@@ -2,7 +2,7 @@
  * intf_qt.cpp: Qt interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_qt.cpp,v 1.1 2001/03/15 01:42:20 sam Exp $
+ * $Id: intf_qt.cpp,v 1.7 2001/05/30 17:03:12 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -42,7 +42,6 @@ extern "C"
 #include "threads.h"
 #include "mtime.h"
 #include "tests.h"
-#include "modules.h"
 
 #include "stream_control.h"
 #include "input_ext-intf.h"
@@ -53,6 +52,9 @@ extern "C"
 
 #include "main.h"
 
+#include "modules.h"
+#include "modules_export.h"
+
 } /* extern "C" */
 
 #include <qapplication.h>
@@ -69,6 +71,7 @@ extern "C"
 #include <qmessagebox.h>
 #include <qlabel.h> 
 #include <qtimer.h> 
+#include <qiconset.h> 
 
 #include <qvbox.h>
 #include <qhbox.h>
@@ -126,7 +129,7 @@ private slots:
     void DateDisplay  ( int );
     void About ( void );
 
-    void Unimplemented( void ) { intf_WarnMsg( 3, "intf warning: "
+    void Unimplemented( void ) { intf_WarnMsg( 1, "intf warning: "
                                  "unimplemented function" ); };
 
 private:
@@ -139,7 +142,11 @@ private:
     QLabel     *p_date;
 };
 
-#include "intf_qt.moc"
+#ifdef BUILTIN
+#   include "BUILTIN_intf_qt.moc"
+#else
+#   include "intf_qt.moc"
+#endif
 
 #define SLIDER_MIN    0x00000
 #define SLIDER_MAX    0x10000
@@ -275,7 +282,8 @@ IntfWindow::IntfWindow( intf_thread_t *p_intf )
     p_toolbar = new QToolBar( this, "toolbar" );
     p_toolbar->setHorizontalStretchable( TRUE );
 
-    QPixmap pixmap = QPixmap( 0, 0 );
+    QIconSet * set = new QIconSet();
+    QPixmap pixmap = set->pixmap( QIconSet::Automatic, QIconSet::Normal );
 
 #define addbut( l, t, s ) new QToolButton( pixmap, l, t, this, s, p_toolbar );
     addbut( "Open", "Open a File", SLOT(FileOpen()) );
@@ -459,7 +467,7 @@ void IntfWindow::About( void )
 void IntfWindow::Manage( void )
 {
     /* Manage the slider */
-    if( p_intf->p_input != NULL )
+    if( p_intf->p_input != NULL && p_intf->p_input->stream.b_seekable )
     {
         int i_value = p_slider->value();
 
@@ -487,13 +495,10 @@ void IntfWindow::Manage( void )
 #undef p_area
     }
 
-    /* If the "display popup" flag has changed */
+    /* If the "display popup" flag has changed, popup the context menu */
     if( p_intf->b_menu_change )
     {
-        /* FIXME: find a way to display this menu right under the mouse */
-        p_popup->popup( QPoint(
-                p_intf->p_sys->p_app->desktop()->width() / 2,
-                p_intf->p_sys->p_app->desktop()->height() / 2 ), 0 );
+        p_popup->popup( QCursor::pos() );
         p_intf->b_menu_change = 0;
     }