summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/oipkgconfigdlg.cpp
Unidiff
Diffstat (limited to 'noncore/settings/packagemanager/oipkgconfigdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
index d134651..7941ab8 100644
--- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp
+++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
@@ -28,25 +28,24 @@
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29 29
30*/ 30*/
31 31
32#include "oipkgconfigdlg.h" 32#include "oipkgconfigdlg.h"
33 33
34#include <qpe/resource.h>
35
34#include <qcheckbox.h> 36#include <qcheckbox.h>
35#include <qcombobox.h> 37#include <qcombobox.h>
36#include <qgroupbox.h> 38#include <qgroupbox.h>
37#include <qlabel.h> 39#include <qlabel.h>
38#include <qlineedit.h> 40#include <qlineedit.h>
39#include <qlistbox.h> 41#include <qlistbox.h>
40#include <qpushbutton.h> 42#include <qpushbutton.h>
41#include <qscrollview.h> 43#include <qscrollview.h>
42#include <qwhatsthis.h> 44#include <qwhatsthis.h>
43 45
44#include <qpe/resource.h>
45
46using namespace Opie::Ui;
47OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent ) 46OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent )
48 : QDialog( parent, QString::null, true, WStyle_ContextHelp ) 47 : QDialog( parent, QString::null, true, WStyle_ContextHelp )
49 , m_ipkg( ipkg ) 48 , m_ipkg( ipkg )
50 , m_configs( 0x0 ) 49 , m_configs( 0x0 )
51 , m_installOptions( installOptions ) 50 , m_installOptions( installOptions )
52 , m_serverNew( false ) 51 , m_serverNew( false )
@@ -98,37 +97,37 @@ void OIpkgConfigDlg::accept()
98 if ( confItem ) 97 if ( confItem )
99 { 98 {
100 confItem->setValue( m_proxyHttpServer->text() ); 99 confItem->setValue( m_proxyHttpServer->text() );
101 confItem->setActive( m_proxyHttpActive->isChecked() ); 100 confItem->setActive( m_proxyHttpActive->isChecked() );
102 } 101 }
103 else 102 else
104 m_configs->append( new OConfItem( QString::null, OConfItem::Option, "http_proxy", 103 m_configs->append( new OConfItem( OConfItem::Option, "http_proxy",
105 m_proxyHttpServer->text(), m_proxyHttpActive->isChecked() ) ); 104 m_proxyHttpServer->text(), m_proxyHttpActive->isChecked() ) );
106 105
107 confItem = findConfItem( OConfItem::Option, "ftp_proxy" ); 106 confItem = findConfItem( OConfItem::Option, "ftp_proxy" );
108 if ( confItem ) 107 if ( confItem )
109 { 108 {
110 confItem->setValue( m_proxyFtpServer->text() ); 109 confItem->setValue( m_proxyFtpServer->text() );
111 confItem->setActive( m_proxyFtpActive->isChecked() ); 110 confItem->setActive( m_proxyFtpActive->isChecked() );
112 } 111 }
113 else 112 else
114 m_configs->append( new OConfItem( QString::null, OConfItem::Option, "ftp_proxy", 113 m_configs->append( new OConfItem( OConfItem::Option, "ftp_proxy",
115 m_proxyFtpServer->text(), m_proxyFtpActive->isChecked() ) ); 114 m_proxyFtpServer->text(), m_proxyFtpActive->isChecked() ) );
116 115
117 confItem = findConfItem( OConfItem::Option, "proxy_username" ); 116 confItem = findConfItem( OConfItem::Option, "proxy_username" );
118 if ( confItem ) 117 if ( confItem )
119 confItem->setValue( m_proxyUsername->text() ); 118 confItem->setValue( m_proxyUsername->text() );
120 else 119 else
121 m_configs->append( new OConfItem( QString::null, OConfItem::Option, "proxy_username", 120 m_configs->append( new OConfItem( OConfItem::Option, "proxy_username",
122 m_proxyUsername->text() ) ); 121 m_proxyUsername->text() ) );
123 122
124 confItem = findConfItem( OConfItem::Option, "proxy_password" ); 123 confItem = findConfItem( OConfItem::Option, "proxy_password" );
125 if ( confItem ) 124 if ( confItem )
126 confItem->setValue( m_proxyPassword->text() ); 125 confItem->setValue( m_proxyPassword->text() );
127 else 126 else
128 m_configs->append( new OConfItem( QString::null, OConfItem::Option, "proxy_password", 127 m_configs->append( new OConfItem( OConfItem::Option, "proxy_password",
129 m_proxyPassword->text() ) ); 128 m_proxyPassword->text() ) );
130 129
131 m_ipkg->setConfigItems( m_configs ); 130 m_ipkg->setConfigItems( m_configs );
132 } 131 }
133 132
134 // Save options configuration 133 // Save options configuration
@@ -529,13 +528,13 @@ void OIpkgConfigDlg::slotServerUpdate()
529 } 528 }
530 } 529 }
531 } 530 }
532 else 531 else
533 { 532 {
534 // Add new destination to configuration list 533 // Add new destination to configuration list
535 m_configs->append( new OConfItem( QString::null, OConfItem::Source, newName, 534 m_configs->append( new OConfItem( OConfItem::Source, newName,
536 m_serverLocation->text(), m_serverActive->isChecked() ) ); 535 m_serverLocation->text(), m_serverActive->isChecked() ) );
537 m_configs->sort(); 536 m_configs->sort();
538 537
539 m_serverList->insertItem( newName ); 538 m_serverList->insertItem( newName );
540 m_serverList->setCurrentItem( m_serverList->count() ); 539 m_serverList->setCurrentItem( m_serverList->count() );
541 m_serverNew = false; 540 m_serverNew = false;
@@ -615,13 +614,13 @@ void OIpkgConfigDlg::slotDestUpdate()
615 } 614 }
616 } 615 }
617 } 616 }
618 else 617 else
619 { 618 {
620 // Add new destination to configuration list 619 // Add new destination to configuration list
621 m_configs->append( new OConfItem( QString::null, OConfItem::Destination, newName, 620 m_configs->append( new OConfItem( OConfItem::Destination, newName,
622 m_destLocation->text(), m_destActive->isChecked() ) ); 621 m_destLocation->text(), m_destActive->isChecked() ) );
623 m_configs->sort(); 622 m_configs->sort();
624 623
625 m_destList->insertItem( newName ); 624 m_destList->insertItem( newName );
626 m_destList->setCurrentItem( m_destList->count() ); 625 m_destList->setCurrentItem( m_destList->count() );
627 m_destNew = false; 626 m_destNew = false;