-rw-r--r-- | noncore/settings/aqpkg/categoryfilterimpl.cpp | 20 | ||||
-rw-r--r-- | noncore/settings/aqpkg/instoptionsimpl.cpp | 16 | ||||
-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 38 | ||||
-rw-r--r-- | noncore/settings/aqpkg/settingsimpl.cpp | 35 |
4 files changed, 61 insertions, 48 deletions
diff --git a/noncore/settings/aqpkg/categoryfilterimpl.cpp b/noncore/settings/aqpkg/categoryfilterimpl.cpp index 61e1f93..217d2c9 100644 --- a/noncore/settings/aqpkg/categoryfilterimpl.cpp +++ b/noncore/settings/aqpkg/categoryfilterimpl.cpp | |||
@@ -24,21 +24,27 @@ | |||
24 | -- :-=` Free Software Foundation, Inc., | 24 | -- :-=` Free Software Foundation, Inc., |
25 | 59 Temple Place - Suite 330, | 25 | 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <iostream> | 30 | #include "categoryfilterimpl.h" |
31 | using namespace std; | ||
32 | 31 | ||
32 | /* OPIE */ | ||
33 | #include <qpe/qpeapplication.h> | ||
34 | |||
35 | /* QT */ | ||
33 | #include <qgroupbox.h> | 36 | #include <qgroupbox.h> |
34 | #include <qlayout.h> | 37 | #include <qlayout.h> |
35 | #include <qlistbox.h> | 38 | #include <qlistbox.h> |
36 | #include <qstring.h> | 39 | #include <qstring.h> |
37 | 40 | ||
38 | #include "categoryfilterimpl.h" | 41 | /* STD */ |
42 | #include <iostream> | ||
43 | using namespace std; | ||
44 | |||
39 | 45 | ||
40 | CategoryFilterImpl :: CategoryFilterImpl(const QString &categories, const QString &selectedCategories, QWidget *parent, const char *name ) | 46 | CategoryFilterImpl :: CategoryFilterImpl(const QString &categories, const QString &selectedCategories, QWidget *parent, const char *name ) |
41 | : QDialog( parent, name, true ) | 47 | : QDialog( parent, name, true ) |
42 | { | 48 | { |
43 | setCaption( tr( "Category Filter" ) ); | 49 | setCaption( tr( "Category Filter" ) ); |
44 | 50 | ||
@@ -73,22 +79,22 @@ CategoryFilterImpl :: CategoryFilterImpl(const QString &categories, const QStrin | |||
73 | finditem = QString( "#%1#" ).arg( item ); | 79 | finditem = QString( "#%1#" ).arg( item ); |
74 | if ( selectedCategories.find( finditem ) != -1 ) | 80 | if ( selectedCategories.find( finditem ) != -1 ) |
75 | lstCategories->setSelected( lstCategories->count()-1, true ); | 81 | lstCategories->setSelected( lstCategories->count()-1, true ); |
76 | } | 82 | } |
77 | 83 | ||
78 | start = end + 1; | 84 | start = end + 1; |
79 | } while ( start < (int)categories.length() ); | 85 | } |
86 | while ( start < (int)categories.length() ); | ||
80 | 87 | ||
81 | lstCategories->sort( true ); | 88 | lstCategories->sort( true ); |
82 | 89 | ||
83 | showMaximized(); | 90 | QPEApplication::showDialog( this ); |
84 | } | 91 | } |
85 | 92 | ||
86 | CategoryFilterImpl :: ~CategoryFilterImpl() | 93 | CategoryFilterImpl :: ~CategoryFilterImpl() |
87 | { | 94 | {} |
88 | } | ||
89 | 95 | ||
90 | QString CategoryFilterImpl :: getSelectedFilter() | 96 | QString CategoryFilterImpl :: getSelectedFilter() |
91 | { | 97 | { |
92 | // Grab cetegories from listbox | 98 | // Grab cetegories from listbox |
93 | QString ret = "#"; | 99 | QString ret = "#"; |
94 | 100 | ||
diff --git a/noncore/settings/aqpkg/instoptionsimpl.cpp b/noncore/settings/aqpkg/instoptionsimpl.cpp index 9d52013..126e3b9 100644 --- a/noncore/settings/aqpkg/instoptionsimpl.cpp +++ b/noncore/settings/aqpkg/instoptionsimpl.cpp | |||
@@ -24,26 +24,29 @@ | |||
24 | -- :-=` Free Software Foundation, Inc., | 24 | -- :-=` Free Software Foundation, Inc., |
25 | 59 Temple Place - Suite 330, | 25 | 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "global.h" | ||
31 | #include "instoptionsimpl.h" | ||
32 | #include "ipkg.h" | ||
33 | |||
34 | /* OPIE */ | ||
30 | #ifdef QWS | 35 | #ifdef QWS |
31 | #include <qpe/config.h> | 36 | #include <qpe/config.h> |
32 | #endif | 37 | #endif |
38 | #include <qpe/qpeapplication.h> | ||
33 | 39 | ||
40 | /* QT */ | ||
34 | #include <qcheckbox.h> | 41 | #include <qcheckbox.h> |
35 | #include <qcombobox.h> | 42 | #include <qcombobox.h> |
36 | #include <qgroupbox.h> | 43 | #include <qgroupbox.h> |
37 | #include <qlabel.h> | 44 | #include <qlabel.h> |
38 | #include <qlayout.h> | 45 | #include <qlayout.h> |
39 | 46 | ||
40 | #include "global.h" | ||
41 | #include "instoptionsimpl.h" | ||
42 | #include "ipkg.h" | ||
43 | |||
44 | InstallOptionsDlgImpl::InstallOptionsDlgImpl( int flags, int verb, QWidget * parent, const char* name, bool modal, WFlags fl ) | 47 | InstallOptionsDlgImpl::InstallOptionsDlgImpl( int flags, int verb, QWidget * parent, const char* name, bool modal, WFlags fl ) |
45 | : QDialog( parent, name, modal, fl ) | 48 | : QDialog( parent, name, modal, fl ) |
46 | { | 49 | { |
47 | setCaption( tr( "Options" ) ); | 50 | setCaption( tr( "Options" ) ); |
48 | 51 | ||
49 | QVBoxLayout *layout = new QVBoxLayout( this ); | 52 | QVBoxLayout *layout = new QVBoxLayout( this ); |
@@ -92,19 +95,18 @@ InstallOptionsDlgImpl::InstallOptionsDlgImpl( int flags, int verb, QWidget * par | |||
92 | forceOverwrite->setChecked( true ); | 95 | forceOverwrite->setChecked( true ); |
93 | // if ( flags & VERBOSE_WGET ) | 96 | // if ( flags & VERBOSE_WGET ) |
94 | // verboseWget->setChecked( true ); | 97 | // verboseWget->setChecked( true ); |
95 | // if ( flags & MAKE_LINKS ) | 98 | // if ( flags & MAKE_LINKS ) |
96 | // makeLinks->setChecked( true ); | 99 | // makeLinks->setChecked( true ); |
97 | 100 | ||
98 | showMaximized(); | 101 | QPEApplication::showDialog( this ); |
99 | 102 | ||
100 | } | 103 | } |
101 | 104 | ||
102 | InstallOptionsDlgImpl::~InstallOptionsDlgImpl() | 105 | InstallOptionsDlgImpl::~InstallOptionsDlgImpl() |
103 | { | 106 | {} |
104 | } | ||
105 | 107 | ||
106 | 108 | ||
107 | int InstallOptionsDlgImpl :: getFlags() | 109 | int InstallOptionsDlgImpl :: getFlags() |
108 | { | 110 | { |
109 | int flags = 0; | 111 | int flags = 0; |
110 | 112 | ||
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index dbe694e..6f5c712 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp | |||
@@ -24,22 +24,33 @@ | |||
24 | -- :-=` Free Software Foundation, Inc., | 24 | -- :-=` Free Software Foundation, Inc., |
25 | 59 Temple Place - Suite 330, | 25 | 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/limits.h> | 30 | #include "categoryfilterimpl.h" |
31 | #include <unistd.h> | 31 | #include "datamgr.h" |
32 | #include "global.h" | ||
33 | #include "inputdlg.h" | ||
34 | #include "ipkg.h" | ||
35 | #include "installdlgimpl.h" | ||
36 | #include "letterpushbutton.h" | ||
37 | #include "mainwin.h" | ||
38 | #include "packagewin.h" | ||
39 | #include "settingsimpl.h" | ||
40 | #include "utils.h" | ||
32 | 41 | ||
42 | /* OPIE */ | ||
33 | #include <qpe/qcopenvelope_qws.h> | 43 | #include <qpe/qcopenvelope_qws.h> |
34 | #include <qmenubar.h> | ||
35 | #include <qpe/qpeapplication.h> | 44 | #include <qpe/qpeapplication.h> |
36 | #include <qtoolbar.h> | ||
37 | #include <qpe/config.h> | 45 | #include <qpe/config.h> |
38 | #include <qpe/resource.h> | 46 | #include <qpe/resource.h> |
39 | 47 | ||
48 | /* QT */ | ||
49 | #include <qmenubar.h> | ||
50 | #include <qtoolbar.h> | ||
40 | #include <qaction.h> | 51 | #include <qaction.h> |
41 | #include <qcombobox.h> | 52 | #include <qcombobox.h> |
42 | #include <qfile.h> | 53 | #include <qfile.h> |
43 | #include <qlabel.h> | 54 | #include <qlabel.h> |
44 | #include <qlayout.h> | 55 | #include <qlayout.h> |
45 | #include <qlineedit.h> | 56 | #include <qlineedit.h> |
@@ -49,23 +60,15 @@ | |||
49 | #include <qpopupmenu.h> | 60 | #include <qpopupmenu.h> |
50 | #include <qprogressbar.h> | 61 | #include <qprogressbar.h> |
51 | #include <qtimer.h> | 62 | #include <qtimer.h> |
52 | #include <qwhatsthis.h> | 63 | #include <qwhatsthis.h> |
53 | #include <qwidgetstack.h> | 64 | #include <qwidgetstack.h> |
54 | 65 | ||
55 | #include "categoryfilterimpl.h" | 66 | /* STD */ |
56 | #include "datamgr.h" | 67 | #include <linux/limits.h> |
57 | #include "global.h" | 68 | #include <unistd.h> |
58 | #include "inputdlg.h" | ||
59 | #include "ipkg.h" | ||
60 | #include "installdlgimpl.h" | ||
61 | #include "letterpushbutton.h" | ||
62 | #include "mainwin.h" | ||
63 | #include "packagewin.h" | ||
64 | #include "settingsimpl.h" | ||
65 | #include "utils.h" | ||
66 | 69 | ||
67 | extern int compareVersions( const char *v1, const char *v2 ); | 70 | extern int compareVersions( const char *v1, const char *v2 ); |
68 | 71 | ||
69 | MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl ) | 72 | MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl ) |
70 | :QMainWindow( parent, name, fl || WStyle_ContextHelp ) | 73 | :QMainWindow( parent, name, fl || WStyle_ContextHelp ) |
71 | { | 74 | { |
@@ -1178,20 +1181,21 @@ void MainWindow :: letterPushed( QString t ) | |||
1178 | break; | 1181 | break; |
1179 | } | 1182 | } |
1180 | 1183 | ||
1181 | item = (QCheckListItem *)item->nextSibling(); | 1184 | item = (QCheckListItem *)item->nextSibling(); |
1182 | if ( !item ) | 1185 | if ( !item ) |
1183 | item = (QCheckListItem *)packagesList->firstChild(); | 1186 | item = (QCheckListItem *)packagesList->firstChild(); |
1184 | } while ( item != start); | 1187 | } |
1188 | while ( item != start); | ||
1185 | } | 1189 | } |
1186 | 1190 | ||
1187 | void MainWindow :: slotDisplayPackage( QListViewItem *item ) | 1191 | void MainWindow :: slotDisplayPackage( QListViewItem *item ) |
1188 | { | 1192 | { |
1189 | QString itemstr( ((QCheckListItem*)item)->text() ); | 1193 | QString itemstr( ((QCheckListItem*)item)->text() ); |
1190 | PackageWindow *p = new PackageWindow( mgr->getServer( serversList->currentText() )->getPackage( itemstr ) ); | 1194 | PackageWindow *p = new PackageWindow( mgr->getServer( serversList->currentText() )->getPackage( itemstr ) ); |
1191 | p->showMaximized(); | 1195 | QPEApplication::showWidget( p ); |
1192 | } | 1196 | } |
1193 | 1197 | ||
1194 | QuestionDlg::QuestionDlg( const QString &caption, const QString &text, const QString &secondbtn ) | 1198 | QuestionDlg::QuestionDlg( const QString &caption, const QString &text, const QString &secondbtn ) |
1195 | : QWidget( 0x0, 0x0, WType_Modal | WType_TopLevel | WStyle_Dialog ) | 1199 | : QWidget( 0x0, 0x0, WType_Modal | WType_TopLevel | WStyle_Dialog ) |
1196 | { | 1200 | { |
1197 | setCaption( caption ); | 1201 | setCaption( caption ); |
diff --git a/noncore/settings/aqpkg/settingsimpl.cpp b/noncore/settings/aqpkg/settingsimpl.cpp index 4887ceb..9fdf31e 100644 --- a/noncore/settings/aqpkg/settingsimpl.cpp +++ b/noncore/settings/aqpkg/settingsimpl.cpp | |||
@@ -24,34 +24,36 @@ | |||
24 | -- :-=` Free Software Foundation, Inc., | 24 | -- :-=` Free Software Foundation, Inc., |
25 | 59 Temple Place - Suite 330, | 25 | 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <fstream> | 30 | #include "settingsimpl.h" |
31 | #include <algorithm> | 31 | #include "global.h" |
32 | using namespace std; | 32 | |
33 | /* OPIE */ | ||
34 | #include <opie/otabwidget.h> | ||
35 | #ifdef QWS | ||
36 | #include <qpe/config.h> | ||
37 | #include <qpe/resource.h> | ||
38 | #endif | ||
39 | #include <qpe/qpeapplication.h> | ||
33 | 40 | ||
41 | /* QT */ | ||
34 | #include <qcheckbox.h> | 42 | #include <qcheckbox.h> |
35 | #include <qgroupbox.h> | 43 | #include <qgroupbox.h> |
36 | #include <qlabel.h> | 44 | #include <qlabel.h> |
37 | #include <qlayout.h> | 45 | #include <qlayout.h> |
38 | #include <qlineedit.h> | 46 | #include <qlineedit.h> |
39 | #include <qlistbox.h> | 47 | #include <qlistbox.h> |
40 | #include <qpushbutton.h> | 48 | #include <qpushbutton.h> |
41 | 49 | ||
42 | #include <opie/otabwidget.h> | 50 | /* STD */ |
43 | 51 | #include <fstream> | |
44 | #ifdef QWS | 52 | #include <algorithm> |
45 | #include <qpe/config.h> | 53 | using namespace std; |
46 | #include <qpe/resource.h> | ||
47 | #endif | ||
48 | |||
49 | #include "settingsimpl.h" | ||
50 | |||
51 | #include "global.h" | ||
52 | 54 | ||
53 | SettingsImpl :: SettingsImpl( DataManager *dataManager, QWidget * parent, const char* name, bool modal, WFlags fl ) | 55 | SettingsImpl :: SettingsImpl( DataManager *dataManager, QWidget * parent, const char* name, bool modal, WFlags fl ) |
54 | : QDialog( parent, name, modal, fl ) | 56 | : QDialog( parent, name, modal, fl ) |
55 | { | 57 | { |
56 | setCaption( tr( "Configuration" ) ); | 58 | setCaption( tr( "Configuration" ) ); |
57 | 59 | ||
@@ -75,20 +77,17 @@ SettingsImpl :: SettingsImpl( DataManager *dataManager, QWidget * parent, const | |||
75 | newserver = false; | 77 | newserver = false; |
76 | newdestination = false; | 78 | newdestination = false; |
77 | } | 79 | } |
78 | 80 | ||
79 | SettingsImpl :: ~SettingsImpl() | 81 | SettingsImpl :: ~SettingsImpl() |
80 | { | 82 | { |
81 | |||
82 | } | 83 | } |
83 | 84 | ||
84 | bool SettingsImpl :: showDlg() | 85 | bool SettingsImpl :: showDlg() |
85 | { | 86 | { |
86 | showMaximized(); | 87 | QPEApplication::execDialog( this ); |
87 | exec(); | ||
88 | |||
89 | if ( changed ) | 88 | if ( changed ) |
90 | dataMgr->writeOutIpkgConf(); | 89 | dataMgr->writeOutIpkgConf(); |
91 | 90 | ||
92 | return changed; | 91 | return changed; |
93 | } | 92 | } |
94 | 93 | ||
@@ -459,12 +458,13 @@ void SettingsImpl :: changeDestinationDetails() | |||
459 | #ifdef QWS | 458 | #ifdef QWS |
460 | QString key = newName; | 459 | QString key = newName; |
461 | key += "_linkToRoot"; | 460 | key += "_linkToRoot"; |
462 | int val = d->linkToRoot(); | 461 | int val = d->linkToRoot(); |
463 | cfg.writeEntry( key, val ); | 462 | cfg.writeEntry( key, val ); |
464 | #endif | 463 | #endif |
464 | |||
465 | } | 465 | } |
466 | } | 466 | } |
467 | else | 467 | else |
468 | { | 468 | { |
469 | dataMgr->getDestinationList().append( new Destination( newName, destinationurl->text() ) ); | 469 | dataMgr->getDestinationList().append( new Destination( newName, destinationurl->text() ) ); |
470 | destinations->insertItem( newName ); | 470 | destinations->insertItem( newName ); |
@@ -473,12 +473,13 @@ void SettingsImpl :: changeDestinationDetails() | |||
473 | 473 | ||
474 | #ifdef QWS | 474 | #ifdef QWS |
475 | QString key = newName; | 475 | QString key = newName; |
476 | key += "_linkToRoot"; | 476 | key += "_linkToRoot"; |
477 | cfg.writeEntry( key, true ); | 477 | cfg.writeEntry( key, true ); |
478 | #endif | 478 | #endif |
479 | |||
479 | } | 480 | } |
480 | } | 481 | } |
481 | 482 | ||
482 | //------------------ Proxy tab ---------------------- | 483 | //------------------ Proxy tab ---------------------- |
483 | void SettingsImpl :: proxyApplyChanges() | 484 | void SettingsImpl :: proxyApplyChanges() |
484 | { | 485 | { |