summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-01-23 20:12:55 (UTC)
committer kergoth <kergoth>2003-01-23 20:12:55 (UTC)
commit2b0157e5c600f6880ef10a1df187df45ac25f051 (patch) (unidiff)
treef9049b5aac89d9605146efeeb221e2b8dcb26b85
parent5100d4dc5012d5ff65bf1afc814e0552fe2d98fa (diff)
downloadopie-2b0157e5c600f6880ef10a1df187df45ac25f051.zip
opie-2b0157e5c600f6880ef10a1df187df45ac25f051.tar.gz
opie-2b0157e5c600f6880ef10a1df187df45ac25f051.tar.bz2
Compile fix, if you use PATH_MAX, include linux/limits.h.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index 8090646..ae073ef 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -1,145 +1,146 @@
1/*************************************************************************** 1/***************************************************************************
2 mainwin.cpp - description 2 mainwin.cpp - description
3 ------------------- 3 -------------------
4 begin : Mon Aug 26 13:32:30 BST 2002 4 begin : Mon Aug 26 13:32:30 BST 2002
5 copyright : (C) 2002 by Andy Qua 5 copyright : (C) 2002 by Andy Qua
6 email : andy.qua@blueyonder.co.uk 6 email : andy.qua@blueyonder.co.uk
7 ***************************************************************************/ 7 ***************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. * 14 * (at your option) any later version. *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17 17
18#include <linux/limits.h>
18#include <unistd.h> 19#include <unistd.h>
19 20
20#include <qpe/qcopenvelope_qws.h> 21#include <qpe/qcopenvelope_qws.h>
21#include <qpe/qpemenubar.h> 22#include <qpe/qpemenubar.h>
22#include <qpe/qpeapplication.h> 23#include <qpe/qpeapplication.h>
23#include <qpe/qpetoolbar.h> 24#include <qpe/qpetoolbar.h>
24#include <qpe/config.h> 25#include <qpe/config.h>
25#include <qpe/resource.h> 26#include <qpe/resource.h>
26 27
27#include <qaction.h> 28#include <qaction.h>
28#include <qcombobox.h> 29#include <qcombobox.h>
29#include <qfile.h> 30#include <qfile.h>
30#include <qlabel.h> 31#include <qlabel.h>
31#include <qlayout.h> 32#include <qlayout.h>
32#include <qlineedit.h> 33#include <qlineedit.h>
33#include <qlistview.h> 34#include <qlistview.h>
34#include <qmenubar.h> 35#include <qmenubar.h>
35#include <qmessagebox.h> 36#include <qmessagebox.h>
36#include <qpopupmenu.h> 37#include <qpopupmenu.h>
37#include <qprogressbar.h> 38#include <qprogressbar.h>
38#include <qtimer.h> 39#include <qtimer.h>
39#include <qwhatsthis.h> 40#include <qwhatsthis.h>
40#include <qwidgetstack.h> 41#include <qwidgetstack.h>
41 42
42#include "categoryfilterimpl.h" 43#include "categoryfilterimpl.h"
43#include "datamgr.h" 44#include "datamgr.h"
44#include "global.h" 45#include "global.h"
45#include "helpwindow.h" 46#include "helpwindow.h"
46#include "inputdlg.h" 47#include "inputdlg.h"
47#include "installdlgimpl.h" 48#include "installdlgimpl.h"
48#include "letterpushbutton.h" 49#include "letterpushbutton.h"
49#include "mainwin.h" 50#include "mainwin.h"
50#include "settingsimpl.h" 51#include "settingsimpl.h"
51#include "utils.h" 52#include "utils.h"
52 53
53extern int compareVersions( const char *v1, const char *v2 ); 54extern int compareVersions( const char *v1, const char *v2 );
54 55
55MainWindow :: MainWindow() 56MainWindow :: MainWindow()
56 :QMainWindow( 0x0, 0x0, WStyle_ContextHelp ) 57 :QMainWindow( 0x0, 0x0, WStyle_ContextHelp )
57{ 58{
58 setCaption( tr( "AQPkg - Package Manager" ) ); 59 setCaption( tr( "AQPkg - Package Manager" ) );
59 60
60#ifdef QWS 61#ifdef QWS
61 // read download directory from config file 62 // read download directory from config file
62 Config cfg( "aqpkg" ); 63 Config cfg( "aqpkg" );
63 cfg.setGroup( "settings" ); 64 cfg.setGroup( "settings" );
64 currentlySelectedServer = cfg.readEntry( "selectedServer", "local" ); 65 currentlySelectedServer = cfg.readEntry( "selectedServer", "local" );
65 showJumpTo = cfg.readBoolEntry( "showJumpTo", "true" ); 66 showJumpTo = cfg.readBoolEntry( "showJumpTo", "true" );
66 67
67#endif 68#endif
68 69
69 // Create UI widgets 70 // Create UI widgets
70 initMainWidget(); 71 initMainWidget();
71 initProgressWidget(); 72 initProgressWidget();
72 73
73 // Build menu and tool bars 74 // Build menu and tool bars
74 setToolBarsMovable( FALSE ); 75 setToolBarsMovable( FALSE );
75 76
76 QPEToolBar *bar = new QPEToolBar( this ); 77 QPEToolBar *bar = new QPEToolBar( this );
77 bar->setHorizontalStretchable( TRUE ); 78 bar->setHorizontalStretchable( TRUE );
78 QPEMenuBar *mb = new QPEMenuBar( bar ); 79 QPEMenuBar *mb = new QPEMenuBar( bar );
79 mb->setMargin( 0 ); 80 mb->setMargin( 0 );
80 bar = new QPEToolBar( this ); 81 bar = new QPEToolBar( this );
81 82
82 // Find toolbar 83 // Find toolbar
83 findBar = new QPEToolBar( this ); 84 findBar = new QPEToolBar( this );
84 addToolBar( findBar, QMainWindow::Top, true ); 85 addToolBar( findBar, QMainWindow::Top, true );
85 findBar->setHorizontalStretchable( true ); 86 findBar->setHorizontalStretchable( true );
86 findEdit = new QLineEdit( findBar ); 87 findEdit = new QLineEdit( findBar );
87 QWhatsThis::add( findEdit, tr( "Type the text to search for here." ) ); 88 QWhatsThis::add( findEdit, tr( "Type the text to search for here." ) );
88 findBar->setStretchableWidget( findEdit ); 89 findBar->setStretchableWidget( findEdit );
89 connect( findEdit, SIGNAL( textChanged( const QString & ) ), this, SLOT( findPackage( const QString & ) ) ); 90 connect( findEdit, SIGNAL( textChanged( const QString & ) ), this, SLOT( findPackage( const QString & ) ) );
90 91
91 // Packages menu 92 // Packages menu
92 QPopupMenu *popup = new QPopupMenu( this ); 93 QPopupMenu *popup = new QPopupMenu( this );
93 94
94 QAction *a = new QAction( tr( "Update lists" ), Resource::loadPixmap( "aqpkg/update" ), QString::null, 0, this, 0 ); 95 QAction *a = new QAction( tr( "Update lists" ), Resource::loadPixmap( "aqpkg/update" ), QString::null, 0, this, 0 );
95 a->setWhatsThis( tr( "Click here to update package lists from servers." ) ); 96 a->setWhatsThis( tr( "Click here to update package lists from servers." ) );
96 connect( a, SIGNAL( activated() ), this, SLOT( updateServer() ) ); 97 connect( a, SIGNAL( activated() ), this, SLOT( updateServer() ) );
97 a->addTo( popup ); 98 a->addTo( popup );
98 a->addTo( bar ); 99 a->addTo( bar );
99 100
100 actionUpgrade = new QAction( tr( "Upgrade" ), Resource::loadPixmap( "aqpkg/upgrade" ), QString::null, 0, this, 0 ); 101 actionUpgrade = new QAction( tr( "Upgrade" ), Resource::loadPixmap( "aqpkg/upgrade" ), QString::null, 0, this, 0 );
101 actionUpgrade->setWhatsThis( tr( "Click here to upgrade all installed packages if a newer version is available." ) ); 102 actionUpgrade->setWhatsThis( tr( "Click here to upgrade all installed packages if a newer version is available." ) );
102 connect( actionUpgrade, SIGNAL( activated() ), this, SLOT( upgradePackages() ) ); 103 connect( actionUpgrade, SIGNAL( activated() ), this, SLOT( upgradePackages() ) );
103 actionUpgrade->addTo( popup ); 104 actionUpgrade->addTo( popup );
104 actionUpgrade->addTo( bar ); 105 actionUpgrade->addTo( bar );
105 106
106 iconDownload = Resource::loadPixmap( "aqpkg/download" ); 107 iconDownload = Resource::loadPixmap( "aqpkg/download" );
107 iconRemove = Resource::loadPixmap( "aqpkg/remove" ); 108 iconRemove = Resource::loadPixmap( "aqpkg/remove" );
108 actionDownload = new QAction( tr( "Download" ), iconDownload, QString::null, 0, this, 0 ); 109 actionDownload = new QAction( tr( "Download" ), iconDownload, QString::null, 0, this, 0 );
109 actionDownload->setWhatsThis( tr( "Click here to download the currently selected package(s)." ) ); 110 actionDownload->setWhatsThis( tr( "Click here to download the currently selected package(s)." ) );
110 connect( actionDownload, SIGNAL( activated() ), this, SLOT( downloadPackage() ) ); 111 connect( actionDownload, SIGNAL( activated() ), this, SLOT( downloadPackage() ) );
111 actionDownload->addTo( popup ); 112 actionDownload->addTo( popup );
112 actionDownload->addTo( bar ); 113 actionDownload->addTo( bar );
113 114
114 a = new QAction( tr( "Apply changes" ), Resource::loadPixmap( "aqpkg/apply" ), QString::null, 0, this, 0 ); 115 a = new QAction( tr( "Apply changes" ), Resource::loadPixmap( "aqpkg/apply" ), QString::null, 0, this, 0 );
115 a->setWhatsThis( tr( "Click here to install, remove or upgrade currently selected package(s)." ) ); 116 a->setWhatsThis( tr( "Click here to install, remove or upgrade currently selected package(s)." ) );
116 connect( a, SIGNAL( activated() ), this, SLOT( applyChanges() ) ); 117 connect( a, SIGNAL( activated() ), this, SLOT( applyChanges() ) );
117 a->addTo( popup ); 118 a->addTo( popup );
118 a->addTo( bar ); 119 a->addTo( bar );
119 120
120 mb->insertItem( tr( "Actions" ), popup ); 121 mb->insertItem( tr( "Actions" ), popup );
121 122
122 // View menu 123 // View menu
123 popup = new QPopupMenu( this ); 124 popup = new QPopupMenu( this );
124 125
125 actionUninstalled = new QAction( tr( "Show packages not installed" ), QString::null, 0, this, 0 ); 126 actionUninstalled = new QAction( tr( "Show packages not installed" ), QString::null, 0, this, 0 );
126 actionUninstalled->setToggleAction( TRUE ); 127 actionUninstalled->setToggleAction( TRUE );
127 actionUninstalled->setWhatsThis( tr( "Click here to show packages available which have not been installed." ) ); 128 actionUninstalled->setWhatsThis( tr( "Click here to show packages available which have not been installed." ) );
128 connect( actionUninstalled, SIGNAL( activated() ), this, SLOT( filterUninstalledPackages() ) ); 129 connect( actionUninstalled, SIGNAL( activated() ), this, SLOT( filterUninstalledPackages() ) );
129 actionUninstalled->addTo( popup ); 130 actionUninstalled->addTo( popup );
130 131
131 actionInstalled = new QAction( tr( "Show installed packages" ), QString::null, 0, this, 0 ); 132 actionInstalled = new QAction( tr( "Show installed packages" ), QString::null, 0, this, 0 );
132 actionInstalled->setToggleAction( TRUE ); 133 actionInstalled->setToggleAction( TRUE );
133 actionInstalled->setWhatsThis( tr( "Click here to show packages currently installed on this device." ) ); 134 actionInstalled->setWhatsThis( tr( "Click here to show packages currently installed on this device." ) );
134 connect( actionInstalled, SIGNAL( activated() ), this, SLOT( filterInstalledPackages() ) ); 135 connect( actionInstalled, SIGNAL( activated() ), this, SLOT( filterInstalledPackages() ) );
135 actionInstalled->addTo( popup ); 136 actionInstalled->addTo( popup );
136 137
137 actionUpdated = new QAction( tr( "Show updated packages" ), QString::null, 0, this, 0 ); 138 actionUpdated = new QAction( tr( "Show updated packages" ), QString::null, 0, this, 0 );
138 actionUpdated->setToggleAction( TRUE ); 139 actionUpdated->setToggleAction( TRUE );
139 actionUpdated->setWhatsThis( tr( "Click here to show packages currently installed on this device which have a newer version available." ) ); 140 actionUpdated->setWhatsThis( tr( "Click here to show packages currently installed on this device which have a newer version available." ) );
140 connect( actionUpdated, SIGNAL( activated() ), this, SLOT( filterUpgradedPackages() ) ); 141 connect( actionUpdated, SIGNAL( activated() ), this, SLOT( filterUpgradedPackages() ) );
141 actionUpdated->addTo( popup ); 142 actionUpdated->addTo( popup );
142 143
143 popup->insertSeparator(); 144 popup->insertSeparator();
144 145
145 actionFilter = new QAction( tr( "Filter by category" ), Resource::loadPixmap( "aqpkg/filter" ), QString::null, 0, this, 0 ); 146 actionFilter = new QAction( tr( "Filter by category" ), Resource::loadPixmap( "aqpkg/filter" ), QString::null, 0, this, 0 );