summaryrefslogtreecommitdiff
path: root/core
Side-by-side diff
Diffstat (limited to 'core') (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 );