Hello community, here is the log from the commit of package yast2-qt checked in at Fri Dec 21 20:35:08 CET 2007. -------- --- yast2-qt/yast2-qt.changes 2007-12-19 19:25:43.000000000 +0100 +++ /mounts/work_src_done/STABLE/yast2-qt/yast2-qt.changes 2007-12-21 18:41:55.000000000 +0100 @@ -1,0 +2,7 @@ +Fri Dec 21 18:38:53 CET 2007 - coolo@suse.de + +- support `CurrentItem in timezone widget +- fix combobox semantic +- V 2.16.12 + +------------------------------------------------------------------- Old: ---- yast2-qt-2.16.11.tar.bz2 New: ---- yast2-qt-2.16.12.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-qt.spec ++++++ --- /var/tmp/diff_new_pack.KK8410/_old 2007-12-21 20:34:38.000000000 +0100 +++ /var/tmp/diff_new_pack.KK8410/_new 2007-12-21 20:34:38.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package yast2-qt (Version 2.16.11) +# spec file for package yast2-qt (Version 2.16.12) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -10,16 +10,17 @@ Name: yast2-qt -Version: 2.16.11 +Version: 2.16.12 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-qt-2.16.11.tar.bz2 -BuildRequires: docbook-xsl-stylesheets doxygen libdrm-devel libjpeg-devel libqt4-devel libxcrypt-devel libxslt libzypp-devel perl-XML-Writer sgml-skel update-desktop-files yast2-devtools +Source0: yast2-qt-2.16.12.tar.bz2 +BuildRequires: docbook-xsl-stylesheets doxygen libdrm-devel libjpeg-devel libqt4-devel libxcrypt-devel libxslt libzypp-devel perl-XML-Writer sgml-skel update-desktop-files Summary: YaST2 - Graphical User Interface -BuildRequires: yast2-core-devel >= 2.16.16 -Requires: yast2-core >= 2.16.16 +BuildRequires: yast2-core-devel >= 2.16.17 +BuildRequires: yast2-devtools >= 2.16.3 +Requires: yast2-core >= 2.16.17 Requires: yast2_theme >= 2.16.1 Requires: libzypp >= 3.11.8 Provides: yast2_ui @@ -77,6 +78,10 @@ %_libdir/YaST2/plugin/libpy2qt_pkg.so %changelog +* Fri Dec 21 2007 - coolo@suse.de +- support `CurrentItem in timezone widget +- fix combobox semantic +- V 2.16.12 * Wed Dec 19 2007 - coolo@suse.de - give the help popup a search function - support non-padding widgets for backgrounds ++++++ yast2-qt-2.16.11.tar.bz2 -> yast2-qt-2.16.12.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.11/src/CMakeLists.txt new/yast2-qt-2.16.12/src/CMakeLists.txt --- old/yast2-qt-2.16.11/src/CMakeLists.txt 2007-12-19 19:24:55.000000000 +0100 +++ new/yast2-qt-2.16.12/src/CMakeLists.txt 2007-12-21 18:41:52.000000000 +0100 @@ -1,14 +1,14 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ) ADD_DEFINITIONS( --DY2LOG=\\\"QT4\\\" ${QT_DEFINITIONS} --DQT_LOCALEDIR=\\\"${CMAKE_INSTALL_PREFIX}/share/qt4/translations\\\" --DICONDIR=\\"${Y2QT_ICONDIR}\\" --DLOCALEDIR=\\\"${Y2QT_LOCALEDIR}\\\" --DLANG_FONTS_FILE=\\\"${CMAKE_INSTALL_PREFIX}/share/fonts/lang_fonts\\\" --DTHEMEDIR=\\\"${Y2QT_THEMEDIR}\\\" --DQTLIBDIR=\\\"${LIB_INSTALL_DIR}\\\" -) + -DY2LOG=\\\"QT4\\\" ${QT_DEFINITIONS} + -DQT_LOCALEDIR=\\\"${CMAKE_INSTALL_PREFIX}/share/qt4/translations\\\" + -DICONDIR=\\"${Y2QT_ICONDIR}\\" + -DLOCALEDIR=\\\"${Y2QT_LOCALEDIR}\\\" + -DLANG_FONTS_FILE=\\\"${CMAKE_INSTALL_PREFIX}/share/fonts/lang_fonts\\\" + -DTHEMEDIR=\\\"${Y2QT_THEMEDIR}\\\" + -DQTLIBDIR=\\\"${LIB_INSTALL_DIR}\\\" + ) SET( qt_yast_plugin_SRCS diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.11/src/pkg/CMakeLists.txt new/yast2-qt-2.16.12/src/pkg/CMakeLists.txt --- old/yast2-qt-2.16.11/src/pkg/CMakeLists.txt 2007-12-19 19:24:56.000000000 +0100 +++ new/yast2-qt-2.16.12/src/pkg/CMakeLists.txt 2007-12-21 18:41:53.000000000 +0100 @@ -7,13 +7,13 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${QT_QT3SUPPORT_INCLUDE_DIR} "${CMAKE_SOURCE_DIR}/src/pkg" ${ZYPP_INCLUDE_DIR}) ADD_DEFINITIONS( --DY2LOG=\\\"QT4\\\" ${QT_DEFINITIONS} --DICONDIR=\\"${Y2QT_ICONDIR}\\" --DLOCALEDIR=\\\"${Y2QT_LOCALEDIR}\\\" --DTHEMEDIR=\\\"${Y2QT_THEMEDIR}\\\" --DQTLIBDIR=\\\"${LIB_INSTALL_DIR}\\\" --DHELPIMAGEDIR=\\\"${CMAKE_INSTALL_PREFIX}/share/YaST2/images\\\" -) + -DY2LOG=\\\"QT4\\\" ${QT_DEFINITIONS} + -DICONDIR=\\"${Y2QT_ICONDIR}\\" + -DLOCALEDIR=\\\"${Y2QT_LOCALEDIR}\\\" + -DTHEMEDIR=\\\"${Y2QT_THEMEDIR}\\\" + -DQTLIBDIR=\\\"${LIB_INSTALL_DIR}\\\" + -DHELPIMAGEDIR=\\\"${CMAKE_INSTALL_PREFIX}/share/YaST2/images\\\" + ) SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-nonliteral -fmessage-length=0" ) SET(qt_yast_pkg_plugin_SRCS diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.11/src/YQComboBox.cc new/yast2-qt-2.16.12/src/YQComboBox.cc --- old/yast2-qt-2.16.11/src/YQComboBox.cc 2007-12-19 19:24:55.000000000 +0100 +++ new/yast2-qt-2.16.12/src/YQComboBox.cc 2007-12-21 18:41:53.000000000 +0100 @@ -35,7 +35,7 @@ #include "YQSignalBlocker.h" #include "YQWidgetCaption.h" #include <QVBoxLayout> - +#include <QDebug> YQComboBox::YQComboBox( YWidget * parent, const string & label, @@ -94,7 +94,14 @@ if ( isValidText( text ) ) { YQSignalBlocker sigBlocker( _qt_comboBox ); - _qt_comboBox->setItemText(_qt_comboBox->currentIndex(), text ); + int index = _qt_comboBox->findText( text ); + YItem *item = findItem( newValue ); + if ( index < 0 ) + _qt_comboBox->setItemText(_qt_comboBox->currentIndex(), text ); + else { + _qt_comboBox->setCurrentIndex( index ); + _qt_comboBox->setItemText(index, text ); + } } else { @@ -119,9 +126,9 @@ } if ( icon.isNull() ) - _qt_comboBox->insertItem( -1, fromUTF8( item->label() ) ); + _qt_comboBox->addItem( fromUTF8( item->label() ) ); else - _qt_comboBox->insertItem( -1, icon, fromUTF8( item->label() ) ); + _qt_comboBox->addItem( icon, fromUTF8( item->label() ) ); if ( item->selected() ) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.11/src/YQTimezoneSelector.cc new/yast2-qt-2.16.12/src/YQTimezoneSelector.cc --- old/yast2-qt-2.16.11/src/YQTimezoneSelector.cc 2007-12-19 19:24:55.000000000 +0100 +++ new/yast2-qt-2.16.12/src/YQTimezoneSelector.cc 2007-12-21 18:41:52.000000000 +0100 @@ -45,6 +45,7 @@ YQTimezoneSelectorPrivate( QWidget *p ) { parent = p; blink = 0; + highlight = 0; } QImage _pix; QPoint _zoom; @@ -166,13 +167,13 @@ int YQTimezoneSelector::preferredWidth() { - return 400; + return 600; } int YQTimezoneSelector::preferredHeight() { - return 200; + return 300; } @@ -192,7 +193,6 @@ if ( event->button() == Qt::RightButton ) { d->_zoom = QPoint(); - d->_best = YQTimezoneSelectorPrivate::Location(); d->cachePix = QPixmap(); } else if ( event->button() == Qt::LeftButton ) @@ -246,28 +246,50 @@ p.drawPixmap( 0, 0, d->cachePix ); - if ( d->highlight > 0 ) - { - QPoint pos = d->pixPosition( d->_best ); - static const QColor blinks[] = { QColor( "#00ff00" ), QColor( "#22dd00" ), QColor( "#44bb00" ), - QColor( "#669900" ), QColor( "#887700" ), QColor( "#aa5500" ), - QColor( "#887700" ), QColor( "#669900" ), QColor( "#44bb00" ), - QColor( "#22dd00" ) }; - int index = d->highlight - 1; - p.setPen( blinks[ index ] ); - p.setBrush( blinks[ index ] ); - - p.drawEllipse( QRect( d->pixToWindow( d->_best.pix_pos ) - QPoint( 2,2 ), QSize( 5, 5 ) ) ); - } setCursor( Qt::CrossCursor ); } - p.setBrush( Qt::green ); - p.setPen( Qt::green ); + p.setBrush( QColor( "#D8DF57" ) ); + p.setPen( QColor( "#B9DFD6" ) ); for ( QListYQTimezoneSelectorPrivate::Location::const_iterator it = d->locations.begin(); it != d->locations.end(); ++it ) { if ( !d->highlight || ( *it ).zone != d->_best.zone ) - p.drawEllipse( QRect( d->pixToWindow( ( *it ).pix_pos ) - QPoint( 2,2 ), QSize( 5, 5 ) ) ); + { + if ( d->_zoom.isNull() ) + p.drawEllipse( QRect( d->pixToWindow( ( *it ).pix_pos ) - QPoint( 1,1 ), QSize( 3, 3 ) ) ); + else + p.drawEllipse( QRect( d->pixToWindow( ( *it ).pix_pos ) - QPoint( 2,2 ), QSize( 5, 5 ) ) ); + } + } + if ( d->highlight > 0 ) + { + QPoint pos = d->pixPosition( d->_best ); + static const QColor blinks[] = { QColor( "#00ff00" ), QColor( "#22dd00" ), QColor( "#44bb00" ), + QColor( "#669900" ), QColor( "#887700" ), QColor( "#aa5500" ), + QColor( "#887700" ), QColor( "#669900" ), QColor( "#44bb00" ), + QColor( "#22dd00" ) }; + int index = d->highlight - 1; + p.setPen( blinks[ index ] ); + p.setBrush( blinks[ index ] ); + + p.drawEllipse( QRect( d->pixToWindow( d->_best.pix_pos ) - QPoint( 2,2 ), QSize( 5, 5 ) ) ); + + QFont f( font() ); + f.setBold( true ); + p.setFont( f ); + QFontMetrics fm( f ); + + QPoint off = d->pixToWindow( d->_best.pix_pos ) + QPoint( 11, 4 ); + int tw = fm.width( d->_best.tip ); + if ( tw + off.x() > width() ) + off.rx() = d->pixToWindow( d->_best.pix_pos ).x() - tw - 10; + + p.setPen( Qt::black ); + p.drawText( off, d->_best.tip ); + + p.setPen( Qt::white ); + p.drawText( off - QPoint( 1, 1 ), d->_best.tip ); + } } @@ -307,13 +329,18 @@ QPoint YQTimezoneSelectorPrivate::pixToWindow( const QPoint &pos ) const { + if ( _zoom.isNull() ) + { + return QPoint( double( pos.x() ) * parent->width() / _pix.width(), + double( pos.y() ) * parent->height() / _pix.height() ); + } int left = qMin( qMax( _zoom.x() - parent->width() / 2, 0 ), _pix.width() - parent->width() ); int top = qMin( qMax( _zoom.y() - parent->height() / 2, 0 ), _pix.height() - parent->height() ); return QPoint( pos.x() - left, pos.y() - top ); } -void YQTimezoneSelector::setCurrentZone( const std::string &_zone ) +void YQTimezoneSelector::setCurrentZone( const std::string &_zone, bool zoom ) { QString zone = QString::fromStdString( _zone ); @@ -328,8 +355,10 @@ d->_best = *it; } - d->_zoom = d->_best.pix_pos; + if ( zoom ) + d->_zoom = d->_best.pix_pos; d->cachePix = QPixmap(); + d->highlight = 1; d->blink->start(); update(); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.11/src/YQTimezoneSelector.h new/yast2-qt-2.16.12/src/YQTimezoneSelector.h --- old/yast2-qt-2.16.11/src/YQTimezoneSelector.h 2007-12-19 19:24:55.000000000 +0100 +++ new/yast2-qt-2.16.12/src/YQTimezoneSelector.h 2007-12-21 18:41:53.000000000 +0100 @@ -77,7 +77,7 @@ /** * subclasses have to implement this to set value */ - virtual void setCurrentZone( const std::string &zone ); + virtual void setCurrentZone( const std::string &zone, bool zoom ); protected: YQTimezoneSelectorPrivate *d; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.11/VERSION.cmake new/yast2-qt-2.16.12/VERSION.cmake --- old/yast2-qt-2.16.11/VERSION.cmake 2007-12-19 19:24:54.000000000 +0100 +++ new/yast2-qt-2.16.12/VERSION.cmake 2007-12-21 18:41:52.000000000 +0100 @@ -1,3 +1,3 @@ SET(VERSION_MAJOR "2") SET(VERSION_MINOR "16") -SET(VERSION_PATCH "11") +SET(VERSION_PATCH "12") diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.11/yast2-qt.spec.in new/yast2-qt-2.16.12/yast2-qt.spec.in --- old/yast2-qt-2.16.11/yast2-qt.spec.in 2007-12-19 19:24:55.000000000 +0100 +++ new/yast2-qt-2.16.12/yast2-qt.spec.in 2007-12-21 18:41:52.000000000 +0100 @@ -2,11 +2,12 @@ @HEADER@ -BuildRequires: libzypp-devel docbook-xsl-stylesheets doxygen libdrm-devel libjpeg-devel libxcrypt-devel libxslt perl-XML-Writer libqt4-devel sgml-skel update-desktop-files yast2-devtools +BuildRequires: libzypp-devel docbook-xsl-stylesheets doxygen libdrm-devel libjpeg-devel libxcrypt-devel libxslt perl-XML-Writer libqt4-devel sgml-skel update-desktop-files Summary: - -BuildRequires: yast2-core-devel >= 2.16.16 -Requires: yast2-core >= 2.16.16 +BuildRequires: yast2-core-devel >= 2.16.17 +BuildRequires: yast2-devtools >= 2.16.3 +Requires: yast2-core >= 2.16.17 Requires: yast2_theme >= 2.16.1 Requires: libzypp >= 3.11.8 Provides: yast2_ui ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org