From 3fce7943f47444f0ac0ccbd225e8b48d8275764b Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Sun, 18 Aug 2013 10:16:29 -0500 Subject: Rename KStyle to TDEStyle to avoid conflicts with KDE4. --- kcontrol/krdb/krdb.cpp | 2 +- kcontrol/style/kcmstyle.cpp | 4 +- kcontrol/style/keramik/CMakeLists.txt | 4 +- kcontrol/style/keramik/Makefile.am | 10 +- kcontrol/style/keramik/keramikconf.cpp | 6 +- kcontrol/tdm/tdm-appear.cpp | 2 +- kpersonalizer/CMakeLists.txt | 4 +- kpersonalizer/Makefile.am | 6 +- kpersonalizer/TODO | 2 +- kpersonalizer/kpersonalizer.cpp | 2 +- kpersonalizer/kstylepage.cpp | 584 --------------------------------- kpersonalizer/kstylepage.h | 128 -------- kpersonalizer/kstylepagedlg.ui | 127 ------- kpersonalizer/tdestylepage.cpp | 584 +++++++++++++++++++++++++++++++++ kpersonalizer/tdestylepage.h | 128 ++++++++ kpersonalizer/tdestylepagedlg.ui | 127 +++++++ r14-xdg-update | 7 +- twin/options.cpp | 2 +- 18 files changed, 867 insertions(+), 862 deletions(-) delete mode 100644 kpersonalizer/kstylepage.cpp delete mode 100644 kpersonalizer/kstylepage.h delete mode 100644 kpersonalizer/kstylepagedlg.ui create mode 100644 kpersonalizer/tdestylepage.cpp create mode 100644 kpersonalizer/tdestylepage.h create mode 100644 kpersonalizer/tdestylepagedlg.ui diff --git a/kcontrol/krdb/krdb.cpp b/kcontrol/krdb/krdb.cpp index 1f5d9a99d..a1543a320 100644 --- a/kcontrol/krdb/krdb.cpp +++ b/kcontrol/krdb/krdb.cpp @@ -119,7 +119,7 @@ static void applyQtColors( TDEConfig& kglobals, TQSettings& settings, TQPalette& settings.writeEntry("/qt/Palette/inactive", inactcg); settings.writeEntry("/qt/Palette/disabled", discg); - // export twin's colors to qtrc for kstyle to use + // export twin's colors to qtrc for tdestyle to use kglobals.setGroup("WM"); // active colors diff --git a/kcontrol/style/kcmstyle.cpp b/kcontrol/style/kcmstyle.cpp index 623ceeebf..2ca50631d 100644 --- a/kcontrol/style/kcmstyle.cpp +++ b/kcontrol/style/kcmstyle.cpp @@ -128,7 +128,7 @@ KCMStyle::KCMStyle( TQWidget* parent, const char* name ) m_bToolbarsDirty = false; TDEGlobal::dirs()->addResourceType("themes", - TDEStandardDirs::kde_default("data") + "kstyle/themes"); + TDEStandardDirs::kde_default("data") + "tdestyle/themes"); TDEAboutData *about = new TDEAboutData( I18N_NOOP("kcmstyle"), @@ -451,7 +451,7 @@ void KCMStyle::styleSpecificConfig() return; } - void* allocPtr = library->symbol("allocate_kstyle_config"); + void* allocPtr = library->symbol("allocate_tdestyle_config"); if (!allocPtr) { diff --git a/kcontrol/style/keramik/CMakeLists.txt b/kcontrol/style/keramik/CMakeLists.txt index b68be1c2e..c6ba1f64b 100644 --- a/kcontrol/style/keramik/CMakeLists.txt +++ b/kcontrol/style/keramik/CMakeLists.txt @@ -20,9 +20,9 @@ link_directories( ) -##### kstyle_keramik_config (module) ############ +##### tdestyle_keramik_config (module) ############ -tde_add_kpart( kstyle_keramik_config AUTOMOC +tde_add_kpart( tdestyle_keramik_config AUTOMOC SOURCES keramikconf.cpp LINK tdeui-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/kcontrol/style/keramik/Makefile.am b/kcontrol/style/keramik/Makefile.am index 56fbefa6b..d0fd2d721 100644 --- a/kcontrol/style/keramik/Makefile.am +++ b/kcontrol/style/keramik/Makefile.am @@ -1,12 +1,12 @@ INCLUDES = $(all_includes) noinst_HEADERS = keramikconf.h -kde_module_LTLIBRARIES = kstyle_keramik_config.la -kstyle_keramik_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module -kstyle_keramik_config_la_LIBADD = $(LIB_TDEUI) -kstyle_keramik_config_la_SOURCES = keramikconf.cpp +kde_module_LTLIBRARIES = tdestyle_keramik_config.la +tdestyle_keramik_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module +tdestyle_keramik_config_la_LIBADD = $(LIB_TDEUI) +tdestyle_keramik_config_la_SOURCES = keramikconf.cpp METASOURCES = AUTO messages: - $(XGETTEXT) *.cpp *.h -o $(podir)/kstyle_keramik_config.pot + $(XGETTEXT) *.cpp *.h -o $(podir)/tdestyle_keramik_config.pot diff --git a/kcontrol/style/keramik/keramikconf.cpp b/kcontrol/style/keramik/keramikconf.cpp index 251ea50aa..7fa6ef698 100644 --- a/kcontrol/style/keramik/keramikconf.cpp +++ b/kcontrol/style/keramik/keramikconf.cpp @@ -32,7 +32,7 @@ DEALINGS IN THE SOFTWARE. extern "C" { - KDE_EXPORT TQWidget* allocate_kstyle_config(TQWidget* parent) + KDE_EXPORT TQWidget* allocate_tdestyle_config(TQWidget* parent) { return new KeramikStyleConfig(parent); } @@ -42,7 +42,7 @@ KeramikStyleConfig::KeramikStyleConfig(TQWidget* parent): TQWidget(parent) { //Should have no margins here, the dialog provides them TQVBoxLayout* layout = new TQVBoxLayout(this, 0, 0); - TDEGlobal::locale()->insertCatalogue("kstyle_keramik_config"); + TDEGlobal::locale()->insertCatalogue("tdestyle_keramik_config"); //highlightLineEdits = new TQCheckBox(i18n("Highlight active lineedits"), this); highlightScrollBar = new TQCheckBox(i18n("Highlight scroll bar handles"), this); @@ -70,7 +70,7 @@ KeramikStyleConfig::KeramikStyleConfig(TQWidget* parent): TQWidget(parent) KeramikStyleConfig::~KeramikStyleConfig() { - TDEGlobal::locale()->removeCatalogue("kstyle_keramik_config"); + TDEGlobal::locale()->removeCatalogue("tdestyle_keramik_config"); } diff --git a/kcontrol/tdm/tdm-appear.cpp b/kcontrol/tdm/tdm-appear.cpp index e8aff7b74..66ecbbfdf 100644 --- a/kcontrol/tdm/tdm-appear.cpp +++ b/kcontrol/tdm/tdm-appear.cpp @@ -330,7 +330,7 @@ void TDMAppearanceWidget::loadGuiStyles(KBackedComboBox *combo) { // XXX: Global + local schemes TQStringList list = TDEGlobal::dirs()-> - findAllResources("data", "kstyle/themes/*.themerc", false, true); + findAllResources("data", "tdestyle/themes/*.themerc", false, true); for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { KSimpleConfig config(*it, true); diff --git a/kpersonalizer/CMakeLists.txt b/kpersonalizer/CMakeLists.txt index 4c151b493..313ff48a5 100644 --- a/kpersonalizer/CMakeLists.txt +++ b/kpersonalizer/CMakeLists.txt @@ -35,11 +35,11 @@ install( FILES uninstall.desktop DESTINATION ${APPS_INSTALL_DIR}/System RENAME k tde_add_executable( kpersonalizer AUTOMOC SOURCES - stylepreview.ui krefinepage.cpp kstylepage.cpp + stylepreview.ui krefinepage.cpp tdestylepage.cpp keyecandypage.cpp kospage.cpp kcountrypage.cpp kpersonalizer.cpp main.cpp kfindlanguage.cpp kcountrypagedlg.ui kospagedlg.ui keyecandypagedlg.ui - kstylepagedlg.ui krefinepagedlg.ui ksysinfo.cpp + tdestylepagedlg.ui krefinepagedlg.ui ksysinfo.cpp LINK tdeio-shared DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/kpersonalizer/Makefile.am b/kpersonalizer/Makefile.am index 66b957804..c4e01d719 100644 --- a/kpersonalizer/Makefile.am +++ b/kpersonalizer/Makefile.am @@ -1,13 +1,13 @@ bin_PROGRAMS = kpersonalizer kpersonalizer_SOURCES = stylepreview.ui krefinepage.cpp \ - kstylepage.cpp keyecandypage.cpp kospage.cpp kcountrypage.cpp kpersonalizer.cpp \ + tdestylepage.cpp keyecandypage.cpp kospage.cpp kcountrypage.cpp kpersonalizer.cpp \ main.cpp kfindlanguage.cpp \ - kcountrypagedlg.ui kospagedlg.ui keyecandypagedlg.ui kstylepagedlg.ui \ + kcountrypagedlg.ui kospagedlg.ui keyecandypagedlg.ui tdestylepagedlg.ui \ krefinepagedlg.ui ksysinfo.cpp kpersonalizer_LDADD = $(LIB_KIO) -EXTRA_DIST = main.cpp kpersonalizer.cpp kpersonalizer.h kpersonalizer.desktop kcountrypage.cpp kcountrypage.h kospage.cpp kospage.h keyecandypage.cpp keyecandypage.h kstylepage.cpp kstylepage.h krefinepage.cpp krefinepage.h cr16-app-kpersonalizer.png cr32-app-kpersonalizer.png README kcountrypagedlg.ui kospage.ui keyecandypagedlg.ui kstylepagedlg.ui krefinepagedlg.ui kfindlanguage.cpp kfindlanguage.h +EXTRA_DIST = main.cpp kpersonalizer.cpp kpersonalizer.h kpersonalizer.desktop kcountrypage.cpp kcountrypage.h kospage.cpp kospage.h keyecandypage.cpp keyecandypage.h tdestylepage.cpp tdestylepage.h krefinepage.cpp krefinepage.h cr16-app-kpersonalizer.png cr32-app-kpersonalizer.png README kcountrypagedlg.ui kospage.ui keyecandypagedlg.ui tdestylepagedlg.ui krefinepagedlg.ui kfindlanguage.cpp kfindlanguage.h xdg_apps_DATA = kpersonalizer.desktop diff --git a/kpersonalizer/TODO b/kpersonalizer/TODO index fdc0bf705..0a1bab85f 100644 --- a/kpersonalizer/TODO +++ b/kpersonalizer/TODO @@ -17,7 +17,7 @@ o kospage: - Desktop Icons are arranged after dcop-call, but we just want to align them o krefinepage: - quit kpersonalizer, if user starts kcontrol -o kstylepage: +o tdestylepage: - don't hardcode the styles - style preview o keyecandypage: diff --git a/kpersonalizer/kpersonalizer.cpp b/kpersonalizer/kpersonalizer.cpp index c3611baf3..86b0a5b4a 100644 --- a/kpersonalizer/kpersonalizer.cpp +++ b/kpersonalizer/kpersonalizer.cpp @@ -43,7 +43,7 @@ #include "kcountrypage.h" #include "kospage.h" #include "keyecandypage.h" -#include "kstylepage.h" +#include "tdestylepage.h" #include "krefinepage.h" #include "kpersonalizer.h" diff --git a/kpersonalizer/kstylepage.cpp b/kpersonalizer/kstylepage.cpp deleted file mode 100644 index 974ac0c9d..000000000 --- a/kpersonalizer/kstylepage.cpp +++ /dev/null @@ -1,584 +0,0 @@ -/*************************************************************************** - kstylepage.cpp - description - ------------------- - begin : Tue May 22 2001 - copyright : (C) 2001 by Ralf Nolden - email : nolden@kde.org - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "stylepreview.h" -#include "kstylepage.h" - -TDEStylePage::TDEStylePage(TQWidget *parent, const char *name ) : TDEStylePageDlg(parent,name) { - - px_stylesSidebar->setPixmap(UserIcon("step4.png")); - - klv_styles->addColumn(i18n("Style")); - klv_styles->addColumn( i18n( "Description" ) ); - klv_styles->setAllColumnsShowFocus(true); - - kde = new TQListViewItem( klv_styles); - kde->setText( 0, TQPixmap::defaultDepth() > 8 ? i18n( "Plastik" ) : i18n( "Light" ) ); - kde->setText( 1, i18n( "TDE default style" ) ); - - classic = new TQListViewItem( klv_styles); - classic->setText( 0, i18n( "KDE Classic" ) ); - classic->setText( 1, i18n( "Classic KDE style" ) ); - - keramik = new TQListViewItem( klv_styles ); - keramik->setText( 0, i18n( "Keramik" ) ); - keramik->setText( 1, i18n( "The previous default style" ) ); - - cde = new TQListViewItem( klv_styles); - cde->setText( 0, i18n( "Sunshine" ) ); - cde->setText( 1, i18n( "A very common desktop" ) ); - - win = new TQListViewItem( klv_styles ); - win->setText( 0, i18n( "Redmond" ) ); - win->setText( 1, i18n( "A style from the northwest of the USA" ) ); - - platinum = new TQListViewItem( klv_styles ); - platinum->setText( 0, i18n( "Platinum" ) ); - platinum->setText( 1, i18n( "The platinum style" ) ); - - connect(klv_styles, TQT_SIGNAL(selectionChanged()), - this, TQT_SLOT(slotCurrentChanged())); - - // Note: if the default is changed here it needs to be changed in tdebase/twin/plugins.cpp - // and tdebase/twin/kcmtwin/twindecoration/twindecoration.cpp as well. - defaultKWinStyle = TQPixmap::defaultDepth() > 8 ? "twin_plastik" : "twin_quartz"; - appliedStyle = NULL; - - getAvailability(); - getUserDefaults(); - initColors(); -} - -TDEStylePage::~TDEStylePage(){ - delete ctwin; - delete appliedStyle; -} - -void TDEStylePage::save(bool curSettings){ - kdDebug() << "TDEStylePage::save()" << endl; - // First, the style, then the colors as styles overwrite color settings - saveStyle(curSettings); - saveColors(curSettings); - saveKWin(curSettings); - saveIcons(curSettings); - liveUpdate(); -} - -/** save the widget-style */ -void TDEStylePage::saveStyle(bool curSettings){ - TQString style = curSettings ? currentStyle : origStyle; - TDEConfig cfg( "kdeglobals" ); - cfg.setGroup("General"); - cfg.writeEntry( "widgetStyle", style, true, true ); - cfg.sync(); - kdDebug() << "TDEStylePage::saveStyle(): " << style << endl; -} - -/** save the KWin-style*/ -void TDEStylePage::saveKWin(bool curSettings){ - TQString twin = origKWinStyle; - if(curSettings) { - KDesktopFile* kdf = 0L; - TDEStandardDirs* kstd = TDEGlobal::dirs(); - if (cde->isSelected() && twin_cde_exist) - kdf = new KDesktopFile(kstd->findResource("data", "twin/cde.desktop")); - else if (win->isSelected() && twin_win_exist) - kdf = new KDesktopFile(kstd->findResource("data", "twin/redmond.desktop")); - else if (platinum->isSelected() && twin_system_exist) - kdf = new KDesktopFile(kstd->findResource("data", "twin/system.desktop")); - else if (keramik->isSelected() && twin_keramik_exist) - kdf = new KDesktopFile(kstd->findResource("data", "twin/keramik.desktop")); - else if (kde->isSelected()) { - if (twin_plastik_exist && (TQColor::numBitPlanes() > 8)) - kdf = new KDesktopFile(kstd->findResource("data", "twin/plastik.desktop")); - else if (twin_quartz_exist) - kdf = new KDesktopFile(kstd->findResource("data", "twin/quartz.desktop")); - } - - if (kdf) { - kdf->setGroup("Desktop Entry"); - twin = kdf->readEntry("X-TDE-Library", defaultKWinStyle); - delete kdf; - } - else { - // if we get here classic is selected (there's no .desktop file for the - // kde2 twin style), or none of the other twin styles were found. - twin = "twin_default"; - } - } - ctwin->writeEntry("PluginLib", twin); - ctwin->sync(); - kdDebug() << "TDEStylePage::saveKWin(): " << twin << endl; -} - -/** Save the color-scheme */ -void TDEStylePage::saveColors(bool curSettings){ - struct colorSet* toSave; - if(curSettings) - toSave=¤tColors; // set the color struct to save as the style colors - else - toSave=&usrColors; - - // the GLOBAL config entries must be taken from the kcsrc file and written to it. Use the default values - // equals that the file is which is no file. TODO: use the default values in that case (kde selected) - TDEConfig *config = TDEGlobal::config(); - config->setGroup( "General" ); - config->writeEntry("foreground", toSave->foreground, true, true); - config->writeEntry("background", toSave->background, true, true); - config->writeEntry("windowForeground", toSave->windowForeground, true, true); - config->writeEntry("windowBackground", toSave->windowBackground, true, true); - config->writeEntry("selectForeground", toSave->selectForeground, true, true); - config->writeEntry("selectBackground", toSave->selectBackground, true, true); - config->writeEntry("buttonForeground", toSave->buttonForeground, true, true); - config->writeEntry("buttonBackground", toSave->buttonBackground, true, true); - config->writeEntry("linkColor", toSave->linkColor, true, true); - config->writeEntry("visitedLinkColor", toSave->visitedLinkColor, true, true); - - // set to the WM group, *only* the TDEGlobal one, a kcsrc file only has the group "Color Scheme" hmpf... - config->setGroup( "WM" ); - config->writeEntry("activeForeground", toSave->activeForeground, true, true); - config->writeEntry("inactiveForeground", toSave->inactiveForeground, true, true); - config->writeEntry("activeBackground", toSave->activeBackground, true, true); - config->writeEntry("inactiveBackground", toSave->inactiveBackground, true, true); - config->writeEntry("activeBlend", toSave->activeBlend, true, true); - config->writeEntry("inactiveBlend", toSave->inactiveBlend, true, true); - config->writeEntry("activeTitleBtnBg", toSave->activeTitleBtnBg, true, true); - config->writeEntry("inactiveTitleBtnBg", toSave->inactiveTitleBtnBg, true, true); - config->writeEntry("alternateBackground", toSave->alternateBackground, true, true); - - //////////////////////////////////////////////////// - // KDE-1.x support - KSimpleConfig *tdeconfig = - new KSimpleConfig( TQDir::homeDirPath() + "/.tderc" ); - tdeconfig->setGroup( "General" ); - tdeconfig->writeEntry("background", toSave->background ); - tdeconfig->writeEntry("selectBackground", toSave->selectBackground ); - tdeconfig->writeEntry("foreground", toSave->foreground ); - tdeconfig->writeEntry("windowForeground", toSave->windowForeground ); - tdeconfig->writeEntry("windowBackground", toSave->windowBackground ); - tdeconfig->writeEntry("selectForeground", toSave->selectForeground ); - tdeconfig->sync(); - delete tdeconfig; - - config->setGroup("KDE"); - // write the color scheme filename and the contrast, default 7, otherwise from file - config->writeEntry("colorScheme", toSave->colorFile,true, true); - config->writeEntry("contrast", toSave->contrast, true, true); - config->sync(); - - // background color changes - TDEConfig kdesktop("kdesktoprc"); - kdesktop.setGroup("Desktop0"); // we only need to set one desktop - - kdesktop.writeEntry("BackgroundMode", toSave->bgMode); - kdesktop.writeEntry("Color1", toSave->usrCol1); - kdesktop.writeEntry("Color2", toSave->usrCol2); - kdesktop.sync(); - kdDebug() << "TDEStylePage::saveColors(): colorFile: " << toSave->colorFile << endl; -} - -/** save the icon-theme*/ -void TDEStylePage::saveIcons(bool curSettings) { - TQString theme = origIcons; - if (curSettings) { - if ( (kde->isSelected() || platinum->isSelected() || keramik->isSelected()) - && icon_crystalsvg_exist) - theme = "crystalsvg"; - else if ( (classic->isSelected() || cde->isSelected() || win->isSelected()) - && (TQColor::numBitPlanes() > 8) && icon_kdeclassic_exist) - theme = "kdeclassic"; - else if ( (classic->isSelected() || cde->isSelected() || win->isSelected()) - && (TQColor::numBitPlanes() <= 8) && icon_Locolor_exist) - theme = "Locolor"; - } - // save, what we got - TDEGlobal::config()->setGroup("Icons"); - TDEGlobal::config()->writeEntry("Theme", theme, true, true); - TDEIconTheme icontheme(theme); - const char * const groups[] = { "Desktop", "Toolbar", "MainToolbar", "Small", 0L }; - for (TDEIcon::Group i=TDEIcon::FirstGroup; isetGroup(TQString::fromLatin1(groups[i]) + "Icons"); - TDEGlobal::config()->writeEntry("Size", icontheme.defaultSize(i)); - } - TDEGlobal::config()->sync(); - kdDebug() << "TDEStylePage::saveIcons(): " << theme << endl; -} - -/** called whenever the selection in the listview changes */ -void TDEStylePage::slotCurrentChanged() { - // fill the currentColors-struct with the selected color-scheme - getColors(¤tColors, true); - // fill the currentStyle-string with the selected style-name - changeCurrentStyle(); - switchPrevStyle(); -} - -void TDEStylePage::changeCurrentStyle() { - // set the style - if (cde->isSelected() && cde_exist) { - currentStyle="Motif"; - } - else if (win->isSelected() && win_exist) { - currentStyle="Windows"; - } - else if (platinum->isSelected() && platinum_exist) { - currentStyle="Platinum"; - } - else if (keramik->isSelected() && kde_plastik_exist) { - currentStyle="Keramik"; - } - else if (classic->isSelected()) { - // Use the highcolor style if the display supports it - if ( (TQColor::numBitPlanes() > 8) && kde_hc_exist ) { - currentStyle="HighColor"; - } - else if (kde_def_exist) { - currentStyle="Default"; - } - } - else if (kde->isSelected()) { - // Use the plastik style if the display supports it - if ( (TQColor::numBitPlanes() > 8) && kde_plastik_exist ) { - currentStyle="Plastik"; - } - else if (kde_light_exist) { - currentStyle="Light, 3rd revision"; - } - // We should never get here - else if (kde_def_exist) { - currentStyle="Default"; - } - } - // update the preview-widget - kdDebug() << "TDEStylePage::changeCurrentStyle(): "<< currentStyle << endl; -} - -/** to be connected to the OS page. Catches - * either KDE, CDE, win or mac and pre-sets the style. - */ -void TDEStylePage::presetStyle(const TQString& style){ - kdDebug() << "TDEStylePage::presetStyle(): "<< style << endl; - if(style=="KDE") { - if (kde_plastik_exist) - klv_styles->setSelected(kde,true); - else if (kde_hc_exist || kde_def_exist) - klv_styles->setSelected(classic,true); - } - else if(style=="CDE" && cde_exist) - klv_styles->setSelected(cde,true); - else if(style=="win" && win_exist) - klv_styles->setSelected(win,true); - else if(style=="mac") { - klv_styles->setSelected(platinum,true); - } -} - -/** set the defaults for this page */ -void TDEStylePage::setDefaults(){ -} - -/** Fill a colorSet with a colorfile, or the default. */ -void TDEStylePage::getColors(colorSet *set, bool colorfile ){ - TDEConfig* config; - bool deleteConfig = false; - // get the color scheme file and go to the color scheme group - if(colorfile){ - TDEGlobal::dirs()->addResourceType("colors", TDEStandardDirs::kde_default("data")+"tdedisplay/color-schemes"); - // set the style - if (kde->isSelected()) { - set->bgMode="Flat"; - set->usrCol1.setNamedColor("#003082"); - set->usrCol2.setNamedColor("#6C8BB9"); - set->colorFile=""; - } - else if(classic->isSelected()){ - set->bgMode="VerticalGradient"; - set->usrCol1.setNamedColor ("#1E72A0"); - set->usrCol2.setNamedColor ("#C0C0C0"); - set->colorFile=locate("colors", "KDETwo.kcsrc"); - } - else if(keramik->isSelected()){ - set->bgMode="VerticalGradient"; - set->usrCol1.setNamedColor ("#1E72A0"); - set->usrCol2.setNamedColor ("#C0C0C0"); - set->colorFile=locate("colors","Keramik.kcsrc"); - } - else if(cde->isSelected()){ - set->bgMode="Flat"; - set->usrCol1.setNamedColor("#718BA5"); - set->usrCol2.setNamedColor ("#C0C0C0"); - set->colorFile=locate("colors","SolarisCDE.kcsrc"); - } - else if(win->isSelected()){ - set->bgMode="Flat"; - set->usrCol1.setNamedColor("#008183"); - set->usrCol2.setNamedColor ("#C0C0C0"); - set->colorFile=locate("colors","Windows2000.kcsrc"); - } - else if(platinum->isSelected()){ - set->bgMode="VerticalGradient"; - set->usrCol1.setNamedColor("#2A569D"); - set->usrCol2.setNamedColor("#6C8BB9"); - set->colorFile=locate("colors","EveX.kcsrc"); - } - set->contrast=7; - config = new KSimpleConfig(set->colorFile, true); - config->setGroup("Color Scheme"); - kdDebug() << "TDEStylePage::getColors(): schemefile: " << set->colorFile << endl; - deleteConfig = true; - } - else { - TDEConfig kdesktop("kdesktoprc"); - kdesktop.setGroup("Desktop0"); - // set Background (userSettings if available, else default) - set->bgMode=kdesktop.readEntry("BackgroundMode", "Flat"); - TQColor tmp1("#003082"); - TQColor tmp2("#C0C0C0"); - set->usrCol1=kdesktop.readColorEntry("Color1", &tmp1); - set->usrCol2=kdesktop.readColorEntry("Color2", &tmp2); - // write the color scheme filename and the contrast, default 7, otherwise from file - config=TDEGlobal::config(); - config->setGroup("KDE"); - set->colorFile=config->readEntry("colorScheme", ""); - set->contrast=config->readNumEntry("contrast", 7); - config->setGroup( "General" ); - kdDebug() << "TDEStylePage::getColors(): schemefile: "<< set->colorFile << endl; - } - set->foreground=config->readColorEntry( "foreground", &black ); - set->background=config->readColorEntry( "background", &widget ); - set->windowForeground=config->readColorEntry( "windowForeground", &black ); - set->windowBackground=config->readColorEntry( "windowBackground", &white ); - set->selectForeground=config->readColorEntry( "selectForeground", &white ); - set->selectBackground=config->readColorEntry( "selectBackground", &trinity4Blue ); - set->buttonForeground=config->readColorEntry( "buttonForeground", &black ); - set->buttonBackground=config->readColorEntry( "buttonBackground", &button ); - set->linkColor=config->readColorEntry( "linkColor", &link ); - set->visitedLinkColor=config->readColorEntry( "visitedLinkColor", &visitedLink ); - // it's necessary to set the group, when reading from globalrc - if(!colorfile) - config->setGroup( "WM" ); - set->activeForeground=config->readColorEntry("activeForeground", &white); - set->inactiveForeground=config->readColorEntry("inactiveForeground", &inactiveForeground); - set->activeBackground=config->readColorEntry("activeBackground", &activeBackground); - set->inactiveBackground=config->readColorEntry("inactiveBackground", &inactiveBackground); - set->activeBlend=config->readColorEntry("activeBlend", &activeBlend); - set->inactiveBlend=config->readColorEntry("inactiveBlend", &inactiveBackground); - set->activeTitleBtnBg=config->readColorEntry("activeTitleBtnBg", &activeTitleBtnBg); - set->inactiveTitleBtnBg=config->readColorEntry("inactiveTitleBtnBg", &inactiveTitleBtnBg); - set->alternateBackground=config->readColorEntry("alternateBackground", &alternateBackground); - if ( deleteConfig) - delete config; -} - -/** Test widget- and twin- styles for availability */ -void TDEStylePage::getAvailability() { - // test, wich styles are available - kde_keramik_exist = kde_hc_exist = kde_def_exist = cde_exist - = kde_plastik_exist = win_exist = platinum_exist = false; - TQStringList styles = TQStyleFactory::keys(); - for (TQStringList::iterator it = styles.begin(); it != styles.end(); it++) { - if (*it == "Keramik") kde_keramik_exist = true; - else if (*it == "HighColor") kde_hc_exist = true; - else if (*it == "Default") kde_def_exist = true; - else if (*it == "Plastik") kde_plastik_exist = true; - else if (*it == "Motif") cde_exist = true; - else if (*it == "Windows") win_exist = true; - else if (*it == "Platinum") platinum_exist = true; - else if (*it == "Light, 3rd revision") kde_light_exist = true; - } - // and disable the ListItems, if they are not. - if ( !(kde_plastik_exist || kde_light_exist) ) kde->setVisible(false); - if ( !(kde_hc_exist || kde_def_exist) ) classic->setVisible(false); - if (!kde_keramik_exist || TQPixmap::defaultDepth() <= 8) keramik->setVisible(false); - if (!cde_exist) cde->setVisible(false); - if (!win_exist) win->setVisible(false); - if (!platinum_exist) platinum->setVisible(false); - - // test, wich KWin-styles are available - twin_keramik_exist = twin_system_exist = twin_plastik_exist - = twin_default_exist = twin_win_exist - = twin_cde_exist = twin_quartz_exist = false; - TDEStandardDirs* kstd = TDEGlobal::dirs(); - if (!kstd->findResource("data", "twin/keramik.desktop").isNull()) - twin_keramik_exist = true; - if (!kstd->findResource("data", "twin/plastik.desktop").isNull()) - twin_plastik_exist = true; - if (!kstd->findResource("data", "twin/system.desktop").isNull()) - twin_system_exist = true; - if (!kstd->findResource("data", "twin/redmond.desktop").isNull()) - twin_win_exist = true; - if (!kstd->findResource("data", "twin/cde.desktop").isNull()) - twin_cde_exist = true; - if (!kstd->findResource("data", "twin/quartz.desktop").isNull()) - twin_quartz_exist = true; - twin_default_exist = true; // we can't check for a .desktop-file for the old default because there is none - - // check, wich Icon-themes are available - icon_crystalsvg_exist = icon_kdeclassic_exist = icon_Locolor_exist = false; - TQStringList icons(TDEIconTheme::list()); - for (TQStringList::iterator it=icons.begin(); it != icons.end(); it++) { - TDEIconTheme icontheme(*it); - if (icontheme.isHidden() || !icontheme.isValid()) continue; - if (*it == "crystalsvg") icon_crystalsvg_exist = true; - else if (*it == "kdeclassic") icon_kdeclassic_exist = true; - else if (*it == "Locolor") icon_Locolor_exist = true; - } -} - -/** get the user's former settings */ -void TDEStylePage::getUserDefaults() { - // Get the user's current widget-style - TDEGlobal::config()->setGroup("General"); - origStyle = TDEGlobal::config()->readEntry( "widgetStyle", TDEStyle::defaultStyle() ); - - // get the user's current KWin-style - ctwin = new TDEConfig("twinrc"); - ctwin->setGroup("Style"); - origKWinStyle = ctwin->readEntry("PluginLib", defaultKWinStyle); - - // get the users current colors - getColors(&usrColors, false); - - // Get the user's current iconset - TDEGlobal::config()->setGroup("Icons"); - origIcons = TDEGlobal::config()->readEntry("Theme"); - - kdDebug() << "TDEStylePage::getUserDefaults(): style: " << origStyle << endl; - kdDebug() << "TDEStylePage::getUserDefaults(): KWinStyle: " << origKWinStyle << endl; - kdDebug() << "TDEStylePage::getUserDefaults(): Colors: " << usrColors.colorFile << endl; - kdDebug() << "TDEStylePage::getUserDefaults(): Icons: " << origIcons << endl; -} - -/** initialize KDE default color values */ -void TDEStylePage::initColors() { - widget.setRgb(239, 239, 239); - trinity4Blue.setRgb(103,141,178); - inactiveBackground.setRgb(157,170,186); - activeBackground.setRgb(65,142,220); - inactiveForeground.setRgb(221,221,221); - activeBlend.setRgb(107,145,184); - activeTitleBtnBg.setRgb(127,158,200); - inactiveTitleBtnBg.setRgb(167,181,199); - alternateBackground.setRgb(237,244,249); - - if (TQPixmap::defaultDepth() > 8) - button.setRgb(221, 223, 228); - else - button.setRgb(220, 220, 220); - - link.setRgb(0, 0, 238); - visitedLink.setRgb(82, 24, 139); -} - -/** live-update the system */ -void TDEStylePage::liveUpdate() { - // tell all apps about the changed icons - for (int i=0; idcopClient()->send("twin*", "", "reconfigure()", TQString("")); - // kdesktop-background - kapp->dcopClient()->send("kdesktop", "KBackgroundIface", "configure()", TQString("")); -} - -/** show the previewWidget styled with the selected one */ -void TDEStylePage::switchPrevStyle() { - TQStyle* style = TQStyleFactory::create(currentStyle); - if (!style) return; - - stylePreview->unsetPalette(); - TQPalette palette = createPalette(); - style->polish(palette); - stylePreview->setPalette(palette); - - // Prevent Qt from wrongly caching radio button images - TQPixmapCache::clear(); - // go ahead - setStyleRecursive( stylePreview, palette, style ); - // this flickers, but reliably draws the widgets corretly. - stylePreview->resize( stylePreview->sizeHint() ); - - delete appliedStyle; - appliedStyle = style; -} - -void TDEStylePage::setStyleRecursive(TQWidget* w, TQPalette &palette, TQStyle* s) { - // Apply the new style. - w->setStyle(s); - // Recursively update all children. - const TQObjectList children = w->childrenListObject(); - if (children.isEmpty()) - return; - // Apply the style to each child widget. - TQPtrListIterator childit(children); - TQObject *child; - while ((child = childit.current()) != 0) { - ++childit; - if (child->isWidgetType()) - setStyleRecursive((TQWidget *) child, palette, s); - } -} - -/** create a TQPalette of our current colorset */ -TQPalette TDEStylePage::createPalette() { - colorSet *cc = ¤tColors; - TQColorGroup disabledgrp(cc->windowForeground, cc->background, cc->background.light(150), - cc->background.dark(), cc->background.dark(120), cc->background.dark(120), - cc->windowBackground); - TQColorGroup colgrp(cc->windowForeground, cc->background, cc->background.light(150), - cc->background.dark(), cc->background.dark(120), cc->foreground, - cc->windowBackground); - colgrp.setColor(TQColorGroup::Highlight, cc->selectBackground); - colgrp.setColor(TQColorGroup::HighlightedText, cc->selectForeground); - colgrp.setColor(TQColorGroup::Button, cc->buttonBackground); - colgrp.setColor(TQColorGroup::ButtonText, cc->buttonForeground); - return TQPalette( colgrp, disabledgrp, colgrp); -} - -#include "kstylepage.moc" diff --git a/kpersonalizer/kstylepage.h b/kpersonalizer/kstylepage.h deleted file mode 100644 index 7a31e26cf..000000000 --- a/kpersonalizer/kstylepage.h +++ /dev/null @@ -1,128 +0,0 @@ -/*************************************************************************** - kstylepage.h - description - ------------------- - begin : Tue May 22 2001 - copyright : (C) 2001 by Ralf Nolden - email : nolden@kde.org - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef KSTYLEPAGE_H -#define KSTYLEPAGE_H - -#include -#include "kstylepagedlg.h" - -/**Abstract class for the style page - *@author Ralf Nolden - */ -class TQListViewItem; - -class TDEStylePage : public TDEStylePageDlg { - Q_OBJECT - -public: - TDEStylePage(TQWidget *parent=0, const char *name=0); - ~TDEStylePage(); - void save(bool curSettings=true); - /** resets to KDE style as default */ - void setDefaults(); - /** set the preview-widgets' style to the currently selected */ - void switchPrevStyle(); - -private: - TQString origStyle; - TQString origKWinStyle; - TQString origIcons; - TQString defaultKWinStyle; - TQString currentStyle; - TDEConfig* ctwin; - struct colorSet { - TQString colorFile, bgMode; - int contrast; - TQColor usrCol1, usrCol2; - TQColor foreground; - TQColor background; - TQColor windowForeground; - TQColor windowBackground; - TQColor selectForeground; - TQColor selectBackground; - TQColor buttonForeground; - TQColor buttonBackground; - TQColor linkColor; - TQColor visitedLinkColor; - TQColor activeForeground; - TQColor inactiveForeground; - TQColor activeBackground; - TQColor inactiveBackground; - TQColor activeBlend; - TQColor inactiveBlend; - TQColor activeTitleBtnBg; - TQColor inactiveTitleBtnBg; - TQColor alternateBackground; - } usrColors, currentColors; - // first, the KDE 2 default color values - TQColor widget; - TQColor trinity4Blue; - TQColor inactiveBackground; - TQColor activeBackground; - TQColor button; - TQColor link; - TQColor visitedLink; - TQColor activeBlend; - TQColor activeTitleBtnBg; - TQColor inactiveTitleBtnBg; - TQColor inactiveForeground; - TQColor alternateBackground; - - TQListViewItem * kde; - TQListViewItem * classic; - TQListViewItem * keramik; - TQListViewItem * cde; - TQListViewItem * win; - TQListViewItem * platinum; - - TQStyle *appliedStyle; - - // widget-style existence - bool kde_hc_exist, kde_def_exist, kde_keramik_exist, kde_light_exist, - cde_exist, win_exist, platinum_exist, kde_plastik_exist; - - // twin-style-existence - bool twin_keramik_exist, twin_default_exist, twin_system_exist, - twin_win_exist, twin_cde_exist, twin_quartz_exist, twin_plastik_exist; - - // icon-theme-existence - bool icon_crystalsvg_exist, icon_kdeclassic_exist, icon_Locolor_exist; - -public slots: // Public slots - /** to be connected to the OS page. Catches either KDE, CDE, win or mac and pre-sets the style. */ - void presetStyle(const TQString& style); - -private: - void saveColors(bool curSettings=true); - void saveStyle(bool curSettings=true); - void saveKWin(bool curSettings=true); - void saveIcons(bool curSettings=true); - void getAvailability(); - void getUserDefaults(); - void initColors(); - void liveUpdate(); - void getColors(colorSet *set, bool colorfile ); - void setStyleRecursive(TQWidget* w, TQPalette &, TQStyle* s); - void changeCurrentStyle(); - TQPalette createPalette(); - -private slots: - void slotCurrentChanged(); -}; - -#endif diff --git a/kpersonalizer/kstylepagedlg.ui b/kpersonalizer/kstylepagedlg.ui deleted file mode 100644 index 65570e542..000000000 --- a/kpersonalizer/kstylepagedlg.ui +++ /dev/null @@ -1,127 +0,0 @@ - -TDEStylePageDlg - - - TDEStylePageDlg - - - - 0 - 0 - 482 - 452 - - - - - unnamed - - - - TextLabel7 - - - - 1 - 1 - 0 - 0 - - - - Please choose the way your computer should look by selecting one of the items below. - - - WordBreak|AlignVCenter|AlignLeft - - - - - - - px_stylesSidebar - - - - 0 - 0 - 0 - 0 - - - - - 170 - 430 - - - - Panel - - - Sunken - - - true - - - 0 - - - - - stylePreview - - - - 1 - 1 - 0 - 0 - - - - - - TextLabel2 - - - Preview - - - - - klv_styles - - - - - - - StylePreview -
stylepreview.h
- - -1 - -1 - - 0 - - 5 - 5 - 0 - 0 - - image0 -
-
- - - 789c6dd7594f23471007f0f7fd14d6d6db2aaaf58c3db647511eb831b7317794879ac30760cc61c010e5bba7dcf5af5688167664fdb66bbaababbb67cccf1f8dab93c3c68f9fdf5e16b298968d7222cf8d1fd5eb6cf6f1e75f7ffcfded7b9a3656ff9aad46fafdb76fdf078b46d9389a3fd42bf04841699e964933b830b79a7019dd0b96955b895b5a703bcd572e08eea576ff6570ae0eedd477b792103f854b8b2fc6d1163f77237e646e37113f89b6f8307e3bf1785a8b0eedbc696eb7ad9db7e01ee6476ee4ffe0c6fd158c7c69182cde4eec6e87fea50dfbf8176e6ba7d07f96669999cfa325ccaf862bcc97a36dbccf60f178cee11cde706761f16917ae30fe6b7488a7851bf14d7327417f676eb4f756eea41e2f57e6d83e83919f6cba117f04235fd9765b3b0fa36dfc398cf973edc67a6fb951ffe768ab6765ee26b8dff213ef5f4630e2b9e7463ea7ee8ee5ff60ee2618af8eb6fe3238437eb91bf1299cdbfacad3cadd5617f5a11738c7fe4adcb8ffd68d7aeec15e8fc3683b9f62ee2518ef33dafa3f75e3bc957086f86eb4d56f3db8e8e6dd56f01a5cc1bbe65e629673d8ebd18d0efdc9058cf9f2c08df9e630ce037db8719ec37c7a9a7fb708f10267b65e7cef46fb3e9ca3fd23dad6ef0cf67abe99f304f95ec3a8871cbb71be52d8d777e8b6fee412f6f958be3adf5ea817b561afe7d86ded7c67ce13c46fc37ede2766c17a17059cd9f38e466e8c3f8eb6fd700f0b9ef7095c37cd3d37de178f2be76dcf876fa343bd790267f012f67a77cc319f69b4ed872e2ca8e732daeabfe3c6fa9cc235f21f9b8bd4f2a5cd687bfedbfd659ee7ede017b842becf6eb44fa3cbd0df8559b0ffe808ceb0ff37e01afba3652e52cc87a26dbe276ecca7097790ff73b4cdef0616ac4fdf6df1c2d1d67ee8c6f80318eb4bd1180ff529513f0ecf7b694b62f5a002ceccb2662e523c2fb7605f9f0fd8fbbf75e3bc2dcd3e9ebcb9f17ce8c05e8f83685bcf701e44eb2db65e4fd1b65eebe62245be53b8c6f3ffdd8dfd3933fbf884761f5f0edcd88f951bf118bf44bde926dae24fe01ae7af76e3f9169e2f45bb143c0f5fdcf6fea23b18f773eac6f3e63ddac6db75e37df5e8c6fbae65aebcde6d37beaf84f528aa52f03c9dc3359ea79939c627d136deab1befaf75b883ef23e76e3ccfaea36d7dc2f795322b05ebfb0ad738af7db7ad371f99fd7e59b8b13f276e9cdf1318f5e54337e6d78cb67cf761ec170efba1acaa1afd9db92d3f3a36d729ea77efc6f33cbccf2beddfe6478fe6d85e45dbfd851bf1577007f5d877e3bc86f5a9ea3a2d6cffdfc1debe116df5db73a39e37b0e777191dda257c7fa83b6e8a2eaae00eeceb13d6b7d69f325b79b058fd32b170c1a55ebffaac2ccae2b9e6118f79c253bd6ef9ee3fd7587fef79c60f7acf3cc617fcc84ffcac6d8ffcc20b7ee5377ee7257ff027aff1bac66ff0269716cf5b1ab7cd3bbcabb17ddee37d3ee0433ee2633ee1019ff290cff89c2ff89229c48b66f1ac3d5df135df7093134eb9c56dcef4b3c35dee71ce393111dbfa8c784a4205955451cd1d1ad1982634a55bbad3f80eddd38c1ef882e66cf52ab5ff2b8d7ea4277aa6175ad06bb866f446efb4d4df0ffad4fed762ffb7b44e1b9cd2266dd142c75e5ddb3cd0bb3e347a477bd9d5f83ee245e3f7689f0ee830f67d44c77412ee186946033aa5e197fecfe85c7bf7be2fe892aee89a6ea84989f6bfa434f4eff9df52c509b5d0779b32ea684d13ea528f728d1e882ebfce37f6cf077422b4ea5b440ad14af1a15452ab473aee52c65ff39789b64fe955f44eb9937b5d858c5b32d377c0c32a7fee7ecd5fe61aff284ff22c2fb290577993775db1443fb53ef2219f5ff2bf93356d5b970dd9d41eb77820dbb223bbab155ed55ffab2f725ffb1eccb81aed6931cca116ab490633909d10339fd5ffdef795d869ae7923bc27226e772415d5986b51d683663b9d4fcfbb1ff190fe54aaec35aeaa577ee20f24673e94b531249a585fc2b69ebfe3ed7dae91f75ba964b5c03e9d344ba1add93bce0826c3f87f3b2a9fb6f18aeba10ba2f563f25eb1b563771a5d17531e2513c5fba538b3111cd690dd73c7ef6a95f4c8aa99de12fe77da4951de9ffffea730be7fd9fdfbffd0b690edc6c - - - - tdelistview.h - kdialog.h - - -
diff --git a/kpersonalizer/tdestylepage.cpp b/kpersonalizer/tdestylepage.cpp new file mode 100644 index 000000000..4995460cb --- /dev/null +++ b/kpersonalizer/tdestylepage.cpp @@ -0,0 +1,584 @@ +/*************************************************************************** + tdestylepage.cpp - description + ------------------- + begin : Tue May 22 2001 + copyright : (C) 2001 by Ralf Nolden + email : nolden@kde.org + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "stylepreview.h" +#include "tdestylepage.h" + +TDEStylePage::TDEStylePage(TQWidget *parent, const char *name ) : TDEStylePageDlg(parent,name) { + + px_stylesSidebar->setPixmap(UserIcon("step4.png")); + + klv_styles->addColumn(i18n("Style")); + klv_styles->addColumn( i18n( "Description" ) ); + klv_styles->setAllColumnsShowFocus(true); + + kde = new TQListViewItem( klv_styles); + kde->setText( 0, TQPixmap::defaultDepth() > 8 ? i18n( "Plastik" ) : i18n( "Light" ) ); + kde->setText( 1, i18n( "TDE default style" ) ); + + classic = new TQListViewItem( klv_styles); + classic->setText( 0, i18n( "KDE Classic" ) ); + classic->setText( 1, i18n( "Classic KDE style" ) ); + + keramik = new TQListViewItem( klv_styles ); + keramik->setText( 0, i18n( "Keramik" ) ); + keramik->setText( 1, i18n( "The previous default style" ) ); + + cde = new TQListViewItem( klv_styles); + cde->setText( 0, i18n( "Sunshine" ) ); + cde->setText( 1, i18n( "A very common desktop" ) ); + + win = new TQListViewItem( klv_styles ); + win->setText( 0, i18n( "Redmond" ) ); + win->setText( 1, i18n( "A style from the northwest of the USA" ) ); + + platinum = new TQListViewItem( klv_styles ); + platinum->setText( 0, i18n( "Platinum" ) ); + platinum->setText( 1, i18n( "The platinum style" ) ); + + connect(klv_styles, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotCurrentChanged())); + + // Note: if the default is changed here it needs to be changed in tdebase/twin/plugins.cpp + // and tdebase/twin/kcmtwin/twindecoration/twindecoration.cpp as well. + defaultKWinStyle = TQPixmap::defaultDepth() > 8 ? "twin_plastik" : "twin_quartz"; + appliedStyle = NULL; + + getAvailability(); + getUserDefaults(); + initColors(); +} + +TDEStylePage::~TDEStylePage(){ + delete ctwin; + delete appliedStyle; +} + +void TDEStylePage::save(bool curSettings){ + kdDebug() << "TDEStylePage::save()" << endl; + // First, the style, then the colors as styles overwrite color settings + saveStyle(curSettings); + saveColors(curSettings); + saveKWin(curSettings); + saveIcons(curSettings); + liveUpdate(); +} + +/** save the widget-style */ +void TDEStylePage::saveStyle(bool curSettings){ + TQString style = curSettings ? currentStyle : origStyle; + TDEConfig cfg( "kdeglobals" ); + cfg.setGroup("General"); + cfg.writeEntry( "widgetStyle", style, true, true ); + cfg.sync(); + kdDebug() << "TDEStylePage::saveStyle(): " << style << endl; +} + +/** save the KWin-style*/ +void TDEStylePage::saveKWin(bool curSettings){ + TQString twin = origKWinStyle; + if(curSettings) { + KDesktopFile* kdf = 0L; + TDEStandardDirs* kstd = TDEGlobal::dirs(); + if (cde->isSelected() && twin_cde_exist) + kdf = new KDesktopFile(kstd->findResource("data", "twin/cde.desktop")); + else if (win->isSelected() && twin_win_exist) + kdf = new KDesktopFile(kstd->findResource("data", "twin/redmond.desktop")); + else if (platinum->isSelected() && twin_system_exist) + kdf = new KDesktopFile(kstd->findResource("data", "twin/system.desktop")); + else if (keramik->isSelected() && twin_keramik_exist) + kdf = new KDesktopFile(kstd->findResource("data", "twin/keramik.desktop")); + else if (kde->isSelected()) { + if (twin_plastik_exist && (TQColor::numBitPlanes() > 8)) + kdf = new KDesktopFile(kstd->findResource("data", "twin/plastik.desktop")); + else if (twin_quartz_exist) + kdf = new KDesktopFile(kstd->findResource("data", "twin/quartz.desktop")); + } + + if (kdf) { + kdf->setGroup("Desktop Entry"); + twin = kdf->readEntry("X-TDE-Library", defaultKWinStyle); + delete kdf; + } + else { + // if we get here classic is selected (there's no .desktop file for the + // kde2 twin style), or none of the other twin styles were found. + twin = "twin_default"; + } + } + ctwin->writeEntry("PluginLib", twin); + ctwin->sync(); + kdDebug() << "TDEStylePage::saveKWin(): " << twin << endl; +} + +/** Save the color-scheme */ +void TDEStylePage::saveColors(bool curSettings){ + struct colorSet* toSave; + if(curSettings) + toSave=¤tColors; // set the color struct to save as the style colors + else + toSave=&usrColors; + + // the GLOBAL config entries must be taken from the kcsrc file and written to it. Use the default values + // equals that the file is which is no file. TODO: use the default values in that case (kde selected) + TDEConfig *config = TDEGlobal::config(); + config->setGroup( "General" ); + config->writeEntry("foreground", toSave->foreground, true, true); + config->writeEntry("background", toSave->background, true, true); + config->writeEntry("windowForeground", toSave->windowForeground, true, true); + config->writeEntry("windowBackground", toSave->windowBackground, true, true); + config->writeEntry("selectForeground", toSave->selectForeground, true, true); + config->writeEntry("selectBackground", toSave->selectBackground, true, true); + config->writeEntry("buttonForeground", toSave->buttonForeground, true, true); + config->writeEntry("buttonBackground", toSave->buttonBackground, true, true); + config->writeEntry("linkColor", toSave->linkColor, true, true); + config->writeEntry("visitedLinkColor", toSave->visitedLinkColor, true, true); + + // set to the WM group, *only* the TDEGlobal one, a kcsrc file only has the group "Color Scheme" hmpf... + config->setGroup( "WM" ); + config->writeEntry("activeForeground", toSave->activeForeground, true, true); + config->writeEntry("inactiveForeground", toSave->inactiveForeground, true, true); + config->writeEntry("activeBackground", toSave->activeBackground, true, true); + config->writeEntry("inactiveBackground", toSave->inactiveBackground, true, true); + config->writeEntry("activeBlend", toSave->activeBlend, true, true); + config->writeEntry("inactiveBlend", toSave->inactiveBlend, true, true); + config->writeEntry("activeTitleBtnBg", toSave->activeTitleBtnBg, true, true); + config->writeEntry("inactiveTitleBtnBg", toSave->inactiveTitleBtnBg, true, true); + config->writeEntry("alternateBackground", toSave->alternateBackground, true, true); + + //////////////////////////////////////////////////// + // KDE-1.x support + KSimpleConfig *tdeconfig = + new KSimpleConfig( TQDir::homeDirPath() + "/.tderc" ); + tdeconfig->setGroup( "General" ); + tdeconfig->writeEntry("background", toSave->background ); + tdeconfig->writeEntry("selectBackground", toSave->selectBackground ); + tdeconfig->writeEntry("foreground", toSave->foreground ); + tdeconfig->writeEntry("windowForeground", toSave->windowForeground ); + tdeconfig->writeEntry("windowBackground", toSave->windowBackground ); + tdeconfig->writeEntry("selectForeground", toSave->selectForeground ); + tdeconfig->sync(); + delete tdeconfig; + + config->setGroup("KDE"); + // write the color scheme filename and the contrast, default 7, otherwise from file + config->writeEntry("colorScheme", toSave->colorFile,true, true); + config->writeEntry("contrast", toSave->contrast, true, true); + config->sync(); + + // background color changes + TDEConfig kdesktop("kdesktoprc"); + kdesktop.setGroup("Desktop0"); // we only need to set one desktop + + kdesktop.writeEntry("BackgroundMode", toSave->bgMode); + kdesktop.writeEntry("Color1", toSave->usrCol1); + kdesktop.writeEntry("Color2", toSave->usrCol2); + kdesktop.sync(); + kdDebug() << "TDEStylePage::saveColors(): colorFile: " << toSave->colorFile << endl; +} + +/** save the icon-theme*/ +void TDEStylePage::saveIcons(bool curSettings) { + TQString theme = origIcons; + if (curSettings) { + if ( (kde->isSelected() || platinum->isSelected() || keramik->isSelected()) + && icon_crystalsvg_exist) + theme = "crystalsvg"; + else if ( (classic->isSelected() || cde->isSelected() || win->isSelected()) + && (TQColor::numBitPlanes() > 8) && icon_kdeclassic_exist) + theme = "kdeclassic"; + else if ( (classic->isSelected() || cde->isSelected() || win->isSelected()) + && (TQColor::numBitPlanes() <= 8) && icon_Locolor_exist) + theme = "Locolor"; + } + // save, what we got + TDEGlobal::config()->setGroup("Icons"); + TDEGlobal::config()->writeEntry("Theme", theme, true, true); + TDEIconTheme icontheme(theme); + const char * const groups[] = { "Desktop", "Toolbar", "MainToolbar", "Small", 0L }; + for (TDEIcon::Group i=TDEIcon::FirstGroup; isetGroup(TQString::fromLatin1(groups[i]) + "Icons"); + TDEGlobal::config()->writeEntry("Size", icontheme.defaultSize(i)); + } + TDEGlobal::config()->sync(); + kdDebug() << "TDEStylePage::saveIcons(): " << theme << endl; +} + +/** called whenever the selection in the listview changes */ +void TDEStylePage::slotCurrentChanged() { + // fill the currentColors-struct with the selected color-scheme + getColors(¤tColors, true); + // fill the currentStyle-string with the selected style-name + changeCurrentStyle(); + switchPrevStyle(); +} + +void TDEStylePage::changeCurrentStyle() { + // set the style + if (cde->isSelected() && cde_exist) { + currentStyle="Motif"; + } + else if (win->isSelected() && win_exist) { + currentStyle="Windows"; + } + else if (platinum->isSelected() && platinum_exist) { + currentStyle="Platinum"; + } + else if (keramik->isSelected() && kde_plastik_exist) { + currentStyle="Keramik"; + } + else if (classic->isSelected()) { + // Use the highcolor style if the display supports it + if ( (TQColor::numBitPlanes() > 8) && kde_hc_exist ) { + currentStyle="HighColor"; + } + else if (kde_def_exist) { + currentStyle="Default"; + } + } + else if (kde->isSelected()) { + // Use the plastik style if the display supports it + if ( (TQColor::numBitPlanes() > 8) && kde_plastik_exist ) { + currentStyle="Plastik"; + } + else if (kde_light_exist) { + currentStyle="Light, 3rd revision"; + } + // We should never get here + else if (kde_def_exist) { + currentStyle="Default"; + } + } + // update the preview-widget + kdDebug() << "TDEStylePage::changeCurrentStyle(): "<< currentStyle << endl; +} + +/** to be connected to the OS page. Catches + * either KDE, CDE, win or mac and pre-sets the style. + */ +void TDEStylePage::presetStyle(const TQString& style){ + kdDebug() << "TDEStylePage::presetStyle(): "<< style << endl; + if(style=="KDE") { + if (kde_plastik_exist) + klv_styles->setSelected(kde,true); + else if (kde_hc_exist || kde_def_exist) + klv_styles->setSelected(classic,true); + } + else if(style=="CDE" && cde_exist) + klv_styles->setSelected(cde,true); + else if(style=="win" && win_exist) + klv_styles->setSelected(win,true); + else if(style=="mac") { + klv_styles->setSelected(platinum,true); + } +} + +/** set the defaults for this page */ +void TDEStylePage::setDefaults(){ +} + +/** Fill a colorSet with a colorfile, or the default. */ +void TDEStylePage::getColors(colorSet *set, bool colorfile ){ + TDEConfig* config; + bool deleteConfig = false; + // get the color scheme file and go to the color scheme group + if(colorfile){ + TDEGlobal::dirs()->addResourceType("colors", TDEStandardDirs::kde_default("data")+"tdedisplay/color-schemes"); + // set the style + if (kde->isSelected()) { + set->bgMode="Flat"; + set->usrCol1.setNamedColor("#003082"); + set->usrCol2.setNamedColor("#6C8BB9"); + set->colorFile=""; + } + else if(classic->isSelected()){ + set->bgMode="VerticalGradient"; + set->usrCol1.setNamedColor ("#1E72A0"); + set->usrCol2.setNamedColor ("#C0C0C0"); + set->colorFile=locate("colors", "KDETwo.kcsrc"); + } + else if(keramik->isSelected()){ + set->bgMode="VerticalGradient"; + set->usrCol1.setNamedColor ("#1E72A0"); + set->usrCol2.setNamedColor ("#C0C0C0"); + set->colorFile=locate("colors","Keramik.kcsrc"); + } + else if(cde->isSelected()){ + set->bgMode="Flat"; + set->usrCol1.setNamedColor("#718BA5"); + set->usrCol2.setNamedColor ("#C0C0C0"); + set->colorFile=locate("colors","SolarisCDE.kcsrc"); + } + else if(win->isSelected()){ + set->bgMode="Flat"; + set->usrCol1.setNamedColor("#008183"); + set->usrCol2.setNamedColor ("#C0C0C0"); + set->colorFile=locate("colors","Windows2000.kcsrc"); + } + else if(platinum->isSelected()){ + set->bgMode="VerticalGradient"; + set->usrCol1.setNamedColor("#2A569D"); + set->usrCol2.setNamedColor("#6C8BB9"); + set->colorFile=locate("colors","EveX.kcsrc"); + } + set->contrast=7; + config = new KSimpleConfig(set->colorFile, true); + config->setGroup("Color Scheme"); + kdDebug() << "TDEStylePage::getColors(): schemefile: " << set->colorFile << endl; + deleteConfig = true; + } + else { + TDEConfig kdesktop("kdesktoprc"); + kdesktop.setGroup("Desktop0"); + // set Background (userSettings if available, else default) + set->bgMode=kdesktop.readEntry("BackgroundMode", "Flat"); + TQColor tmp1("#003082"); + TQColor tmp2("#C0C0C0"); + set->usrCol1=kdesktop.readColorEntry("Color1", &tmp1); + set->usrCol2=kdesktop.readColorEntry("Color2", &tmp2); + // write the color scheme filename and the contrast, default 7, otherwise from file + config=TDEGlobal::config(); + config->setGroup("KDE"); + set->colorFile=config->readEntry("colorScheme", ""); + set->contrast=config->readNumEntry("contrast", 7); + config->setGroup( "General" ); + kdDebug() << "TDEStylePage::getColors(): schemefile: "<< set->colorFile << endl; + } + set->foreground=config->readColorEntry( "foreground", &black ); + set->background=config->readColorEntry( "background", &widget ); + set->windowForeground=config->readColorEntry( "windowForeground", &black ); + set->windowBackground=config->readColorEntry( "windowBackground", &white ); + set->selectForeground=config->readColorEntry( "selectForeground", &white ); + set->selectBackground=config->readColorEntry( "selectBackground", &trinity4Blue ); + set->buttonForeground=config->readColorEntry( "buttonForeground", &black ); + set->buttonBackground=config->readColorEntry( "buttonBackground", &button ); + set->linkColor=config->readColorEntry( "linkColor", &link ); + set->visitedLinkColor=config->readColorEntry( "visitedLinkColor", &visitedLink ); + // it's necessary to set the group, when reading from globalrc + if(!colorfile) + config->setGroup( "WM" ); + set->activeForeground=config->readColorEntry("activeForeground", &white); + set->inactiveForeground=config->readColorEntry("inactiveForeground", &inactiveForeground); + set->activeBackground=config->readColorEntry("activeBackground", &activeBackground); + set->inactiveBackground=config->readColorEntry("inactiveBackground", &inactiveBackground); + set->activeBlend=config->readColorEntry("activeBlend", &activeBlend); + set->inactiveBlend=config->readColorEntry("inactiveBlend", &inactiveBackground); + set->activeTitleBtnBg=config->readColorEntry("activeTitleBtnBg", &activeTitleBtnBg); + set->inactiveTitleBtnBg=config->readColorEntry("inactiveTitleBtnBg", &inactiveTitleBtnBg); + set->alternateBackground=config->readColorEntry("alternateBackground", &alternateBackground); + if ( deleteConfig) + delete config; +} + +/** Test widget- and twin- styles for availability */ +void TDEStylePage::getAvailability() { + // test, wich styles are available + kde_keramik_exist = kde_hc_exist = kde_def_exist = cde_exist + = kde_plastik_exist = win_exist = platinum_exist = false; + TQStringList styles = TQStyleFactory::keys(); + for (TQStringList::iterator it = styles.begin(); it != styles.end(); it++) { + if (*it == "Keramik") kde_keramik_exist = true; + else if (*it == "HighColor") kde_hc_exist = true; + else if (*it == "Default") kde_def_exist = true; + else if (*it == "Plastik") kde_plastik_exist = true; + else if (*it == "Motif") cde_exist = true; + else if (*it == "Windows") win_exist = true; + else if (*it == "Platinum") platinum_exist = true; + else if (*it == "Light, 3rd revision") kde_light_exist = true; + } + // and disable the ListItems, if they are not. + if ( !(kde_plastik_exist || kde_light_exist) ) kde->setVisible(false); + if ( !(kde_hc_exist || kde_def_exist) ) classic->setVisible(false); + if (!kde_keramik_exist || TQPixmap::defaultDepth() <= 8) keramik->setVisible(false); + if (!cde_exist) cde->setVisible(false); + if (!win_exist) win->setVisible(false); + if (!platinum_exist) platinum->setVisible(false); + + // test, wich KWin-styles are available + twin_keramik_exist = twin_system_exist = twin_plastik_exist + = twin_default_exist = twin_win_exist + = twin_cde_exist = twin_quartz_exist = false; + TDEStandardDirs* kstd = TDEGlobal::dirs(); + if (!kstd->findResource("data", "twin/keramik.desktop").isNull()) + twin_keramik_exist = true; + if (!kstd->findResource("data", "twin/plastik.desktop").isNull()) + twin_plastik_exist = true; + if (!kstd->findResource("data", "twin/system.desktop").isNull()) + twin_system_exist = true; + if (!kstd->findResource("data", "twin/redmond.desktop").isNull()) + twin_win_exist = true; + if (!kstd->findResource("data", "twin/cde.desktop").isNull()) + twin_cde_exist = true; + if (!kstd->findResource("data", "twin/quartz.desktop").isNull()) + twin_quartz_exist = true; + twin_default_exist = true; // we can't check for a .desktop-file for the old default because there is none + + // check, wich Icon-themes are available + icon_crystalsvg_exist = icon_kdeclassic_exist = icon_Locolor_exist = false; + TQStringList icons(TDEIconTheme::list()); + for (TQStringList::iterator it=icons.begin(); it != icons.end(); it++) { + TDEIconTheme icontheme(*it); + if (icontheme.isHidden() || !icontheme.isValid()) continue; + if (*it == "crystalsvg") icon_crystalsvg_exist = true; + else if (*it == "kdeclassic") icon_kdeclassic_exist = true; + else if (*it == "Locolor") icon_Locolor_exist = true; + } +} + +/** get the user's former settings */ +void TDEStylePage::getUserDefaults() { + // Get the user's current widget-style + TDEGlobal::config()->setGroup("General"); + origStyle = TDEGlobal::config()->readEntry( "widgetStyle", TDEStyle::defaultStyle() ); + + // get the user's current KWin-style + ctwin = new TDEConfig("twinrc"); + ctwin->setGroup("Style"); + origKWinStyle = ctwin->readEntry("PluginLib", defaultKWinStyle); + + // get the users current colors + getColors(&usrColors, false); + + // Get the user's current iconset + TDEGlobal::config()->setGroup("Icons"); + origIcons = TDEGlobal::config()->readEntry("Theme"); + + kdDebug() << "TDEStylePage::getUserDefaults(): style: " << origStyle << endl; + kdDebug() << "TDEStylePage::getUserDefaults(): KWinStyle: " << origKWinStyle << endl; + kdDebug() << "TDEStylePage::getUserDefaults(): Colors: " << usrColors.colorFile << endl; + kdDebug() << "TDEStylePage::getUserDefaults(): Icons: " << origIcons << endl; +} + +/** initialize KDE default color values */ +void TDEStylePage::initColors() { + widget.setRgb(239, 239, 239); + trinity4Blue.setRgb(103,141,178); + inactiveBackground.setRgb(157,170,186); + activeBackground.setRgb(65,142,220); + inactiveForeground.setRgb(221,221,221); + activeBlend.setRgb(107,145,184); + activeTitleBtnBg.setRgb(127,158,200); + inactiveTitleBtnBg.setRgb(167,181,199); + alternateBackground.setRgb(237,244,249); + + if (TQPixmap::defaultDepth() > 8) + button.setRgb(221, 223, 228); + else + button.setRgb(220, 220, 220); + + link.setRgb(0, 0, 238); + visitedLink.setRgb(82, 24, 139); +} + +/** live-update the system */ +void TDEStylePage::liveUpdate() { + // tell all apps about the changed icons + for (int i=0; idcopClient()->send("twin*", "", "reconfigure()", TQString("")); + // kdesktop-background + kapp->dcopClient()->send("kdesktop", "KBackgroundIface", "configure()", TQString("")); +} + +/** show the previewWidget styled with the selected one */ +void TDEStylePage::switchPrevStyle() { + TQStyle* style = TQStyleFactory::create(currentStyle); + if (!style) return; + + stylePreview->unsetPalette(); + TQPalette palette = createPalette(); + style->polish(palette); + stylePreview->setPalette(palette); + + // Prevent Qt from wrongly caching radio button images + TQPixmapCache::clear(); + // go ahead + setStyleRecursive( stylePreview, palette, style ); + // this flickers, but reliably draws the widgets corretly. + stylePreview->resize( stylePreview->sizeHint() ); + + delete appliedStyle; + appliedStyle = style; +} + +void TDEStylePage::setStyleRecursive(TQWidget* w, TQPalette &palette, TQStyle* s) { + // Apply the new style. + w->setStyle(s); + // Recursively update all children. + const TQObjectList children = w->childrenListObject(); + if (children.isEmpty()) + return; + // Apply the style to each child widget. + TQPtrListIterator childit(children); + TQObject *child; + while ((child = childit.current()) != 0) { + ++childit; + if (child->isWidgetType()) + setStyleRecursive((TQWidget *) child, palette, s); + } +} + +/** create a TQPalette of our current colorset */ +TQPalette TDEStylePage::createPalette() { + colorSet *cc = ¤tColors; + TQColorGroup disabledgrp(cc->windowForeground, cc->background, cc->background.light(150), + cc->background.dark(), cc->background.dark(120), cc->background.dark(120), + cc->windowBackground); + TQColorGroup colgrp(cc->windowForeground, cc->background, cc->background.light(150), + cc->background.dark(), cc->background.dark(120), cc->foreground, + cc->windowBackground); + colgrp.setColor(TQColorGroup::Highlight, cc->selectBackground); + colgrp.setColor(TQColorGroup::HighlightedText, cc->selectForeground); + colgrp.setColor(TQColorGroup::Button, cc->buttonBackground); + colgrp.setColor(TQColorGroup::ButtonText, cc->buttonForeground); + return TQPalette( colgrp, disabledgrp, colgrp); +} + +#include "tdestylepage.moc" diff --git a/kpersonalizer/tdestylepage.h b/kpersonalizer/tdestylepage.h new file mode 100644 index 000000000..30b907094 --- /dev/null +++ b/kpersonalizer/tdestylepage.h @@ -0,0 +1,128 @@ +/*************************************************************************** + tdestylepage.h - description + ------------------- + begin : Tue May 22 2001 + copyright : (C) 2001 by Ralf Nolden + email : nolden@kde.org + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef TDESTYLEPAGE_H +#define TDESTYLEPAGE_H + +#include +#include "tdestylepagedlg.h" + +/**Abstract class for the style page + *@author Ralf Nolden + */ +class TQListViewItem; + +class TDEStylePage : public TDEStylePageDlg { + Q_OBJECT + +public: + TDEStylePage(TQWidget *parent=0, const char *name=0); + ~TDEStylePage(); + void save(bool curSettings=true); + /** resets to KDE style as default */ + void setDefaults(); + /** set the preview-widgets' style to the currently selected */ + void switchPrevStyle(); + +private: + TQString origStyle; + TQString origKWinStyle; + TQString origIcons; + TQString defaultKWinStyle; + TQString currentStyle; + TDEConfig* ctwin; + struct colorSet { + TQString colorFile, bgMode; + int contrast; + TQColor usrCol1, usrCol2; + TQColor foreground; + TQColor background; + TQColor windowForeground; + TQColor windowBackground; + TQColor selectForeground; + TQColor selectBackground; + TQColor buttonForeground; + TQColor buttonBackground; + TQColor linkColor; + TQColor visitedLinkColor; + TQColor activeForeground; + TQColor inactiveForeground; + TQColor activeBackground; + TQColor inactiveBackground; + TQColor activeBlend; + TQColor inactiveBlend; + TQColor activeTitleBtnBg; + TQColor inactiveTitleBtnBg; + TQColor alternateBackground; + } usrColors, currentColors; + // first, the KDE 2 default color values + TQColor widget; + TQColor trinity4Blue; + TQColor inactiveBackground; + TQColor activeBackground; + TQColor button; + TQColor link; + TQColor visitedLink; + TQColor activeBlend; + TQColor activeTitleBtnBg; + TQColor inactiveTitleBtnBg; + TQColor inactiveForeground; + TQColor alternateBackground; + + TQListViewItem * kde; + TQListViewItem * classic; + TQListViewItem * keramik; + TQListViewItem * cde; + TQListViewItem * win; + TQListViewItem * platinum; + + TQStyle *appliedStyle; + + // widget-style existence + bool kde_hc_exist, kde_def_exist, kde_keramik_exist, kde_light_exist, + cde_exist, win_exist, platinum_exist, kde_plastik_exist; + + // twin-style-existence + bool twin_keramik_exist, twin_default_exist, twin_system_exist, + twin_win_exist, twin_cde_exist, twin_quartz_exist, twin_plastik_exist; + + // icon-theme-existence + bool icon_crystalsvg_exist, icon_kdeclassic_exist, icon_Locolor_exist; + +public slots: // Public slots + /** to be connected to the OS page. Catches either KDE, CDE, win or mac and pre-sets the style. */ + void presetStyle(const TQString& style); + +private: + void saveColors(bool curSettings=true); + void saveStyle(bool curSettings=true); + void saveKWin(bool curSettings=true); + void saveIcons(bool curSettings=true); + void getAvailability(); + void getUserDefaults(); + void initColors(); + void liveUpdate(); + void getColors(colorSet *set, bool colorfile ); + void setStyleRecursive(TQWidget* w, TQPalette &, TQStyle* s); + void changeCurrentStyle(); + TQPalette createPalette(); + +private slots: + void slotCurrentChanged(); +}; + +#endif diff --git a/kpersonalizer/tdestylepagedlg.ui b/kpersonalizer/tdestylepagedlg.ui new file mode 100644 index 000000000..65570e542 --- /dev/null +++ b/kpersonalizer/tdestylepagedlg.ui @@ -0,0 +1,127 @@ + +TDEStylePageDlg + + + TDEStylePageDlg + + + + 0 + 0 + 482 + 452 + + + + + unnamed + + + + TextLabel7 + + + + 1 + 1 + 0 + 0 + + + + Please choose the way your computer should look by selecting one of the items below. + + + WordBreak|AlignVCenter|AlignLeft + + + + + + + px_stylesSidebar + + + + 0 + 0 + 0 + 0 + + + + + 170 + 430 + + + + Panel + + + Sunken + + + true + + + 0 + + + + + stylePreview + + + + 1 + 1 + 0 + 0 + + + + + + TextLabel2 + + + Preview + + + + + klv_styles + + + + + + + StylePreview +
stylepreview.h
+ + -1 + -1 + + 0 + + 5 + 5 + 0 + 0 + + image0 +
+
+ + + 789c6dd7594f23471007f0f7fd14d6d6db2aaaf58c3db647511eb831b7317794879ac30760cc61c010e5bba7dcf5af5688167664fdb66bbaababbb67cccf1f8dab93c3c68f9fdf5e16b298968d7222cf8d1fd5eb6cf6f1e75f7ffcfded7b9a3656ff9aad46fafdb76fdf078b46d9389a3fd42bf04841699e964933b830b79a7019dd0b96955b895b5a703bcd572e08eea576ff6570ae0eedd477b792103f854b8b2fc6d1163f77237e646e37113f89b6f8307e3bf1785a8b0eedbc696eb7ad9db7e01ee6476ee4ffe0c6fd158c7c69182cde4eec6e87fea50dfbf8176e6ba7d07f96669999cfa325ccaf862bcc97a36dbccf60f178cee11cde706761f16917ae30fe6b7488a7851bf14d7327417f676eb4f756eea41e2f57e6d83e83919f6cba117f04235fd9765b3b0fa36dfc398cf973edc67a6fb951ffe768ab6765ee26b8dff213ef5f4630e2b9e7463ea7ee8ee5ff60ee2618af8eb6fe3238437eb91bf1299cdbfacad3cadd5617f5a11738c7fe4adcb8ffd68d7aeec15e8fc3683b9f62ee2518ef33dafa3f75e3bc957086f86eb4d56f3db8e8e6dd56f01a5cc1bbe65e629673d8ebd18d0efdc9058cf9f2c08df9e630ce037db8719ec37c7a9a7fb708f10267b65e7cef46fb3e9ca3fd23dad6ef0cf67abe99f304f95ec3a8871cbb71be52d8d777e8b6fee412f6f958be3adf5ea817b561afe7d86ded7c67ce13c46fc37ede2766c17a17059cd9f38e466e8c3f8eb6fd700f0b9ef7095c37cd3d37de178f2be76dcf876fa343bd790267f012f67a77cc319f69b4ed872e2ca8e732daeabfe3c6fa9cc235f21f9b8bd4f2a5cd687bfedbfd659ee7ede017b842becf6eb44fa3cbd0df8559b0ffe808ceb0ff37e01afba3652e52cc87a26dbe276ecca7097790ff73b4cdef0616ac4fdf6df1c2d1d67ee8c6f80318eb4bd1180ff529513f0ecf7b694b62f5a002ceccb2662e523c2fb7605f9f0fd8fbbf75e3bc2dcd3e9ebcb9f17ce8c05e8f83685bcf701e44eb2db65e4fd1b65eebe62245be53b8c6f3ffdd8dfd3933fbf884761f5f0edcd88f951bf118bf44bde926dae24fe01ae7af76e3f9169e2f45bb143c0f5fdcf6fea23b18f773eac6f3e63ddac6db75e37df5e8c6fbae65aebcde6d37beaf84f528aa52f03c9dc3359ea79939c627d136deab1befaf75b883ef23e76e3ccfaea36d7dc2f795322b05ebfb0ad738af7db7ad371f99fd7e59b8b13f276e9cdf1318f5e54337e6d78cb67cf761ec170efba1acaa1afd9db92d3f3a36d729ea77efc6f33cbccf2beddfe6478fe6d85e45dbfd851bf1577007f5d877e3bc86f5a9ea3a2d6cffdfc1debe116df5db73a39e37b0e777191dda257c7fa83b6e8a2eaae00eeceb13d6b7d69f325b79b058fd32b170c1a55ebffaac2ccae2b9e6118f79c253bd6ef9ee3fd7587fef79c60f7acf3cc617fcc84ffcac6d8ffcc20b7ee5377ee7257ff027aff1bac66ff0269716cf5b1ab7cd3bbcabb17ddee37d3ee0433ee2633ee1019ff290cff89c2ff89229c48b66f1ac3d5df135df7093134eb9c56dcef4b3c35dee71ce393111dbfa8c784a4205955451cd1d1ad1982634a55bbad3f80eddd38c1ef882e66cf52ab5ff2b8d7ea4277aa6175ad06bb866f446efb4d4df0ffad4fed762ffb7b44e1b9cd2266dd142c75e5ddb3cd0bb3e347a477bd9d5f83ee245e3f7689f0ee830f67d44c77412ee186946033aa5e197fecfe85c7bf7be2fe892aee89a6ea84989f6bfa434f4eff9df52c509b5d0779b32ea684d13ea528f728d1e882ebfce37f6cf077422b4ea5b440ad14af1a15452ab473aee52c65ff39789b64fe955f44eb9937b5d858c5b32d377c0c32a7fee7ecd5fe61aff284ff22c2fb290577993775db1443fb53ef2219f5ff2bf93356d5b970dd9d41eb77820dbb223bbab155ed55ffab2f725ffb1eccb81aed6931cca116ab490633909d10339fd5ffdef795d869ae7923bc27226e772415d5986b51d683663b9d4fcfbb1ff190fe54aaec35aeaa577ee20f24673e94b531249a585fc2b69ebfe3ed7dae91f75ba964b5c03e9d344ba1add93bce0826c3f87f3b2a9fb6f18aeba10ba2f563f25eb1b563771a5d17531e2513c5fba538b3111cd690dd73c7ef6a95f4c8aa99de12fe77da4951de9ffffea730be7fd9fdfbffd0b690edc6c + + + + tdelistview.h + kdialog.h + + +
diff --git a/r14-xdg-update b/r14-xdg-update index 84c9e0c08..090cec9e3 100644 --- a/r14-xdg-update +++ b/r14-xdg-update @@ -634,7 +634,12 @@ if [ ! -f $HOME/.tderc ] && [ -f $HOME/.kderc ]; then mv $HOME/.kderc $HOME/.tderc 2>/dev/null fi fi -# Copy the following two rc files rather than move because the older versions are for HAL systems. +if [ -a $PROFILE_DIR/share/apps/kstyle ]; then + Message_Prefix + echo " kstyle->tdestyle" + mv $PROFILE_DIR/share/apps/kstyle $PROFILE_DIR/share/apps/tdestyle 2>/dev/null +fi +# Copy the following two rc files rather than move because the older versions are needed for HAL systems. if [ ! -f $PROFILE_DIR/share/config/tdenetworkmanagerrc ] && [ -f $PROFILE_DIR/share/config/knetworkmanagerrc ]; then Message_Prefix echo " knetworkmanager->tdenetworkmanager" diff --git a/twin/options.cpp b/twin/options.cpp index 73d416155..0bb127e11 100644 --- a/twin/options.cpp +++ b/twin/options.cpp @@ -216,7 +216,7 @@ unsigned long Options::updateSettings() // Read button tooltip animation effect from kdeglobals // Since we want to allow users to enable window decoration tooltips - // and not kstyle tooltips and vise-versa, we don't read the + // and not tdestyle tooltips and vise-versa, we don't read the // "EffectNoTooltip" setting from kdeglobals. TDEConfig globalConfig("kdeglobals"); globalConfig.setGroup("KDE"); -- cgit v1.2.3