Hello community,
here is the log from the commit of package yast2-qt
checked in at Sun Dec 2 15:52:19 CET 2007.
--------
--- yast2-qt/yast2-qt.changes 2007-11-27 19:28:58.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-qt/yast2-qt.changes 2007-11-30 17:23:53.954451000 +0100
@@ -1,0 +2,6 @@
+Fri Nov 30 17:20:49 CET 2007 - sh(a)suse.de
+
+- Migrated YQDialog to mod-ui
+- V 2.16.6
+
+-------------------------------------------------------------------
Old:
----
yast2-qt-2.16.5.tar.bz2
New:
----
yast2-qt-2.16.6.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-qt.spec ++++++
--- /var/tmp/diff_new_pack.W11892/_old 2007-12-02 15:51:52.000000000 +0100
+++ /var/tmp/diff_new_pack.W11892/_new 2007-12-02 15:51:52.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-qt (Version 2.16.5)
+# spec file for package yast2-qt (Version 2.16.6)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,17 +11,17 @@
# norootforbuild
Name: yast2-qt
-Version: 2.16.5
+Version: 2.16.6
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-qt-2.16.5.tar.bz2
+Source0: yast2-qt-2.16.6.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
-BuildRequires: yast2-core-devel >= 2.16.10
-Requires: yast2-core >= 2.16.10
+BuildRequires: yast2-core-devel >= 2.16.11
+Requires: yast2-core >= 2.16.11
Requires: libzypp >= 3.11.8
Provides: yast2_ui
Provides: y2base:/var/lib/YaST2/servers/qt
@@ -44,7 +44,7 @@
Stefan Hundhammer <sh(a)suse.de>
%prep
-%setup -n yast2-qt-2.16.5
+%setup -n yast2-qt-2.16.6
%build
%{prefix}/bin/y2tool y2autoconf
@@ -89,6 +89,9 @@
/usr/share/YaST2/data/lang_fonts
%doc %{prefix}/share/doc/packages/yast2-qt
%changelog
+* Fri Nov 30 2007 - sh(a)suse.de
+- Migrated YQDialog to mod-ui
+- V 2.16.6
* Tue Nov 27 2007 - sh(a)suse.de
- Moved all YCP related code out of YQWizard
- V 2.16.5
++++++ yast2-qt-2.16.5.tar.bz2 -> yast2-qt-2.16.6.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.5/src/pkg/YQPkgConflictDialog.cc new/yast2-qt-2.16.6/src/pkg/YQPkgConflictDialog.cc
--- old/yast2-qt-2.16.5/src/pkg/YQPkgConflictDialog.cc 2007-11-27 19:07:34.000000000 +0100
+++ new/yast2-qt-2.16.6/src/pkg/YQPkgConflictDialog.cc 2007-11-30 12:13:48.000000000 +0100
@@ -354,7 +354,7 @@
QString heading = QString( "<h2>%1</h2>" ).arg( _( "Create Dependency Resolver Test Case" ) );
QString msg =
- _( "<p>Use this to generate extensive logs to help tracking down bugs in the dependency resolver."
+ _( "<p>Use this to generate extensive logs to help tracking down bugs in the dependency resolver. "
"The logs will be stored in directory <br><tt>%1</tt></p>" ).arg( testCaseDir );
int button_no = QMessageBox::information( 0, // parent
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.5/src/pkg/YQPkgRepoFilterView.cc new/yast2-qt-2.16.6/src/pkg/YQPkgRepoFilterView.cc
--- old/yast2-qt-2.16.5/src/pkg/YQPkgRepoFilterView.cc 2007-11-16 12:41:12.000000000 +0100
+++ new/yast2-qt-2.16.6/src/pkg/YQPkgRepoFilterView.cc 2007-11-30 12:15:22.000000000 +0100
@@ -95,7 +95,11 @@
// Translators: This is a combo box where the user can apply a secondary filter
// in addition to the primary filter by repository - one of
- // "all packages", "RPM groups", "search", "summary"
+ // "All packages", "RPM groups", "search", "summary"
+ //
+ // And yes, the colon really belongs there since this is one of the very
+ // few cases where a combo box label is left to the combo box rather than
+ // above it.
_secondaryFilters = new QY2ComboTabWidget( _( "&Secondary Filter:" ), vbox );
CHECK_PTR( _secondaryFilters );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.5/src/YQDialog.cc new/yast2-qt-2.16.6/src/YQDialog.cc
--- old/yast2-qt-2.16.5/src/YQDialog.cc 2007-11-27 19:07:34.000000000 +0100
+++ new/yast2-qt-2.16.6/src/YQDialog.cc 2007-11-30 17:07:23.000000000 +0100
@@ -38,14 +38,22 @@
// like "Above", "Below" etc. that clash with some Qt headers.
#include <X11/Xlib.h>
+#define YQMainDialogWFlags 0
-YQDialog::YQDialog( const YWidgetOpt & opt,
- QWidget * qt_parent,
- bool default_size )
- : QWidget( qt_parent,
- 0, // name
- default_size ? 0 : WStyle_Customize | WStyle_DialogBorder | WType_Modal | WStyle_Dialog ) // WFlags
- , YDialog( opt )
+#define YQPopupDialogWFlags \
+ ( WStyle_Customize | \
+ WStyle_Dialog | \
+ WType_Modal | \
+ WStyle_DialogBorder )
+
+
+YQDialog::YQDialog( QWidget * qParent,
+ YDialogType dialogType,
+ YDialogColorMode colorMode )
+ : QWidget( qParent,
+ 0, // name
+ dialogType == YMainDialog ? YQMainDialogWFlags : YQPopupDialogWFlags )
+ , YDialog( dialogType, colorMode )
{
_userResized = false;
_focusButton = 0;
@@ -53,16 +61,16 @@
setWidgetRep( this );
- setCaption( hasDefaultSize() ? "YaST2" : "" );
+ setCaption( dialogType == YMainDialog ? "YaST2" : "" );
setFocusPolicy( QWidget::StrongFocus );
- if ( hasWarnColor() || hasInfoColor() )
+ if ( colorMode != YDialogNormalColor )
{
QColor normalBackground ( 0, 128, 0 );
QColor inputFieldBackground ( 0, 96, 0 );
QColor text = white;
- if ( hasInfoColor() )
+ if ( colorMode == YDialogInfoColor )
{
normalBackground = QColor ( 238, 232, 170 ); // PaleGoldenrod
}
@@ -74,31 +82,6 @@
warnPalette.setNormal( normalColors );
setPalette( warnPalette );
}
-
- _qFrame = new QFrame ( this );
- bool decorate = ! hasDefaultSize() && ! YQUI::ui()->haveWM();
-
-#if 0
- if ( hasSmallDecorations() )
- {
- // None of this works (yet). :-((
-
- clearWFlags( getWFlags() );
- setWFlags( WStyle_Customize | WStyle_DialogBorder | WStyle_StaysOnTop );
- // decorate = true;
- }
-#endif
-
- if ( decorate )
- {
- _qFrame->setFrameStyle ( QFrame::Box | QFrame::Raised );
- _qFrame->setLineWidth(2);
- _qFrame->setMidLineWidth(3);
- }
- else
- {
- _qFrame->setFrameStyle ( QFrame::NoFrame );
- }
}
@@ -111,7 +94,7 @@
{
int preferredWidth;
- if ( hasDefaultSize() )
+ if ( dialogType() == YMainDialog )
{
if ( userResized() )
preferredWidth = _userSize.width();
@@ -120,7 +103,7 @@
}
else
{
- preferredWidth = YDialog::preferredWidth() + 2 * decorationWidth();
+ preferredWidth = YDialog::preferredWidth();
}
int screenWidth = qApp->desktop()->width();
@@ -139,7 +122,7 @@
{
int preferredHeight;
- if ( hasDefaultSize() )
+ if ( dialogType() == YMainDialog )
{
if ( userResized() )
preferredHeight = _userSize.height();
@@ -148,7 +131,7 @@
}
else
{
- preferredHeight = YDialog::preferredHeight() + 2 * decorationWidth();
+ preferredHeight = YDialog::preferredHeight();
}
int screenHeight = qApp->desktop()->height();
@@ -163,19 +146,10 @@
}
-int YQDialog::decorationWidth()
-{
- if ( ! hasDefaultSize() && _qFrame )
- return _qFrame->frameWidth();
- else
- return 0;
-}
-
-
void YQDialog::setEnabled( bool enabled )
{
QWidget::setEnabled( enabled );
- YWidget::setEnabled( enabled );
+ YDialog::setEnabled( enabled );
}
@@ -189,16 +163,9 @@
if ( hasChildren() )
{
- firstChild()->setSize( newWidth - 2 * decorationWidth(),
- newHeight - 2 * decorationWidth() );
-
- QWidget * qChild = (QWidget *) firstChild()->widgetRep();
- qChild->move( decorationWidth(), decorationWidth() );
+ firstChild()->setSize( newWidth, newHeight );
}
- if ( _qFrame )
- _qFrame->resize( newWidth, newHeight );
-
resize( newWidth, newHeight );
}
@@ -241,6 +208,9 @@
_defaultButton = findDefaultButton( childrenBegin(), childrenEnd() );
+ YDialog::setDefaultButton( 0 ); // prevent complaints about multiple default buttons
+ YDialog::setDefaultButton( _defaultButton );
+
return _defaultButton;
}
@@ -347,6 +317,13 @@
_defaultButton = wizardDefaultButton( wizard );
}
+ if ( _defaultButton )
+ {
+ YDialog::setDefaultButton( 0 ); // prevent complaints about multiple default buttons
+ YDialog::setDefaultButton( _defaultButton );
+ }
+
+
YQGenericButton * def = _focusButton ? _focusButton : _defaultButton;
if ( def )
@@ -455,6 +432,10 @@
if ( _defaultButton && ! _focusButton )
_defaultButton->showAsDefault( true );
}
+
+
+ YDialog::setDefaultButton( 0 ); // prevent complaints about multiple default buttons
+ YDialog::setDefaultButton( _defaultButton );
}
@@ -619,9 +600,9 @@
void YQDialog::closeEvent( QCloseEvent * event )
{
- // The window manager "close window" button ( and menu, e.g. Alt-F4 ) will be
+ // The window manager "close window" button (and WM menu, e.g. Alt-F4) will be
// handled just like the user had clicked on the `id`( `cancel ) button in
- // that dialog. It's up to the YCP application to handle this ( if desired ).
+ // that dialog. It's up to the YCP application to handle this (if desired).
y2debug( "Ignoring window manager close button." );
event->ignore();
@@ -654,10 +635,8 @@
void
YQDialog::show()
{
- if ( ! hasDefaultSize() && qApp->mainWidget()->isVisible() )
- center( this, qApp->mainWidget() );
- else if ( isCentered() )
- center( this, qApp->desktop() );
+ if ( ! dialogType() == YMainDialog && qApp->mainWidget()->isVisible() )
+ center( this, qApp->mainWidget() );
QWidget::show();
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.5/src/YQDialog.h new/yast2-qt-2.16.6/src/YQDialog.h
--- old/yast2-qt-2.16.5/src/YQDialog.h 2007-11-16 12:41:12.000000000 +0100
+++ new/yast2-qt-2.16.6/src/YQDialog.h 2007-11-30 17:02:54.000000000 +0100
@@ -26,7 +26,6 @@
class YQGenericButton;
class YQWizard;
-class QFrame;
class YQDialog : public QWidget, public YDialog
@@ -35,17 +34,27 @@
public:
/**
- * Constructor: Constructor.
+ * Constructor.
+ *
+ * 'dialogType' is one of YMainDialog or YPopupDialog.
+ *
+ * 'colorMode' can be set to YDialogWarnColor to use very bright "warning"
+ * colors or YDialogInfoColor to use more prominent, yet not quite as
+ * bright as "warning" colors. Use both only very rarely.
**/
- YQDialog( const YWidgetOpt & opt,
- QWidget * qt_parent = 0,
- bool default_size = false );
+ YQDialog( QWidget * qParent,
+ YDialogType dialogType,
+ YDialogColorMode colorMode = YDialogNormalColor );
+
+protected:
/**
- * Destructor: Cleans up.
+ * Destructor.
+ * Don't delete a dialog directly, use YDialog::deleteTopmostDialog().
**/
- ~YQDialog();
+ virtual ~YQDialog();
+public:
/**
* Makes this dialog active or inactive
**/
@@ -86,12 +95,6 @@
virtual void setSize( int newWidth, int newHeight );
/**
- * Returns the size of (artificial) window manager decorations, depending
- * on the value of YDialog::isDecorated().
- **/
- int decorationWidth();
-
- /**
* Return this dialog's (first) default button or 0 if none
**/
YQGenericButton * findDefaultButton();
@@ -228,8 +231,6 @@
// Data members
//
- QFrame * _qFrame;
-
bool _userResized;
QSize _userSize;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.5/src/YQImage.cc new/yast2-qt-2.16.6/src/YQImage.cc
--- old/yast2-qt-2.16.5/src/YQImage.cc 2007-11-16 12:41:12.000000000 +0100
+++ new/yast2-qt-2.16.6/src/YQImage.cc 2007-11-30 14:46:38.000000000 +0100
@@ -20,6 +20,7 @@
#include <unistd.h>
#include <qpixmap.h>
#include <qmovie.h>
+#include <qiconset.h>
#define y2log_component "qt-ui"
#include <ycp/y2log.h>
@@ -163,5 +164,17 @@
resize( newWidth, newHeight );
}
+void YQImage::setEnabled( bool enable )
+{
+ if (enable)
+ setImage( imageFileName(), animated() );
+ else {
+ // Trigger image re-display
+ QPixmap pixmap( fromUTF8( imageFileName() ) );
+ QIconSet icon(pixmap);
+ icon.setIconSize( QIconSet::Large, pixmap.size());
+ QLabel::setPixmap( icon.pixmap( QIconSet::Large, QIconSet::Disabled, QIconSet::Off ) );
+ }
+}
#include "YQImage.moc"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.5/src/YQImage.h new/yast2-qt-2.16.6/src/YQImage.h
--- old/yast2-qt-2.16.5/src/YQImage.h 2007-11-16 12:41:12.000000000 +0100
+++ new/yast2-qt-2.16.6/src/YQImage.h 2007-11-30 14:06:16.000000000 +0100
@@ -62,6 +62,11 @@
virtual void setAutoScale( bool autoScale = true );
/**
+ * if false, the image will be displayed in gray
+ */
+ virtual void setEnabled( bool enabled );
+
+ /**
* Preferred width of the widget.
*
* Reimplemented from YWidget.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.5/src/YQInputField.cc new/yast2-qt-2.16.6/src/YQInputField.cc
--- old/yast2-qt-2.16.5/src/YQInputField.cc 2007-11-19 17:57:33.000000000 +0100
+++ new/yast2-qt-2.16.6/src/YQInputField.cc 2007-11-30 12:11:56.000000000 +0100
@@ -14,7 +14,7 @@
Author: Stefan Hundhammer <sh(a)suse.de>
- textdomain "packages-qt"
+ Textdomain "packages-qt"
/-*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.5/src/YQUI_core.cc new/yast2-qt-2.16.6/src/YQUI_core.cc
--- old/yast2-qt-2.16.5/src/YQUI_core.cc 2007-11-22 20:44:14.000000000 +0100
+++ new/yast2-qt-2.16.6/src/YQUI_core.cc 2007-11-29 17:41:45.000000000 +0100
@@ -485,6 +485,8 @@
}
+#warning obsolete
+#if 0
YDialog * YQUI::createDialog( YWidgetOpt & opt )
{
bool has_defaultsize = opt.hasDefaultSize.value();
@@ -510,6 +512,7 @@
return dialog;
}
+#endif
void YQUI::showDialog( YDialog * dialog )
@@ -522,7 +525,7 @@
return;
}
- if ( dialog->hasDefaultSize() )
+ if ( dialog->dialogType() == YMainDialog )
{
_widget_stack->addWidget ( qw, ++_main_dialog_id );
_widget_stack->raiseWidget( qw ); // maybe this is not necessary (?)
@@ -559,7 +562,7 @@
return;
}
- if ( dialog->hasDefaultSize() )
+ if ( dialog->dialogType() == YMainDialog )
{
_widget_stack->removeWidget( qw );
@@ -579,6 +582,8 @@
{
qw->hide();
+#warning FIXME
+#if 0
// Clean up the popup stack. libyui guarantees that a dialog will be
// deleted after closeDialog() so it is safe to pop that dialog from
// the popup stack here.
@@ -587,6 +592,7 @@
_popup_stack.pop_back();
else
y2error( "Popup dialog stack corrupted!" );
+#endif
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.5/src/YQUI.h new/yast2-qt-2.16.6/src/YQUI.h
--- old/yast2-qt-2.16.5/src/YQUI.h 2007-11-22 20:39:09.000000000 +0100
+++ new/yast2-qt-2.16.6/src/YQUI.h 2007-11-29 12:38:38.000000000 +0100
@@ -340,13 +340,6 @@
YEvent * pollInput();
/**
- * Create a dialog.
- *
- * Reimplemented from YUI.
- **/
- YDialog * createDialog( YWidgetOpt & opt );
-
- /**
* Show and activate a dialog.
*
* Reimplemented from YUI.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.5/src/YQWidgetFactory.cc new/yast2-qt-2.16.6/src/YQWidgetFactory.cc
--- old/yast2-qt-2.16.5/src/YQWidgetFactory.cc 2007-11-16 12:41:12.000000000 +0100
+++ new/yast2-qt-2.16.6/src/YQWidgetFactory.cc 2007-11-29 17:38:43.000000000 +0100
@@ -47,22 +47,17 @@
//
YQDialog *
-YQWidgetFactory::createMainDialog()
+YQWidgetFactory::createDialog( YDialogType dialogType, YDialogColorMode colorMode )
{
- return 0; // FIXME: TO DO
-}
-
-
+ QWidget * qParent = 0;
+ YQDialog * dialog = new YQDialog( qParent, dialogType, colorMode );
+ YUI_CHECK_NEW( dialog );
-YQDialog *
-YQWidgetFactory::createPopupDialog()
-{
- return 0; // FIXME: TO DO
+ return dialog;
}
-
//
// Layout Boxes
//
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.5/src/YQWidgetFactory.h new/yast2-qt-2.16.6/src/YQWidgetFactory.h
--- old/yast2-qt-2.16.5/src/YQWidgetFactory.h 2007-11-21 14:58:18.000000000 +0100
+++ new/yast2-qt-2.16.6/src/YQWidgetFactory.h 2007-11-29 14:53:19.000000000 +0100
@@ -70,14 +70,13 @@
// Dialogs
//
- virtual YQDialog * createMainDialog();
- virtual YQDialog * createPopupDialog();
+ virtual YQDialog * createDialog ( YDialogType dialogType, YDialogColorMode colorMode = YDialogNormalColor );
//
// Layout Boxes
//
- virtual YQLayoutBox * createLayoutBox( YWidget * parent, YUIDimension dim );
+ virtual YQLayoutBox * createLayoutBox ( YWidget * parent, YUIDimension dim );
//
// Common Leaf Widgets
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-qt-2.16.5/VERSION new/yast2-qt-2.16.6/VERSION
--- old/yast2-qt-2.16.5/VERSION 2007-11-27 19:07:53.000000000 +0100
+++ new/yast2-qt-2.16.6/VERSION 2007-11-30 17:20:33.000000000 +0100
@@ -1 +1 @@
-2.16.5
+2.16.6
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org