diff options
Diffstat (limited to 'kcontrol')
44 files changed, 707 insertions, 135 deletions
diff --git a/kcontrol/ConfigureChecks.cmake b/kcontrol/ConfigureChecks.cmake index 1ff4f0635..9676dbab3 100644 --- a/kcontrol/ConfigureChecks.cmake +++ b/kcontrol/ConfigureChecks.cmake @@ -45,16 +45,6 @@ else( ) endif( ) -##### check for Xrandr ########################## - -if( WITH_XRANDR ) - pkg_search_module( XRANDR xrandr ) - if( NOT XRANDR_FOUND ) - tde_message_fatal( "xrandr are requested, but not found on your system" ) - endif( ) -endif( ) - - ##### check for libusb ########################## if( WITH_LIBUSB ) diff --git a/kcontrol/access/kaccess.cpp b/kcontrol/access/kaccess.cpp index 5a8206809..5e506470c 100644 --- a/kcontrol/access/kaccess.cpp +++ b/kcontrol/access/kaccess.cpp @@ -748,7 +748,7 @@ void KAccessApp::xkbControlsNotify(XkbControlsNotifyEvent *event) createDialogContents(); featuresLabel->setText ( question+"\n\n"+explanation - +" "+i18n("These AccessX settings are needed for some users with motion impairments and can be configured in the TDE Control Center. You can also turn them on and off with standardized keyboard gestures.\n\nIf you do not need them, you can select \"Deactivate all AccessX features and gestures\".") ); + +" "+i18n("These AccessX settings are needed for some users with motion impairments and can be configured in the Trinity Control Center. You can also turn them on and off with standardized keyboard gestures.\n\nIf you do not need them, you can select \"Deactivate all AccessX features and gestures\".") ); KWin::setState( dialog->winId(), NET::KeepAbove ); kapp->updateUserTimestamp(); diff --git a/kcontrol/background/CMakeLists.txt b/kcontrol/background/CMakeLists.txt index 7996f58a6..0d04bd10d 100644 --- a/kcontrol/background/CMakeLists.txt +++ b/kcontrol/background/CMakeLists.txt @@ -29,7 +29,7 @@ if( BUILD_KCONTROL OR BUILD_KDESKTOP OR BUILD_TDM ) ##### bgnd (static) ############################# tde_add_library( bgnd STATIC_PIC AUTOMOC - SOURCES bgrender.cpp bgsettings.cpp + SOURCES bgrender.cpp bgsettings.cpp KCrossBGRender.cc LINK ${LIBART_LIBRARIES} ) diff --git a/kcontrol/background/KCrossBGRender.cc b/kcontrol/background/KCrossBGRender.cc new file mode 100644 index 000000000..3158e5699 --- /dev/null +++ b/kcontrol/background/KCrossBGRender.cc @@ -0,0 +1,361 @@ +/* + * Copyright (C) 2008 Danilo Cesar Lemes de Paula <danilo@mandriva.com> + * Copyright (C) 2008 Gustavo Boiko <boiko@mandriva.com> + * Mandriva Conectiva + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License version 2 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include <tqdom.h> +#include <tqfile.h> + +#include <kdebug.h> + +#include "KCrossBGRender.h" +#include <tqapplication.h> +#include <kimageeffect.h> + + +KCrossBGRender::KCrossBGRender(int desk, int screen, bool drawBackgroundPerScreen, TDEConfig *config): KBackgroundRenderer(desk,screen,drawBackgroundPerScreen,config) +{ + useCrossEfect = false; + if ( wallpaperList()[0].endsWith("xml",false) ) { + initCrossFade(wallpaperList()[0]); + } +} + + +void KCrossBGRender::initCrossFade(TQString xmlFile) +{ + useCrossEfect = true; + if (xmlFile.isEmpty()){ + useCrossEfect = false; + return; + } + secs = 0; + timeList.empty(); + + // read the XMLfile + TQDomDocument xmldoc = TQDomDocument(xmlFile); + TQFile file( xmlFile ); + if ( !file.open( IO_ReadOnly ) ) { + useCrossEfect = false; + return; + } + if ( !xmldoc.setContent( &file ) ) { + useCrossEfect = false; + file.close(); + return; + } + file.close(); + + TQDomElement docElem = xmldoc.documentElement(); + TQDomNode n = docElem.firstChild(); + while( !n.isNull() ) { + TQDomElement e = n.toElement(); // try to convert the node to an element. + if( !e.isNull() ) { + if (e.tagName() == "starttime") { + createStartTime(e); + } else if (e.tagName() == "transition") { + createTransition(e); + } else if (e.tagName() == "static") { + createStatic(e); + } + } + n = n.nextSibling(); + } + + // Setting "now" state + setCurrentEvent(true); + pix = getCurrentPixmap(); + + useCrossEfect = true; +} + + +KCrossBGRender::~KCrossBGRender(){ +} + +TQPixmap KCrossBGRender::pixmap() { + fixEnabled(); + if (!useCrossEfect){ + TQPixmap p = KBackgroundRenderer::pixmap(); + kdDebug() << "Inherited " << p.size() << endl; + if (p.width() == 0 && p.height() == 0){ + p.convertFromImage(image()); + } + return p; + } + + return pix; +} + +bool KCrossBGRender::needWallpaperChange(){ + if (!useCrossEfect) { + return KBackgroundRenderer::needWallpaperChange(); + } + + bool forceChange = setCurrentEvent(); // If we change the current state + if (forceChange){ // do not matter what hapens + actualPhase = 0; // we need to change background + return true; + } + + // Return false if it's not a transition + if (!current.transition) { + return false; + } + + double timeLeft, timeTotal; + TQTime now = TQTime::currentTime(); + + timeLeft = now.secsTo(current.etime); + if (timeLeft < 0) { + timeLeft += 86400; // before midnight + } + timeTotal = current.stime.secsTo(current.etime); + if (timeTotal < 0) { + timeTotal += 86400; + } + + double passed = timeTotal - timeLeft; + double timeCell = timeTotal/60; //Time cell size + + //kdDebug() << "\ntimeleft:" << timeLeft << " timeTotal:" << timeTotal + // << "\npassed:" << passed << " timeCell:" << timeCell + // << "\nactualPhase: " << actualPhase << endl; + + int aux = passed/timeCell; + if(actualPhase != aux){ + //kdDebug() << "needWallpaperChange() => returned true" << endl; + actualPhase = passed/timeCell; + return true; + } + + //kdDebug() << "needWallpaperChange() => returned false" << endl; + return false; +} + +/* + * This method change the enabledEffect flag to TRUE of FALSE, according + * with multiWallpaperMode and FileName (it needs to be a XML) + */ +void KCrossBGRender::fixEnabled(){ + + + TQString w = wallpaperList()[0]; + useCrossEfect = false; + if(multiWallpaperMode() == Random || multiWallpaperMode() == InOrder){ + + if ( w != xmlFileName ){ + // New XML File + xmlFileName = w; + if (w.endsWith("xml",false)){ + initCrossFade(wallpaperList()[0]); + //useCrossEfect = true; + }else{ + // Not, it's not a xml file + useCrossEfect = false; + } + }else if (w.endsWith("xml",false)){ + //xmlFile doesn't change + //but it's there + useCrossEfect = true; + }else{ + // it's not a XML file + useCrossEfect = false; + } + } +} + +void KCrossBGRender::changeWallpaper(bool init){ + + + + fixEnabled(); + + if (!useCrossEfect){ + KBackgroundRenderer::changeWallpaper(init); + return; + } + + pix = getCurrentPixmap(); + + +} + + +bool KCrossBGRender::setCurrentEvent(bool init){ + TQTime now = TQTime::currentTime(); + + + //Verify if is need to change + if (!(init || now <= current.stime || now >= current.etime )) { + return false; + } + + TQValueList<KBGCrossEvent>::iterator it; + for ( it = timeList.begin(); it != timeList.end(); ++it ){ + + // Look for time + if ( ((*it).stime <= now && now <= (*it).etime) || //normal situation + ((*it).etime <= (*it).stime && (now >= (*it).stime || + now <= (*it).etime) ) ) + { + current = *it; + actualPhase = 0; + + //kdDebug() << "Cur: " << current.stime << "< now <" << current.etime << endl; + return true; + } + } +} + +TQPixmap KCrossBGRender::getCurrentPixmap() +{ + float alpha; + TQPixmap ret; + TQImage tmp; + TQImage p1; + if (!tmp.load(current.pix1)) + return TQPixmap(); + + // scale the pixmap to fit in the screen + //p1 = TQPixmap(QApplication::desktop()->screenGeometry().size()); + //TQPainter p(&p1); + //p.drawPixmap(p1.rect(), tmp); + // + p1 = tmp.smoothScale(TQApplication::desktop()->screenGeometry().size()); + + if (current.transition){ + TQTime now = TQTime::currentTime(); + double timeLeft,timeTotal; + + TQImage p2; + + if (!tmp.load(current.pix2) ) + return NULL; + + p2 = tmp.smoothScale(TQApplication::desktop()->screenGeometry().size()); + //TQPainter p(&p2); + //p.drawPixmap(p2.rect(), tmp); + + timeLeft = now.secsTo(current.etime); + if (timeLeft < 0) + timeLeft += 86400; + timeTotal = current.stime.secsTo(current.etime); + if (timeTotal < 0) + timeTotal += 86400; + + alpha = (timeTotal - timeLeft)/timeTotal; + + //ret = crossFade(p2,p1,alpha); + tmp = KImageEffect::blend(p2,p1,alpha); + ret.convertFromImage(tmp); + return ret; + }else{ + ret.convertFromImage(p1); + return ret; + } + + +} + +void KCrossBGRender::createStartTime(TQDomElement docElem) +{ + int hour; + int minutes; + + TQDomNode n = docElem.firstChild(); + while( !n.isNull() ) { + TQDomElement e = n.toElement(); + if( !e.isNull() ) { + if (e.tagName() == "hour"){ + hour = e.text().toInt(); + }else if ( e.tagName() == "minute" ){ + minutes = e.text().toInt(); + } + + } + + n = n.nextSibling(); + } + secs = hour*60*60 + minutes*60; +} +void KCrossBGRender::createTransition(TQDomElement docElem) +{ + int duration; + TQString from; + TQString to; + + TQDomNode n = docElem.firstChild(); + while( !n.isNull() ) { + TQDomElement e = n.toElement(); + if( !e.isNull() ) { + if (e.tagName() == "duration"){ + duration = e.text().toFloat(); + }else if ( e.tagName() == "from" ){ + from = e.text(); + } + else if ( e.tagName() == "to" ){ + to = e.text(); + } + + } + n = n.nextSibling(); + } + TQTime startTime(0,0,0); + startTime = startTime.addSecs(secs); + TQTime endTime(0,0,0); + endTime = endTime.addSecs(secs+duration); + + secs += duration; + + KBGCrossEvent l = {true, from, to, startTime,endTime}; + + timeList.append(l); + +} +void KCrossBGRender::createStatic(TQDomElement docElem) +{ + int duration; + TQString file; + + TQDomNode n = docElem.firstChild(); + while( !n.isNull() ) { + TQDomElement e = n.toElement(); + if( !e.isNull() ) { + if (e.tagName() == "duration"){ + duration = e.text().toFloat(); + }else if ( e.tagName() == "file" ){ + file = e.text(); + } + + } + n = n.nextSibling(); + } + + TQTime startTime(0,0,0); + startTime = startTime.addSecs(secs); + TQTime endTime(0,0,0); + endTime = endTime.addSecs(secs+duration); + + secs += duration; + + KBGCrossEvent l = {false, file, NULL, startTime,endTime}; + timeList.append(l); +} + +#include "KCrossBGRender.moc" diff --git a/kcontrol/background/KCrossBGRender.h b/kcontrol/background/KCrossBGRender.h new file mode 100644 index 000000000..f3c2f0931 --- /dev/null +++ b/kcontrol/background/KCrossBGRender.h @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2008 Danilo Cesar Lemes de Paula <danilo@mandriva.com> + * Copyright (C) 2008 Gustavo Boiko <boiko@mandriva.com> + * Mandriva Conectiva + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License version 2 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. +*/ + +#ifndef __KCROSSBGRENDER_H__ +#define __KCROSSBGRENDER_H__ + + +#include <tqvaluelist.h> +#include <tqpixmap.h> +#include <tqvaluelist.h> +#include <tqdatetime.h> + +#include "bgrender.h" + +class TQDomElement; + +typedef struct crossEvent{ + bool transition; + TQString pix1; + TQString pix2; + TQTime stime; //start time + TQTime etime; //end time +} KBGCrossEvent; + + +class KCrossBGRender: public KBackgroundRenderer{ + +TQ_OBJECT + +public: + KCrossBGRender(int desk, int screen, bool drawBackgroundPerScreen, TDEConfig *config=0); + ~KCrossBGRender(); + + bool needWallpaperChange(); + void changeWallpaper(bool init=false); + TQPixmap pixmap(); + bool usingCrossXml(){return useCrossEfect;}; + + +private: + TQPixmap pix; + int secs; + TQString xmlFileName; + bool useCrossEfect; + + int actualPhase; + + void createStartTime(TQDomElement e); + void createTransition(TQDomElement e); + void createStatic(TQDomElement e); + bool setCurrentEvent(bool init = false); + void initCrossFade(TQString xml); + void fixEnabled(); + TQPixmap getCurrentPixmap(); + KBGCrossEvent current; + TQValueList<KBGCrossEvent> timeList; +}; + +#endif // __KCROSSBGRENDER_H__ diff --git a/kcontrol/background/bgdefaults.h b/kcontrol/background/bgdefaults.h index 8a0f2912e..d64c6e546 100644 --- a/kcontrol/background/bgdefaults.h +++ b/kcontrol/background/bgdefaults.h @@ -34,5 +34,6 @@ #define _defBlendMode KBackgroundSettings::NoBlending #define _defBlendBalance 100 #define _defReverseBlending false +#define _defCrossFadeBg false #endif // __BGDefaults_h_Included__ diff --git a/kcontrol/background/bgdialog.cpp b/kcontrol/background/bgdialog.cpp index 9c0cd5e1b..c221a50fe 100644 --- a/kcontrol/background/bgdialog.cpp +++ b/kcontrol/background/bgdialog.cpp @@ -174,6 +174,10 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop) connect(m_cbBlendReverse, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotBlendReverse(bool))); + // Crossfading background + connect(m_cbCrossFadeBg, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotCrossFadeBg(bool))); + // advanced options connect(m_buttonAdvanced, TQT_SIGNAL(clicked()), TQT_SLOT(slotAdvanced())); @@ -304,6 +308,7 @@ void BGDialog::makeReadOnly() m_cbBlendReverse->setEnabled( false ); m_buttonAdvanced->setEnabled( false ); m_buttonGetNew->setEnabled( false ); + m_cbCrossFadeBg->setEnabled( false ); } void BGDialog::load( bool useDefaults ) @@ -781,6 +786,8 @@ void BGDialog::updateUI() m_cbBlendReverse->setChecked(r->reverseBlending()); m_sliderBlend->setValue( r->blendBalance() / 10 ); + m_cbCrossFadeBg->setChecked(r->crossFadeBg()); + m_comboBlend->blockSignals(false); m_sliderBlend->blockSignals(false); @@ -1295,6 +1302,17 @@ void BGDialog::slotBlendReverse(bool b) eRenderer()->start(true); } +void BGDialog::slotCrossFadeBg(bool b) +{ + if (b == eRenderer()->crossFadeBg()) + return; + emit changed(true); + + eRenderer()->stop(); + eRenderer()->setCrossFadeBg(b); + eRenderer()->start(true); +} + void BGDialog::desktopResized() { for (unsigned i = 0; i < m_renderer.size(); ++i) diff --git a/kcontrol/background/bgdialog.h b/kcontrol/background/bgdialog.h index 08dfe13be..6b33d8999 100644 --- a/kcontrol/background/bgdialog.h +++ b/kcontrol/background/bgdialog.h @@ -80,6 +80,7 @@ protected slots: void slotBlendReverse(bool b); void desktopResized(); void setBlendingEnabled(bool); + void slotCrossFadeBg(bool); protected: void getEScreen(); diff --git a/kcontrol/background/bgdialog_ui.ui b/kcontrol/background/bgdialog_ui.ui index 3960b4009..f35e19f78 100644 --- a/kcontrol/background/bgdialog_ui.ui +++ b/kcontrol/background/bgdialog_ui.ui @@ -376,6 +376,17 @@ </ul></qt></string> </property> </widget> + <widget class="TQCheckBox" row="8" column="1"> + <property name="name"> + <cstring>m_cbCrossFadeBg</cstring> + </property> + <property name="text"> + <string>Cross-fading background</string> + </property> + <property name="whatsThis" stdset="0"> + <string>Enables a smooth fading effect when changing background image.</string> + </property> + </widget> <widget class="TQComboBox" row="5" column="1"> <property name="name"> <cstring>m_comboBlend</cstring> diff --git a/kcontrol/background/bgrender.cpp b/kcontrol/background/bgrender.cpp index f6db68f70..5e9e4b82f 100644 --- a/kcontrol/background/bgrender.cpp +++ b/kcontrol/background/bgrender.cpp @@ -10,6 +10,8 @@ #include <config.h> +#include "KCrossBGRender.h" + #include <time.h> #include <stdlib.h> #include <utime.h> @@ -1061,7 +1063,7 @@ KVirtualBGRenderer::~KVirtualBGRenderer() } -KBackgroundRenderer * KVirtualBGRenderer::renderer(unsigned screen) +KCrossBGRender * KVirtualBGRenderer::renderer(unsigned screen) { return m_renderer[screen]; } @@ -1220,7 +1222,7 @@ void KVirtualBGRenderer::initRenderers() for (unsigned i=0; i<m_numRenderers; ++i) { int eScreen = m_bCommonScreen ? 0 : i; - KBackgroundRenderer * r = new KBackgroundRenderer( m_desk, eScreen, m_bDrawBackgroundPerScreen, m_pConfig ); + KCrossBGRender *r = new KCrossBGRender(m_desk, eScreen, m_bDrawBackgroundPerScreen, m_pConfig); m_renderer.insert( i, r ); r->setSize(renderSize(i)); connect( r, TQT_SIGNAL(imageDone(int,int)), this, TQT_SLOT(screenDone(int,int)) ); @@ -1250,7 +1252,7 @@ void KVirtualBGRenderer::screenDone(int _desk, int _screen) Q_UNUSED(_desk); Q_UNUSED(_screen); - const KBackgroundRenderer * sender = dynamic_cast<const KBackgroundRenderer*>(this->sender()); + const KCrossBGRender * sender = dynamic_cast<const KCrossBGRender*>(this->sender()); int screen = m_renderer.find(sender); if (screen == -1) //?? diff --git a/kcontrol/background/bgrender.h b/kcontrol/background/bgrender.h index 56317013f..5ab1cc6c3 100644 --- a/kcontrol/background/bgrender.h +++ b/kcontrol/background/bgrender.h @@ -28,6 +28,7 @@ class TDEProcess; class KTempFile; class KShellProcess; class TDEStandardDirs; +class KCrossBGRender; /** * This class renders a desktop background to a TQImage. The operation is @@ -127,7 +128,7 @@ public: KVirtualBGRenderer(int desk, TDEConfig *config=0l); ~KVirtualBGRenderer(); - KBackgroundRenderer * renderer(unsigned screen); + KCrossBGRender * renderer(unsigned screen); unsigned numRenderers() const { return m_numRenderers; } TQPixmap pixmap(); @@ -173,7 +174,7 @@ private: TQSize m_size; TQMemArray<bool> m_bFinished; - TQPtrVector<KBackgroundRenderer> m_renderer; + TQPtrVector<KCrossBGRender> m_renderer; TQPixmap *m_pPixmap; }; diff --git a/kcontrol/background/bgsettings.cpp b/kcontrol/background/bgsettings.cpp index d36d7f140..f29eeacf4 100644 --- a/kcontrol/background/bgsettings.cpp +++ b/kcontrol/background/bgsettings.cpp @@ -437,6 +437,7 @@ KBackgroundSettings::KBackgroundSettings(int desk, int screen, bool drawBackgrou defBlendMode = _defBlendMode; defBlendBalance = _defBlendBalance; defReverseBlending = _defReverseBlending; + defCrossFadeBg = _defCrossFadeBg; m_MinOptimizationDepth = _defMinOptimizationDepth; m_bShm = _defShm; @@ -537,6 +538,7 @@ void KBackgroundSettings::copyConfig(const KBackgroundSettings *settings) m_BlendMode = settings->m_BlendMode; m_BlendBalance = settings->m_BlendBalance; m_ReverseBlending = settings->m_ReverseBlending; + m_CrossFadeBg = settings->m_CrossFadeBg; m_MinOptimizationDepth = settings->m_MinOptimizationDepth; m_bShm = settings->m_bShm; m_MultiMode = settings->m_MultiMode; @@ -633,6 +635,15 @@ void KBackgroundSettings::setReverseBlending(bool value) } +void KBackgroundSettings::setCrossFadeBg(bool value) +{ + if (m_CrossFadeBg == value) + return; + dirty = hashdirty = true; + m_CrossFadeBg = value; +} + + void KBackgroundSettings::setWallpaper(TQString wallpaper) { dirty = hashdirty = true; @@ -774,6 +785,8 @@ void KBackgroundSettings::readSettings(bool reparse) m_ReverseBlending = m_pConfig->readBoolEntry( "ReverseBlending", defReverseBlending); + m_CrossFadeBg = m_pConfig->readBoolEntry( "CrossFadeBg", defCrossFadeBg); + // Multiple wallpaper config m_WallpaperList = m_pConfig->readPathListEntry("WallpaperList"); @@ -834,6 +847,7 @@ void KBackgroundSettings::writeSettings() m_pConfig->writeEntry("BlendMode", m_BlMRevMap[m_BlendMode]); m_pConfig->writeEntry("BlendBalance", m_BlendBalance); m_pConfig->writeEntry("ReverseBlending", m_ReverseBlending); + m_pConfig->writeEntry("CrossFadeBg", m_CrossFadeBg); m_pConfig->writeEntry("MinOptimizationDepth", m_MinOptimizationDepth); m_pConfig->writeEntry("UseSHM", m_bShm); diff --git a/kcontrol/background/bgsettings.h b/kcontrol/background/bgsettings.h index 0e16a87e9..a49873af2 100644 --- a/kcontrol/background/bgsettings.h +++ b/kcontrol/background/bgsettings.h @@ -8,8 +8,8 @@ * Public License. See the file "COPYING.LIB" for the exact licensing terms. */ -#ifndef __BGSettings_h_Included__ -#define __BGSettings_h_Included__ +#ifndef __BGSETTINGS_H__ +#define __BGSETTINGS_H__ #include <tqstringlist.h> @@ -198,6 +198,9 @@ public: void setReverseBlending(bool value); bool reverseBlending() const { return m_ReverseBlending; } + void setCrossFadeBg(bool value); + bool crossFadeBg() const { return m_CrossFadeBg; } + void setBlendBalance(int value); int blendBalance() const { return m_BlendBalance; } @@ -273,6 +276,7 @@ private: int m_BlendMode, defBlendMode; int m_BlendBalance, defBlendBalance; bool m_ReverseBlending, defReverseBlending; + bool m_CrossFadeBg, defCrossFadeBg; int m_MinOptimizationDepth; bool m_bShm; bool m_bDrawBackgroundPerScreen; @@ -369,4 +373,4 @@ private: }; -#endif // __BGSettings_h_Included__ +#endif // __BGSETTINGS_H__ diff --git a/kcontrol/background/crossfade.h b/kcontrol/background/crossfade.h new file mode 100644 index 000000000..dba34a3b4 --- /dev/null +++ b/kcontrol/background/crossfade.h @@ -0,0 +1,56 @@ +/* vi: ts=8 sts=4 sw=4 + * kate: space-indent on; tab-width 8; indent-width 4; indent-mode cstyle; + * + * This file is part of the KDE project, module kdesktop. + * Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org> + * + * You can Freely distribute this program under the GNU General Public + * License. See the file "COPYING" for the exact licensing terms. + */ + +#ifndef __CROSSFADE_H__ +#define __CROSSFADE_H__ + +#include <tqtimer.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <X11/X.h> +#include <X11/Xlib.h> +#include <X11/Xatom.h> +#include <X11/extensions/Xrender.h> +#include <kdebug.h> +#include <unistd.h> + + + +inline TQPixmap crossFade(const TQPixmap &pix1, const TQPixmap &pix2, double r_alpha, + bool sync = false){ + + TQPixmap pix = TQPixmap(1,1,8); + int mw,mh; + mw = pix1.width(); + mh = pix1.height(); + + int alpha = 0xffff * (1-r_alpha); + + XRenderColor clr = { 0, 0, 0, alpha }; + XRenderPictureAttributes pa; + pa.repeat = True; + Picture pic = XRenderCreatePicture(pix.x11Display(), pix.handle(), + XRenderFindStandardFormat (pix.x11Display(), PictStandardA8), + CPRepeat, &pa); + XRenderFillRectangle(pix.x11Display(), PictOpSrc, pic, + &clr, 0, 0, 1, 1); + TQPixmap dst(pix1); + dst.detach(); + XRenderComposite(pix.x11Display(), PictOpOver, pix2.x11RenderHandle(), + pic, dst.x11RenderHandle(),0,0, 0,0, 0,0, mw,mh); + + if (sync) { + XSync(pix.x11Display(), false); + } + XRenderFreePicture(pix.x11Display(), pic); + return dst; +} + +#endif // __CROSSFADE_H__ diff --git a/kcontrol/displayconfig/displayconfig.desktop b/kcontrol/displayconfig/displayconfig.desktop index 2d4b5051a..5314c0460 100644 --- a/kcontrol/displayconfig/displayconfig.desktop +++ b/kcontrol/displayconfig/displayconfig.desktop @@ -1,25 +1,35 @@ [Desktop Entry] +Exec=tdecmshell displayconfig +Icon=background +Type=Application +DocPath=kcontrol/displayconfig/index.html + +X-TDE-Library=displayconfig +X-TDE-ParentApp=kcontrol +X-TDE-RootOnly=true +X-TDE-SubstituteUID=true +X-TDE-Username= + Categories=Qt;TDE;X-TDE-settings-system; Comment=Configure display Comment[en_US]=Configure display -DocPath=kcontrol/displayconfig/index.html -Exec=tdecmshell displayconfig +Comment[fr]=Configuration de l'affichage +Comment[it]=Configurazione del display +Comment[ru]=Конфигурация экрана +Comment[uk]=Конфігурація екрану GenericName= GenericName[en_US]= -Icon=background Keywords=monitor,resolution,display MimeType= Name=Monitor & Display Name[en_US]=Monitor & Display +Name[fr]=Moniteurs & Affichage +Name[it]=Schermo & display +Name[ru]=Монитор & Экран +Name[uk]=Монітор & Екран NoDisplay=false Path= StartupNotify=true Terminal=false TerminalOptions= -Type=Application X-DCOP-ServiceType= -X-TDE-Library=displayconfig -X-TDE-ParentApp=kcontrol -X-TDE-RootOnly=true -X-TDE-SubstituteUID=true -X-TDE-Username= diff --git a/kcontrol/iccconfig/iccconfig.desktop b/kcontrol/iccconfig/iccconfig.desktop index ffa072e9b..68203a44e 100644 --- a/kcontrol/iccconfig/iccconfig.desktop +++ b/kcontrol/iccconfig/iccconfig.desktop @@ -12,11 +12,19 @@ X-TDE-SubstituteUID=true Categories=Qt;TDE;X-TDE-settings-hardware; Comment=Configure display ICC profile Comment[en_US]=Configure display ICC profile +Comment[fr]=Configurer les profils de couleurs ICC +Comment[it]=Configurazione del profilo ICC del display +Comment[ru]=Конфигурация профиля ICC экрана +Comment[uk]=Конфігурація профілю ICC екрану GenericName= GenericName[en_US]= Keywords=ICC,display,color,profile MimeType= Name=ICC Color Profile Name[en_US]=ICC Color Profile +Name[fr]=Profils de couleurs ICC +Name[it]=Profilo dei colori ICC +Name[ru]=ICC Профиль цвета +Name[uk]=ICC Профіль кольору NoDisplay=false diff --git a/kcontrol/joystick/caldialog.cpp b/kcontrol/joystick/caldialog.cpp index 877befb62..69e0beff6 100644 --- a/kcontrol/joystick/caldialog.cpp +++ b/kcontrol/joystick/caldialog.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * Copyright (C) 2003 by Martin Koller * * m.koller@surfeu.at * - * This file is part of the TDE Control Center Module for Joysticks * + * This file is part of the Trinity Control Center Module for Joysticks * * * * 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 * diff --git a/kcontrol/joystick/caldialog.h b/kcontrol/joystick/caldialog.h index 343666f97..202296f2b 100644 --- a/kcontrol/joystick/caldialog.h +++ b/kcontrol/joystick/caldialog.h @@ -1,7 +1,7 @@ /*************************************************************************** * Copyright (C) 2003 by Martin Koller * * m.koller@surfeu.at * - * This file is part of the TDE Control Center Module for Joysticks * + * This file is part of the Trinity Control Center Module for Joysticks * * * * 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 * diff --git a/kcontrol/joystick/joydevice.cpp b/kcontrol/joystick/joydevice.cpp index 3c4aeac3f..f6bf04e6a 100644 --- a/kcontrol/joystick/joydevice.cpp +++ b/kcontrol/joystick/joydevice.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * Copyright (C) 2003 by Martin Koller * * m.koller@surfeu.at * - * This file is part of the TDE Control Center Module for Joysticks * + * This file is part of the Trinity Control Center Module for Joysticks * * * * 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 * diff --git a/kcontrol/joystick/joydevice.h b/kcontrol/joystick/joydevice.h index d02d5deea..7519bbf67 100644 --- a/kcontrol/joystick/joydevice.h +++ b/kcontrol/joystick/joydevice.h @@ -1,7 +1,7 @@ /*************************************************************************** * Copyright (C) 2003 by Martin Koller * * m.koller@surfeu.at * - * This file is part of the TDE Control Center Module for Joysticks * + * This file is part of the Trinity Control Center Module for Joysticks * * * * 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 * diff --git a/kcontrol/joystick/joystick.cpp b/kcontrol/joystick/joystick.cpp index 69e81b79b..d0521d81e 100644 --- a/kcontrol/joystick/joystick.cpp +++ b/kcontrol/joystick/joystick.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * Copyright (C) 2003 by Martin Koller * * m.koller@surfeu.at * - * This file is part of the TDE Control Center Module for Joysticks * + * This file is part of the Trinity Control Center Module for Joysticks * * * * 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 * @@ -70,7 +70,7 @@ joystick::joystick(TQWidget *parent, const char *name, const TQStringList &) : TDECModule(JoystickFactory::instance(), parent, name) { setAboutData( new TDEAboutData("kcmjoystick", I18N_NOOP("TDE Joystick Control Module"), "1.0", - I18N_NOOP("TDE Control Center Module to test Joysticks"), + I18N_NOOP("Trinity Control Center Module to test Joysticks"), TDEAboutData::License_GPL, "(c) 2004, Martin Koller", 0, "m.koller@surfeu.at")); diff --git a/kcontrol/joystick/joystick.h b/kcontrol/joystick/joystick.h index eadccd0fd..8ef9e966e 100644 --- a/kcontrol/joystick/joystick.h +++ b/kcontrol/joystick/joystick.h @@ -1,7 +1,7 @@ /*************************************************************************** * Copyright (C) 2003 by Martin Koller * * m.koller@surfeu.at * - * This file is part of the TDE Control Center Module for Joysticks * + * This file is part of the Trinity Control Center Module for Joysticks * * * * 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 * diff --git a/kcontrol/joystick/joywidget.cpp b/kcontrol/joystick/joywidget.cpp index 67ea30eeb..5d104006b 100644 --- a/kcontrol/joystick/joywidget.cpp +++ b/kcontrol/joystick/joywidget.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * Copyright (C) 2003 by Martin Koller * * m.koller@surfeu.at * - * This file is part of the TDE Control Center Module for Joysticks * + * This file is part of the Trinity Control Center Module for Joysticks * * * * 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 * diff --git a/kcontrol/joystick/joywidget.h b/kcontrol/joystick/joywidget.h index 5a33530f8..45291d275 100644 --- a/kcontrol/joystick/joywidget.h +++ b/kcontrol/joystick/joywidget.h @@ -1,7 +1,7 @@ /*************************************************************************** * Copyright (C) 2003 by Martin Koller * * m.koller@surfeu.at * - * This file is part of the TDE Control Center Module for Joysticks * + * This file is part of the Trinity Control Center Module for Joysticks * * * * 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 * diff --git a/kcontrol/joystick/poswidget.cpp b/kcontrol/joystick/poswidget.cpp index 95fb5dd30..af8609070 100644 --- a/kcontrol/joystick/poswidget.cpp +++ b/kcontrol/joystick/poswidget.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * Copyright (C) 2003 by Martin Koller * * m.koller@surfeu.at * - * This file is part of the TDE Control Center Module for Joysticks * + * This file is part of the Trinity Control Center Module for Joysticks * * * * 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 * diff --git a/kcontrol/joystick/poswidget.h b/kcontrol/joystick/poswidget.h index 4dd565cc5..324ee1da2 100644 --- a/kcontrol/joystick/poswidget.h +++ b/kcontrol/joystick/poswidget.h @@ -1,7 +1,7 @@ /*************************************************************************** * Copyright (C) 2003 by Martin Koller * * m.koller@surfeu.at * - * This file is part of the TDE Control Center Module for Joysticks * + * This file is part of the Trinity Control Center Module for Joysticks * * * * 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 * diff --git a/kcontrol/kcontrol/KControl.desktop b/kcontrol/kcontrol/KControl.desktop index c149fba3a..9413b2acc 100644 --- a/kcontrol/kcontrol/KControl.desktop +++ b/kcontrol/kcontrol/KControl.desktop @@ -5,7 +5,7 @@ Type=Application DocPath=kcontrol/index.html X-TDE-StartupNotify=true -Name=Control Center +Name=Trinity Control Center Name[af]=Beheer Sentrum Name[ar]=مركز التحكم Name[az]=İdarə Mərkəzi @@ -28,7 +28,7 @@ Name[et]=Juhtimiskeskus Name[eu]=Kontrol gunea Name[fa]=مرکز کنترل Name[fi]=Ohjauskeskus -Name[fr]=Centre de configuration de TDE +Name[fr]=Centre de configuration de Trinity Name[fy]=Konfiguraasjesintrum Name[ga]=Lárionad Rialaithe Name[gl]=Centro de Control @@ -38,7 +38,7 @@ Name[hr]=Upravljačko središte Name[hu]=Vezérlőpult Name[id]=Pusat Kontrol Name[is]=Stjórnborð -Name[it]=Centro di controllo +Name[it]=Centro di controllo di Trinity Name[ja]=コントロールセンター Name[ka]=საკონტროლო ცენტრი Name[kk]=Басқару орталығы diff --git a/kcontrol/kcontrol/KControl_NoDisplay.desktop b/kcontrol/kcontrol/KControl_NoDisplay.desktop index dec66d313..cc0c0119e 100644 --- a/kcontrol/kcontrol/KControl_NoDisplay.desktop +++ b/kcontrol/kcontrol/KControl_NoDisplay.desktop @@ -5,7 +5,7 @@ Type=Application DocPath=kcontrol/index.html X-TDE-StartupNotify=true -Name=Control Center +Name=Trinity Control Center Name[af]=Beheer Sentrum Name[ar]=مركز التحكم Name[az]=İdarə Mərkəzi @@ -28,7 +28,7 @@ Name[et]=Juhtimiskeskus Name[eu]=Kontrol gunea Name[fa]=مرکز کنترل Name[fi]=Ohjauskeskus -Name[fr]=Centre de configuration de TDE +Name[fr]=Centre de configuration de Trinity Name[fy]=Konfiguraasjesintrum Name[ga]=Lárionad Rialaithe Name[gl]=Centro de Control @@ -38,7 +38,7 @@ Name[hr]=Upravljačko središte Name[hu]=Vezérlőpult Name[id]=Pusat Kontrol Name[is]=Stjórnborð -Name[it]=Centro di controllo +Name[it]=Centro di controllo di Trinity Name[ja]=コントロールセンター Name[ka]=საკონტროლო ცენტრი Name[kk]=Басқару орталығы diff --git a/kcontrol/kcontrol/about/kcontrol.css b/kcontrol/kcontrol/about/kcontrol.css index 7e17e6a0d..dac9f05bf 100644 --- a/kcontrol/kcontrol/about/kcontrol.css +++ b/kcontrol/kcontrol/about/kcontrol.css @@ -9,14 +9,13 @@ #title { right: 80px; - font-size: x-large; + font-size: xx-large; } #tagline { right: 80px; - font-size: x-small; - text-shadow: #c8c8c8 0px 0px 3px; - + font-size: small; + text-shadow: #000000 1px 1px 1px; } #barCenter { diff --git a/kcontrol/kcontrol/about/main.html b/kcontrol/kcontrol/about/main.html index 65a0a4c02..23343ddda 100644 --- a/kcontrol/kcontrol/about/main.html +++ b/kcontrol/kcontrol/about/main.html @@ -20,6 +20,7 @@ <body> <div id="header"> <div id="headerL"/> + <div id="headerCenter"/> <div id="headerR"/> <div id="title"> diff --git a/kcontrol/kcontrol/about/top-right-kcontrol.png b/kcontrol/kcontrol/about/top-right-kcontrol.png Binary files differindex bad44f089..a615af44d 100644 --- a/kcontrol/kcontrol/about/top-right-kcontrol.png +++ b/kcontrol/kcontrol/about/top-right-kcontrol.png diff --git a/kcontrol/kcontrol/main.cpp b/kcontrol/kcontrol/main.cpp index 2656359c2..25ab4fc4a 100644 --- a/kcontrol/kcontrol/main.cpp +++ b/kcontrol/kcontrol/main.cpp @@ -103,7 +103,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[]) TDELocale::setMainCatalogue("kcontrol"); TDEAboutData aboutKControl( "kcontrol", I18N_NOOP("Trinity Control Center"), KCONTROL_VERSION, I18N_NOOP("The Trinity Control Center"), TDEAboutData::License_GPL, - I18N_NOOP("(c) 1998-2004, The TDE Control Center Developers")); + I18N_NOOP("(c) 1998-2004, The Trinity Control Center Developers")); TQCString argv_0 = argv[0]; TDEAboutData *aboutData; diff --git a/kcontrol/kcontrol/tde-kcontrol.desktop b/kcontrol/kcontrol/tde-kcontrol.desktop index f27736e6e..c5e78af16 100644 --- a/kcontrol/kcontrol/tde-kcontrol.desktop +++ b/kcontrol/kcontrol/tde-kcontrol.desktop @@ -5,7 +5,7 @@ Type=Application DocPath=kcontrol/index.html X-TDE-StartupNotify=true -Name=TDE Control Center +Name=Trinity Control Center Name[ca]=Centre de control del TDE Name[cs]=Ovládací centrum TDE Name[da]=TDE Kontrolcenter diff --git a/kcontrol/keys/keyconfig.cpp b/kcontrol/keys/keyconfig.cpp index 9785d22da..ee39447a1 100644 --- a/kcontrol/keys/keyconfig.cpp +++ b/kcontrol/keys/keyconfig.cpp @@ -137,7 +137,7 @@ void KKeyModule::init( bool isGlobal, bool _bSeriesOnly, bool bSeriesNone ) // That move will take a lot of UI redesigning, though, so i'll do it once CVS // opens up for feature commits again. -- ellis /* Needed to remove because this depended upon non-BC changes in KeyEntry.*/ - // If this is the "Global Keys" section of the TDE Control Center: + // If this is the "Global Keys" section of the Trinity Control Center: if( isGlobal && !bSeriesOnly ) { preferMetaBt = new TQCheckBox( i18n("Prefer 4-modifier defaults"), this ); if( !KKeySequence::keyboardHasMetaKey() ) diff --git a/kcontrol/kicker/menutab.ui b/kcontrol/kicker/menutab.ui index 78a9711ed..aa488c1b0 100644 --- a/kcontrol/kicker/menutab.ui +++ b/kcontrol/kicker/menutab.ui @@ -163,7 +163,7 @@ </widget> </grid> </widget> - <widget class="TQPushButton" colspan="4"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_editKMenuButton</cstring> </property> @@ -174,7 +174,21 @@ <string>Start the editor for the TDE Menu. Here you can add, edit, remove and hide applications.</string> </property> </widget> - <spacer> + <widget class="KPushButton"> + <property name="name"> + <cstring>btnCustomKMenuIcon</cstring> + </property> + <property name="text"> + <string>Change menu icon</string> + </property> + <property name="whatsThis" stdset="0"> + <string>Allows you to choose a different icon for the TDE menu.</string> + </property> + <property name="acceptDrops"> + <bool>false</bool> + </property> + </widget> + <spacer> <property name="name"> <cstring>Spacer10</cstring> </property> @@ -293,6 +307,22 @@ <property name="margin"> <number>0</number> </property> + <widget class="TQLabel" row="0" column="0"> + <property name="name"> + <cstring>TextLabel1_3_3_2</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>1</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Text:</string> + </property> + </widget> <widget class="TQLineEdit" row="0" column="1" colspan="3"> <property name="name"> <cstring>kcfg_KMenuText</cstring> @@ -301,70 +331,7 @@ <number>35</number> </property> </widget> - <widget class="TQLabel" row="3" column="0" colspan="2"> - <property name="name"> - <cstring>TextLabel1_3_3_2</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>1</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Change TDE Menu icon:</string> - </property> - </widget> - <widget class="KPushButton" row="3" column="3" colspan="1"> - <property name="name"> - <cstring>btnCustomKMenuIcon</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>0</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>26</width> - <height>26</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>26</width> - <height>26</height> - </size> - </property> - <property name="acceptDrops"> - <bool>false</bool> - </property> - <property name="text"> - <string></string> - </property> - </widget> - <widget class="TQLabel" row="0" column="0"> - <property name="name"> - <cstring>TextLabel1_3_3_2</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>1</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Text:</string> - </property> - </widget> - <widget class="TQLabel" row="2" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel1_3_3_2</cstring> </property> @@ -380,12 +347,12 @@ <string>Font:</string> </property> </widget> - <widget class="TDEFontRequester" row="2" column="1" rowspan="1" colspan="3"> + <widget class="TDEFontRequester" row="1" column="1" colspan="3"> <property name="name"> <cstring>kcfg_ButtonFont</cstring> </property> </widget> - <spacer row="4" column="3"> + <spacer row="2" column="3"> <property name="name"> <cstring>spacer6</cstring> </property> diff --git a/kcontrol/kicker/menutab_impl.cpp b/kcontrol/kicker/menutab_impl.cpp index 571365a55..6be59c475 100644 --- a/kcontrol/kicker/menutab_impl.cpp +++ b/kcontrol/kicker/menutab_impl.cpp @@ -85,13 +85,12 @@ MenuTab::MenuTab( TQWidget *parent, const char* name ) connect(maxrecentdocs, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(kmenuChanged())); TDEIconLoader * ldr = TDEGlobal::iconLoader(); - TQPixmap kmenu_icon; m_kmenu_icon = KickerSettings::customKMenuIcon(); if (m_kmenu_icon.isNull() == true) { m_kmenu_icon = TQString("kmenu"); } - kmenu_icon = ldr->loadIcon(m_kmenu_icon, TDEIcon::Small, TDEIcon::SizeSmall); - btnCustomKMenuIcon->setPixmap(kmenu_icon); + TQIconSet kmenu_icon = ldr->loadIconSet(m_kmenu_icon, TDEIcon::Small, TDEIcon::SizeSmall); + btnCustomKMenuIcon->setIconSet(kmenu_icon); TDEConfig *config; config = new TDEConfig(TQString::fromLatin1("kdeglobals"), false, false); @@ -323,10 +322,9 @@ void MenuTab::launchIconEditor() return; m_kmenu_icon = newIcon; - TDEIconLoader * ldr = TDEGlobal::iconLoader(); - TQPixmap kmenu_icon; - kmenu_icon = ldr->loadIcon(m_kmenu_icon, TDEIcon::Small, TDEIcon::SizeSmall); - btnCustomKMenuIcon->setPixmap(kmenu_icon); + TDEIconLoader * ldr = TDEGlobal::iconLoader(); + TQIconSet kmenu_icon = ldr->loadIconSet(m_kmenu_icon, TDEIcon::Small, TDEIcon::SizeSmall); + btnCustomKMenuIcon->setIconSet(kmenu_icon); m_kmenu_button_changed = true; emit changed(); diff --git a/kcontrol/knotify/README b/kcontrol/knotify/README index 712b78d2e..0ebfea879 100644 --- a/kcontrol/knotify/README +++ b/kcontrol/knotify/README @@ -1,2 +1,2 @@ -This is a TDE Control Center Module for configuring system notifications +This is a Trinity Control Center Module for configuring system notifications diff --git a/kcontrol/konq/onlyone.png b/kcontrol/konq/onlyone.png Binary files differindex 03cb65b9c..7033763f3 100644 --- a/kcontrol/konq/onlyone.png +++ b/kcontrol/konq/onlyone.png diff --git a/kcontrol/konq/overlapping.png b/kcontrol/konq/overlapping.png Binary files differindex 93adb259e..145234576 100644 --- a/kcontrol/konq/overlapping.png +++ b/kcontrol/konq/overlapping.png diff --git a/kcontrol/randr/tderandrtray.cpp b/kcontrol/randr/tderandrtray.cpp index 1e07cea1d..32f6f39ac 100644 --- a/kcontrol/randr/tderandrtray.cpp +++ b/kcontrol/randr/tderandrtray.cpp @@ -54,7 +54,9 @@ KRandRSystemTray::KRandRSystemTray(TQWidget* parent, const char *name) , m_popupUp(false) , m_help(new KHelpMenu(this, TDEGlobal::instance()->aboutData(), false, actionCollection())) { - setPixmap(KSystemTray::loadSizedIcon("randr", width())); + TDEPopupMenu *help = m_help->menu(); + help->connectItem(KHelpMenu::menuHelpContents, this, TQT_SLOT(slotHelpContents())); + setPixmap(KSystemTray::loadIcon("randr")); setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); connect(this, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(_quit())); TQToolTip::add(this, i18n("Screen resize & rotate")); @@ -111,7 +113,7 @@ void KRandRSystemTray::_quit (){ exit(0); } -void KRandRSystemTray::resizeEvent ( TQResizeEvent * ) +void KRandRSystemTray::resizeTrayIcon () { // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes TQPixmap origpixmap; @@ -124,6 +126,18 @@ void KRandRSystemTray::resizeEvent ( TQResizeEvent * ) setPixmap(scaledpixmap); } +void KRandRSystemTray::resizeEvent ( TQResizeEvent * ) +{ + // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes + resizeTrayIcon(); +} + +void KRandRSystemTray::showEvent ( TQShowEvent * ) +{ + // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes + resizeTrayIcon(); +} + void KRandRSystemTray::mousePressEvent(TQMouseEvent* e) { // Popup the context menu with left-click @@ -882,3 +896,9 @@ void KRandRSystemTray::deviceChanged (TDEGenericDevice* device) { applyHotplugRules(locateLocal("config", "/", true)); } } + +void KRandRSystemTray::slotHelpContents() +{ + kapp->invokeHelp(TQString::null, "tderandrtray"); +} + diff --git a/kcontrol/randr/tderandrtray.h b/kcontrol/randr/tderandrtray.h index aee432b4a..09a1b2671 100644 --- a/kcontrol/randr/tderandrtray.h +++ b/kcontrol/randr/tderandrtray.h @@ -58,10 +58,12 @@ protected slots: void slotOutputChanged(int parameter); void slotColorProfileChanged(int parameter); void slotDisplayProfileChanged(int parameter); + void slotHelpContents(); protected: void mousePressEvent( TQMouseEvent *e ); void resizeEvent ( TQResizeEvent * ); + void showEvent ( TQShowEvent * ); private: void populateMenu(TDEPopupMenu* menu); @@ -70,6 +72,7 @@ private: int GetHackResolutionParameter(); void findPrimaryDisplay(); void reloadDisplayConfiguration(); + void resizeTrayIcon(); bool m_popupUp; KHelpMenu* m_help; diff --git a/kcontrol/screensaver/scrnsave.cpp b/kcontrol/screensaver/scrnsave.cpp index 33df74f27..a0b26ae46 100644 --- a/kcontrol/screensaver/scrnsave.cpp +++ b/kcontrol/screensaver/scrnsave.cpp @@ -177,7 +177,7 @@ KScreenSaver::KScreenSaver(TQWidget *parent, const char *name, const TQStringLis mSettingsGroup = new TQGroupBox( i18n("Settings"), this ); mSettingsGroup->setColumnLayout( 0, Qt::Vertical ); leftColumnLayout->addWidget( mSettingsGroup ); - TQGridLayout *settingsGroupLayout = new TQGridLayout( mSettingsGroup->layout(), 4, 2, KDialog::spacingHint() ); + TQGridLayout *settingsGroupLayout = new TQGridLayout( mSettingsGroup->layout(), 5, 2, KDialog::spacingHint() ); mEnabledCheckBox = new TQCheckBox(i18n("Start a&utomatically"), mSettingsGroup); mEnabledCheckBox->setChecked(mEnabled); @@ -264,13 +264,20 @@ KScreenSaver::KScreenSaver(TQWidget *parent, const char *name, const TQStringLis settingsGroupLayout->addWidget(mUseUnmanagedLockWindowsCheckBox, 2, 1); TQWhatsThis::add( mUseUnmanagedLockWindowsCheckBox, i18n("Use old-style unmanaged X11 lock windows.") ); - mHideActiveWindowsFromSaverCheckBox = new TQCheckBox( i18n("&Hide active windows from saver"), mSettingsGroup ); + mHideActiveWindowsFromSaverCheckBox = new TQCheckBox( i18n("Hide active &windows from saver"), mSettingsGroup ); mHideActiveWindowsFromSaverCheckBox->setEnabled( true ); mHideActiveWindowsFromSaverCheckBox->setChecked( mHideActiveWindowsFromSaver ); connect( mHideActiveWindowsFromSaverCheckBox, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotHideActiveWindowsFromSaver( bool ) ) ); settingsGroupLayout->addWidget(mHideActiveWindowsFromSaverCheckBox, 3, 1); TQWhatsThis::add( mHideActiveWindowsFromSaverCheckBox, i18n("Hide all active windows from the screen saver and use the desktop background as the screen saver input.") ); + mHideCancelButtonCheckBox = new TQCheckBox( i18n("Hide &cancel button"), mSettingsGroup ); + mHideCancelButtonCheckBox->setEnabled( true ); + mHideCancelButtonCheckBox->setChecked( mHideCancelButton ); + connect( mHideCancelButtonCheckBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotHideCancelButton(bool)) ); + settingsGroupLayout->addWidget(mHideCancelButtonCheckBox, 4, 1); + TQWhatsThis::add(mHideCancelButtonCheckBox, i18n("Hide Cancel button from the \"Desktop Session Locked\" dialog.")); + // right column TQBoxLayout* rightColumnLayout = new TQVBoxLayout(topLayout, KDialog::spacingHint()); @@ -432,6 +439,7 @@ void KScreenSaver::readSettings( bool useDefaults ) mUseTSAK = config->readBoolEntry("UseTDESAK", true); mUseUnmanagedLockWindows = config->readBoolEntry("UseUnmanagedLockWindows", false); mHideActiveWindowsFromSaver = config->readBoolEntry("HideActiveWindowsFromSaver", true); + mHideCancelButton = config->readBoolEntry("HideCancelButton", false); mSaver = config->readEntry("Saver"); if (mTimeout < 60) mTimeout = 60; @@ -484,6 +492,7 @@ void KScreenSaver::save() config->writeEntry("UseTDESAK", mUseTSAK); config->writeEntry("UseUnmanagedLockWindows", mUseUnmanagedLockWindows); config->writeEntry("HideActiveWindowsFromSaver", mHideActiveWindowsFromSaver); + config->writeEntry("HideCancelButton", mHideCancelButton); if ( !mSaver.isEmpty() ) config->writeEntry("Saver", mSaver); @@ -688,6 +697,7 @@ void KScreenSaver::slotEnable(bool e) // void KScreenSaver::processLockouts() { + bool useSAK = mTDMConfig->readBoolEntry("UseSAK", false); mActivateLbl->setEnabled( mEnabled ); mWaitEdit->setEnabled( mEnabled ); mLockCheckBox->setEnabled( mEnabled ); @@ -699,7 +709,7 @@ void KScreenSaver::processLockouts() mDelaySaverStartCheckBox->setEnabled( false ); mDelaySaverStartCheckBox->setChecked( false ); } - if (!mUseUnmanagedLockWindows && mTDMConfig->readBoolEntry("UseSAK", false)) { + if (!mUseUnmanagedLockWindows && useSAK) { mUseTSAKCheckBox->setEnabled( true ); mUseTSAKCheckBox->setChecked( mUseTSAK ); } @@ -715,6 +725,14 @@ void KScreenSaver::processLockouts() mHideActiveWindowsFromSaverCheckBox->setEnabled( false ); mHideActiveWindowsFromSaverCheckBox->setChecked( false ); } + if (mUseUnmanagedLockWindows || (useSAK && mUseTSAK)) { + mHideCancelButtonCheckBox->setEnabled( false ); + mHideCancelButtonCheckBox->setChecked( false ); + } + else { + mHideCancelButtonCheckBox->setEnabled( true ); + mHideCancelButtonCheckBox->setChecked( mHideCancelButton ); + } mLockLbl->setEnabled( mEnabled && mLock ); mWaitLockEdit->setEnabled( mEnabled && mLock ); } @@ -980,6 +998,16 @@ void KScreenSaver::slotHideActiveWindowsFromSaver( bool h ) //--------------------------------------------------------------------------- // +void KScreenSaver::slotHideCancelButton( bool h ) +{ + if (mHideCancelButtonCheckBox->isEnabled()) mHideCancelButton = h; + processLockouts(); + mChanged = true; + emit changed(true); +} + +//--------------------------------------------------------------------------- +// void KScreenSaver::slotSetupDone(TDEProcess *) { mPrevSelected = -1; // see ugly hack in slotPreviewExited() diff --git a/kcontrol/screensaver/scrnsave.h b/kcontrol/screensaver/scrnsave.h index a8f6e53b0..d52c81227 100644 --- a/kcontrol/screensaver/scrnsave.h +++ b/kcontrol/screensaver/scrnsave.h @@ -60,6 +60,7 @@ protected slots: void slotUseTSAK( bool ); void slotUseUnmanagedLockWindows( bool ); void slotHideActiveWindowsFromSaver( bool ); + void slotHideCancelButton( bool ); void processLockouts(); void slotSetupDone(TDEProcess*); // when selecting a new screensaver, the old preview will @@ -103,6 +104,7 @@ protected: TQCheckBox *mUseTSAKCheckBox; TQCheckBox *mUseUnmanagedLockWindowsCheckBox; TQCheckBox *mHideActiveWindowsFromSaverCheckBox; + TQCheckBox *mHideCancelButtonCheckBox; int mSelected; int mPrevSelected; @@ -121,6 +123,7 @@ protected: bool mUseTSAK; bool mUseUnmanagedLockWindows; bool mHideActiveWindowsFromSaver; + bool mHideCancelButton; KSimpleConfig* mTDMConfig; }; diff --git a/kcontrol/smartcard/nosmartcardbase.ui b/kcontrol/smartcard/nosmartcardbase.ui index ceaec9e3f..3b32d63b7 100644 --- a/kcontrol/smartcard/nosmartcardbase.ui +++ b/kcontrol/smartcard/nosmartcardbase.ui @@ -44,7 +44,7 @@ </property> <property name="text"> <string> -1) The TDE daemon, 'kded' is not running. You can restart it by running the command 'tdeinit' and then try reloading the TDE Control Center to see if this message goes away. +1) The TDE daemon, 'kded' is not running. You can restart it by running the command 'tdeinit' and then try reloading the Trinity Control Center to see if this message goes away. 2) You don't appear to have smartcard support in the TDE libraries. You will need to recompile the tdelibs package with libpcsclite installed.</string> </property> |