author | harlekin <harlekin> | 2004-06-19 10:18:25 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2004-06-19 10:18:25 (UTC) |
commit | e05195bbaf71fbfca033bef5855085772fa586eb (patch) (side-by-side diff) | |
tree | 2e2aaf7a200ac7f4c2e4a8a76f62fb1ed2f5e590 /core/settings/launcher/tabdialog.cpp | |
parent | 48ec0fc077b7834c49c1af1b1279f943ef58de41 (diff) | |
download | opie-e05195bbaf71fbfca033bef5855085772fa586eb.zip opie-e05195bbaf71fbfca033bef5855085772fa586eb.tar.gz opie-e05195bbaf71fbfca033bef5855085772fa586eb.tar.bz2 |
BUGFIX: 0001089 - remember Browse path when selecting a tab background image
Diffstat (limited to 'core/settings/launcher/tabdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/launcher/tabdialog.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp index 546e229..cef92d9 100644 --- a/core/settings/launcher/tabdialog.cpp +++ b/core/settings/launcher/tabdialog.cpp @@ -23,30 +23,35 @@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "tabdialog.h" /* OPIE */ -#include <qpe/resource.h> + #include <opie2/ofontselector.h> #include <opie2/otabwidget.h> #include <opie2/ocolorbutton.h> #include <opie2/ofiledialog.h> #include <opie2/odebug.h> +/* QPE */ +#include <qpe/resource.h> +#include <qpe/qpeapplication.h> + /* QT */ #include <qlayout.h> #include <qvbox.h> #include <qtabbar.h> #include <qiconview.h> #include <qapplication.h> #include <qlabel.h> +#include <qfileinfo.h> #include <qradiobutton.h> #include <qbuttongroup.h> #include <qwhatsthis.h> #include <qcheckbox.h> using namespace Opie::Ui; class SampleItem : public QIconViewItem { @@ -409,30 +414,31 @@ QWidget *TabDialog::createIconTab ( QWidget *parent ) gridLayout-> addWidget( rb, 0, 1 ); rb = new QRadioButton( tr( "Large" ), tab, "iconlarge" ); m_iconsize-> insert ( rb, TabConfig::Icon ); gridLayout-> addWidget( rb, 1, 1 ); connect ( m_iconsize, SIGNAL( clicked(int)), this, SLOT( iconSizeClicked(int))); -// vertLayout-> addSpacing ( 8 ); - -// gridLayout = new QGridLayout ( vertLayout ); gridLayout-> addRowSpacing ( 2, 8 ); label = new QLabel ( tr( "Color:" ), tab ); gridLayout-> addWidget ( label, 3, 0 ); m_iconcolor = new Opie::OColorButton ( tab, QColor ( m_tc. m_text_color ) ); connect ( m_iconcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( iconColorClicked(const QColor&))); gridLayout-> addWidget ( m_iconcolor, 3, 1, AlignLeft ); vertLayout-> addStretch ( 10 ); + if ( m_tc.m_last_directory == QString::null ) { + m_tc.m_last_directory = QPEApplication::documentDir(); + } + return tab; } void TabDialog::iconSizeClicked ( int s ) { m_sample-> setViewMode ((TabConfig::ViewMode) s ); } @@ -475,18 +481,20 @@ void TabDialog::bgImageClicked ( ) // ### use OFileSelector here ### // this is just a quick c&p from the old appearance app MimeTypes types; QStringList list; list << "image/*"; types. insert ( "Images", list ); - QString file = OFileDialog::getOpenFileName ( 1, "/", QString::null, types ); + QString file = OFileDialog::getOpenFileName ( 1, m_tc.m_last_directory, QString::null, types ); + if ( !file. isEmpty ( )) { + m_tc.m_last_directory = QFileInfo( file ).dirPath(); m_bgimage = DocLnk ( file ). file ( ); bgTypeClicked ( TabConfig::Image ); } } void TabDialog::bgDefaultClicked ( ) { m_bgimage = "launcher/opie-background"; |