Changeset e09c1d278e60f5924c35965e90aed401c5b003fe
- 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
| ra1e8137 |
re09c1d2 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Jean-Paul Saman <jpsaman@wxs.nl> |
|---|
| … | … | |
| 43 | 43 | QApplication* p_qte_application; |
|---|
| 44 | 44 | QWidget* p_qte_widget; |
|---|
| | 45 | bool b_gui_server; |
|---|
| 45 | 46 | |
|---|
| 46 | 47 | } qte_thread_t; |
|---|
| … | … | |
| 63 | 64 | * Module descriptor |
|---|
| 64 | 65 | *****************************************************************************/ |
|---|
| | 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 | |
|---|
| 65 | 70 | vlc_module_begin(); |
|---|
| 66 | 71 | set_description( _("Qt Embedded GUI helper") ); |
|---|
| 67 | 72 | set_capability( "gui-helper", 90 ); |
|---|
| | 73 | add_bool( "qte-guiserver", 0, NULL, STANDALONE_TEXT, STANDALONE_LONGTEXT, VLC_FALSE ); |
|---|
| 68 | 74 | add_shortcut( "qte" ); |
|---|
| 69 | 75 | set_callbacks( Open, Close ); |
|---|
| … | … | |
| 152 | 158 | static void QteMain( qte_thread_t *p_this ) |
|---|
| 153 | 159 | { |
|---|
| 154 | | int argc = 0; |
|---|
| | 160 | int i_argc = 1; |
|---|
| | 161 | char *p_args[] = {"-qws", NULL}; |
|---|
| | 162 | char **pp_args = p_args; |
|---|
| 155 | 163 | |
|---|
| 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)) ); |
|---|
| 157 | 174 | if(pApp) |
|---|
| 158 | 175 | { |
|---|
| … | … | |
| 166 | 183 | } |
|---|
| 167 | 184 | |
|---|
| | 185 | if (p_this->b_gui_server) { |
|---|
| | 186 | p_this->p_qte_application->desktop()->setFixedSize(240, 320); |
|---|
| | 187 | } |
|---|
| 168 | 188 | /* signal the creation of the window */ |
|---|
| 169 | 189 | p_this->p_qte_application->setMainWidget(p_this->p_qte_widget); |
|---|