rev 8619 - in branches/kde4/packages/kdebase-workspace/debian: . patches
Modestas Vainius
modax-guest at alioth.debian.org
Fri Dec 28 20:54:14 UTC 2007
Author: modax-guest
Date: 2007-12-28 20:54:13 +0000 (Fri, 28 Dec 2007)
New Revision: 8619
Added:
branches/kde4/packages/kdebase-workspace/debian/patches/15_revert_kgreeter.cpp_to_rc2.diff
Modified:
branches/kde4/packages/kdebase-workspace/debian/changelog
branches/kde4/packages/kdebase-workspace/debian/patches/series
Log:
FIx kdm X crash (but kdm is still not perfect)
Modified: branches/kde4/packages/kdebase-workspace/debian/changelog
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/changelog 2007-12-28 18:57:51 UTC (rev 8618)
+++ branches/kde4/packages/kdebase-workspace/debian/changelog 2007-12-28 20:54:13 UTC (rev 8619)
@@ -1,5 +1,5 @@
kdebase-workspace (4:3.98.0~svn753247-1) experimental; urgency=low
-
+
* Svn snapshot of revision 753247.
+++ Changes by Armin Berres:
@@ -19,14 +19,20 @@
+++ Changes by Modestas Vainius:
* Add myself to uploaders.
-
+
+++ Changes by Ana Beatriz Guerrero Lopez:
* Bump build-dep to >= 4:3.98.0~svn753247-1.
* Update *.install files.
- -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Mon, 24 Dec 2007 17:40:29 +0100
+ +++ Changes by Modestas Vainius:
+ * Revert kdm/kfrontend/kgreeter.cpp back to its state when rc2 was released.
+ Debian kdm theme (and probably other themes as well) are borked, but X
+ does not crash and users can login (patch 15_revert_kgreeter.cpp_to_rc2.diff)
+
+ -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Fri, 28 Dec 2007 22:50:17 +0200
+
kdebase-workspace (4:3.97.0-2) experimental; urgency=low
+++ Changes by Modestas Vainius:
Added: branches/kde4/packages/kdebase-workspace/debian/patches/15_revert_kgreeter.cpp_to_rc2.diff
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/patches/15_revert_kgreeter.cpp_to_rc2.diff (rev 0)
+++ branches/kde4/packages/kdebase-workspace/debian/patches/15_revert_kgreeter.cpp_to_rc2.diff 2007-12-28 20:54:13 UTC (rev 8619)
@@ -0,0 +1,182 @@
+--- kdebase-workspace-3.97.0/kdm/kfrontend/kgreeter.cpp 2007-12-05 16:12:43.000000000 +0200
++++ kdebase-workspace-3.98.0~svn753247/kdm/kfrontend/kgreeter.cpp 2007-12-27 02:22:32.000000000 +0200
+@@ -38,20 +38,24 @@
+ #include <KConfigGroup>
+
+ #include <QAction>
++#include <QBuffer>
+ #include <QDir>
+ #include <QFile>
++#include <QImageReader>
+ #include <QKeyEvent>
+ #include <QLabel>
+ #include <QListWidget>
+ #include <QListWidgetItem>
+ #include <QMenu>
+ #include <QMovie>
++#include <QPainter>
+ #include <QPushButton>
+ #include <QStyle>
+
+ #include <sys/types.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <fcntl.h>
+ #include <pwd.h>
+ #include <grp.h>
+
+@@ -63,7 +67,7 @@
+ : QListWidget( parent )
+ , cachedSizeHint( -1, 0 )
+ {
+- setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored );
++ setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Ignored );
+ setUniformItemSizes( true );
+ setVerticalScrollMode( ScrollPerPixel );
+ setIconSize( QSize( 48, 48 ) );
+@@ -179,6 +183,23 @@
+ delete stsGroup;
+ }
+
++static void
++expandFace( QImage &img )
++{
++ if (img.width() < 48) {
++ QImage nimg( 48, img.height(), QImage::Format_ARGB32 );
++ nimg.fill( 0 );
++ QPainter p( &nimg );
++ p.drawImage( (48 - img.width()) / 2, 0, img );
++ img = nimg;
++ }
++}
++
++#define FILE_LIMIT_ICON 20
++#define FILE_LIMIT_IMAGE 200
++#define PIXEL_LIMIT_ICON 100
++#define PIXEL_LIMIT_IMAGE 300
++
+ void
+ KGreeter::insertUser( const QImage &default_pix,
+ const QString &username, struct passwd *ps )
+@@ -197,16 +218,48 @@
+ nd = 1;
+ QImage p;
+ do {
+- QString fn = dp ?
+- QFile::decodeName( ps->pw_dir ) + "/.face" :
+- _faceDir + '/' + username + ".face";
+- if (p.load( fn + ".icon" ) || p.load( fn )) {
+- QSize ns( 48, 48 );
+- if (p.size() != ns)
+- p = p.convertToFormat( QImage::Format_RGB32 ).scaled( ns, Qt::KeepAspectRatio, Qt::SmoothTransformation );
+- goto gotit;
++ dp ^= 1;
++ QByteArray fn = !dp ?
++ QByteArray( ps->pw_dir ) + '/' :
++ QFile::encodeName( _faceDir + '/' + username );
++ fn += ".face.icon";
++ int fd, ico;
++ if ((fd = open( fn.data(), O_RDONLY | O_NONBLOCK )) < 0) {
++ fn.chop( 5 );
++ if ((fd = open( fn.data(), O_RDONLY | O_NONBLOCK )) < 0)
++ continue;
++ ico = 0;
++ } else
++ ico = 1;
++ QFile f;
++ f.open( fd, QFile::ReadOnly );
++ int fs = f.size();
++ if (fs > (ico ? FILE_LIMIT_ICON : FILE_LIMIT_IMAGE) * 1000) {
++ logWarn( "%s exceeds file size limit (%dkB)\n",
++ fn.data(), ico ? FILE_LIMIT_ICON : FILE_LIMIT_IMAGE );
++ continue;
++ }
++ QByteArray fc = f.read( fs );
++ ::close( fd );
++ QBuffer buf( &fc );
++ buf.open( QBuffer::ReadOnly );
++ QImageReader ir( &buf );
++ QSize sz = ir.size();
++ int lim = ico ? PIXEL_LIMIT_ICON : PIXEL_LIMIT_IMAGE;
++ if (sz.width() > lim || sz.height() > lim) {
++ logWarn( "%s exceeds image dimension limit (%dx%d)\n",
++ fn.data(), lim, lim );
++ continue;
++ }
++ sz.scale( 48, 48, Qt::KeepAspectRatio );
++ ir.setScaledSize( sz );
++ p = ir.read();
++ if (p.isNull()) {
++ logInfo( "%s is no valid image\n", fn.data() );
++ continue;
+ }
+- dp = 1 - dp;
++ expandFace( p );
++ goto gotit;
+ } while (--nd >= 0);
+ p = default_pix;
+ gotit:
+@@ -268,9 +321,11 @@
+ if (!default_pix.load( _faceDir + "/.default.face" ))
+ logError( "Cannot open default user face\n" );
+ QSize ns( 48, 48 );
+- if (default_pix.size() != ns)
++ if (default_pix.size() != ns) {
+ default_pix =
+- default_pix.convertToFormat( QImage::Format_RGB32 ).scaled( ns, Qt::KeepAspectRatio, Qt::SmoothTransformation );
++ default_pix.convertToFormat( QImage::Format_ARGB32 ).scaled( ns, Qt::KeepAspectRatio, Qt::SmoothTransformation );
++ expandFace( default_pix );
++ }
+ }
+ if (_showUsers == SHOW_ALL) {
+ UserList noUsers( _noUsers );
+@@ -316,6 +371,7 @@
+ }
+ }
+ endpwent();
++ endgrent();
+ if (_sortUsers) {
+ if (userView)
+ userView->sortItems();
+@@ -380,14 +436,16 @@
+ {
+ struct passwd *pw;
+
+- if (userView && (pw = getpwnam( curUser.toLocal8Bit().data() ))) {
+- QString theUser = QString::fromLocal8Bit( pw->pw_name );
+- for (int i = 0, rc = userView->model()->rowCount(); i < rc; i++) {
+- UserListViewItem *item =
+- static_cast<UserListViewItem *>(userView->item( i ));
+- if (item->login == theUser) {
+- userView->setCurrentItem( item );
+- goto oke;
++ if (userView) {
++ if ((pw = getpwnam( curUser.toLocal8Bit().data() ))) {
++ QString theUser = QString::fromLocal8Bit( pw->pw_name );
++ for (int i = 0, rc = userView->model()->rowCount(); i < rc; i++) {
++ UserListViewItem *item =
++ static_cast<UserListViewItem *>(userView->item( i ));
++ if (item->login == theUser) {
++ userView->setCurrentItem( item );
++ goto oke;
++ }
+ }
+ }
+ userView->clearSelection();
+@@ -810,14 +868,14 @@
+ if ((itm = themer->findNode( "language_button" ))) // not implemented yet
+ itm->setVisible( false );
+
+-#ifdef WITH_KDM_XCONSOLE
+ if (console_node) {
++#ifdef WITH_KDM_XCONSOLE
+ if (consoleView)
+ console_node->setWidget( consoleView );
+ else
++#endif
+ console_rect->setVisible( false );
+ }
+-#endif
+
+ if (xauth_warning && (_authorized || !_authComplain))
+ xauth_warning->setVisible( false );
Modified: branches/kde4/packages/kdebase-workspace/debian/patches/series
===================================================================
--- branches/kde4/packages/kdebase-workspace/debian/patches/series 2007-12-28 18:57:51 UTC (rev 8618)
+++ branches/kde4/packages/kdebase-workspace/debian/patches/series 2007-12-28 20:54:13 UTC (rev 8619)
@@ -7,3 +7,4 @@
12_be_better_at_honouring_user_kdm_theming.diff
13_kdm_override_docs.diff
14_correct_kde4home_for_kstartupconfig4.diff
+15_revert_kgreeter.cpp_to_rc2.diff -p1 -R
More information about the pkg-kde-commits
mailing list