]> git.sesse.net Git - vlc/blobdiff - modules/misc/qte_main.cpp
* modules/gui/wxwindows/*: misc fixes.
[vlc] / modules / misc / qte_main.cpp
index afdc8c751a587e545e1ef78635009894ef7a8c78..b4941a33c352ccd3667bc9e269d7f896a47077db 100644 (file)
@@ -2,7 +2,7 @@
  * qte_main.c : QT Embedded wrapper for gte_main
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: qte_main.cpp,v 1.3 2003/02/14 13:48:41 jpsaman Exp $
+ * $Id: qte_main.cpp,v 1.6 2003/03/30 18:14:38 gbazin Exp $
  *
  * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
  *
@@ -38,10 +38,10 @@ extern "C"
 
 typedef struct qte_thread_t
 {
-       VLC_COMMON_MEMBERS
+    VLC_COMMON_MEMBERS
 
     QApplication*       p_qte_application;
-    QWidget*                   p_qte_widget;
+    QWidget*            p_qte_widget;
 
 } qte_thread_t;
 
@@ -63,8 +63,8 @@ static qte_thread_t * p_qte_main = NULL;
  * Module descriptor
  *****************************************************************************/
 vlc_module_begin();
-    set_description( _("Qt Embedded helper module") );
-    set_capability( "qte_main", 90 );
+    set_description( _("Qt Embedded GUI helper") );
+    set_capability( "gui-helper", 90 );
     add_shortcut( "qte" );
     set_callbacks( Open, Close );
 vlc_module_end();
@@ -94,8 +94,8 @@ static int Open( vlc_object_t *p_this )
 
     p_qte_main = (qte_thread_t *) vlc_object_create( p_this, sizeof(qte_thread_t) );
 
-    /* Launch the gtk_main() thread. It will not return until it has
-     * called gdk_threads_enter(), which ensures us thread safety. */
+    /* Launch the QApplication::exec() thread. It will not return until the
+     * application is properly initialized, which ensures us thread safety. */
     if( vlc_thread_create( p_qte_main, "qte_main", QteMain,
                            VLC_THREAD_PRIORITY_LOW, VLC_TRUE ) )
     {
@@ -167,6 +167,7 @@ static void QteMain( qte_thread_t *p_this )
 
     /* signal the creation of the window */
     p_this->p_qte_application->setMainWidget(p_this->p_qte_widget);
+    p_this->p_qte_widget->show();
 
     vlc_thread_ready( p_this );
     p_this->p_qte_application->exec();