Changeset e09c1d278e60f5924c35965e90aed401c5b003fe

Show
Ignore:
Timestamp:
09/06/03 21:56:26 (5 years ago)
Author:
Jean-Paul Saman <jpsaman@videolan.org>
git-committer:
Jean-Paul Saman <jpsaman@videolan.org> 1055188586 +0000
git-parent:

[1e20549b4a96f7aa08c9a188c2633f9c7a3a6186]

git-author:
Jean-Paul Saman <jpsaman@videolan.org> 1055188586 +0000
Message:

Run opie-vlc and zaurus-vlc as GuiServer?. (Didn't I commit this before???).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/misc/qte_main.cpp

    ra1e8137 re09c1d2  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: qte_main.cpp,v 1.6 2003/03/30 18:14:38 gbazin Exp $ 
     5 * $Id: qte_main.cpp,v 1.7 2003/06/09 19:56:26 jpsaman Exp $ 
    66 * 
    77 * Authors: Jean-Paul Saman <jpsaman@wxs.nl> 
     
    4343    QApplication*       p_qte_application; 
    4444    QWidget*            p_qte_widget; 
     45    bool        b_gui_server; 
    4546 
    4647} qte_thread_t; 
     
    6364 * Module descriptor 
    6465 *****************************************************************************/ 
     66#define STANDALONE_TEXT N_("Run as standalone Qt/Embedded Gui Server") 
     67#define STANDALONE_LONGTEXT N_("Use this option to run as standalone Qt/Embedded Gui Server. " \ 
     68    "This option is equivalent to the -qws option from normal Qt.") 
     69 
    6570vlc_module_begin(); 
    6671    set_description( _("Qt Embedded GUI helper") ); 
    6772    set_capability( "gui-helper", 90 ); 
     73    add_bool( "qte-guiserver", 0, NULL, STANDALONE_TEXT, STANDALONE_LONGTEXT, VLC_FALSE ); 
    6874    add_shortcut( "qte" ); 
    6975    set_callbacks( Open, Close ); 
     
    152158static void QteMain( qte_thread_t *p_this ) 
    153159{ 
    154     int argc = 0; 
     160    int i_argc = 1; 
     161    char *p_args[] = {"-qws", NULL}; 
     162    char **pp_args = p_args; 
    155163 
    156     QApplication* pApp = new QApplication(argc, NULL); 
     164    p_this->b_gui_server = VLC_FALSE; 
     165    if( config_GetInt( p_this, "qte-guiserver" ) ) 
     166    { 
     167    msg_Dbg( p_this, "Running as Qt Embedded standalone GuiServer" ); 
     168        p_this->b_gui_server = VLC_TRUE; 
     169    } 
     170 
     171    /* Run as standalone GuiServer or as GuiClient. */ 
     172    QApplication* pApp = new QApplication(i_argc, NULL, 
     173        (p_this->b_gui_server ? (QApplication::GuiServer):(QApplication::GuiClient)) ); 
    157174    if(pApp) 
    158175    { 
     
    166183    } 
    167184 
     185    if (p_this->b_gui_server) { 
     186        p_this->p_qte_application->desktop()->setFixedSize(240, 320); 
     187    } 
    168188    /* signal the creation of the window */ 
    169189    p_this->p_qte_application->setMainWidget(p_this->p_qte_widget);