author | drw <drw> | 2004-08-16 18:11:27 (UTC) |
---|---|---|
committer | drw <drw> | 2004-08-16 18:11:27 (UTC) |
commit | cbb2e3969b0a6bb36aca6bc608a77dcaeb5bbac2 (patch) (unidiff) | |
tree | 58d91571a252bc8519d94ff32832c9b3a7a16089 /noncore/settings/packagemanager/oipkgconfigdlg.cpp | |
parent | f8f568aaddc63d39b50aa8357326a64c036f5847 (diff) | |
download | opie-cbb2e3969b0a6bb36aca6bc608a77dcaeb5bbac2.zip opie-cbb2e3969b0a6bb36aca6bc608a77dcaeb5bbac2.tar.gz opie-cbb2e3969b0a6bb36aca6bc608a77dcaeb5bbac2.tar.bz2 |
Use OFileDialog::getDirectory to select destination path
Diffstat (limited to 'noncore/settings/packagemanager/oipkgconfigdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/oipkgconfigdlg.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp index 1561470..ea0aef0 100644 --- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp +++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp | |||
@@ -32,4 +32,6 @@ _;:, .> :=|. This program is free software; you can | |||
32 | #include "oipkgconfigdlg.h" | 32 | #include "oipkgconfigdlg.h" |
33 | 33 | ||
34 | #include <opie2/ofiledialog.h> | ||
35 | |||
34 | #include <qpe/resource.h> | 36 | #include <qpe/resource.h> |
35 | 37 | ||
@@ -84,6 +86,4 @@ OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *paren | |||
84 | m_tabWidget.addTab( m_optionsWidget, "exec", tr( "Options" ) ); | 86 | m_tabWidget.addTab( m_optionsWidget, "exec", tr( "Options" ) ); |
85 | } | 87 | } |
86 | |||
87 | //showMaximized(); | ||
88 | } | 88 | } |
89 | 89 | ||
@@ -256,5 +256,5 @@ void OIpkgConfigDlg::initDestinationWidget() | |||
256 | m_destName = new QLineEdit( grpbox ); | 256 | m_destName = new QLineEdit( grpbox ); |
257 | QWhatsThis::add( m_destName, tr( "Enter the name of this entry here." ) ); | 257 | QWhatsThis::add( m_destName, tr( "Enter the name of this entry here." ) ); |
258 | grplayout->addWidget( m_destName, 0, 1 ); | 258 | grplayout->addMultiCellWidget( m_destName, 0, 0, 1, 2 ); |
259 | 259 | ||
260 | label = new QLabel( tr( "Location:" ), grpbox ); | 260 | label = new QLabel( tr( "Location:" ), grpbox ); |
@@ -264,13 +264,18 @@ void OIpkgConfigDlg::initDestinationWidget() | |||
264 | QWhatsThis::add( m_destLocation, tr( "Enter the absolute directory path of this entry here." ) ); | 264 | QWhatsThis::add( m_destLocation, tr( "Enter the absolute directory path of this entry here." ) ); |
265 | grplayout->addWidget( m_destLocation, 1, 1 ); | 265 | grplayout->addWidget( m_destLocation, 1, 1 ); |
266 | btn = new QPushButton( Resource::loadPixmap( "folder" ), QString::null, grpbox ); | ||
267 | btn->setMaximumWidth( btn->height() ); | ||
268 | QWhatsThis::add( btn, tr( "Tap here to select the desired location." ) ); | ||
269 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestSelectPath()) ); | ||
270 | grplayout->addWidget( btn, 1, 2 ); | ||
266 | 271 | ||
267 | m_destActive = new QCheckBox( tr( "Active" ), grpbox ); | 272 | m_destActive = new QCheckBox( tr( "Active" ), grpbox ); |
268 | QWhatsThis::add( m_destActive, tr( "Tap here to indicate whether this entry is active or not." ) ); | 273 | QWhatsThis::add( m_destActive, tr( "Tap here to indicate whether this entry is active or not." ) ); |
269 | grplayout->addMultiCellWidget( m_destActive, 2, 2, 0, 1 ); | 274 | grplayout->addMultiCellWidget( m_destActive, 2, 2, 0, 2 ); |
270 | 275 | ||
271 | btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Update" ), grpbox ); | 276 | btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Update" ), grpbox ); |
272 | QWhatsThis::add( btn, tr( "Tap here to update the entry's information." ) ); | 277 | QWhatsThis::add( btn, tr( "Tap here to update the entry's information." ) ); |
273 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestUpdate()) ); | 278 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestUpdate()) ); |
274 | grplayout->addMultiCellWidget( btn, 3, 3, 0, 1 ); | 279 | grplayout->addMultiCellWidget( btn, 3, 3, 0, 2 ); |
275 | } | 280 | } |
276 | 281 | ||
@@ -585,4 +590,12 @@ void OIpkgConfigDlg::slotDestDelete() | |||
585 | } | 590 | } |
586 | 591 | ||
592 | void OIpkgConfigDlg::slotDestSelectPath() | ||
593 | { | ||
594 | QString path = Opie::Ui::OFileDialog::getDirectory( 0, m_destLocation->text() ); | ||
595 | if ( path.at( path.length() - 1 ) == '/' ) | ||
596 | path.truncate( path.length() - 1 ); | ||
597 | m_destLocation->setText( path ); | ||
598 | } | ||
599 | |||
587 | void OIpkgConfigDlg::slotDestUpdate() | 600 | void OIpkgConfigDlg::slotDestUpdate() |
588 | { | 601 | { |