summaryrefslogtreecommitdiff
path: root/core/settings
authorharlekin <harlekin>2004-06-19 10:18:25 (UTC)
committer harlekin <harlekin>2004-06-19 10:18:25 (UTC)
commite05195bbaf71fbfca033bef5855085772fa586eb (patch) (side-by-side diff)
tree2e2aaf7a200ac7f4c2e4a8a76f62fb1ed2f5e590 /core/settings
parent48ec0fc077b7834c49c1af1b1279f943ef58de41 (diff)
downloadopie-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') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/launcher/tabconfig.h13
-rw-r--r--core/settings/launcher/tabdialog.cpp18
-rw-r--r--core/settings/launcher/tabssettings.cpp6
3 files changed, 26 insertions, 11 deletions
diff --git a/core/settings/launcher/tabconfig.h b/core/settings/launcher/tabconfig.h
index 9086341..84ba073 100644
--- a/core/settings/launcher/tabconfig.h
+++ b/core/settings/launcher/tabconfig.h
@@ -17,3 +17,3 @@
..}^=.=       =       ; Public License for more details.
-++=   -.     .`     .:
+++=   -.     .`     .:
 :     =  ...= . :.=- You should have received a copy of the GNU
@@ -30,3 +30,3 @@
struct TabConfig {
- enum ViewMode {
+ enum ViewMode {
Icon,
@@ -42,2 +42,3 @@ struct TabConfig {
BackgroundType m_bg_type;
+ QString m_last_directory;
QString m_bg_image;
@@ -51,6 +52,6 @@ struct TabConfig {
bool m_changed;
-
+
bool operator == ( const TabConfig &tc )
{
- return ( m_view == tc. m_view ) &&
+ return ( m_view == tc. m_view ) &&
( m_bg_type == tc. m_bg_type ) &&
@@ -59,3 +60,3 @@ struct TabConfig {
( m_text_color == tc. m_text_color ) &&
- ( m_font_use == tc. m_font_use ) &&
+ ( m_font_use == tc. m_font_use ) &&
( m_font_use ? (
@@ -66,3 +67,3 @@ struct TabConfig {
) : true );
-
+
}
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
@@ -30,3 +30,3 @@
/* OPIE */
-#include <qpe/resource.h>
+
#include <opie2/ofontselector.h>
@@ -37,2 +37,6 @@
+/* QPE */
+#include <qpe/resource.h>
+#include <qpe/qpeapplication.h>
+
/* QT */
@@ -44,2 +48,3 @@
#include <qlabel.h>
+#include <qfileinfo.h>
#include <qradiobutton.h>
@@ -416,5 +421,2 @@ QWidget *TabDialog::createIconTab ( QWidget *parent )
-// vertLayout-> addSpacing ( 8 );
-
-// gridLayout = new QGridLayout ( vertLayout );
gridLayout-> addRowSpacing ( 2, 8 );
@@ -430,2 +432,6 @@ QWidget *TabDialog::createIconTab ( QWidget *parent )
+ if ( m_tc.m_last_directory == QString::null ) {
+ m_tc.m_last_directory = QPEApplication::documentDir();
+ }
+
return tab;
@@ -482,4 +488,6 @@ void TabDialog::bgImageClicked ( )
- 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 ( );
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp
index e5a7087..5ac625b 100644
--- a/core/settings/launcher/tabssettings.cpp
+++ b/core/settings/launcher/tabssettings.cpp
@@ -145,2 +145,3 @@ void TabsSettings::readTabSettings ( Config &cfg )
+ Config cfg2 = Config( "Launchersettings" );
@@ -150,2 +151,3 @@ void TabsSettings::readTabSettings ( Config &cfg )
cfg. setGroup ( grp. arg ( *it ));
+ cfg2. setGroup( grp. arg ( *it ));
@@ -166,2 +168,3 @@ void TabsSettings::readTabSettings ( Config &cfg )
tc. m_bg_image = cfg. readEntry ( "BackgroundImage", tc. m_bg_image );
+ tc. m_last_directory = cfg2.readEntry( "DefaultDir", "" );
tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color );
@@ -202,2 +205,3 @@ void TabsSettings::accept ( )
Config cfg ( "Launcher" );
+ Config cfg2 ( "Launchersettings" );
@@ -213,2 +217,3 @@ void TabsSettings::accept ( )
cfg. setGroup ( grp. arg ( *it ));
+ cfg2. setGroup ( grp. arg ( *it ));
switch ( tc. m_view ) {
@@ -228,2 +233,3 @@ void TabsSettings::accept ( )
cfg. writeEntry ( "TextColor", tc. m_text_color );
+ cfg2. writeEntry ( "DefaultDir", tc.m_last_directory );