author | wimpie <wimpie> | 2005-01-09 03:02:21 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-09 03:02:21 (UTC) |
commit | 67d1d0b292553af550219d770cbd5c00987d8b8b (patch) (unidiff) | |
tree | 517759c7fbda44a40ff733e3b5d5667d90558caa /core | |
parent | 987bc9a2c5b39ddd4dc2a665cea65688bfd2179e (diff) | |
download | opie-67d1d0b292553af550219d770cbd5c00987d8b8b.zip opie-67d1d0b292553af550219d770cbd5c00987d8b8b.tar.gz opie-67d1d0b292553af550219d770cbd5c00987d8b8b.tar.bz2 |
CONTROL files : reset version to 'standard' format
(partly rolls back my drastic
all-applicatoins-same-version change)
now format is x.y(.z)$EXTRAVERSION
where x.y (and aptionally .z)
are x : major version
y : minor version
z : application patch
and extra version is seconds-since-epoch
this value can be used to automatically
upgrade versions with minor changes (without
manual update of the control file)
-rw-r--r-- | core/multimedia/opieplayer/modplug/opie-modplugin.control | 2 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 2 | ||||
-rw-r--r-- | core/pim/today/task-opie-today.control | 2 | ||||
-rw-r--r-- | core/settings/security/demo/multiauth.control | 2 | ||||
-rw-r--r-- | core/tools/quicklauncher/main.cpp | 3 |
5 files changed, 5 insertions, 6 deletions
diff --git a/core/multimedia/opieplayer/modplug/opie-modplugin.control b/core/multimedia/opieplayer/modplug/opie-modplugin.control index 9e0957b..6e9ad7c 100644 --- a/core/multimedia/opieplayer/modplug/opie-modplugin.control +++ b/core/multimedia/opieplayer/modplug/opie-modplugin.control | |||
@@ -1,10 +1,10 @@ | |||
1 | Package: opie-modplugin | 1 | Package: opie-modplugin |
2 | Files: plugins/codecs/libmodplugin.so* | 2 | Files: plugins/codecs/libmodplugin.so* |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: libs | 4 | Section: libs |
5 | Maintainer: Simon Hausmann <hausmann@kde.org>, L.J. Potter <lpotter@trolltech.com> | 5 | Maintainer: Simon Hausmann <hausmann@kde.org>, L.J. Potter <lpotter@trolltech.com> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Version: $QPE_VERSION$EXTRAVERSION | 7 | Version: 2.0.2-$EXTRAVERSION |
8 | Depends: task-opie-minimal | 8 | Depends: task-opie-minimal |
9 | Description: MOD/XM/S3M/IT plugin using libmodplug | 9 | Description: MOD/XM/S3M/IT plugin using libmodplug |
10 | Plugin to play MOD/XM/S3M/IT amiga tracker modules with the mediaplayer in the Opie environment. | 10 | Plugin to play MOD/XM/S3M/IT amiga tracker modules with the mediaplayer in the Opie environment. |
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 0654e1a..3f0ac74 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -1,166 +1,166 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** Copyright (C) 2003 Stefan Eilers (eilers.stefan@epost.de) | 3 | ** Copyright (C) 2003 Stefan Eilers (eilers.stefan@epost.de) |
4 | ** | 4 | ** |
5 | ** This file is part of the Open Palmtop Environment (see www.opie.info). | 5 | ** This file is part of the Open Palmtop Environment (see www.opie.info). |
6 | ** | 6 | ** |
7 | ** This file may be distributed and/or modified under the terms of the | 7 | ** This file may be distributed and/or modified under the terms of the |
8 | ** GNU General Public License version 2 as published by the Free Software | 8 | ** GNU General Public License version 2 as published by the Free Software |
9 | ** Foundation and appearing in the file LICENSE.GPL included in the | 9 | ** Foundation and appearing in the file LICENSE.GPL included in the |
10 | ** packaging of this file. | 10 | ** packaging of this file. |
11 | ** | 11 | ** |
12 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 12 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
13 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 13 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
14 | ** | 14 | ** |
15 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 15 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
16 | ** | 16 | ** |
17 | ** | 17 | ** |
18 | **********************************************************************/ | 18 | **********************************************************************/ |
19 | 19 | ||
20 | #define QTOPIA_INTERNAL_FD | 20 | #define QTOPIA_INTERNAL_FD |
21 | 21 | ||
22 | // #include "addresssettings.h" | 22 | // #include "addresssettings.h" |
23 | #include "addressbook.h" | 23 | #include "addressbook.h" |
24 | 24 | ||
25 | #include <opie2/odebug.h> | 25 | #include <opie2/odebug.h> |
26 | #include <opie2/ofileselector.h> | 26 | #include <opie2/ofileselector.h> |
27 | #include <opie2/ofiledialog.h> | 27 | #include <opie2/ofiledialog.h> |
28 | #include <opie2/opimcontact.h> | 28 | #include <opie2/opimcontact.h> |
29 | #include <opie2/ocontactaccessbackend_vcard.h> | 29 | #include <opie2/ocontactaccessbackend_vcard.h> |
30 | 30 | ||
31 | #include <qpe/resource.h> | 31 | #include <qpe/resource.h> |
32 | #include <qpe/ir.h> | 32 | #include <qpe/ir.h> |
33 | #include <qpe/qpemessagebox.h> | 33 | #include <qpe/qpemessagebox.h> |
34 | #include <qmenubar.h> | 34 | #include <qmenubar.h> |
35 | // #include <qtoolbar.h> | 35 | // #include <qtoolbar.h> |
36 | // #include <qmenubar.h> | 36 | // #include <qmenubar.h> |
37 | #include <qpe/qpeapplication.h> | 37 | #include <qpe/qpeapplication.h> |
38 | 38 | ||
39 | #include <qaction.h> | 39 | #include <qaction.h> |
40 | #include <qlayout.h> | 40 | #include <qlayout.h> |
41 | #include <qmessagebox.h> | 41 | #include <qmessagebox.h> |
42 | #include <qtoolbutton.h> | 42 | #include <qtoolbutton.h> |
43 | 43 | ||
44 | #include <stdlib.h> | 44 | #include <stdlib.h> |
45 | #include <sys/stat.h> | 45 | #include <sys/stat.h> |
46 | #include <sys/types.h> | 46 | #include <sys/types.h> |
47 | #include <fcntl.h> | 47 | #include <fcntl.h> |
48 | #include <unistd.h> | 48 | #include <unistd.h> |
49 | 49 | ||
50 | 50 | ||
51 | #include "picker.h" | 51 | #include "picker.h" |
52 | #include "configdlg.h" | 52 | #include "configdlg.h" |
53 | 53 | ||
54 | extern QString addressbookPersonalVCardName(); | 54 | extern QString addressbookPersonalVCardName(); |
55 | 55 | ||
56 | AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, | 56 | AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, |
57 | WFlags f ) | 57 | WFlags f ) |
58 | : QMainWindow( parent, name, f ), | 58 | : QMainWindow( parent, name, f ), |
59 | catMenu (0l), | 59 | catMenu (0l), |
60 | abEditor(0l), | 60 | abEditor(0l), |
61 | syncing(FALSE), | 61 | syncing(FALSE), |
62 | m_tableViewButton(0l), | 62 | m_tableViewButton(0l), |
63 | m_cardViewButton(0l) | 63 | m_cardViewButton(0l) |
64 | { | 64 | { |
65 | isLoading = true; | 65 | isLoading = true; |
66 | 66 | ||
67 | m_config.load(); | 67 | m_config.load(); |
68 | 68 | ||
69 | setCaption( tr("Contacts") ); | 69 | setCaption( tr("Contacts") ); |
70 | setIcon( Resource::loadPixmap( "AddressBook" ) ); | 70 | setIcon( Resource::loadPixmap( "addressbook/AddressBook" ) ); |
71 | 71 | ||
72 | // Settings for Main Menu | 72 | // Settings for Main Menu |
73 | // setToolBarsMovable( false ); | 73 | // setToolBarsMovable( false ); |
74 | setToolBarsMovable( !m_config.fixedBars() ); | 74 | setToolBarsMovable( !m_config.fixedBars() ); |
75 | setRightJustification( true ); | 75 | setRightJustification( true ); |
76 | 76 | ||
77 | QToolBar *bar = new QToolBar( this ); | 77 | QToolBar *bar = new QToolBar( this ); |
78 | bar->setHorizontalStretchable( TRUE ); | 78 | bar->setHorizontalStretchable( TRUE ); |
79 | 79 | ||
80 | QMenuBar *mbList = new QMenuBar( bar ); | 80 | QMenuBar *mbList = new QMenuBar( bar ); |
81 | mbList->setMargin( 0 ); | 81 | mbList->setMargin( 0 ); |
82 | 82 | ||
83 | QPopupMenu *edit = new QPopupMenu( mbList ); | 83 | QPopupMenu *edit = new QPopupMenu( mbList ); |
84 | mbList->insertItem( tr( "Contact" ), edit ); | 84 | mbList->insertItem( tr( "Contact" ), edit ); |
85 | 85 | ||
86 | // Category Menu | 86 | // Category Menu |
87 | catMenu = new QPopupMenu( this ); | 87 | catMenu = new QPopupMenu( this ); |
88 | catMenu->setCheckable( TRUE ); | 88 | catMenu->setCheckable( TRUE ); |
89 | connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); | 89 | connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); |
90 | mbList->insertItem( tr("View"), catMenu ); | 90 | mbList->insertItem( tr("View"), catMenu ); |
91 | 91 | ||
92 | // Create Toolbar | 92 | // Create Toolbar |
93 | listTools = new QToolBar( this, "list operations" ); | 93 | listTools = new QToolBar( this, "list operations" ); |
94 | listTools->setHorizontalStretchable( true ); | 94 | listTools->setHorizontalStretchable( true ); |
95 | addToolBar( listTools ); | 95 | addToolBar( listTools ); |
96 | moveToolBar( listTools, m_config.getToolBarPos() ); | 96 | moveToolBar( listTools, m_config.getToolBarPos() ); |
97 | 97 | ||
98 | // View Icons | 98 | // View Icons |
99 | m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/listview" ), | 99 | m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/listview" ), |
100 | QString::null, 0, this, 0 ); | 100 | QString::null, 0, this, 0 ); |
101 | connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) ); | 101 | connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) ); |
102 | m_tableViewButton->setToggleAction( true ); | 102 | m_tableViewButton->setToggleAction( true ); |
103 | m_tableViewButton->addTo( listTools ); | 103 | m_tableViewButton->addTo( listTools ); |
104 | m_cardViewButton = new QAction( tr( "Card" ), Resource::loadPixmap( "addressbook/cardview" ), QString::null, 0, this, 0 ); | 104 | m_cardViewButton = new QAction( tr( "Card" ), Resource::loadPixmap( "addressbook/cardview" ), QString::null, 0, this, 0 ); |
105 | connect( m_cardViewButton, SIGNAL( activated() ), this, SLOT( slotCardView() ) ); | 105 | connect( m_cardViewButton, SIGNAL( activated() ), this, SLOT( slotCardView() ) ); |
106 | m_cardViewButton->setToggleAction( true ); | 106 | m_cardViewButton->setToggleAction( true ); |
107 | m_cardViewButton->addTo( listTools ); | 107 | m_cardViewButton->addTo( listTools ); |
108 | 108 | ||
109 | listTools->addSeparator(); | 109 | listTools->addSeparator(); |
110 | 110 | ||
111 | // Other Buttons | 111 | // Other Buttons |
112 | QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, | 112 | QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, |
113 | 0, this, 0 ); | 113 | 0, this, 0 ); |
114 | actionNew = a; | 114 | actionNew = a; |
115 | connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) ); | 115 | connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) ); |
116 | a->addTo( edit ); | 116 | a->addTo( edit ); |
117 | a->addTo( listTools ); | 117 | a->addTo( listTools ); |
118 | 118 | ||
119 | a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, | 119 | a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, |
120 | 0, this, 0 ); | 120 | 0, this, 0 ); |
121 | actionEdit = a; | 121 | actionEdit = a; |
122 | connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) ); | 122 | connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) ); |
123 | a->addTo( edit ); | 123 | a->addTo( edit ); |
124 | a->addTo( listTools ); | 124 | a->addTo( listTools ); |
125 | 125 | ||
126 | a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, | 126 | a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, |
127 | 0, this, 0 ); | 127 | 0, this, 0 ); |
128 | actionTrash = a; | 128 | actionTrash = a; |
129 | connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); | 129 | connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); |
130 | a->addTo( edit ); | 130 | a->addTo( edit ); |
131 | a->addTo( listTools ); | 131 | a->addTo( listTools ); |
132 | 132 | ||
133 | 133 | ||
134 | // make it possible to go directly to businesscard via qcop call | 134 | // make it possible to go directly to businesscard via qcop call |
135 | //#if defined(Q_WS_QWS) // Why this ? (se) | 135 | //#if defined(Q_WS_QWS) // Why this ? (se) |
136 | #if !defined(QT_NO_COP) | 136 | #if !defined(QT_NO_COP) |
137 | QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this ); | 137 | QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this ); |
138 | connect (addressChannel, SIGNAL( received(const QCString&,const QByteArray&)), | 138 | connect (addressChannel, SIGNAL( received(const QCString&,const QByteArray&)), |
139 | this, SLOT ( appMessage(const QCString&,const QByteArray&) ) ); | 139 | this, SLOT ( appMessage(const QCString&,const QByteArray&) ) ); |
140 | #endif | 140 | #endif |
141 | // #endif | 141 | // #endif |
142 | a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), | 142 | a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), |
143 | QString::null, 0, this, 0 ); | 143 | QString::null, 0, this, 0 ); |
144 | actionFind = a; | 144 | actionFind = a; |
145 | connect( a, SIGNAL(activated()), this, SLOT( slotFindOpen()) ); | 145 | connect( a, SIGNAL(activated()), this, SLOT( slotFindOpen()) ); |
146 | a->addTo( edit ); | 146 | a->addTo( edit ); |
147 | a->addTo( listTools ); | 147 | a->addTo( listTools ); |
148 | 148 | ||
149 | // Much better search widget, taken from QTReader.. (se) | 149 | // Much better search widget, taken from QTReader.. (se) |
150 | searchBar = new OFloatBar( "Search", this, QMainWindow::Top, TRUE ); | 150 | searchBar = new OFloatBar( "Search", this, QMainWindow::Top, TRUE ); |
151 | searchBar->setHorizontalStretchable( TRUE ); | 151 | searchBar->setHorizontalStretchable( TRUE ); |
152 | searchBar->hide(); | 152 | searchBar->hide(); |
153 | searchEdit = new QLineEdit( searchBar, "searchEdit" ); | 153 | searchEdit = new QLineEdit( searchBar, "searchEdit" ); |
154 | 154 | ||
155 | // QFont f("unifont", 16 /*, QFont::Bold*/); | 155 | // QFont f("unifont", 16 /*, QFont::Bold*/); |
156 | // searchEdit->setFont( f ); | 156 | // searchEdit->setFont( f ); |
157 | 157 | ||
158 | searchBar->setStretchableWidget( searchEdit ); | 158 | searchBar->setStretchableWidget( searchEdit ); |
159 | connect( searchEdit, SIGNAL( returnPressed() ), | 159 | connect( searchEdit, SIGNAL( returnPressed() ), |
160 | this, SLOT( slotFind() ) ); | 160 | this, SLOT( slotFind() ) ); |
161 | 161 | ||
162 | a = new QAction( tr( "Start Search" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 ); | 162 | a = new QAction( tr( "Start Search" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 ); |
163 | connect( a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); | 163 | connect( a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); |
164 | a->addTo( searchBar ); | 164 | a->addTo( searchBar ); |
165 | 165 | ||
166 | a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); | 166 | a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); |
diff --git a/core/pim/today/task-opie-today.control b/core/pim/today/task-opie-today.control index 6798141..3d637cc 100644 --- a/core/pim/today/task-opie-today.control +++ b/core/pim/today/task-opie-today.control | |||
@@ -1,12 +1,12 @@ | |||
1 | Package: task-opie-today | 1 | Package: task-opie-today |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: opie/pim | 3 | Section: opie/pim |
4 | Maintainer: Maximilian Reiß <harlekin@handhelds.org> | 4 | Maintainer: Maximilian Reiß <harlekin@handhelds.org> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: $QPE_VERSION$EXTRAVERSION | 6 | Version: 0.5$EXTRAVERSION |
7 | Depends: task-opie-minimal, opie-today, opie-today-datebookplugin, opie-today-todolistplugin | 7 | Depends: task-opie-minimal, opie-today, opie-today-datebookplugin, opie-today-todolistplugin |
8 | License: GPL | 8 | License: GPL |
9 | Description: Task for basic Today app setup | 9 | Description: Task for basic Today app setup |
10 | Includes datebook and todolist plugins. | 10 | Includes datebook and todolist plugins. |
11 | 11 | ||
12 | Files: | 12 | Files: |
diff --git a/core/settings/security/demo/multiauth.control b/core/settings/security/demo/multiauth.control index c7dd82a..c549035 100644 --- a/core/settings/security/demo/multiauth.control +++ b/core/settings/security/demo/multiauth.control | |||
@@ -1,16 +1,16 @@ | |||
1 | Package: opie-multiauth | 1 | Package: opie-multiauth |
2 | Files: bin/multiauth apps/Applications/multiauth.desktop pics/security/multiauth.png | 2 | Files: bin/multiauth apps/Applications/multiauth.desktop pics/security/multiauth.png |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/settings | 4 | Section: opie/settings |
5 | Maintainer: Clement Seveillac <clement@nist.gov> | 5 | Maintainer: Clement Seveillac <clement@nist.gov> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Version: $QPE_VERSION$EXTRAVERSION | 7 | Version: 0.0.2$EXTRAVERSION |
8 | Depends: opie-security | 8 | Depends: opie-security |
9 | Description: multi-plugin authentication demonstrator for Opie. | 9 | Description: multi-plugin authentication demonstrator for Opie. |
10 | This demonstration application allows us to use one or several | 10 | This demonstration application allows us to use one or several |
11 | ways to lock and unlock our device. Since it really locks your | 11 | ways to lock and unlock our device. Since it really locks your |
12 | PDA the way you configured it in the Security settings, you can | 12 | PDA the way you configured it in the Security settings, you can |
13 | map a button to it through the Buttons settings to lock your | 13 | map a button to it through the Buttons settings to lock your |
14 | PDA on demand, with one simple click. | 14 | PDA on demand, with one simple click. |
15 | You must install some opie-multiauth-* plugins, and configure | 15 | You must install some opie-multiauth-* plugins, and configure |
16 | them through opie-security, to really see its possibilities. | 16 | them through opie-security, to really see its possibilities. |
diff --git a/core/tools/quicklauncher/main.cpp b/core/tools/quicklauncher/main.cpp index fbed5a1..59dd17e 100644 --- a/core/tools/quicklauncher/main.cpp +++ b/core/tools/quicklauncher/main.cpp | |||
@@ -24,194 +24,193 @@ | |||
24 | /* OPIE */ | 24 | /* OPIE */ |
25 | #include <opie2/odebug.h> | 25 | #include <opie2/odebug.h> |
26 | #include <opie2/oapplication.h> | 26 | #include <opie2/oapplication.h> |
27 | 27 | ||
28 | /* QT */ | 28 | /* QT */ |
29 | #include <qpainter.h> | 29 | #include <qpainter.h> |
30 | #include <qstrlist.h> | 30 | #include <qstrlist.h> |
31 | #include <qtimer.h> | 31 | #include <qtimer.h> |
32 | #include <qguardedptr.h> | 32 | #include <qguardedptr.h> |
33 | #include <qcopchannel_qws.h> | 33 | #include <qcopchannel_qws.h> |
34 | 34 | ||
35 | #ifdef private | 35 | #ifdef private |
36 | # undef private | 36 | # undef private |
37 | #endif | 37 | #endif |
38 | #define private public | 38 | #define private public |
39 | #include <qtopia/qpeapplication.h> | 39 | #include <qtopia/qpeapplication.h> |
40 | #undef private | 40 | #undef private |
41 | 41 | ||
42 | /* STD */ | 42 | /* STD */ |
43 | #include <stdio.h> | 43 | #include <stdio.h> |
44 | #include <stdlib.h> | 44 | #include <stdlib.h> |
45 | #include <sys/types.h> | 45 | #include <sys/types.h> |
46 | #include <sys/stat.h> | 46 | #include <sys/stat.h> |
47 | 47 | ||
48 | #ifdef _OS_LINUX_ | 48 | #ifdef _OS_LINUX_ |
49 | #include <sys/prctl.h> | 49 | #include <sys/prctl.h> |
50 | #ifndef PR_SET_NAME | 50 | #ifndef PR_SET_NAME |
51 | #define PR_SET_NAME 15 | 51 | #define PR_SET_NAME 15 |
52 | #endif | 52 | #endif |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | #include <unistd.h> | 55 | #include <unistd.h> |
56 | 56 | ||
57 | 57 | ||
58 | using QuickPrivate::PluginLoader; | 58 | using QuickPrivate::PluginLoader; |
59 | 59 | ||
60 | static QPEApplication *app = 0; | 60 | static QPEApplication *app = 0; |
61 | static PluginLoader *loader = 0; | 61 | static PluginLoader *loader = 0; |
62 | static ApplicationInterface *appIface = 0; | 62 | static ApplicationInterface *appIface = 0; |
63 | static QGuardedPtr<QWidget> mainWindow; | 63 | static QGuardedPtr<QWidget> mainWindow; |
64 | 64 | ||
65 | #ifdef _OS_LINUX_ | 65 | #ifdef _OS_LINUX_ |
66 | static char **argv0 = 0; | 66 | static char **argv0 = 0; |
67 | static int argv_lth; | 67 | static int argv_lth; |
68 | extern char **environ; | 68 | extern char **environ; |
69 | #ifndef SPT_BUFSIZE | 69 | #ifndef SPT_BUFSIZE |
70 | #define SPT_BUFSIZE 2048 | 70 | #define SPT_BUFSIZE 2048 |
71 | #endif | 71 | #endif |
72 | #include <stdarg.h> | 72 | #include <stdarg.h> |
73 | void setproctitle (const char *fmt,...) { | 73 | void setproctitle (const char *fmt,...) { |
74 | int i; | 74 | int i; |
75 | char buf[SPT_BUFSIZE]; | 75 | char buf[SPT_BUFSIZE]; |
76 | va_list ap; | 76 | va_list ap; |
77 | 77 | ||
78 | if (!argv0) | 78 | if (!argv0) |
79 | return; | 79 | return; |
80 | 80 | ||
81 | va_start(ap, fmt); | 81 | va_start(ap, fmt); |
82 | (void) vsnprintf(buf, SPT_BUFSIZE, fmt, ap); | 82 | (void) vsnprintf(buf, SPT_BUFSIZE, fmt, ap); |
83 | va_end(ap); | 83 | va_end(ap); |
84 | 84 | ||
85 | i = strlen (buf); | 85 | i = strlen (buf); |
86 | if (i > argv_lth - 2) { | 86 | if (i > argv_lth - 2) { |
87 | i = argv_lth - 2; | 87 | i = argv_lth - 2; |
88 | buf[i] = '\0'; | 88 | buf[i] = '\0'; |
89 | } | 89 | } |
90 | 90 | ||
91 | memset(argv0[0], '\0', argv_lth); /* clear the memory area */ | 91 | memset(argv0[0], '\0', argv_lth); /* clear the memory area */ |
92 | (void) strcpy (argv0[0], buf); | 92 | (void) strcpy (argv0[0], buf); |
93 | 93 | ||
94 | argv0[1] = NULL; | 94 | argv0[1] = NULL; |
95 | } | 95 | } |
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | 98 | ||
99 | class QuickLauncher : public QObject | 99 | class QuickLauncher : public QObject |
100 | { | 100 | { |
101 | Q_OBJECT | 101 | Q_OBJECT |
102 | public: | 102 | public: |
103 | QuickLauncher() : QObject() | 103 | QuickLauncher() : QObject() |
104 | { | 104 | { |
105 | QCString ch("QPE/QuickLauncher-"); | 105 | QCString ch("QPE/QuickLauncher-"); |
106 | ch += QString::number(getpid()); | 106 | ch += QString::number(getpid()); |
107 | qlChannel = new QCopChannel( ch, this); | 107 | qlChannel = new QCopChannel( ch, this); |
108 | connect( qlChannel, SIGNAL(received(const QCString&,const QByteArray&)), | 108 | connect( qlChannel, SIGNAL(received(const QCString&,const QByteArray&)), |
109 | this, SLOT(message(const QCString&,const QByteArray&)) ); | 109 | this, SLOT(message(const QCString&,const QByteArray&)) ); |
110 | } | 110 | } |
111 | 111 | ||
112 | static void exec( int /*argc*/, char **argv ) | 112 | static void exec( int /*argc*/, char **argv ) |
113 | { | 113 | { |
114 | QString appName = argv[0]; | 114 | QString appName = argv[0]; |
115 | int sep = appName.findRev( '/' ); | 115 | int sep = appName.findRev( '/' ); |
116 | if ( sep > 0 ) | 116 | if ( sep > 0 ) |
117 | appName = appName.mid( sep+1 ); | 117 | appName = appName.mid( sep+1 ); |
118 | 118 | ||
119 | appIface = 0; | 119 | appIface = 0; |
120 | if ( loader->queryInterface(appName, IID_QtopiaApplication, (QUnknownInterface**)&appIface) != QS_OK ) { | 120 | if ( ! ( loader->queryInterface(appName, IID_QtopiaApplication, (QUnknownInterface**)&appIface) == QS_OK ) ) { |
121 | owarn << "Plugin does not support QuickLauncher interface" << oendl; | ||
122 | exit(-1); | 121 | exit(-1); |
123 | } | 122 | } |
124 | 123 | ||
125 | mainWindow = appIface->createMainWindow( appName ); | 124 | mainWindow = appIface->createMainWindow( appName ); |
126 | 125 | ||
127 | if ( mainWindow ) { | 126 | if ( mainWindow ) { |
128 | if ( mainWindow->metaObject()->slotNames().contains("setDocument(const QString&)") ) { | 127 | if ( mainWindow->metaObject()->slotNames().contains("setDocument(const QString&)") ) { |
129 | app->showMainDocumentWidget( mainWindow ); | 128 | app->showMainDocumentWidget( mainWindow ); |
130 | } else { | 129 | } else { |
131 | app->showMainWidget( mainWindow ); | 130 | app->showMainWidget( mainWindow ); |
132 | } | 131 | } |
133 | } else { | 132 | } else { |
134 | owarn << "Could not create application main window" << oendl; | 133 | owarn << "Could not create application main window" << oendl; |
135 | exit(-1); | 134 | exit(-1); |
136 | } | 135 | } |
137 | } | 136 | } |
138 | 137 | ||
139 | private slots: | 138 | private slots: |
140 | void message(const QCString &msg, const QByteArray & data) | 139 | void message(const QCString &msg, const QByteArray & data) |
141 | { | 140 | { |
142 | QStrList argList; | 141 | QStrList argList; |
143 | 142 | ||
144 | if ( msg == "execute(QStrList)" ) { | 143 | if ( msg == "execute(QStrList)" ) { |
145 | delete qlChannel; | 144 | delete qlChannel; |
146 | QDataStream stream( data, IO_ReadOnly ); | 145 | QDataStream stream( data, IO_ReadOnly ); |
147 | QStrList argList; | 146 | QStrList argList; |
148 | stream >> argList; | 147 | stream >> argList; |
149 | odebug << "QuickLauncher execute: " << argList.at(0) << oendl; | 148 | odebug << "QuickLauncher execute: " << argList.at(0) << oendl; |
150 | doQuickLaunch( argList ); | 149 | doQuickLaunch( argList ); |
151 | delete this; | 150 | delete this; |
152 | } else if ( msg == "execute(QString)" ) { | 151 | } else if ( msg == "execute(QString)" ) { |
153 | delete qlChannel; | 152 | delete qlChannel; |
154 | QDataStream stream( data, IO_ReadOnly ); | 153 | QDataStream stream( data, IO_ReadOnly ); |
155 | QString arg; | 154 | QString arg; |
156 | stream >> arg; | 155 | stream >> arg; |
157 | odebug << "QuickLauncher execute: " << arg << oendl; | 156 | odebug << "QuickLauncher execute: " << arg << oendl; |
158 | QStrList argList; | 157 | QStrList argList; |
159 | argList.append( arg.utf8() ); | 158 | argList.append( arg.utf8() ); |
160 | doQuickLaunch( argList ); | 159 | doQuickLaunch( argList ); |
161 | delete this; | 160 | delete this; |
162 | } | 161 | } |
163 | } | 162 | } |
164 | 163 | ||
165 | private: | 164 | private: |
166 | void doQuickLaunch( QStrList &argList ) | 165 | void doQuickLaunch( QStrList &argList ) |
167 | { | 166 | { |
168 | static int myargc = argList.count(); | 167 | static int myargc = argList.count(); |
169 | static char **myargv = new char *[myargc + 1]; | 168 | static char **myargv = new char *[myargc + 1]; |
170 | 169 | ||
171 | for ( int j = 0; j < myargc; j++ ) { | 170 | for ( int j = 0; j < myargc; j++ ) { |
172 | myargv[j] = new char [strlen(argList.at(j))+1]; | 171 | myargv[j] = new char [strlen(argList.at(j))+1]; |
173 | strcpy( myargv[j], argList.at(j) ); | 172 | strcpy( myargv[j], argList.at(j) ); |
174 | } | 173 | } |
175 | 174 | ||
176 | myargv[myargc] = NULL; | 175 | myargv[myargc] = NULL; |
177 | #ifdef _OS_LINUX_ | 176 | #ifdef _OS_LINUX_ |
178 | // Change name of process | 177 | // Change name of process |
179 | setproctitle(myargv[0]); | 178 | setproctitle(myargv[0]); |
180 | prctl( PR_SET_NAME, (unsigned long)myargv[0], 0, 0, 0 ); | 179 | prctl( PR_SET_NAME, (unsigned long)myargv[0], 0, 0, 0 ); |
181 | #endif | 180 | #endif |
182 | 181 | ||
183 | connect(app, SIGNAL(lastWindowClosed()), app, SLOT(hideOrQuit())); | 182 | connect(app, SIGNAL(lastWindowClosed()), app, SLOT(hideOrQuit())); |
184 | app->exit_loop(); | 183 | app->exit_loop(); |
185 | app->initApp( myargc, myargv ); | 184 | app->initApp( myargc, myargv ); |
186 | exec( myargc, myargv ); | 185 | exec( myargc, myargv ); |
187 | } | 186 | } |
188 | 187 | ||
189 | private: | 188 | private: |
190 | QCopChannel *qlChannel; | 189 | QCopChannel *qlChannel; |
191 | }; | 190 | }; |
192 | 191 | ||
193 | int main( int argc, char** argv ) | 192 | int main( int argc, char** argv ) |
194 | { | 193 | { |
195 | app = new Opie::Core::OApplication( argc, argv ); | 194 | app = new Opie::Core::OApplication( argc, argv ); |
196 | 195 | ||
197 | loader = new PluginLoader( "application" ); | 196 | loader = new PluginLoader( "application" ); |
198 | 197 | ||
199 | unsetenv( "LD_BIND_NOW" ); | 198 | unsetenv( "LD_BIND_NOW" ); |
200 | 199 | ||
201 | QCString arg0 = argv[0]; | 200 | QCString arg0 = argv[0]; |
202 | int sep = arg0.findRev( '/' ); | 201 | int sep = arg0.findRev( '/' ); |
203 | 202 | ||
204 | if ( sep > 0 ) | 203 | if ( sep > 0 ) |
205 | arg0 = arg0.mid( sep+1 ); | 204 | arg0 = arg0.mid( sep+1 ); |
206 | 205 | ||
207 | if ( arg0 != "quicklauncher" ) { | 206 | if ( arg0 != "quicklauncher" ) { |
208 | odebug << "QuickLauncher invoked as: " << arg0.data() << oendl; | 207 | odebug << "QuickLauncher invoked as: " << arg0.data() << oendl; |
209 | QuickLauncher::exec( argc, argv ); | 208 | QuickLauncher::exec( argc, argv ); |
210 | } else { | 209 | } else { |
211 | #ifdef _OS_LINUX_ | 210 | #ifdef _OS_LINUX_ |
212 | // Setup to change proc title | 211 | // Setup to change proc title |
213 | int i; | 212 | int i; |
214 | char **envp = environ; | 213 | char **envp = environ; |
215 | /* Move the environment so we can reuse the memory. | 214 | /* Move the environment so we can reuse the memory. |
216 | * (Code borrowed from sendmail.) */ | 215 | * (Code borrowed from sendmail.) */ |
217 | for (i = 0; envp[i] != NULL; i++) | 216 | for (i = 0; envp[i] != NULL; i++) |