summaryrefslogtreecommitdiff
path: root/core/settings/launcher/tabssettings.cpp
Side-by-side diff
Diffstat (limited to 'core/settings/launcher/tabssettings.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/settings/launcher/tabssettings.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp
index ab64331..42f0568 100644
--- a/core/settings/launcher/tabssettings.cpp
+++ b/core/settings/launcher/tabssettings.cpp
@@ -149,48 +149,49 @@ void TabsSettings::readTabSettings ( Config &cfg )
for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
TabConfig tc = ( it != m_ids. begin ( )) ? m_tabs [GLOBALID] : global_def;
cfg. setGroup ( grp. arg ( *it ));
cfg2. setGroup( grp. arg ( *it ));
QString view = cfg. readEntry ( "View" );
if ( view == "Icon" ) // No tr
tc. m_view = TabConfig::Icon;
if ( view == "List" ) // No tr
tc. m_view = TabConfig::List;
QString bgType = cfg. readEntry ( "BackgroundType" );
if ( bgType == "Image" )
tc. m_bg_type = TabConfig::Image;
else if ( bgType == "SolidColor" )
tc. m_bg_type = TabConfig::SolidColor;
else if ( bgType == "Image" ) // No tr
tc. m_bg_type = TabConfig::Image;
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 );
tc. m_iconcolumns = cfg. readNumEntry ( "Columns", tc. m_iconcolumns );
+ qDebug( "m_iconcolumns for %s = %d", (const char*) *it, tc.m_iconcolumns );
tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color );
QStringList f = cfg. readListEntry ( "Font", ',' );
if ( f. count ( ) == 4 ) {
tc. m_font_use = true;
tc. m_font_family = f [0];
tc. m_font_size = f [1]. toInt ( );
tc. m_font_weight = f [2]. toInt ( );
tc. m_font_italic = ( f [3]. toInt ( ));
}
m_tabs [*it] = tc;
}
// if all tabs have the same config, then initialize the GLOBALID tab to these values
TabConfig *first = 0;
bool same = true;
for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
if ( *it == GLOBALID )
continue;
else if ( !first )
first = &m_tabs [*it];
else
same &= ( *first == m_tabs [*it] );
@@ -242,48 +243,51 @@ void TabsSettings::accept ( )
}
else
cfg. removeEntry ( "Font" );
QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" );
switch ( tc. m_bg_type ) {
case TabConfig::Ruled:
cfg.writeEntry( "BackgroundType", "Ruled" );
be << *it << tc. m_bg_type << QString("");
break;
case TabConfig::SolidColor:
cfg.writeEntry( "BackgroundType", "SolidColor" );
be << *it << tc. m_bg_type << tc. m_bg_color;
break;
case TabConfig::Image:
cfg.writeEntry( "BackgroundType", "Image" );
be << *it << tc. m_bg_type << tc. m_bg_image;
break;
}
QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" );
te << *it << tc. m_text_color;
+ QCopEnvelope ic( "QPE/Launcher", "setIconColumns(QString,int)" );
+ ic << *it << tc. m_iconcolumns;
+
QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" );
fe << *it;
fe << ( tc. m_font_use ? tc. m_font_family : QString::null );
fe << tc. m_font_size;
fe << tc. m_font_weight;
fe << ( tc. m_font_italic ? 1 : 0 );
tc. m_changed = false;
}
cfg. setGroup ( "GUI" );
QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" );
cfg. writeEntry ( "BusyType", busytype );
cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) );
{
QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" );
e << busytype;
}
}
void TabsSettings::newClicked ( )
{
QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" ));