Hello community,
here is the log from the commit of package kdebase4-workspace
checked in at Mon Apr 14 20:04:15 CEST 2008.
--------
--- KDE/kdebase4-workspace/kdebase4-wallpapers.changes 2008-04-10 21:26:44.000000000 +0200
+++ kdebase4-workspace/kdebase4-wallpapers.changes 2008-04-14 20:00:58.344347000 +0200
@@ -1,0 +2,17 @@
+Mon Apr 14 17:55:20 CEST 2008 - stbinner@suse.de
+
+- improve logout, shutdown, restart confirmation and add countdown
+- draw rounded background behind system tray windows
+- don't align on every added file but only first run (bnc#379463)
+
+-------------------------------------------------------------------
+Mon Apr 14 16:57:51 CEST 2008 - dmueller@suse.de
+
+- add kgreeter_generic from 4.1 branch (fate#301954)
+
+-------------------------------------------------------------------
+Fri Apr 11 13:47:33 CEST 2008 - dmueller@suse.de
+
+- fix wallpaper not immediately updating (bnc#378771)
+
+-------------------------------------------------------------------
kdebase4-workspace.changes: same change
New:
----
kgreeter-generic.diff
ksmserver-leave-countdown.diff
lowdiskspace.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdebase4-wallpapers.spec ++++++
--- /var/tmp/diff_new_pack.DR8385/_old 2008-04-14 20:02:10.000000000 +0200
+++ /var/tmp/diff_new_pack.DR8385/_new 2008-04-14 20:02:10.000000000 +0200
@@ -22,7 +22,7 @@
Summary: KDE 4 Wallpapers
Url: http://www.kde.org/
Version: 4.0.3
-Release: 5
+Release: 8
Source0: kdebase-workspace-%version.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
@@ -59,6 +59,14 @@
/usr/share/wallpapers
%changelog
+* Mon Apr 14 2008 stbinner@suse.de
+- improve logout, shutdown, restart confirmation and add countdown
+- draw rounded background behind system tray windows
+- don't align on every added file but only first run (bnc#379463)
+* Mon Apr 14 2008 dmueller@suse.de
+- add kgreeter_generic from 4.1 branch (fate#301954)
+* Fri Apr 11 2008 dmueller@suse.de
+- fix wallpaper not immediately updating (bnc#378771)
* Thu Apr 10 2008 stbinner@suse.de
- update Plasma diff from openSUSE Plasma branch:
* draw desktop icons old style
++++++ kdebase4-workspace.spec ++++++
--- /var/tmp/diff_new_pack.DR8385/_old 2008-04-14 20:02:10.000000000 +0200
+++ /var/tmp/diff_new_pack.DR8385/_new 2008-04-14 20:02:10.000000000 +0200
@@ -27,7 +27,7 @@
Summary: The KDE Workspace Components
Url: http://www.kde.org/
Version: 4.0.3
-Release: 5
+Release: 8
%define rversion 4.0.3
Source0: kdebase-workspace-%rversion.tar.bz2
Source2: titlebar_decor.png
@@ -56,6 +56,9 @@
Patch69: systemsettings-desktop.diff
Patch71: oxygen-windeco-colors.diff
Patch72: select-wm-gui.diff
+Patch73: kgreeter-generic.diff
+Patch74: lowdiskspace.patch
+Patch75: ksmserver-leave-countdown.diff
%kde4_runtime_requires
Conflicts: yast2-theme-NLD
%if %suse_version > 1030
@@ -109,6 +112,9 @@
%patch69
%patch71
%patch72
+%patch73
+%patch74
+%patch75
%build
%cmake_kde4 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE4_KCHECKPASS_PAM_SERVICE=xdm
@@ -351,6 +357,8 @@
/usr/bin/plasmoidviewer
/usr/bin/kdostartupconfig4
/usr/bin/kstartupconfig4
+%_libdir/kde4/kded_susefreespacenotifier.so
+/usr/share/kde4/services/kded/susefreespacenotifier.desktop
%_libdir/kde4/krunner_webshortcuts.so
%_libdir/kde4/kcm_colors.so
%_libdir/kde4/plasma_*.so
@@ -631,6 +639,14 @@
/usr/%_lib/kde4/kgreet_*.so
%changelog
+* Mon Apr 14 2008 stbinner@suse.de
+- improve logout, shutdown, restart confirmation and add countdown
+- draw rounded background behind system tray windows
+- don't align on every added file but only first run (bnc#379463)
+* Mon Apr 14 2008 dmueller@suse.de
+- add kgreeter_generic from 4.1 branch (fate#301954)
+* Fri Apr 11 2008 dmueller@suse.de
+- fix wallpaper not immediately updating (bnc#378771)
* Thu Apr 10 2008 stbinner@suse.de
- update Plasma diff from openSUSE Plasma branch:
* draw desktop icons old style
++++++ 4_0_BRANCH.diff ++++++
--- /var/tmp/diff_new_pack.DR8385/_old 2008-04-14 20:02:10.000000000 +0200
+++ /var/tmp/diff_new_pack.DR8385/_new 2008-04-14 20:02:10.000000000 +0200
@@ -1,7 +1,33 @@
package: kdebase-workspace-4.0.3.tar.bz2
kdemod: kdebase/workspace
-current HEAD: 792769
-svn di between /tags/KDE/4.0.3 and /branches/KDE//branches/KDE/4.0
+--- BRANCH_STATUS
++++ BRANCH_STATUS
+@@ -0,0 +1,2 @@
++current HEAD: 795774
++svn di between //tags/KDE/4.0.3/kdebase/workspace and //branches/KDE/4.0/kdebase/workspace
+--- ksmserver/startup.cpp
++++ ksmserver/startup.cpp
+@@ -255,7 +255,9 @@
+ continue;
+ }
+ if ( wm == config.readEntry( QString("program")+n, QString() ) )
+- continue;
++ continue; // wm already started
++ if( config.readEntry( QString( "wasWm" )+n, false ))
++ continue; // it was wm before, but not now, don't run it (some have --replace in command :( )
+ startApplication( restartCommand,
+ config.readEntry( QString("clientMachine")+n, QString() ),
+ config.readEntry( QString("userId")+n, QString() ));
+--- ksmserver/server.cpp
++++ ksmserver/server.cpp
+@@ -884,6 +884,7 @@
+ cg.writePathEntry( QString("discardCommand")+n, c->discardCommand() );
+ cg.writeEntry( QString("restartStyleHint")+n, restartHint );
+ cg.writeEntry( QString("userId")+n, c->userId() );
++ cg.writeEntry( QString("wasWm")+n, isWM( c ));
+ }
+ cg.writeEntry( "count", count );
+
--- kcontrol/access/kaccess.notifyrc
+++ kcontrol/access/kaccess.notifyrc
@@ -607,7 +607,7 @@
@@ -152,6 +178,28 @@
protected Q_SLOTS:
void updateSceneRect();
+--- kscreensaver/kblank_screensaver/kblank.desktop
++++ kscreensaver/kblank_screensaver/kblank.desktop
+@@ -113,7 +113,7 @@
+ Name[ko]=설정...
+ Name[ku]=Sazkirin...
+ Name[lt]=Nustatymas...
+-Name[lv]=Uzstādīšana...
++Name[lv]=Konfigurēt...
+ Name[mk]=Постави...
+ Name[ms]=Tetapan...
+ Name[nb]=Oppsett …
+--- kscreensaver/krandom_screensaver/krandom.desktop
++++ kscreensaver/krandom_screensaver/krandom.desktop
+@@ -113,7 +113,7 @@
+ Name[ko]=설정...
+ Name[ku]=Sazkirin...
+ Name[lt]=Nustatymas...
+-Name[lv]=Uzstādīšana...
++Name[lv]=Konfigurēt...
+ Name[mk]=Постави...
+ Name[ms]=Tetapan...
+ Name[nb]=Oppsett …
--- khotkeys/data/konqueror_gestures_kde321.khotkeys
+++ khotkeys/data/konqueror_gestures_kde321.khotkeys
@@ -1938,7 +1938,7 @@
@@ -174,6 +222,17 @@
Comment[fy]=Lês earst it kommentaar fan de aksje "typ 'Hallo'".\n\nQt Designer brûkt Ctrl+F4 om finsters te sluten (miskien omdat Microsoft Windows dat ek docht). Mar yn KDE betekent Ctrl+4 it gean nei it firtuele buroblêd 4. Dêrtroch wurket de fluchtoets net yn Qt Designer en wurdt Ctrl+W, de standert sluttoets yn KDE, net brûkt.\n\nJo kinne dizze swierricgens opslosse troch Ctrl+W nei Ctrl+F4 te wizigjen wannear it aktive finster Qt Designer is. Wannear Qt Designer aktyf is, sil eltse kear as Ctrl+W yndrukt wurdt it sinjaal Ctrl+F4 nei Qt Designer tastjoer wurde. Ctrl+W bliuwt yn oare programma's gewoan deselde betekenis hâlden.\n\nDer moatte trije gegevens ynfierd wurde: de fluchtoets sles, de ferstjoerde fluchtoets en de foarwearde dat it aktive finster Qt Designer wêze moat.\nQt Designer hat altyd de titel 'Qt Designer by Trolltech', dus de foarwearde moat kontrolearje of it finster dy titel hat.
Comment[ga]=Léigh an nóta a bhaineann leis an ngníomh "Clóscríobh 'Hello'" ar dtús.\n\nÚsáideann Qt Designer Ctrl+F4 chun fuinneoga a dhúnadh (ag sodar i ndiaidh na n-uasal Microsoft is dócha). Ach i KDE, osclaíonn Ctrl+F4 deasc fhíorúil 4 agus dá bhrí sin ní oibríonn sé i Qt Designer. Agus freisin ní úsáideann Qt Designer an t-aicearra (Ctrl+W) chun fuinneog a dhúnadh atá caighdeánach i KDE.\n\nIs féidir an fhadhb seo a réiteach trí Ctrl+W a mhapáil go dtí Ctrl+F4 nuair is é Qt Designer an fhuinneog ghníomhach. Nuair atá Qt Designer gníomhach, seolfar Ctrl+F4 chuig Qt Designer in ionad Ctrl+W gach uair a bhrúitear Ctrl+W. I bhfeidhmchláir eile, oibríonn Ctrl+W mar is gnách ar ndóigh.\n\nCaithfidh muid trí rud a shonrú anois: truicear nua don aicearra 'Ctrl+W', gníomh nua ionchurtha a sheolann Ctrl+F4, agus coinníoll nua a deir gur é Qt Designer an fhuinneog ghníomhach.\nDe réir cosúlachta, is é 'Qt Designer by Trolltech' an teideal ar Qt Designer i gcónaí agus dá bhrí sin seiceálfaidh an coinníoll go bhfuil an teideal seo ag an bhfuinneog ghníomhach.
Comment[gl]=Lea primeiro o comentario da acción "Escreber "Hello"".\n\nQt Designer usa Ctrl+F4 para pechar fiestras (poida que porque MS Windows o fai dese xeito). Pero Ctrl+F4 en KDE significa ir ao escritorio virtual 4, polo que non funciona en Qt Designet, ademais, QT Designer non usa o atallo estándar de KDE, Ctrl+W para pechar a fiestra.\n\nPero o problema pode resolverse mapeando Ctrl+W para Ctrl+F4 cando a fiestra activa é a de Qt Designer. Cando Qt Designer está activo, sempre que prema Ctrl+W, enviarase Ctrl+F4 no seu lugar a Qt Designer. En outros programas, Ctrl+W funcionará do xeito habitual.\n\nAgora debemos indicar tres cousas: Un novo activador de atallo en "Ctrl+W", unha nova acción de entrada por teclado que envía Ctrl+F4, e unha nova condición de que a fiestra activa sexa a de Qt Designer.\nSemella que Qt Designer sempre leva o título "Qt Designer por Trolltech", polo que a condición comprobará que a fiestra activa teña ese título.
+--- khotkeys/data/printscreen.khotkeys
++++ khotkeys/data/printscreen.khotkeys
+@@ -78,7 +78,7 @@
+ Name[kk]=Дайын әрекеттері
+ Name[km]=កំណត់អំពើជាមុន
+ Name[ko]=미리 정의된 동작
+-Name[lv]=Sākotnēji uzstādītās darbības
++Name[lv]=Noklusētās darbības
+ Name[nb]=Forhåndsdefinerte handlinger
+ Name[nds]=Vörinstellt Akschonen
+ Name[ne]=कार्य प्रिसेट गर्नुहोस्
--- kwin/effects/sharpen.desktop
+++ kwin/effects/sharpen.desktop
@@ -61,7 +61,7 @@
@@ -185,6 +244,42 @@
Comment[fy]=Makket jo buroblêd ekstra dúdlik
Comment[ga]=Géaraigh dealramh do dheisce
Comment[gl]=Fai que o escritorio aparente estar máis focalizado
+--- kwin/effects/minimizeanimation.desktop
++++ kwin/effects/minimizeanimation.desktop
+@@ -7,6 +7,7 @@
+ Name[da]=Minimér-animation
+ Name[de]=Minimieren-Animation
+ Name[el]=Κίνηση ελαχιστοποίησης
++Name[en_GB]=Minimise Animation
+ Name[eo]=Minimumigi animacion
+ Name[es]=Animación de minimización
+ Name[et]=Minimeerimise animatsioon
+@@ -58,6 +59,7 @@
+ Comment[da]=Animerer minimering af vinduer
+ Comment[de]=Animiert den Minimieren-Vorgang von Fenstern
+ Comment[el]=Κίνηση στα παράθυρα που ελαχιστοποιούνται
++Comment[en_GB]=Animates minimising of windows
+ Comment[eo]=Animigas la minimumadon de fenestroj
+ Comment[es]=Anima la minimización de ventanas
+ Comment[et]=Animeerib akende minimeerimise
+--- kwin/effects/dialogparent.desktop
++++ kwin/effects/dialogparent.desktop
+@@ -5,6 +5,7 @@
+ Name[ca]=Diàleg principal
+ Name[de]=Eltern-Dialog
+ Name[el]=Γονικός διάλογος
++Name[en_GB]=Dialogue Parent
+ Name[eo]=Dialoga patro
+ Name[es]=Padre de la ventana
+ Name[et]=Dialoogi eellane
+@@ -53,6 +54,7 @@
+ Comment[da]=Gør forældrevinduer til aktive dialoger mørke
+ Comment[de]=Dunkelt den Eltern-Dialog des aktiven Fensters ab
+ Comment[el]=Σκίαση γονικών παραθύρων των ενεργών διαλόγων
++Comment[en_GB]=Darkens parent windows of active dialogues
+ Comment[eo]=Malheligas patrajn fenestrojn de dialogoj
+ Comment[es]=Oscurece la ventana padre de los diálogos activos
+ Comment[et]=Tumendab aktiivsete dialoogide eellasaknad
--- kwin/effects/login.desktop
+++ kwin/effects/login.desktop
@@ -59,7 +59,7 @@
@@ -196,6 +291,27 @@
Comment[fy]=Fisueel effekt by it ynloggen
Comment[ga]=Maisíocht físe ag am logála isteach
Comment[gl]=Efeito visual de aceso
+--- kwin/kwin.notifyrc
++++ kwin/kwin.notifyrc
+@@ -4005,6 +4005,7 @@
+ Comment[da]=Midlertidigt vindue (en dialog) viser sig
+ Comment[de]=Transientes Fenster (Dialog) wird angezeigt
+ Comment[el]=Ένα προσωρινό παράθυρο (διάλογος) εμφανίζεται
++Comment[en_GB]=Transient window (a dialogue) appears
+ Comment[eo]=Provizora fenestro (dialogo) aperas
+ Comment[es]=Aparece la ventana de transición (un diálogo)
+ Comment[et]=Avaneb ajutine aken (dialoog)
+--- kwin/main.cpp
++++ kwin/main.cpp
+@@ -490,6 +490,8 @@
+ signal(SIGHUP, SIG_IGN);
+ // HACK this is needed for AIGLX
+ setenv( "LIBGL_ALWAYS_INDIRECT","1", true );
++ // HACK this is needed to work around a Qt4.4.0RC1 bug (#157659)
++ setenv( "QT_SLOW_TOPLEVEL_RESIZE", "1", true );
+ KWin::Application a;
+ KWin::SessionManager weAreIndeed;
+ KWin::SessionSaveDoneHelper helper;
--- kdm/kfrontend/sessions/wmaker.desktop
+++ kdm/kfrontend/sessions/wmaker.desktop
@@ -31,7 +31,7 @@
@@ -218,6 +334,48 @@
Comment[fy]=In tige ynstelbere lichtgewicht finstersmanager basearre op Blackbox
Comment[ga]=Bainisteoir fuinneog éadrom inchumraithe, bunaithe ar Blackbox
Comment[gl]=Un xestor de fiestras moi configurábel e lixeiro baseado en Blackbox
+--- plasma/containments/desktop/desktop.cpp
++++ plasma/containments/desktop/desktop.cpp
+@@ -65,6 +65,7 @@
+ m_logoutAction(0),
+ m_configDialog(0),
+ m_wallpaperPath(0),
++ m_wallpaperPosition(0),
+ m_renderer(resolution(), 1.0)
+ {
+ qRegisterMetaType<QImage>("QImage");
+@@ -195,14 +196,20 @@
+ (int) BackgroundDialog::kStaticBackground);
+
+ // used in both modes, so read it no matter which mode we are in
++ int old_wallPaperPosition = m_wallpaperPosition;
+ m_wallpaperPosition = cg.readEntry("wallpaperposition", 0);
++ QColor old_wallpaperColor = m_wallpaperColor;
+ m_wallpaperColor = cg.readEntry("wallpapercolor", QColor(Qt::black));
+
+ if (m_backgroundMode == BackgroundDialog::kStaticBackground) {
+ m_slideshowTimer.stop();
+ // Only set the wallpaper if constraints have been loaded
+ // and background image has changed
+- if (!skipUpdates && screen() != -1 && oldWallpaperPath != m_wallpaperPath) {
++ if (!skipUpdates && screen() != -1 && (
++ oldWallpaperPath != m_wallpaperPath
++ || m_wallpaperPosition != old_wallPaperPosition
++ || m_wallpaperColor != old_wallpaperColor
++ )) {
+ updateBackground();
+ }
+ } else {
+--- plasma/applets/analog-clock/plasma-applet-analogclock.desktop
++++ plasma/applets/analog-clock/plasma-applet-analogclock.desktop
+@@ -9,6 +9,7 @@
+ Name[da]=Analogt ur
+ Name[de]=Analoge Uhr
+ Name[el]=Αναλογικό ρολόι
++Name[en_GB]=Analogue Clock
+ Name[eo]=Analoga horloĝo
+ Name[es]=Reloj analógico
+ Name[et]=Analoogkell
--- plasma/desktoptheme/widgets/panel-background.svg
+++ plasma/desktoptheme/widgets/panel-background.svg
@@ -1,295 +1,228 @@
++++++ kgreeter-generic.diff ++++++
++++ 797 lines (skipped)
++++++ ksmserver-leave-countdown.diff ++++++
Index: libs/kworkspace/kworkspace.h
===================================================================
--- libs/kworkspace/kworkspace.h (revision 796708)
+++ libs/kworkspace/kworkspace.h (working copy)
@@ -52,7 +52,7 @@
*/
ShutdownTypeDefault = -1,
/**
- * Only log out.
+ * Only show log out dialog
*/
ShutdownTypeNone = 0,
/**
@@ -62,7 +62,11 @@
/**
* Log out and halt the machine.
*/
- ShutdownTypeHalt = 2
+ ShutdownTypeHalt = 2,
+ /**
+ * Only log out
+ */
+ ShutdownTypeLogout = 3
};
/**
Index: ksmserver/server.cpp
===================================================================
--- ksmserver/server.cpp (revision 796708)
+++ ksmserver/server.cpp (working copy)
@@ -29,6 +29,10 @@
******************************************************************/
+#include "server.h"
+#include "global.h"
+#include "client.h"
+#include "ksmserverinterfaceadaptor.h"
#include
#include // HAVE_LIMITS_H
@@ -72,15 +76,8 @@
#include
#include
-#include "server.h"
-#include "global.h"
-#include "client.h"
-#include "ksmserverinterfaceadaptor.h"
-
#include "server.moc"
-#include
-
#include
#include <QX11Info>
#include
Index: ksmserver/shutdowndlg.h
===================================================================
--- ksmserver/shutdowndlg.h (revision 796708)
+++ ksmserver/shutdowndlg.h (working copy)
@@ -32,6 +32,7 @@
class QMenu;
class QTimer;
class QTimeLine;
+class QLabel;
namespace Plasma
{
@@ -122,6 +123,11 @@
QStringList rebootOptions;
QPixmap m_renderedSvg;
Plasma::Svg* m_svg;
+ QLabel *m_automaticallyDoLabel;
+ int m_automaticallyDoSeconds;
+
+private Q_SLOTS:
+ void automaticallyDoTimeout();
};
#endif
Index: ksmserver/shutdowndlg.cpp
===================================================================
--- ksmserver/shutdowndlg.cpp (revision 796708)
+++ ksmserver/shutdowndlg.cpp (working copy)
@@ -23,8 +23,6 @@
******************************************************************/
-#include
-
#include "shutdowndlg.h"
#include "plasma/svg.h"
@@ -55,6 +53,8 @@
#include
+#include
+
#include "shutdowndlg.moc"
#define FONTCOLOR "#bfbfbf"
@@ -338,7 +338,8 @@
KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
bool maysd, KWorkSpace::ShutdownType sdtype )
- : QDialog( parent, Qt::Popup )
+ : QDialog( parent, Qt::Popup ), //krazy:exclude=qclasses
+ m_automaticallyDoSeconds(30)
// this is a WType_Popup on purpose. Do not change that! Not
// having a popup here has severe side effects.
{
@@ -364,7 +365,7 @@
QVBoxLayout *mainLayout = new QVBoxLayout();
- mainLayout->setContentsMargins(9, 9, 12, 7);
+ mainLayout->setContentsMargins(12, 9, 12, 7);
QVBoxLayout *buttonLayout = new QVBoxLayout();
buttonLayout->addStretch();
QHBoxLayout *buttonMainLayout = new QHBoxLayout();
@@ -378,6 +379,9 @@
QFont fnt;
fnt.setPixelSize(16);
+ QPalette palette;
+ palette.setColor(QPalette::WindowText, QColor(FONTCOLOR));
+
QLabel *versionLabel = new QLabel(this);
int vmajor, vminor, vbugfix;
@@ -403,7 +407,8 @@
vcomposed = i18nc("@label In corner of the logout dialog",
"KDE <numid>%1.%2</numid>", vmajor, vminor);
}
- versionLabel->setText("<font color='" + QString(FONTCOLOR) + "'>" + vcomposed + "</font>");
+ versionLabel->setPalette(palette);
+ versionLabel->setText(vcomposed);
versionLabel->setFont(fnt);
KUser userInformation;
@@ -411,6 +416,11 @@
QString userName = userInformation.property( KUser::FullName ).toString();
QString loginName = userInformation.loginName();
+ QFontMetrics fm(fnt);
+ if (fm.width(userName) > width() / 2) { // cut the text if it is really long in order to not use more than two lines
+ userName = fm.elidedText(userName, Qt::ElideRight, width() / 2);
+ }
+
if (userName.isEmpty()) {
logoutMsg = i18n( "End Session for %1", loginName );
} else {
@@ -419,7 +429,8 @@
QLabel *logoutMessageLabel = new QLabel(this);
// FIXME Made the color picked from the user's one
- logoutMessageLabel->setText("<font color='" + QString(FONTCOLOR) + "'>" + logoutMsg + "</font>");
+ logoutMessageLabel->setPalette(palette);
+ logoutMessageLabel->setText(logoutMsg);
logoutMessageLabel->setAlignment(Qt::AlignRight);
fnt.setPixelSize(12);
logoutMessageLabel->setFont(fnt);
@@ -429,15 +440,21 @@
topLayout->addWidget(logoutMessageLabel, 1, Qt::AlignBottom);
KSMPushButton* btnLogout = new KSMPushButton( i18n("Logout"), this );
+ btnLogout->setObjectName("btnLogout");
btnLogout->setPixmap(KIconLoader::global()->loadIcon("system-log-out", KIconLoader::NoGroup, 32));
- btnLogout->setFocus();
+ if ( sdtype == KWorkSpace::ShutdownTypeLogout )
+ btnLogout->setFocus();
connect(btnLogout, SIGNAL(clicked()), SLOT(slotLogout()));
buttonLayout->addWidget(btnLogout);
buttonLayout->addStretch();
+ KSMPushButton* btnHalt = 0;
+ KSMPushButton* btnReboot = 0;
+
if (maysd) {
// Shutdown
- KSMPushButton* btnHalt = new KSMPushButton( i18n("Turn Off Computer"), this );
+ btnHalt = new KSMPushButton( i18n("Turn Off Computer"), this );
+ btnHalt->setObjectName("btnHalt");
btnHalt->setPixmap(KIconLoader::global()->loadIcon("system-shutdown", KIconLoader::NoGroup, 32));
buttonLayout->addWidget(btnHalt);
buttonLayout->addStretch();
@@ -465,7 +482,8 @@
shutdownMenu->addActions(spdActionGroup->actions());
// Reboot
- KSMPushButton* btnReboot = new KSMPushButton( i18n("Restart Computer"), this );
+ btnReboot = new KSMPushButton( i18n("Restart Computer"), this );
+ btnReboot->setObjectName("btnReboot");
btnReboot->setPixmap(KIconLoader::global()->loadIcon("system-restart", KIconLoader::NoGroup, 32));
connect(btnReboot, SIGNAL(clicked()), SLOT(slotReboot()));
buttonLayout->addWidget(btnReboot);
@@ -497,19 +515,70 @@
}
}
+ if ( sdtype == KWorkSpace::ShutdownTypeLogout ) {
+ btnReboot->setHidden(true);
+ btnHalt->setHidden(true);
+ }
+ else if ( sdtype == KWorkSpace::ShutdownTypeHalt ) {
+ btnReboot->setHidden(true);
+ btnLogout->setHidden(true);
+ }
+ else if ( sdtype == KWorkSpace::ShutdownTypeReboot ) {
+ btnHalt->setHidden(true);
+ btnLogout->setHidden(true);
+ }
+
KSMPushButton* btnBack = new KSMPushButton(i18n("Cancel"), this, true);
btnBack->setPixmap(KIconLoader::global()->loadIcon( "dialog-cancel", KIconLoader::NoGroup, 16));
- bottomLayout->addStretch();
+
+ m_automaticallyDoLabel = new QLabel(this);
+ m_automaticallyDoLabel->setPalette(palette);
+ fnt.setPixelSize(11);
+ m_automaticallyDoLabel->setFont(fnt);
+ m_automaticallyDoLabel->setWordWrap(true);
+ automaticallyDoTimeout();
+
+ QTimer *automaticallyDoTimer = new QTimer(this);
+ connect(automaticallyDoTimer, SIGNAL(timeout()), this, SLOT(automaticallyDoTimeout()));
+ automaticallyDoTimer->start(1000);
+
+ bottomLayout->addWidget(m_automaticallyDoLabel, 1, Qt::AlignBottom);
bottomLayout->addWidget(btnBack);
connect(btnBack, SIGNAL(clicked()), SLOT(reject()));
mainLayout->addLayout(topLayout);
+ mainLayout->addSpacing(5);
mainLayout->addLayout(buttonMainLayout);
+ mainLayout->addSpacing(9);
mainLayout->addLayout(bottomLayout);
setLayout( mainLayout );
}
+void KSMShutdownDlg::automaticallyDoTimeout()
+{
+ QPushButton *focusedButton = qobject_cast(focusWidget());
+ if (focusedButton) {
+ if (m_automaticallyDoSeconds <= 0) { // timeout is at 0, do selected action
+ focusedButton->click();
+ // following code is required to provide a clean way to translate strings
+ } else if (!focusedButton->objectName().isEmpty()) { // one of the action buttons; not cancel
+ if (focusedButton->objectName() == "btnLogout")
+ m_automaticallyDoLabel->setText(i18np("Log out in 1 second.",
+ "Log out in %1 seconds.", m_automaticallyDoSeconds));
+ else if (focusedButton->objectName() == "btnHalt")
+ m_automaticallyDoLabel->setText(i18np("Turn off computer in 1 second.",
+ "Turn off computer in %1 seconds.", m_automaticallyDoSeconds));
+ else if (focusedButton->objectName() == "btnReboot")
+ m_automaticallyDoLabel->setText(i18np("Reboot computer in 1 second.",
+ "Reboot computer in %1 seconds.", m_automaticallyDoSeconds));
+ m_automaticallyDoSeconds--; // only decrease time if a valid actions button is selected
+ } else {
+ m_automaticallyDoLabel->setText(QString());
+ }
+ }
+}
+
void KSMShutdownDlg::paintEvent(QPaintEvent *e)
{
Q_UNUSED(e);
Index: plasma/applets/kickoff/core/itemhandlers.cpp
===================================================================
--- plasma/applets/kickoff/core/itemhandlers.cpp (revision 796708)
+++ plasma/applets/kickoff/core/itemhandlers.cpp (working copy)
@@ -94,7 +94,7 @@
KWorkSpace::ShutdownType type = KWorkSpace::ShutdownTypeNone;
if (m_logoutAction == "logout") {
- type = KWorkSpace::ShutdownTypeNone;
+ type = KWorkSpace::ShutdownTypeLogout;
} else if (m_logoutAction == "lock") {
kDebug() << "Locking screen";
} else if (m_logoutAction == "switch") {
++++++ lowdiskspace.patch ++++++
Subject: Dialog notifying about running low on disk space
From: Lubos Lunak
Feature: bnc#199054
Patch-upstream: no
--- freespacenotifier/freespacenotifier.cpp.sav
+++ freespacenotifier/freespacenotifier.cpp
@@ -0,0 +1,161 @@
+/* This file is part of the KDE Project
+ Copyright (c) 2006 Lukas Tinkl
+ Copyright (c) 2008 Lubos Lunak
+
+ 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.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/.
+*/
+
+#include "freespacenotifier.h"
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include "freespacewidget.h"
+
+
+FreeSpaceNotifier::FreeSpaceNotifier( QObject* parent )
+ : QObject( parent )
+ , lastAvailTimer( NULL )
+ , dialog( NULL )
+ , lastAvail( -1 )
+{
+ connect( &timer, SIGNAL( timeout() ), SLOT( checkFreeDiskSpace() ) );
+ KConfig cfg( "lowspacesuse" );
+ KConfigGroup group( &cfg, "General" );
+ limit = group.readEntry( "WarnMinimumFreeSpace", 200 ); // MiB
+ if( limit != 0 )
+ timer.start( 1000 * 60 /* 1 minute */ );
+}
+
+FreeSpaceNotifier::~FreeSpaceNotifier()
+{
+ delete dialog;
+}
+
+void FreeSpaceNotifier::checkFreeDiskSpace()
+{
+ if ( dialog )
+ return;
+ struct statfs sfs;
+ if ( statfs( QFile::encodeName( QDir::homeDirPath() ), &sfs ) == 0 )
+ {
+ long avail = ( getuid() ? sfs.f_bavail : sfs.f_bfree );
+
+ if (avail < 0 || sfs.f_blocks <= 0)
+ return; // we better do not say anything about it
+
+ int availpct = int( 100 * avail / sfs.f_blocks );
+ avail = ((long long)avail) * sfs.f_bsize / ( 1024 * 1024 ); // to MiB
+ bool warn = false;
+ if( avail < limit ) // avail disk space dropped under a limit
+ {
+ if( lastAvail < 0 ) // always warn the first time
+ {
+ lastAvail = avail;
+ warn = true;
+ }
+ else if( avail > lastAvail ) // the user freed some space
+ lastAvail = avail; // so warn if it goes low again
+ else if( avail < lastAvail * 0.5 ) // available dropped to a half of previous one, warn again
+ {
+ warn = true;
+ lastAvail = avail;
+ }
+ // do not change lastAvail otherwise, to handle free space slowly going down
+ }
+ if ( warn )
+ {
+ dialog = new KDialog;
+ dialog->setCaption( i18n( "Low Disk Space" ));
+ dialog->setButtons( KDialog::Yes | KDialog::No | KDialog::Cancel );
+ dialog->setDefaultButton( KDialog::Yes );
+ dialog->setEscapeButton( KDialog::No );
+ dialog->setButtonText( KDialog::Yes, i18n( "Open File Manager" ));
+ dialog->setButtonText( KDialog::No, i18n( "Do Nothing" ));
+ dialog->setButtonText( KDialog::Cancel, i18n( "Disable Warning" ));
+ widget = new FreeSpaceWidget( dialog );
+ dialog->setMainWidget( widget );
+
+ QString text = i18n( "You are running low on disk space on your home partition (currently %2%, %1 MiB free).",
+ avail, availpct );
+ widget->warningLabel->setText( text );
+ widget->spinbox->setMinValue( 0 );
+ widget->spinbox->setMaxValue( 100000 );
+ widget->spinbox->setValue( limit );
+ connect( dialog, SIGNAL( yesClicked() ), SLOT( slotYes() ) );
+ connect( dialog, SIGNAL( noClicked() ), SLOT( slotNo() ) );
+ connect( dialog, SIGNAL( cancelClicked() ), SLOT( slotCancel() ) );
+ dialog->show();
+ }
+ }
+}
+
+void FreeSpaceNotifier::slotYes()
+{
+ ( void ) new KRun( KUrl::fromPathOrUrl( QDir::homeDirPath() ), dialog );
+ cleanupDialog( widget->spinbox->value());
+}
+
+void FreeSpaceNotifier::slotNo()
+{
+ cleanupDialog( widget->spinbox->value());
+}
+
+void FreeSpaceNotifier::slotCancel()
+{
+ cleanupDialog( 0 ); // set limit to zero
+}
+
+void FreeSpaceNotifier::cleanupDialog( long newLimit )
+{
+ dialog->deleteLater();
+ dialog = NULL;
+ if( limit != newLimit )
+ {
+ KConfig cfg( "lowspacesuse" );
+ KConfigGroup group( &cfg, "General" );
+ limit = newLimit;
+ group.writeEntry( "WarnMinimumFreeSpace", int( limit ));
+ if( limit == 0 )
+ timer.stop();
+ }
+ if( limit != 0 )
+ { // warn again if constanly below limit for too long
+ if( lastAvailTimer == NULL )
+ {
+ lastAvailTimer = new QTimer( this );
+ connect( lastAvailTimer, SIGNAL( timeout()), SLOT( resetLastAvailable()));
+ }
+ lastAvailTimer->start( 1000 * 60 * 60 /* 1 hour*/ );
+ }
+}
+
+void FreeSpaceNotifier::resetLastAvailable()
+{
+ lastAvail = -1;
+ lastAvailTimer->deleteLater();
+ lastAvailTimer = NULL;
+}
+
+#include "freespacenotifier.moc"
--- freespacenotifier/freespacenotifier.h.sav
+++ freespacenotifier/freespacenotifier.h
@@ -0,0 +1,51 @@
+/* This file is part of the KDE Project
+ Copyright (c) 2006 Lukas Tinkl
+ Copyright (c) 2008 Lubos Lunak
+
+ 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.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/.
+*/
+
+#ifndef _FREESPACENOTIFIER_H_
+#define _FREESPACENOTIFIER_H_
+
+#include
+
+#include
+
+class FreeSpaceWidget;
+
+class FreeSpaceNotifier
+: public QObject
+{
+ Q_OBJECT
+ public:
+ FreeSpaceNotifier( QObject* parent = NULL );
+ virtual ~FreeSpaceNotifier();
+ private slots:
+ void checkFreeDiskSpace();
+ void resetLastAvailable();
+ void slotYes();
+ void slotNo();
+ void slotCancel();
+ private:
+ void cleanupDialog( long newLimit );
+ QTimer timer;
+ QTimer* lastAvailTimer;
+ KDialog* dialog;
+ FreeSpaceWidget* widget;
+ long limit;
+ long lastAvail; // used to supress repeated warnings when available space hasn't changed
+};
+
+#endif
--- freespacenotifier/freespacewidget.ui.sav
+++ freespacenotifier/freespacewidget.ui
@@ -0,0 +1,118 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>FreeSpaceWidget</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>Form1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>489</width>
+ <height>108</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Form1</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>warningLabel</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Would you like to run a file manager to free some disk space and fix the problem?</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout3</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Warn again when the free space is below</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>spinbox</cstring>
+ </property>
+ <property name="suffix">
+ <string> MiB</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
--- freespacenotifier/CMakeLists.txt.sav
+++ freespacenotifier/CMakeLists.txt
@@ -0,0 +1,19 @@
+add_definitions (-DQT3_SUPPORT -DQT3_SUPPORT_WARNINGS)
+
+
+########### next target ###############
+
+set(kded_susefreespacenotifier_SRCS freespacenotifier.cpp module.cpp)
+
+kde4_add_ui3_files(kded_susefreespacenotifier_SRCS freespacewidget.ui)
+
+kde4_add_plugin(kded_susefreespacenotifier ${kded_susefreespacenotifier_SRCS})
+
+target_link_libraries(kded_susefreespacenotifier ${KDE4_KIO_LIBS} )
+
+install(TARGETS kded_susefreespacenotifier DESTINATION ${PLUGIN_INSTALL_DIR} )
+
+
+########### install files ###############
+
+install( FILES susefreespacenotifier.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded )
--- freespacenotifier/module.cpp.sav
+++ freespacenotifier/module.cpp
@@ -0,0 +1,37 @@
+/* This file is part of the KDE Project
+ Copyright (c) 2006 Lukas Tinkl
+ Copyright (c) 2008 Lubos Lunak
+
+ 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.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/.
+*/
+
+#include "module.h"
+
+#include
+#include
+
+K_PLUGIN_FACTORY(FreeSpaceNotifierModuleFactory,
+ registerPlugin<FreeSpaceNotifierModule>();
+ )
+K_EXPORT_PLUGIN(FreeSpaceNotifierModuleFactory("susefreespacenotifier"))
+
+
+// KhotKeysModule
+
+FreeSpaceNotifierModule::FreeSpaceNotifierModule(QObject* parent, const QList<QVariant>&)
+ : KDEDModule(parent)
+{
+}
+
+#include "module.moc"
--- freespacenotifier/module.h.sav
+++ freespacenotifier/module.h
@@ -0,0 +1,38 @@
+/* This file is part of the KDE Project
+ Copyright (c) 2006 Lukas Tinkl
+ Copyright (c) 2008 Lubos Lunak
+
+ 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.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/.
+*/
+
+#ifndef MODULE_H
+#define MODULE_H
+
+#include
+#include
+#include
+
+#include "freespacenotifier.h"
+
+class FreeSpaceNotifierModule
+ : public KDEDModule
+ {
+ Q_OBJECT
+ public:
+ FreeSpaceNotifierModule(QObject* parent, const QList<QVariant>&);
+ private:
+ FreeSpaceNotifier notifier;
+ };
+
+#endif
--- freespacenotifier/susefreespacenotifier.desktop.sav
+++ freespacenotifier/susefreespacenotifier.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=Free Space Notifier
+Type=Service
+X-KDE-ServiceTypes=KDEDModule
+X-KDE-Library=susefreespacenotifier
+X-KDE-DBus-ModuleName=susefreespacenotifier
+X-KDE-Kded-autoload=true
--- CMakeLists.txt.sav
+++ CMakeLists.txt
@@ -98,3 +98,5 @@ endif (NOT WIN32)
if(CMAKE_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
macro_display_feature_log()
endif(CMAKE_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
+
+add_subdirectory( freespacenotifier )
++++++ plasma.diff ++++++
--- /var/tmp/diff_new_pack.DR8385/_old 2008-04-14 20:02:12.000000000 +0200
+++ /var/tmp/diff_new_pack.DR8385/_new 2008-04-14 20:02:12.000000000 +0200
@@ -520,7 +520,7 @@
#include "plasma/phase.h"
#include "plasma/theme.h"
#include "kworkspace/kworkspace.h"
-@@ -60,6 +61,7 @@
+@@ -60,12 +61,12 @@
: Containment(parent, args),
m_lockDesktopAction(0),
m_appletBrowserAction(0),
@@ -528,7 +528,13 @@
m_runCommandAction(0),
m_lockScreenAction(0),
m_logoutAction(0),
-@@ -139,6 +141,7 @@
+ m_configDialog(0),
+ m_wallpaperPath(0),
+- m_wallpaperPosition(0),
+ m_renderer(resolution(), 1.0)
+ {
+ qRegisterMetaType<QImage>("QImage");
+@@ -140,6 +141,7 @@
// we need to update the menu items that have already been created
bool locked = isImmutable();
m_appletBrowserAction->setVisible(!locked);
@@ -536,8 +542,13 @@
if (locked) {
m_lockDesktopAction->setIcon(KIcon("object-unlocked"));
m_lockDesktopAction->setText(i18n("Unlock Widgets"));
-@@ -198,7 +201,8 @@
+@@ -196,20 +198,15 @@
+ (int) BackgroundDialog::kStaticBackground);
+
+ // used in both modes, so read it no matter which mode we are in
+- int old_wallPaperPosition = m_wallpaperPosition;
m_wallpaperPosition = cg.readEntry("wallpaperposition", 0);
+- QColor old_wallpaperColor = m_wallpaperColor;
m_wallpaperColor = cg.readEntry("wallpapercolor", QColor(Qt::black));
- if (m_backgroundMode == BackgroundDialog::kStaticBackground) {
@@ -546,7 +557,16 @@
m_slideshowTimer.stop();
// Only set the wallpaper if constraints have been loaded
// and background image has changed
-@@ -250,8 +254,10 @@
+- if (!skipUpdates && screen() != -1 && (
+- oldWallpaperPath != m_wallpaperPath
+- || m_wallpaperPosition != old_wallPaperPosition
+- || m_wallpaperColor != old_wallpaperColor
+- )) {
++ if (!skipUpdates && screen() != -1 && oldWallpaperPath != m_wallpaperPath) {
+ updateBackground();
+ }
+ } else {
+@@ -257,8 +254,10 @@
void DefaultDesktop::updateBackground()
{
@@ -559,7 +579,7 @@
QString testPath = defaultPath.arg(geometry().width()).arg(geometry().height());
m_wallpaperPath = KStandardDirs::locate("wallpaper", testPath);
-@@ -282,6 +288,25 @@
+@@ -289,6 +288,25 @@
}
}
@@ -585,7 +605,7 @@
void DefaultDesktop::runCommand()
{
if (!KAuthorized::authorizeKAction("run_command")) {
-@@ -332,6 +357,10 @@
+@@ -339,6 +357,10 @@
connect(m_appletBrowserAction, SIGNAL(triggered(bool)), this, SIGNAL(showAddWidgets()));
m_appletBrowserAction->setIcon(KIcon("list-add"));
@@ -596,7 +616,7 @@
m_runCommandAction = new QAction(i18n("Run Command..."), this);
connect(m_runCommandAction, SIGNAL(triggered(bool)), this, SLOT(runCommand()));
m_runCommandAction->setIcon(KIcon("system-run"));
-@@ -348,7 +377,7 @@
+@@ -355,7 +377,7 @@
m_lockScreenAction->setIcon(KIcon("system-lock-screen"));
connect(m_lockScreenAction, SIGNAL(triggered(bool)), this, SLOT(lockScreen()));
@@ -605,7 +625,7 @@
m_logoutAction->setIcon(KIcon("system-log-out"));
connect(m_logoutAction, SIGNAL(triggered(bool)), this, SLOT(logout()));
constraintsUpdated(Plasma::ImmutableConstraint);
-@@ -367,6 +396,7 @@
+@@ -374,6 +396,7 @@
}
actions.append(m_appletBrowserAction);
@@ -643,7 +663,26 @@
static const int topBorder = 20;
-@@ -67,6 +68,9 @@
+@@ -39,7 +40,8 @@
+ m_verticalOrientation(true),
+ m_iconShow(true),
+ m_gridAlign(true),
+- m_enableMedia(false)
++ m_enableMedia(false),
++ m_firstRun(true)
+ {
+ QTimer::singleShot(0, this, SLOT(init()));
+ }
+@@ -57,7 +59,7 @@
+ m_iconShow = cg.readEntry("showIcons",m_iconShow);
+ m_gridAlign = cg.readEntry("alignToGrid",m_gridAlign);
+ m_enableMedia = cg.readEntry("EnableMedia",m_enableMedia);
+-
++ m_firstRun = cg.readEntry("FirstRun",m_firstRun);
+
+ setGridSize(QSizeF(150, 150));
+
+@@ -67,6 +69,9 @@
if (applet->name() == i18n("Icon")) {
addIcon(applet);
}
@@ -653,7 +692,7 @@
}
//list ~/Desktop and add new applets
-@@ -185,12 +189,29 @@
+@@ -185,12 +190,29 @@
return;
}
@@ -663,27 +702,37 @@
+ if (!QFile::exists("/usr/share/kde4/services/sysinfo.protocol"))
+ blacklist << "myComputer.desktop";
+
-+ bool new_added = false;
-+
foreach (KFileItem item, items) {
- if (!m_iconMap.contains(item.url().path())) {
+ if (item.url().fileName()=="trash.desktop" && !m_iconMap.contains("trash") && QFile::exists("/usr/share/kde4/services/plasma-applet-trash.desktop")) {
+ Plasma::Applet *newApplet = m_desktop->addApplet("trash", QVariantList(), 0);
+ if (newApplet) {
+ m_iconMap["trash"] = newApplet;
-+ new_added = true;
+ }
+ }
+ if (!blacklist.contains(item.url().fileName()) && !m_iconMap.contains(item.url().path())) {
addIcon(item.url());
-+ new_added = true;
}
}
-+ if (new_added)
++ if (m_firstRun) {
+ slotAlignHorizontal();
++ KConfigGroup cg = m_desktop->config();
++ cg.writeEntry("FirstRun", false);
++ m_firstRun = false;
++ }
}
void IconLoader::deleteItem(const KFileItem item)
+--- containments/desktop/iconloader.h
++++ containments/desktop/iconloader.h
+@@ -139,6 +139,7 @@
+ bool m_iconShow;
+ bool m_gridAlign;
+ bool m_enableMedia;
++ bool m_firstRun;
+ QSizeF m_gridSize;
+
+ private Q_SLOTS:
--- containments/desktop/BackgroundDialog.ui
+++ containments/desktop/BackgroundDialog.ui
@@ -5,167 +5,378 @@
@@ -1702,6 +1751,64 @@
//It seems the layout geometry must be calculated by hand for the first time
layout->setGeometry(QRectF(0,0, contentSize().width(), contentSize().height()));
}
+--- applets/systemtray/systemtraywidget.cpp
++++ applets/systemtray/systemtraywidget.cpp
+@@ -26,7 +26,11 @@
+
+ // Qt
+ #include <QX11Info>
++#include <QPainter>
+
++// KDE
++#include
++
+ // Xlib
+ #include
+
+@@ -49,7 +53,7 @@
+ m_mainLayout = new QGridLayout(this);
+
+ // Override spacing set by the current style
+- m_mainLayout->setContentsMargins(0, 0, 0, 0);
++ m_mainLayout->setContentsMargins(5,5,5,5);
+ m_mainLayout->setSpacing(4);
+
+ init();
+@@ -169,5 +173,24 @@
+ layout()->activate();
+ emit sizeShouldChange();
+ }
++void SystemTrayWidget::paintEvent(QPaintEvent*)
++{
++ // Qt's transparent background mechanism does not work properly with
++ // system tray windows (see comments in SystemTrayContainer::updateBackground())
++ //
++ // So draw a rounded rectangle filled with the current theme background color instead.
++ int leftMargin,rightMargin,topMargin,bottomMargin;
++ m_mainLayout->getContentsMargins(&leftMargin,&topMargin,&rightMargin,&bottomMargin);
+
++ int xRounding = qMin(leftMargin,rightMargin);
++ int yRounding = qMin(topMargin,bottomMargin);
++
++ QPainter painter(this);
++ painter.setRenderHint(QPainter::Antialiasing);
++ painter.setBrush(Plasma::Theme::self()->backgroundColor());
++ painter.setPen(Qt::NoPen);
++ painter.drawRoundedRect(rect(),xRounding,yRounding);
++}
++
++
+ #include "systemtraywidget.moc"
+--- applets/systemtray/systemtraywidget.h
++++ applets/systemtray/systemtraywidget.h
+@@ -43,6 +43,7 @@
+
+ protected:
+ bool x11Event(XEvent *event);
++ virtual void paintEvent(QPaintEvent* event);
+
+ Q_SIGNALS:
+ void sizeShouldChange();
--- applets/tasks/taskgroupitem.cpp
+++ applets/tasks/taskgroupitem.cpp
@@ -32,7 +32,6 @@
@@ -2662,6 +2769,16 @@
}
}
}
+--- applets/analog-clock/plasma-applet-analogclock.desktop
++++ applets/analog-clock/plasma-applet-analogclock.desktop
+@@ -9,7 +9,6 @@
+ Name[da]=Analogt ur
+ Name[de]=Analoge Uhr
+ Name[el]=Αναλογικό ρολόι
+-Name[en_GB]=Analogue Clock
+ Name[eo]=Analoga horloĝo
+ Name[es]=Reloj analógico
+ Name[et]=Analoogkell
--- applets/kickoff/simpleapplet/menuview.cpp
+++ applets/kickoff/simpleapplet/menuview.cpp
@@ -23,8 +23,12 @@
@@ -4187,11 +4304,15 @@
Copyright 2007 Robert Knight
This library is free software; you can redistribute it and/or
-@@ -39,7 +39,7 @@
+@@ -39,7 +39,11 @@
QStandardItem* LeaveModel::createStandardItem(const QString& url)
{
- //Q_ASSERT(QUrl(url).scheme() == "leave");
++#if 0
++ i18n("Save Session");
++ i18n("Save current session for next login");
++#endif
+ //Q_ASSERT(KUrl(url).scheme() == "leave");
QStandardItem *item = new QStandardItem();
const QString basename = QFileInfo(url).baseName();
@@ -4912,7 +5033,18 @@
+#endif // KICKOFFABSTRACTMODEL_H
--- applets/kickoff/core/searchmodel.cpp
+++ applets/kickoff/core/searchmodel.cpp
-@@ -60,7 +60,7 @@
+@@ -26,7 +26,10 @@
+ // KDE
+ #include <KDebug>
+ #include <KMimeType>
++#include <KProcess>
++#include <KShell>
+ #include <KServiceTypeTrader>
++#include <KStandardDirs>
+ #ifdef HAVE_STRIGIDBUS
+ #include
+ #endif
+@@ -60,11 +63,12 @@
};
SearchModel::SearchModel(QObject *parent)
@@ -4921,7 +5053,12 @@
, d(new Private(this))
{
d->searchIfaces << new ApplicationSearch(this);
-@@ -74,6 +74,10 @@
+ //d->searchIfaces << new IndexerSearch(this);
++ d->searchIfaces << new CalculatorSearch(this);
+ d->searchIfaces << new WebSearch(this);
+
+ foreach(SearchInterface *iface,d->searchIfaces) {
+@@ -74,6 +78,10 @@
this,SLOT(resultsAvailable(QStringList)));
connect(iface,SIGNAL(resultsAvailable(ResultList)),
this,SLOT(resultsAvailable(ResultList)));
@@ -4932,7 +5069,7 @@
}
}
SearchModel::~SearchModel()
-@@ -136,7 +140,7 @@
+@@ -136,7 +144,7 @@
void ApplicationSearch::setQuery(const QString& query)
{
//QString mimeName = mimeNameForQuery(query);
@@ -4941,7 +5078,7 @@
//" or ('%2' in MimeType)"
)
.arg(query); //.arg(mimeName);
-@@ -218,7 +222,7 @@
+@@ -218,7 +226,7 @@
void IndexerSearch::setQuery(const QString& query)
{
#ifdef HAVE_STRIGIDBUS
@@ -4950,6 +5087,58 @@
QList<QString> urls;
QList<StrigiHit> hits = searchClient.getHits(query,10,0);
+@@ -231,4 +239,51 @@
+ #endif
+ }
+
++QString calculate(const QString &exp)
++{
++ QString result, cmd;
++ const QString bc = KStandardDirs::findExe("bc");
++ if ( !bc.isEmpty() ) {
++ cmd = QString("echo %1 | %2").arg(KShell::quoteArg(exp), KShell::quoteArg(bc));
++ }
++ else {
++ cmd = QString("echo $((%1))").arg(exp);
++ }
++ FILE *fs = popen(QFile::encodeName(cmd).data(), "r");
++ if (fs) {
++ QTextStream ts(fs);
++ result = ts.readAll().simplified();
++ pclose(fs);
++ }
++ return result;
++}
++
++CalculatorSearch::CalculatorSearch(QObject *parent)
++ : SearchInterface(parent)
++{
++}
++QString CalculatorSearch::name() const
++{
++ return i18n("Calculator");
++}
++void CalculatorSearch::setQuery(const QString& query)
++{
++ QString cmd = query.simplified();
++ if (!cmd.isEmpty() && (cmd[0].isNumber() || (cmd[0] == '(')) &&
++ (QRegExp("[a-zA-Z\\]\\[]").indexIn(cmd) == -1)) {
++ QString result = calculate(cmd);
++ if (!result.isEmpty()) {
++ ResultList results;
++ SearchResult calcResult;
++ KService::Ptr service = KService::serviceByStorageId("kde4-kcalc.desktop");
++ if (service) {
++ calcResult.url = service->entryPath();
++ }
++ calcResult.title = i18n("%1 = %2", query, result);
++ results << calcResult;
++ emit resultsAvailable(results);
++ }
++ }
++}
++
+ #include "searchmodel.moc"
--- applets/kickoff/core/recentlyusedmodel.cpp
+++ applets/kickoff/core/recentlyusedmodel.cpp
@@ -1,4 +1,4 @@
@@ -5166,6 +5355,23 @@
private:
class Private;
Private * const d;
+@@ -105,6 +108,16 @@
+ virtual void setQuery(const QString& query);
+ };
+
++class CalculatorSearch : public SearchInterface
++{
++Q_OBJECT
++
++public:
++ CalculatorSearch(QObject *parent);
++ virtual QString name() const;
++ virtual void setQuery(const QString& query);
++};
++
+ }
+
+ #endif // SEARCHMODEL_H
--- applets/kickoff/core/recentlyusedmodel.h
+++ applets/kickoff/core/recentlyusedmodel.h
@@ -1,4 +1,4 @@
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org