SOURCES (DEVEL): kde4-kdebase-workspace-branch.diff (NEW) - new
arekm
arekm at pld-linux.org
Tue Feb 3 10:12:26 CET 2009
Author: arekm Date: Tue Feb 3 09:12:26 2009 GMT
Module: SOURCES Tag: DEVEL
---- Log message:
- new
---- Files affected:
SOURCES:
kde4-kdebase-workspace-branch.diff (NONE -> 1.1.2.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/kde4-kdebase-workspace-branch.diff
diff -u /dev/null SOURCES/kde4-kdebase-workspace-branch.diff:1.1.2.1
--- /dev/null Tue Feb 3 10:12:27 2009
+++ SOURCES/kde4-kdebase-workspace-branch.diff Tue Feb 3 10:12:20 2009
@@ -0,0 +1,3901 @@
+--- workspace/ksmserver/shutdowndlg.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/ksmserver/shutdowndlg.cpp (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -604,6 +604,8 @@
+ m_svg->paint(&p, QRect(0, 0, width(), height()), "background");
+ setMask(mask);
+ }
++
++ KDialog::centerOnScreen(this);
+ }
+
+ void KSMShutdownDlg::slotLogout()
+--- workspace/kcontrol/kfontinst/lib/FcEngine.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/kcontrol/kfontinst/lib/FcEngine.cpp (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -1112,7 +1112,7 @@
+
+ XftFont *f=getFont(constQuerySize);
+
+- if(!isCorrect(f, true))
++ if(f && !isCorrect(f, true))
+ {
+ XftFontClose(QX11Info::display(), f);
+ f=NULL;
+--- workspace/kcontrol/screensaver/scrnsave.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/kcontrol/screensaver/scrnsave.cpp (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -345,6 +345,10 @@
+ {
+ if (mPreviewProc->isRunning())
+ {
++ //Avoid triggering slotPreviewExited on close
++ disconnect(mPreviewProc, SIGNAL(processExited(K3Process *)),
++ this, SLOT(slotPreviewExited(K3Process *)));
++
+ mPreviewProc->kill( );
+ mPreviewProc->wait( );
+ }
+--- workspace/kcontrol/autostart/autostart.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/kcontrol/autostart/autostart.desktop (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -91,6 +91,7 @@
+ Comment[eo]=Agordilo por la administrado de aŭtomate lanĉitaj programo ĉe KDE-lanĉo.
+ Comment[es]=Una herramienta de configuración para gestionar los programas que arrancan automáticamente con KDE.
+ Comment[et]=Seadistustööriist programmide haldamiseks, mis käivituvad koos KDE-ga.
++Comment[eu]=KDErekin zein programa abiatzen diren kudeatzeko konfiguraketa tresna bat.
+ Comment[fi]=Työkalu KDE:n käynnistyksessä käynnistettävien ohjelmien hallintaan.
+ Comment[fr]=Un outil de gestion des programmes lancés au démarrage de KDE.
+ Comment[fy]=In konfiguraasjeark foar it behearen fan programma's dy't mei KDE starte.
+--- workspace/kcontrol/randr/outputgraphicsitem.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/kcontrol/randr/outputgraphicsitem.cpp (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -29,6 +29,8 @@
+ OutputGraphicsItem::OutputGraphicsItem(RandROutput *output)
+ : QGraphicsRectItem(output->rect())
+ {
++ m_output = output;
++
+ m_left = m_right = m_top = m_bottom = NULL;
+
+ setPen(QPen(Qt::black));
+@@ -39,26 +41,14 @@
+ setFlag(QGraphicsItem::ItemIsMovable, false);
+ setFlag(QGraphicsItem::ItemIsSelectable, true);
+
+- // An example of this description text with radeonhd on randr 1.2:
+- // DVI-I_2/digital
+- // 1680x1050 (60.0 Hz)
+- int w = output->rect().width(), h = output->rect().height();
+- QString refresh = QString::number(output->refreshRate(), 'f', 1);
+- QString desc = output->name() + '\n' +
+- QString("%1x%2 (%3 Hz)").arg(w).arg(h).arg(refresh);
+-
+- m_text = new QGraphicsTextItem(desc, this);
+-
++ m_text = new QGraphicsTextItem( this );
++
+ QFont font = KGlobalSettings::generalFont();
+ font.setPixelSize(72);
+ m_text->setFont(font);
++
++ updateText();
+
+- QRectF textRect = m_text->boundingRect();
+- QRect outRect = output->rect();
+-
+- // more accurate text centering
+- m_text->setPos((outRect.width() - textRect.width()) / 2,
+- (outRect.height() - textRect.height()) / 2);
+ }
+
+ OutputGraphicsItem::~OutputGraphicsItem()
+@@ -226,6 +216,28 @@
+ }
+ }
+
++void OutputGraphicsItem::updateText()
++{
++ // An example of this description text with radeonhd on randr 1.2:
++ // DVI-I_2/digital
++ // 1680x1050 (60.0 Hz)
++
++ int w = m_output->rect().width(), h = m_output->rect().height();
++
++ QString refresh = QString::number(m_output->refreshRate(), 'f', 1);
++ QString desc = m_output->name() + '\n' +
++ QString("%1x%2 (%3 Hz)").arg(w).arg(h).arg(refresh);
++
++ m_text->setPlainText(desc);
++
++ QRectF textRect = m_text->boundingRect();
++ QRect outRect = m_output->rect();
++ // more accurate text centering
++ m_text->setPos((outRect.width() - textRect.width()) / 2,
++ (outRect.height() - textRect.height()) / 2);
++
++}
++
+ void OutputGraphicsItem::disconnect()
+ {
+ // for now just disconnect everything
+--- workspace/kcontrol/randr/outputconfig.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/kcontrol/randr/outputconfig.cpp (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -124,9 +124,8 @@
+ if(changes & RandR::ChangeRect) {
+ QRect r = m_output->rect();
+ kDebug() << "Output rect changed:" << r;
+- //m_item->setRect(0, 0, r.width(), r.height());
+ m_item->setRect(r);
+- //m_item->setPos
++ emit updateView();
+ }
+
+ if(changes & RandR::ChangeRotation) {
+@@ -152,6 +151,11 @@
+ //QSize modeSize = m_output->screen()->mode(m_output->mode()).size();
+ QSize modeSize = m_output->mode().size();
+ updateRateList(sizeCombo->findData(modeSize));
++
++ //Update the text inside the OutputGraphicsItem
++ m_item->updateText();
++ m_item->setRect(m_output->rect());
++ emit updateView();
+ }
+ }
+
+--- workspace/kcontrol/randr/outputgraphicsitem.h (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/kcontrol/randr/outputgraphicsitem.h (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -44,6 +44,8 @@
+ void setBottom(OutputGraphicsItem *output);
+
+ bool isConnected();
++
++ void updateText();
+
+ protected:
+ void disconnect();
+--- workspace/kcontrol/randr/krandrtray.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/kcontrol/randr/krandrtray.desktop (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -33,7 +33,7 @@
+ GenericName[eo]=Regrandigi kaj turni ekranon
+ GenericName[es]=Redimensionar y rotar pantalla
+ GenericName[et]=Ekraani suuruse muutmine ja pööramine
+-GenericName[eu]=Pantailaren tamaina aldaketa eta biraketa
++GenericName[eu]=Pantailaren neurri aldaketa eta biraketa
+ GenericName[fa]=تغییر اندازه و چرخش پرده
+ GenericName[fi]=Näytön kuvan koon muuttaminen ja kuvan kääntäminen
+ GenericName[fr]=Redimensionnement et rotation de l'écran
+@@ -106,6 +106,7 @@
+ Comment[eo]=Panela aplikaĵeto por regrandigi kaj reorienti la X ekranojn.
+ Comment[es]=Una miniaplicación del panel para redimensionar y reorientar pantallas X.
+ Comment[et]=Paneeliaplett X'i ekraanide suuruse muutmiseks ja pööramiseks
++Comment[eu]=X pantailen neurria aldatu eta biratzeko paneleko applet bat.
+ Comment[fa]=برنامک تابلویی برای تغییر اندازه و تغییر جهت پردههای X.
+ Comment[fi]=Panelisovelma X-ruutujen koon ja suunnan muuttamiseksi
+ Comment[fr]=Une applet du tableau de bord pour redimensionner et pivoter l'écran.
+--- workspace/kcontrol/kdm/background/patterns/triangles.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/kcontrol/kdm/background/patterns/triangles.desktop (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -39,6 +39,7 @@
+ Comment[lv]=Trīsstūri
+ Comment[mk]=Триаголници
+ Comment[ml]=ത്രികോണങ്ങള്
++Comment[ms]=Segi Tiga
+ Comment[nds]=Dre'ecks
+ Comment[nl]=Triangels
+ Comment[nn]=Trekantar
+--- workspace/kcontrol/kdm/background/patterns/fish.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/kcontrol/kdm/background/patterns/fish.desktop (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -38,6 +38,7 @@
+ Comment[lv]=Zivju tīkls
+ Comment[mk]=Рибарска мрежа
+ Comment[mr]=फिश नेट
++Comment[ms]=Jala Ikan
+ Comment[nb]=Fish-nettverk
+ Comment[nds]=Fischnett
+ Comment[nl]=Visnet
+--- workspace/doc/kcontrol/powerdevil/index.docbook (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/doc/kcontrol/powerdevil/index.docbook (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -4,7 +4,7 @@
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE">
+ ]>
+-<article>
++<article lang="&language;">
+ <articleinfo>
+ <authorgroup>
+ <author>&Dario.Freddi;&Dario.Freddi.mail;</author>
+@@ -324,4 +324,4 @@
+
+ vim:tabstop=2:shiftwidth=2:expandtab
+ kate: space-indent on; indent-width 2; tab-width 2; indent-mode none;
+--->
+\ No newline at end of file
++-->
+--- workspace/doc/kcontrol/autostart/index.docbook (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/doc/kcontrol/autostart/index.docbook (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -4,7 +4,7 @@
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE">
+ ]>
+-<article>
++<article lang="&language;">
+ <articleinfo>
+ <authorgroup>
+ <author>&Anne-Marie.Mahfouf;</author>
+@@ -157,4 +157,5 @@
+
+ vim:tabstop=2:shiftwidth=2:expandtab
+ kate: space-indent on; indent-width 2; tab-width 2; indent-mode none;
+--->
+\ No newline at end of file
++-->
++
+--- workspace/doc/kcontrol/splashscreen/index.docbook (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/doc/kcontrol/splashscreen/index.docbook (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -4,7 +4,7 @@
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE">
+ ]>
+-<article>
++<article lang="&language;">
+ <articleinfo>
+ <authorgroup>
+ <author>
+@@ -113,4 +113,4 @@
+
+ vim:tabstop=2:shiftwidth=2:expandtab
+ kate: space-indent on; indent-width 2; tab-width 2; indent-mode none;
+--->
+\ No newline at end of file
++-->
+--- workspace/doc/kcontrol/kcmaccess/index.docbook (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/doc/kcontrol/kcmaccess/index.docbook (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -5,7 +5,7 @@
+ <!ENTITY % English "INCLUDE" > <!-- change language only here -->
+ ]>
+
+-<article>
++<article lang="&language;">
+ <articleinfo>
+
+ <authorgroup>
+--- workspace/doc/kcontrol/joystick/index.docbook (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/doc/kcontrol/joystick/index.docbook (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -4,7 +4,7 @@
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE">
+ ]>
+-<article>
++<article lang="&language;">
+ <articleinfo>
+ <authorgroup>
+ <author>
+@@ -133,4 +133,4 @@
+
+ vim:tabstop=2:shiftwidth=2:expandtab
+ kate: space-indent on; indent-width 2; tab-width 2; indent-mode none;
+--->
+\ No newline at end of file
++-->
+--- workspace/doc/kcontrol/kcmdisplay/index.docbook (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/doc/kcontrol/kcmdisplay/index.docbook (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -4,7 +4,7 @@
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE">
+ ]>
+-<article>
++<article lang="&language;">
+ <articleinfo>
+ <authorgroup>
+ <author>&Richard.Johnson;</author>
+@@ -303,4 +303,5 @@
+
+ vim:tabstop=2:shiftwidth=2:expandtab
+ kate: space-indent on; indent-width 2; tab-width 2; indent-mode none;
+--->
+\ No newline at end of file
++-->
++
+--- workspace/systemsettings/categories/settings-general.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/systemsettings/categories/settings-general.desktop (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -50,7 +50,7 @@
+ Name[ml]=സാധാരണ
+ Name[mr]=सामान्य
+ Name[nb]=Generelt
+-Name[nds]=Allgemeen
++Name[nds]=Allmeen
+ Name[ne]=सामन्य
+ Name[nl]=Algemeen
+ Name[nn]=Generelt
+--- workspace/systemsettings/categories/settings-advanced-user-settings.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/systemsettings/categories/settings-advanced-user-settings.desktop (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -39,6 +39,7 @@
+ Name[kn]=ಪ್ರೌಢ ಬಳಕೆದಾರ ಸಂಯೋಜನೆಗಳು
+ Name[ko]=고급 사용자 설정
+ Name[ku]=Mîhengên Pêşketî ên Bikarhêner
++Name[lt]=Sudėtingesni vartotojo nustatymai
+ Name[lv]=Paplašināti lietotāja iestatījumi
+ Name[mai]=उन्नत प्रयोक्ता बिन्यास
+ Name[mk]=Напредни кориснички поставувања
+--- workspace/kwrited/kwrited.notifyrc (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/kwrited/kwrited.notifyrc (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -17,6 +17,7 @@
+ Comment[eu]=KDEren idazketa deabrua
+ Comment[fr]=Démon Write de KDE
+ Comment[fy]=KDE Skriuwdaemon
++Comment[ga]=Deamhan scríofa KDE
+ Comment[gl]=Daemon de escritura de KDE
+ Comment[gu]=KDE રાઇટ ડેમોન
+ Comment[he]=תהליך הרקע Write של KDE
+@@ -64,6 +65,7 @@
+ Name[el]=Λήφθηκε νέο μήνυμα
+ Name[es]=Se ha recibido un nuevo mensaje
+ Name[et]=Saabus uus teade
++Name[eu]=Mezu berria jaso da
+ Name[fr]=Nouveau message reçu
+ Name[fy]=Nij berjocht is ûntfongen
+ Name[gl]=Recibiuse unha mensaxe nova
+@@ -112,6 +114,7 @@
+ Comment[el]=Ο δαίμονας έλαβε ένα νέο μήνυμα μέσω του wall(1) ή του write(1)
+ Comment[es]=El demonio recibió un nuevo mensaje enviado mediante wall(1) o write(1)
+ Comment[et]=Deemon sai uue teate, mis saadeti käsuga wall(1) või write(1)
++Comment[eu]=Deabruak hauetako batekin bidalitako mezu berri bat jaso du wall(1) edo write(1)
+ Comment[fr]=Le démon a reçu un nouveau message envoyé avec wall(1) ou write(1)
+ Comment[fy]=De daemon ûntfong in nij berjocht stjoert mei wall(1) of write(1)
+ Comment[gl]=O daemon recibiu unha mensaxe nova enviada con wall(1) ou write(1)
+--- workspace/wallpapers/HighTide/metadata.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/wallpapers/HighTide/metadata.desktop (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -21,6 +21,8 @@
+ Name[te]=హైటైడ్
+ Name[tr]=Büyük Med Cezir
+ Name[uk]=Висока хвиля
++Name[x-test]=xxHighTidexx
++Name[zh_CN]=高潮
+ Name[zh_TW]=高潮
+
+ X-KDE-PluginInfo-Name=HighTide
+--- workspace/powerdevil/kcmodule/powerdevilconfig.desktop (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/powerdevil/kcmodule/powerdevilconfig.desktop (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -27,6 +27,7 @@
+ Name[fi]=Virranhallinta
+ Name[fr]=Gestion de l'énergie
+ Name[fy]=Enerzjybehear
++Name[ga]=Bainisteoireacht Cumhachta
+ Name[gl]=Xestión da enerxía
+ Name[gu]=પાવર વ્યવસ્થાપક
+ Name[he]=ניהול צריכת חשמל
+--- workspace/powerdevil/powerdevil.notifyrc (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/powerdevil/powerdevil.notifyrc (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -16,6 +16,7 @@
+ Name[fi]=Virranhallinta
+ Name[fr]=Gestion de l'énergie
+ Name[fy]=Enerzjybehear
++Name[ga]=Bainisteoireacht Cumhachta
+ Name[gl]=Xestión da enerxía
+ Name[gu]=પાવર વ્યવસ્થાપક
+ Name[he]=ניהול צריכת חשמל
+--- workspace/krunner/screensaver/saverengine.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/krunner/screensaver/saverengine.cpp (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -46,7 +46,11 @@
+ // Save X screensaver parameters
+ XGetScreenSaver(QX11Info::display(), &mXTimeout, &mXInterval,
+ &mXBlanking, &mXExposures);
+- // ... and disable it
++ // And disable it. The internal X screensaver is not used at all, but we use its
++ // internal idle timer (and it is also used by DPMS support in X). This timer must not
++ // be altered by this code, since e.g. resetting the counter after activating our
++ // screensaver would prevent DPMS from activating. We use the timer merely to detect
++ // user activity.
+ XSetScreenSaver(QX11Info::display(), 0, mXInterval, mXBlanking, mXExposures);
+
+ mState = Waiting;
+@@ -87,7 +91,6 @@
+
+ void SaverEngine::Lock()
+ {
+- bool ok = true;
+ if (mState == Waiting)
+ {
+ startLockProcess( ForceLock );
+@@ -125,6 +128,7 @@
+
+ void SaverEngine::SimulateUserActivity()
+ {
++ XForceScreenSaver( QX11Info::display(), ScreenSaverReset );
+ if ( mXAutoLock && mState == Waiting )
+ {
+ mXAutoLock->resetTrigger();
+@@ -323,6 +327,8 @@
+ //
+ void SaverEngine::idleTimeout()
+ {
++ if( mState != Waiting )
++ return; // already saving
+ startLockProcess( DefaultLock );
+ }
+
+--- workspace/krunner/screensaver/xautolock.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/krunner/screensaver/xautolock.cpp (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -83,8 +83,10 @@
+ mActive = false;
+
+ mTimerId = startTimer( CHECK_INTERVAL );
++ // This is an internal clock timer (in seconds), used instead of querying system time.
++ // It is incremented manually, preventing from problems with clock jumps.
++ // In other words, this is the 'now' time and the reference point for other times here.
+ mElapsed = 0;
+-
+ }
+
+ //---------------------------------------------------------------------------
+@@ -126,8 +128,6 @@
+ {
+ mActive = true;
+ resetTrigger();
+- XSetScreenSaver(QX11Info::display(), mTimeout + 10, 100, PreferBlanking, DontAllowExposures); // We'll handle blanking
+- kDebug() << "XSetScreenSaver" << mTimeout + 10;
+ }
+
+ //---------------------------------------------------------------------------
+@@ -138,8 +138,6 @@
+ {
+ mActive = false;
+ resetTrigger();
+- XSetScreenSaver(QX11Info::display(), 0, 100, PreferBlanking, DontAllowExposures); // No blanking at all
+- kDebug() << "XSetScreenSaver 0";
+ }
+
+ //---------------------------------------------------------------------------
+@@ -148,12 +146,15 @@
+ //
+ void XAutoLock::resetTrigger()
+ {
++ // Time of the last user activity (used only when the internal XScreensaver
++ // idle counter is not available).
+ mLastReset = mElapsed;
++ // Time when screensaver should be activated.
+ mTrigger = mElapsed + mTimeout;
+ #ifdef HAVE_XSCREENSAVER
+ mLastIdle = 0;
+ #endif
+- XForceScreenSaver( QX11Info::display(), ScreenSaverReset );
++ // Do not reset the internal X screensaver here (no XForceScreenSaver())
+ }
+
+ //---------------------------------------------------------------------------
+@@ -205,6 +206,9 @@
+ if (mMitInfo)
+ {
+ Display *d = QX11Info::display();
++ // Check user idle time. If it is smaller than before, it is either
++ // clock jump or user activity, so reset the trigger time. Checking whether
++ // there is user inactivity timeout is done below using mTrigger and mElapsed.
+ XScreenSaverQueryInfo(d, DefaultRootWindow(d), mMitInfo);
+ if (mLastIdle < mMitInfo->idle)
+ mLastIdle = mMitInfo->idle;
+@@ -218,35 +222,46 @@
+
+ bool activate = false;
+
+- // kDebug() << now << mTrigger;
++ // This is the test whether to activate screensaver. If we have reached the time
++ // and for the whole timeout period there was no activity (which would change mTrigger
++ // again), activate.
+ if (mElapsed >= mTrigger)
+- {
+- resetTrigger();
+ activate = true;
+- }
+
+ #ifdef HAVE_DPMS
+ BOOL on;
+ CARD16 state;
++ CARD16 timeout1, timeout2, timeout3;
+ DPMSInfo( QX11Info::display(), &state, &on );
++ DPMSGetTimeouts( QX11Info::display(), &timeout1, &timeout2, &timeout3 );
+
+ // kDebug() << "DPMSInfo " << state << on;
+ // If DPMS is active, it makes XScreenSaverQueryInfo() report idle time
+ // that is always smaller than DPMS timeout (X bug I guess). So if DPMS
+ // saving is active, simply always activate our saving too, otherwise
+ // this could prevent locking from working.
++ // X.Org 7.4: With this version activating DPMS resets the screensaver idle timer,
++ // so keep this. It probably makes sense to always do this anyway.
+ if(state == DPMSModeStandby || state == DPMSModeSuspend || state == DPMSModeOff)
+ activate = true;
+- if(!on && mDPMS) {
++ // If we are DPMS-dependent and either DPMS is turned off completely or all
++ // three DPMS modes are turned off, don't activate (apps use this to turn off
++ // screensavers).
++ if(mDPMS && (!on || (timeout1 == 0 && timeout2 == 0 && timeout3 == 0 ))) {
+ activate = false;
+ resetTrigger();
+ }
+ #endif
+
+-#ifdef HAVE_XSCREENSAVER
+- if (mMitInfo && mMitInfo->state == ScreenSaverDisabled)
+- activate = false;
+-#endif
++ // Do not check whether internal X screensaver is enabled or disabled, since we
++ // have disabled it ourselves. Some apps might try to disable it too to prevent
++ // screensavers, but then our logic breaks[*]. Those apps need to disable DPMS anyway,
++ // or they will still have problems, so the DPMS code above should be enough.
++ // Besides, I doubt other screensaver implementations check this either.
++ // [*] We can't run with X screensaver enabled, since then sooner or later
++ // the internal screensaver will activate instead of our screensaver and we cannot
++ // prevent its activation by resetting the idle counter since that would also
++ // reset DPMS saving.
+
+ if(mActive && activate)
+ emit timeout();
+--- workspace/krunner/interfaces/quicksand/qs_matchview.h (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/krunner/interfaces/quicksand/qs_matchview.h (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -65,8 +65,9 @@
+ * Sets the list of items to be displayed on screen
+ * @param items The list of items to display
+ * @param popup Display the popup completion box
++ * @param append Append items to the current list instead of replacing it
+ */
+- void setItems(const QList<MatchItem*> &items, bool popup = true);
++ void setItems(const QList<MatchItem*> &items, bool popup = true, bool append = false);
+
+ /**
+ * Sets the item count text on the upper right hand corner
+--- workspace/krunner/interfaces/quicksand/qs_dialog.cpp (.../tags/KDE/4.2.0/kdebase) (wersja 920563)
++++ workspace/krunner/interfaces/quicksand/qs_dialog.cpp (.../branches/KDE/4.2/kdebase) (wersja 920563)
+@@ -1,6 +1,6 @@
+ /*
+ * Copyright (C) 2006 by Aaron Seigo <aseigo at kde.org>
+- * Copyright (C) 2007-2008 Ryan P. Bitanga <ryan.bitanga at gmail.com>
++ * Copyright (C) 2007-2009 Ryan P. Bitanga <ryan.bitanga at gmail.com>
+ * Copyright (C) 2008 by Davide Bettio <davide.bettio at kdemail.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+@@ -108,6 +108,8 @@
+ connect(m_actionView, SIGNAL(itemActivated(MatchItem*)), this, SLOT(run(MatchItem*)));
+
+ m_matchView->setFocus();
++
++ m_newQuery = true;
+ }
+
+ QsDialog::~QsDialog()
+@@ -145,6 +147,7 @@
+ m_matchView->showLoading();
+ }
+ m_runnerManager->launchQuery(query);
++ m_newQuery = true;
+ }
+
+ void QsDialog::run(MatchItem *item)
+@@ -184,7 +187,28 @@
+ void QsDialog::setMatches(const QList<Plasma::QueryMatch> &matches)
+ {
+ QList<MatchItem*> items;
++ QMultiMap<QString, Plasma::QueryMatch> temp;
++ QMultiMap<QString, Plasma::QueryMatch>::iterator end = m_matches.end();
+ foreach (Plasma::QueryMatch match, matches) {
++ temp.insert(match.id(), match);
++ // Do not create new MatchItems for existing matches when the query hasn't changed
++ if (!m_newQuery && m_matches.find(match.id()) != end) {
++ // kDebug() << "A match with id " << match.id() << " already exists." << endl;
++ QList<Plasma::QueryMatch> duplicates = m_matches.values(match.id());
++ bool exists = false;
++ foreach (Plasma::QueryMatch m, duplicates) {
++ // FIXME: Matching the displayed text isn't always reliable
++ // maybe adding an operator== to QueryMatch would help
++ if (m.text() == match.text()) {
++ exists = true;
++ break;
++ }
++ }
++
++ if (exists) {
++ continue;
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list