Hello community, here is the log from the commit of package yast2-qt checked in at Fri Sep 29 18:18:15 CEST 2006. -------- --- yast2-qt/yast2-qt.changes 2006-08-03 15:23:49.000000000 +0200 +++ /mounts/work_src_done/STABLE/yast2-qt/yast2-qt.changes 2006-09-29 17:55:43.000000000 +0200 @@ -1,0 +2,18 @@ +Fri Sep 29 17:53:59 CEST 2006 - sh@suse.de + +- V 2.13.63 +- Fixed bug #205059: CapsLock warning in password fields + +------------------------------------------------------------------- +Fri Sep 22 16:59:31 CEST 2006 - sh@suse.de + +- Allow pattern categories to be collapsed +- V 2.13.62 + +------------------------------------------------------------------- +Wed Sep 13 16:42:01 CEST 2006 - sh@suse.de + +- Applied patch from Ricardo Cruz <rpmcruz@clix.pt> + for new UI::Beep() built-in + +------------------------------------------------------------------- Old: ---- yast2-qt-2.13.61.tar.bz2 New: ---- yast2-qt-2.13.63.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-qt.spec ++++++ --- /var/tmp/diff_new_pack.gO2n27/_old 2006-09-29 18:17:34.000000000 +0200 +++ /var/tmp/diff_new_pack.gO2n27/_new 2006-09-29 18:17:34.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-qt (Version 2.13.61) +# spec file for package yast2-qt (Version 2.13.63) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,12 +11,12 @@ # norootforbuild Name: yast2-qt -Version: 2.13.61 +Version: 2.13.63 Release: 1 License: GPL Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-qt-2.13.61.tar.bz2 +Source0: yast2-qt-2.13.63.tar.bz2 prefix: /usr BuildRequires: boost-devel curl-devel dbus-1-devel docbook-xsl-stylesheets doxygen hal-devel libdrm-devel libjpeg-devel libxcrypt-devel libxslt libzypp-devel perl-XML-Writer qt3-devel rpm-devel sgml-skel update-desktop-files yast2-core-devel yast2-devtools Summary: YaST2 - Graphical User Interface @@ -42,7 +42,7 @@ Stefan Hundhammer <sh@suse.de> %prep -%setup -n yast2-qt-2.13.61 +%setup -n yast2-qt-2.13.63 %build %{prefix}/bin/y2tool y2autoconf @@ -85,6 +85,15 @@ %doc %{prefix}/share/doc/packages/yast2-qt %changelog -n yast2-qt +* Fri Sep 29 2006 - sh@suse.de +- V 2.13.63 +- Fixed bug #205059: CapsLock warning in password fields +* Fri Sep 22 2006 - sh@suse.de +- Allow pattern categories to be collapsed +- V 2.13.62 +* Wed Sep 13 2006 - sh@suse.de +- Applied patch from Ricardo Cruz <rpmcruz@clix.pt> + for new UI::Beep() built-in * Thu Aug 03 2006 - mvidner@suse.cz - Added a configure-time check for the X font directory. - 2.13.61 ++++++ yast2-qt-2.13.61.tar.bz2 -> yast2-qt-2.13.63.tar.bz2 ++++++ ++++ 16057 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-qt-2.13.61/VERSION new/yast2-qt-2.13.63/VERSION --- old/yast2-qt-2.13.61/VERSION 2006-08-02 15:57:11.000000000 +0200 +++ new/yast2-qt-2.13.63/VERSION 2006-09-29 17:53:52.000000000 +0200 @@ -1 +1 @@ -2.13.61 +2.13.63 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-qt-2.13.61/configure.in new/yast2-qt-2.13.63/configure.in --- old/yast2-qt-2.13.61/configure.in 2006-08-03 15:26:07.000000000 +0200 +++ new/yast2-qt-2.13.63/configure.in 2006-08-30 19:10:34.000000000 +0200 @@ -1,6 +1,6 @@ dnl configure.in for yast2-qt dnl -dnl -- This file is generated by y2autoconf 2.13.19 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.13.22 - DO NOT EDIT! -- dnl (edit configure.in.in instead) AC_INIT(yast2-qt, 2.13.61, http://bugs.opensuse.org/, yast2-qt) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-qt-2.13.61/src/YQIconPool.cc new/yast2-qt-2.13.63/src/YQIconPool.cc --- old/yast2-qt-2.13.61/src/YQIconPool.cc 2005-04-22 14:43:18.000000000 +0200 +++ new/yast2-qt-2.13.63/src/YQIconPool.cc 2006-09-22 16:51:14.000000000 +0200 @@ -48,6 +48,8 @@ #include "icons/taboo_disabled.xpm" #include "icons/update.xpm" #include "icons/update_disabled.xpm" +#include "icons/tree_plus.xpm" +#include "icons/tree_minus.xpm" #include "icons/normal_conflict.xpm" #include "icons/select_conflict.xpm" @@ -99,6 +101,9 @@ QPixmap YQIconPool::tabooPkgConflict() { return iconPool()->cachedIcon( normal_conflict_xpm ); } QPixmap YQIconPool::selectPkgConflict() { return iconPool()->cachedIcon( select_conflict_xpm ); } +QPixmap YQIconPool::treePlus() { return iconPool()->cachedIcon( tree_plus_xpm ); } +QPixmap YQIconPool::treeMinus() { return iconPool()->cachedIcon( tree_minus_xpm ); } + YQIconPool * YQIconPool::iconPool() { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-qt-2.13.61/src/YQPackageSelector.cc new/yast2-qt-2.13.63/src/YQPackageSelector.cc --- old/yast2-qt-2.13.61/src/YQPackageSelector.cc 2006-05-26 16:01:30.000000000 +0200 +++ new/yast2-qt-2.13.63/src/YQPackageSelector.cc 2006-09-20 11:56:32.000000000 +0200 @@ -543,7 +543,7 @@ // Translators: Please keep this short! _checkDependenciesButton = new QPushButton( _( "Chec&k" ), button_box ); CHECK_PTR( _checkDependenciesButton ); - _checkDependenciesButton->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) ); // hor/vert + _checkDependenciesButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); // hor/vert _normalButtonBackground = _checkDependenciesButton->paletteBackgroundColor(); connect( _checkDependenciesButton, SIGNAL( clicked() ), diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-qt-2.13.61/src/YQPkgPatchFilterView.cc new/yast2-qt-2.13.63/src/YQPkgPatchFilterView.cc --- old/yast2-qt-2.13.61/src/YQPkgPatchFilterView.cc 2006-04-10 13:50:45.000000000 +0200 +++ new/yast2-qt-2.13.63/src/YQPkgPatchFilterView.cc 2006-09-22 11:29:34.000000000 +0200 @@ -52,10 +52,9 @@ { QVBox * vbox; - _splitter = new QSplitter( QSplitter::Vertical, this ); CHECK_PTR( _splitter ); - - vbox = new QVBox( _splitter ); CHECK_PTR( vbox ); - _patchList = new YQPkgPatchList( vbox ); CHECK_PTR( _patchList ); + _splitter = new QSplitter( QSplitter::Vertical, this ); CHECK_PTR( _splitter ); + vbox = new QVBox( _splitter ); CHECK_PTR( vbox ); + _patchList = new YQPkgPatchList( vbox ); CHECK_PTR( _patchList ); addVSpacing( vbox, 4 ); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-qt-2.13.61/src/YQPkgPatternList.cc new/yast2-qt-2.13.63/src/YQPkgPatternList.cc --- old/yast2-qt-2.13.61/src/YQPkgPatternList.cc 2006-04-10 13:50:44.000000000 +0200 +++ new/yast2-qt-2.13.63/src/YQPkgPatternList.cc 2006-09-22 17:16:52.000000000 +0200 @@ -30,6 +30,7 @@ #include "YQi18n.h" #include "utf8.h" #include "YQPkgPatternList.h" +#include "YQIconPool.h" #include "YQUI.h" @@ -210,6 +211,54 @@ } +void +YQPkgPatternList::pkgObjClicked( int button, + QListViewItem * listViewItem, + int col, + const QPoint & pos ) +{ + YQPkgPatternCategoryItem * categoryItem + = dynamic_cast<YQPkgPatternCategoryItem *> (listViewItem); + + if ( categoryItem ) + { + if ( button == Qt::LeftButton ) + { + if ( col == statusCol() ) + { + categoryItem->setOpen( ! categoryItem->isOpen() ); + } + } + } + else + { + YQPkgObjList::pkgObjClicked( button, listViewItem, col, pos ); + } +} + + +void +YQPkgPatternList::selectSomething() +{ + QListViewItemIterator it( this ); + + while ( *it ) + { + QY2ListViewItem * item = dynamic_cast<QY2ListViewItem *> (*it); + YQPkgPatternCategoryItem * categoryItem = + dynamic_cast<YQPkgPatternCategoryItem *> (*it); + + if ( item && item->isSelectable() && ! categoryItem ) + { + setSelected( item, true ); // emits signal, too + return; + } + + ++it; + } +} + + @@ -296,11 +345,12 @@ YQPkgPatternCategoryItem::YQPkgPatternCategoryItem( YQPkgPatternList * patternList, const QString & category ) : QY2ListViewItem( patternList ) + , _patternList( patternList ) { - setText( patternList->summaryCol(), category ); + setText( _patternList->summaryCol(), category ); setBackgroundColor( CATEGORY_BACKGROUND ); setOpen( true ); - setSelectable( false ); + setTreeIcon(); } @@ -339,15 +389,25 @@ void -YQPkgPatternCategoryItem::setOpen( bool ) +YQPkgPatternCategoryItem::setOpen( bool open ) { - // Pattern categories should always remain open - - // suppress any attempt to close them + QListViewItem::setOpen( open ); + setTreeIcon(); +} + - QListViewItem::setOpen( true ); +void +YQPkgPatternCategoryItem::setTreeIcon() +{ + setPixmap( _patternList->statusCol(), + isOpen() ? + YQIconPool::treeMinus() : + YQIconPool::treePlus() ); + } + /** * Comparison function used for sorting the list. * Returns: diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-qt-2.13.61/src/YQPkgVersionsView.cc new/yast2-qt-2.13.63/src/YQPkgVersionsView.cc --- old/yast2-qt-2.13.61/src/YQPkgVersionsView.cc 2006-05-26 16:01:30.000000000 +0200 +++ new/yast2-qt-2.13.63/src/YQPkgVersionsView.cc 2006-09-20 15:20:24.000000000 +0200 @@ -128,7 +128,9 @@ new YQPkgVersion( this, root, selectable, *it, _userCanSwitch ); if ( selectable->installedObj() && - selectable->installedObj()->edition() == (*it)->edition() ) + selectable->installedObj()->edition() == (*it)->edition() && + selectable->installedObj()->arch() == (*it)->arch() ) + // FIXME: In future releases, also the vendor will make a difference installedIsAvailable = true; #if 0 @@ -255,7 +257,8 @@ if ( _selectable->hasInstalledObj() ) { - if ( _zyppObj->edition() == _selectable->installedObj()->edition() ) + if ( _zyppObj->edition() == _selectable->installedObj()->edition() && + _zyppObj->arch() == _selectable->installedObj()->arch() ) { setPixmap( statusCol(), YQIconPool::pkgKeepInstalled() ); setBackgroundColor( QColor( 0xF0, 0xF0, 0xF0 ) ); // light grey diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-qt-2.13.61/src/YQTextEntry.cc new/yast2-qt-2.13.63/src/YQTextEntry.cc --- old/yast2-qt-2.13.61/src/YQTextEntry.cc 2005-05-20 16:41:53.000000000 +0200 +++ new/yast2-qt-2.13.63/src/YQTextEntry.cc 2006-09-29 17:50:39.000000000 +0200 @@ -15,11 +15,16 @@ Author: Mathias Kettner <kettner@suse.de> Maintainer: Stefan Hundhammer <sh@suse.de> + textdomain "qt-packages" + /-*/ #include <qlineedit.h> #include <qlabel.h> +#include <X11/X.h> +#include <X11/Xlib.h> +#include <X11/keysym.h> #define y2log_component "qt-ui" #include <ycp/y2log.h> @@ -30,6 +35,7 @@ #include "YEvent.h" #include "QY2CharValidator.h" #include "YQTextEntry.h" +#include "YQi18n.h" YQTextEntry::YQTextEntry( QWidget * parent, @@ -39,6 +45,7 @@ : QVBox( parent ) , YTextEntry( opt, label ) , _validator(0) + , _displayingCapsLockWarning( false ) { setWidgetRep( this ); @@ -52,25 +59,33 @@ if ( label->value() == "" ) _qt_label->hide(); - _qt_lineedit = new QLineEdit( this ); - _qt_lineedit->setFont( YQUI::ui()->currentFont() ); - _qt_lineedit->setText( fromUTF8(text->value() ) ); - - _qt_label->setBuddy( _qt_lineedit ); + _qt_lineEdit = new YQRawLineEdit( this ); + _qt_lineEdit->setFont( YQUI::ui()->currentFont() ); + _qt_lineEdit->setText( fromUTF8(text->value() ) ); - if ( opt.passwordMode.value() ) - _qt_lineedit->setEchoMode( QLineEdit::Password ); + _qt_label->setBuddy( _qt_lineEdit ); _shrinkable = opt.isShrinkable.value(); - connect( _qt_lineedit, SIGNAL( textChanged( const QString & ) ), + connect( _qt_lineEdit, SIGNAL( textChanged( const QString & ) ), this, SLOT ( changed ( const QString & ) ) ); + + if ( opt.passwordMode.value() ) + { + _qt_lineEdit->setEchoMode( QLineEdit::Password ); + + connect( _qt_lineEdit, SIGNAL( capsLockActivated() ), + this, SLOT ( displayCapsLockWarning() ) ); + + connect( _qt_lineEdit, SIGNAL( capsLockDeactivated() ), + this, SLOT ( clearCapsLockWarning() ) ); + } } void YQTextEntry::setEnabling( bool enabled ) { - _qt_lineedit->setEnabled( enabled ); + _qt_lineEdit->setEnabled( enabled ); } @@ -101,12 +116,12 @@ void YQTextEntry::setText( const YCPString & ytext ) { QString text = fromUTF8( ytext->value() ); - + if ( isValidText( text ) ) { - _qt_lineedit->blockSignals( true ); - _qt_lineedit->setText( text ); - _qt_lineedit->blockSignals( false ); + _qt_lineEdit->blockSignals( true ); + _qt_lineEdit->setText( text ); + _qt_lineEdit->blockSignals( false ); } else { @@ -118,7 +133,7 @@ YCPString YQTextEntry::getText() { - return YCPString( toUTF8(_qt_lineedit->text() ) ); + return YCPString( toUTF8(_qt_lineEdit->text() ) ); } @@ -136,7 +151,7 @@ int pos = 0; QString text( txt ); // need a non-const QString & - + return _validator->validate( text, pos ) == QValidator::Acceptable; } @@ -150,19 +165,19 @@ else { _validator = new QY2CharValidator( fromUTF8( newValidChars->value() ), this ); - _qt_lineedit->setValidator( _validator ); + _qt_lineEdit->setValidator( _validator ); // No need to delete the validator in the destructor - Qt will take // care of that since it's a QObject with a parent! } - if ( ! isValidText( _qt_lineedit->text() ) ) + if ( ! isValidText( _qt_lineEdit->text() ) ) { y2error( "Old value \"%s\" of %s \"%s\" invalid according to ValidChars \"%s\" - deleting", - (const char *) _qt_lineedit->text(), + (const char *) _qt_lineEdit->text(), widgetClass(), debugLabel().c_str(), newValidChars->value().c_str() ); - _qt_lineedit->setText( "" ); + _qt_lineEdit->setText( "" ); } YTextEntry::setValidChars( newValidChars ); @@ -170,13 +185,13 @@ void YQTextEntry::setInputMaxLength( const YCPInteger & numberOfChars) { - _qt_lineedit->setMaxLength(numberOfChars->asInteger()->value()); + _qt_lineEdit->setMaxLength(numberOfChars->asInteger()->value()); } bool YQTextEntry::setKeyboardFocus() { - _qt_lineedit->setFocus(); - _qt_lineedit->selectAll(); + _qt_lineEdit->setFocus(); + _qt_lineEdit->selectAll(); return true; } @@ -189,7 +204,117 @@ } +void YQTextEntry::displayCapsLockWarning() +{ + y2milestone( "warning" ); + if ( _displayingCapsLockWarning ) + return; + if ( _qt_lineEdit->echoMode() == QLineEdit::Normal ) + return; -#include "YQTextEntry.moc" + // Translators: This is a very short warning that the CapsLock key + // is active while trying to type in a password field. This warning + // replaces the normal label (caption) of that password field while + // CapsLock is active, so please keep it short. Please don't translate it + // at all if the term "CapsLock" can reasonably expected to be understood + // by the target audience. + // + // In particular, please don't translate this to death in German. + // Simply leave it. + _qt_label->setText( _( "CapsLock!" ) ); + _qt_label->setFont( YQUI::ui()->boldFont() ); + _displayingCapsLockWarning = true; +} + + +void YQTextEntry::clearCapsLockWarning() +{ + y2milestone( "warning off " ); + if ( ! _displayingCapsLockWarning ) + return; + + if ( _qt_lineEdit->echoMode() == QLineEdit::Normal ) + return; + + _qt_label->setText( fromUTF8( getLabel()->value() ) ); + _qt_label->setFont( YQUI::ui()->currentFont() ); + _displayingCapsLockWarning = false; +} + + +bool YQRawLineEdit::x11Event( XEvent * event ) +{ + // Qt (3.x) does not have support for the CapsLock key. + // All other modifiers (Shift, Control, Meta) are propagated via + // Qt's events, but for some reason, CapsLock is not. + // + // So let's examine the raw X11 event here to check for the + // CapsLock status. All events are really handled on the parent class + // (QWidget) level, though. We only peek into the modifier states. + + if ( event ) + { + bool oldCapsLockActive = _capsLockActive; + + switch ( event->type ) + { + case KeyPress: + _capsLockActive = (bool) ( event->xkey.state & LockMask ); + break; + + case KeyRelease: + + _capsLockActive = (bool) ( event->xkey.state & LockMask ); + + if ( _capsLockActive && oldCapsLockActive ) + { + KeySym key = XLookupKeysym( &(event->xkey), 0 ); + + if ( key == XK_Caps_Lock || + key == XK_Shift_Lock ) + { + y2milestone( "CapsLock released" ); + _capsLockActive = false; + } + } + + y2debug( "Key event; caps lock: %s", _capsLockActive ? "on" : "off" ); + break; + + case ButtonPress: + case ButtonRelease: + _capsLockActive = (bool) ( event->xbutton.state & LockMask ); + break; + + case EnterNotify: + _capsLockActive = (bool) ( event->xcrossing.state & LockMask ); + break; + + case LeaveNotify: + case FocusOut: + _capsLockActive = false; + emit capsLockDeactivated(); + break; + + default: + break; + } + + if ( oldCapsLockActive != _capsLockActive ) + { + y2milestone( "Emitting warning" ); + + if ( _capsLockActive ) + emit capsLockActivated(); + else + emit capsLockDeactivated(); + } + } + + return false; // handle this event at the Qt level +} + + +#include "YQTextEntry.moc" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-qt-2.13.61/src/YQUI_x11.cc new/yast2-qt-2.13.63/src/YQUI_x11.cc --- old/yast2-qt-2.13.61/src/YQUI_x11.cc 2006-06-14 17:16:20.000000000 +0200 +++ new/yast2-qt-2.13.63/src/YQUI_x11.cc 2006-09-13 16:23:12.000000000 +0200 @@ -91,6 +91,13 @@ return _main_win; }; + +void YQUI::beep() +{ + qApp->beep(); +} + + void YQUI::busyCursor( void ) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-qt-2.13.61/src/include/QY2ListView.h new/yast2-qt-2.13.63/src/include/QY2ListView.h --- old/yast2-qt-2.13.61/src/include/QY2ListView.h 2006-03-20 10:56:10.000000000 +0100 +++ new/yast2-qt-2.13.63/src/include/QY2ListView.h 2006-09-22 17:08:58.000000000 +0200 @@ -58,7 +58,7 @@ public slots: /** - * Select a list entry ( if there is any ). + * Select a list entry (if there is any). * Usually this will be the first list entry, but don't rely on that - this * might change without notice. Emits signal selectionChanged(). **/ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-qt-2.13.61/src/include/YQIconPool.h new/yast2-qt-2.13.63/src/include/YQIconPool.h --- old/yast2-qt-2.13.61/src/include/YQIconPool.h 2005-04-22 14:43:08.000000000 +0200 +++ new/yast2-qt-2.13.63/src/include/YQIconPool.h 2006-09-22 16:52:05.000000000 +0200 @@ -67,6 +67,9 @@ static QPixmap tabooPkgConflict(); static QPixmap selectPkgConflict(); + static QPixmap treePlus(); + static QPixmap treeMinus(); + protected: diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-qt-2.13.61/src/include/YQPkgPatternList.h new/yast2-qt-2.13.63/src/include/YQPkgPatternList.h --- old/yast2-qt-2.13.61/src/include/YQPkgPatternList.h 2006-04-10 13:50:41.000000000 +0200 +++ new/yast2-qt-2.13.63/src/include/YQPkgPatternList.h 2006-09-22 17:09:57.000000000 +0200 @@ -87,6 +87,25 @@ **/ void fillList(); + /** + * Dispatcher slot for mouse click: cycle status depending on column. + * For pattern category items, emulate tree open / close behaviour. + * + * Reimplemented from YQPkgObjList. + **/ + virtual void pkgObjClicked( int button, + QListViewItem * item, + int col, + const QPoint & pos ); + + /** + * Select the first selectable list entry that is not a pattern category. + * + * Reimplemented from QY2ListView. + **/ + virtual void selectSomething(); + + public: /** @@ -252,10 +271,22 @@ * Reimplemented from QListViewItem to force categories open at all times */ virtual void setOpen( bool open ); + protected: /** + * Set a suitable tree open/close icon depending on this category's + * open/close status. + * + * The default QListView plus/minus icons would require treeStepSize() to + * be set >0 and rootItemDecorated( true ), but that would look very ugly + * in this context, so the pattern categories paint their own tree open / + * close icons. + **/ + void setTreeIcon( void ); + + /** * Paint method. Reimplemented from @ref QListViewItem so a different * font can be used. * @@ -271,7 +302,8 @@ // Data members // - ZyppPattern _firstPattern; + YQPkgPatternList * _patternList; + ZyppPattern _firstPattern; }; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-qt-2.13.61/src/include/YQTextEntry.h new/yast2-qt-2.13.63/src/include/YQTextEntry.h --- old/yast2-qt-2.13.61/src/include/YQTextEntry.h 2005-11-21 12:41:40.000000000 +0100 +++ new/yast2-qt-2.13.63/src/include/YQTextEntry.h 2006-09-29 17:14:20.000000000 +0200 @@ -23,6 +23,7 @@ #define YQTextEntry_h #include <qvbox.h> +#include <qlineedit.h> #include <ycp/YCPString.h> #include "YTextEntry.h" @@ -32,6 +33,8 @@ class QLabel; class QLineEdit; class QY2CharValidator; +class YQRawLineEdit; + class YQTextEntry : public QVBox, public YTextEntry { @@ -112,28 +115,79 @@ */ void changed( const QString & ); + /** + * Display a warning that CapsLock is active: + * Replace the label with "CapsLock!" + **/ + void displayCapsLockWarning(); + + /** + * Clear the CapsLock warning: Restore old label + **/ + void clearCapsLockWarning(); + protected: + // + // Data members + // + + QLabel * _qt_label; + YQRawLineEdit * _qt_lineEdit; + QY2CharValidator * _validator; + bool _shrinkable; + bool _displayingCapsLockWarning; +}; + + +/** + * Helper class that can obtain the CapsLock status, too. + * For some reason, Qt does not propagate that information from X11. + **/ +class YQRawLineEdit: public QLineEdit +{ + Q_OBJECT + +public: + /** - * Pointer to the qt widget representing the label - */ - QLabel * _qt_label; + * Constructor + **/ + YQRawLineEdit( QWidget * parent ) + : QLineEdit( parent ) + , _capsLockActive( false ) + {} /** - * Pointer to the qt widget representing the text entry - */ - QLineEdit * _qt_lineedit; + * Destructor + **/ + virtual ~YQRawLineEdit() {}; /** - * Pointer to the validator object + * Check if CapsLock is active + * (rather: was active at the time of the last key or focus event) **/ - QY2CharValidator * _validator; + bool isCapsLockActive() const { return _capsLockActive; } + + +signals: + void capsLockActivated(); + void capsLockDeactivated(); + +protected: /** - * true if the horizontal nice size should be very small - */ - bool _shrinkable; + * X11 raw event handler. Propagates all events to the Qt event handlers, + * but updates _capsLockActive for key events. + * + * Reimplemented from QWidget. + **/ + bool x11Event( XEvent * event ) ; + +private: + + bool _capsLockActive; }; #endif // YQTextEntry_h diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-qt-2.13.61/src/include/YQUI.h new/yast2-qt-2.13.63/src/include/YQUI.h --- old/yast2-qt-2.13.61/src/include/YQUI.h 2006-02-01 11:03:30.000000000 +0100 +++ new/yast2-qt-2.13.63/src/include/YQUI.h 2006-09-13 16:30:29.000000000 +0200 @@ -236,7 +236,14 @@ **/ QString productName() const; + /** + * Beep - activate the system (X11) bell. + * + * Reimplemented from YUI. + */ + void beep(); + public slots: /** ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@suse.de