]> git.sesse.net Git - vlc/blobdiff - modules/misc/qte_main.cpp
Implement SORT_AUTHOR. Closes #196
[vlc] / modules / misc / qte_main.cpp
index 8002def862543bb4711c5e42ccb3962f2315ec51..72cac7a65f498508a175b2288b4df469e610163b 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.8 2003/12/22 02:24:52 sam Exp $
+ * $Id$
  *
  * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
  *
@@ -116,6 +116,9 @@ static int Open( vlc_object_t *p_this )
     i_refcount++;
     vlc_mutex_unlock( (vlc_mutex_t *) lockval.p_address );
 
+    vlc_object_attach( p_qte_main, p_this );
+    msg_Dbg( p_this, "qte_main running" );
+
     return VLC_SUCCESS;
 }
 
@@ -143,6 +146,9 @@ static void Close( vlc_object_t *p_this )
     delete p_qte_main->p_qte_widget;
     delete p_qte_main->p_qte_application;
 
+    msg_Dbg( p_this, "Detaching qte_main" );
+    vlc_object_detach( p_qte_main );
+
     vlc_object_destroy( p_qte_main );
     p_qte_main = NULL;
 
@@ -159,8 +165,6 @@ static void Close( vlc_object_t *p_this )
 static void QteMain( qte_thread_t *p_this )
 {
     int i_argc = 1;
-    char *p_args[] = {"-qws", NULL};
-    char **pp_args = p_args;
 
     p_this->b_gui_server = VLC_FALSE;
     if( config_GetInt( p_this, "qte-guiserver" ) )
@@ -177,15 +181,12 @@ static void QteMain( qte_thread_t *p_this )
         p_this->p_qte_application = pApp;
     }
 
-    QWidget* pWidget = new QWidget();
+    QWidget* pWidget = new QWidget(0, _("video") );
     if(pWidget)
     {
         p_this->p_qte_widget = pWidget;
     }
 
-    if (p_this->b_gui_server) {
-        p_this->p_qte_application->desktop()->setFixedSize(240, 320);
-    }
     /* signal the creation of the window */
     p_this->p_qte_application->setMainWidget(p_this->p_qte_widget);
     p_this->p_qte_widget->show();