author | mickeyl <mickeyl> | 2005-01-11 17:32:06 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-01-11 17:32:06 (UTC) |
commit | f8fd8556da5649f54af740a5dbb9a8c1ead2bcfc (patch) (side-by-side diff) | |
tree | db41b30ad733fc476746e1a9c7576a5a083240fa /core | |
parent | f82173157bdba4fa99afde9cc999bfe9b511ce07 (diff) | |
download | opie-f8fd8556da5649f54af740a5dbb9a8c1ead2bcfc.zip opie-f8fd8556da5649f54af740a5dbb9a8c1ead2bcfc.tar.gz opie-f8fd8556da5649f54af740a5dbb9a8c1ead2bcfc.tar.bz2 |
finish per-tab column setting. it now works on the fly and is persistent
-rw-r--r-- | core/launcher/launcher.cpp | 7 | ||||
-rw-r--r-- | core/launcher/launcherview.cpp | 2 | ||||
-rw-r--r-- | core/settings/launcher/tabconfig.h | 1 | ||||
-rw-r--r-- | core/settings/launcher/tabdialog.cpp | 1 | ||||
-rw-r--r-- | core/settings/launcher/tabssettings.cpp | 6 |
5 files changed, 15 insertions, 2 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 4f81076..4255b44 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -416,4 +416,11 @@ void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray & if ( id == "Documents" ) docLoadingWidget->setTextColor( QColor(color) ); + } else if ( msg == "setIconColumns(QString,int)" ) { + QString id; + stream >> id; + int number; + stream >> number; + if ( view(id ) ) + view(id)->setColNumber( number ); } else if ( msg == "setFont(QString,QString,int,int,int)" ) { QString id; diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 9d78c0d..2b34cc5 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp @@ -640,5 +640,5 @@ void LauncherIconView::calculateGrid( ItemTextPos pos ) else if ( viewerWidth >= 400 ) numColumns = viewerWidth/150; else numColumns = 2; - } + } setSpacing( 2 ); setGridX( (viewerWidth-(numColumns+1)*spacing())/numColumns ); diff --git a/core/settings/launcher/tabconfig.h b/core/settings/launcher/tabconfig.h index 7844673..9ea2418 100644 --- a/core/settings/launcher/tabconfig.h +++ b/core/settings/launcher/tabconfig.h @@ -59,4 +59,5 @@ struct TabConfig { ( m_bg_image == tc. m_bg_image ) && ( m_bg_color == tc. m_bg_color ) && + ( m_iconcolumns == tc. m_iconcolumns ) && ( m_text_color == tc. m_text_color ) && ( m_font_use == tc. m_font_use ) && diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp index abe310f..bd51628 100644 --- a/core/settings/launcher/tabdialog.cpp +++ b/core/settings/launcher/tabdialog.cpp @@ -306,4 +306,5 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig m_bgtype-> setButton ( tc. m_bg_type ); //m_solidcolor-> setColor ( QColor ( tc. m_bg_color )); + m_iconcolumns->setValue( tc. m_iconcolumns ); m_bgimage = tc. m_bg_image; bgTypeClicked ( tc. m_bg_type ); 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 @@ -171,4 +171,5 @@ void TabsSettings::readTabSettings ( Config &cfg ) 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", ',' ); @@ -264,5 +265,8 @@ void TabsSettings::accept ( ) te << *it << tc. m_text_color; - QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" ); + 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 ); |