Author: coolo
Date: Sun Dec 2 17:14:25 2007
New Revision: 42573
URL: http://svn.opensuse.org/viewcvs/yast?rev=42573&view=rev
Log:
cherry picked 42559 42570 42571
Removed:
branches/tmp/coolo/wizard-rework/acinclude.m4
branches/tmp/coolo/wizard-rework/configure.in.in
branches/tmp/coolo/wizard-rework/doc/Makefile.am
branches/tmp/coolo/wizard-rework/doc/autodocs/Makefile.am
branches/tmp/coolo/wizard-rework/fonts/Makefile.am
branches/tmp/coolo/wizard-rework/src/Makefile.am
branches/tmp/coolo/wizard-rework/src/pkg/Makefile.am
branches/tmp/coolo/wizard-rework/src/pkg/icons/Makefile.am
branches/tmp/coolo/wizard-rework/testsuite/Makefile.am
Modified:
branches/tmp/coolo/wizard-rework/Makefile.cvs
branches/tmp/coolo/wizard-rework/VERSION
branches/tmp/coolo/wizard-rework/package/yast2-qt4.changes
branches/tmp/coolo/wizard-rework/src/CMakeLists.txt
branches/tmp/coolo/wizard-rework/src/YQDialog.cc
branches/tmp/coolo/wizard-rework/src/YQDialog.h
branches/tmp/coolo/wizard-rework/src/YQInputField.cc
branches/tmp/coolo/wizard-rework/src/YQUI.h
branches/tmp/coolo/wizard-rework/src/YQUI_core.cc
branches/tmp/coolo/wizard-rework/src/YQWidgetFactory.cc
branches/tmp/coolo/wizard-rework/src/YQWidgetFactory.h
branches/tmp/coolo/wizard-rework/src/pkg/YQPkgConflictDialog.cc
branches/tmp/coolo/wizard-rework/src/pkg/YQPkgRepoFilterView.cc
branches/tmp/coolo/wizard-rework/yast2-qt4.spec.in
Modified: branches/tmp/coolo/wizard-rework/Makefile.cvs
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/wizard-rework/Makefile.cvs?rev=42573&r1=42572&r2=42573&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/Makefile.cvs (original)
+++ branches/tmp/coolo/wizard-rework/Makefile.cvs Sun Dec 2 17:14:25 2007
@@ -6,18 +6,15 @@
PREFIX = /usr
-configure: all
- ./configure --prefix=$(PREFIX) --libdir=$(PREFIX)/$(LIB)
-
-all:
- y2tool y2autoconf
- y2tool y2automake
- autoreconf --force --install
+configure:
+ mkdir build ;\
+ cd build ;\
+ cmake -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DLIB=$(LIB) ..
install: configure
- make
- make install
+ cd build; \
+ make && make install
-reconf: all
- ./config.status --recheck
- ./config.status
+reconf:
+ cd build ;\
+ cmake rebuild_cache
Modified: branches/tmp/coolo/wizard-rework/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/wizard-rework/VERSION?rev=42573&r1=42572&r2=42573&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/VERSION (original)
+++ branches/tmp/coolo/wizard-rework/VERSION Sun Dec 2 17:14:25 2007
@@ -1 +1 @@
-2.16.5
+2.16.6
Modified: branches/tmp/coolo/wizard-rework/package/yast2-qt4.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/wizard-rework/package/yast2-qt4.changes?rev=42573&r1=42572&r2=42573&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/package/yast2-qt4.changes (original)
+++ branches/tmp/coolo/wizard-rework/package/yast2-qt4.changes Sun Dec 2 17:14:25 2007
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri Nov 30 17:20:49 CET 2007 - sh@suse.de
+
+- Migrated YQDialog to mod-ui
+- V 2.16.6
+
+-------------------------------------------------------------------
Tue Nov 27 19:08:00 CET 2007 - sh@suse.de
- Moved all YCP related code out of YQWizard
Modified: branches/tmp/coolo/wizard-rework/src/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/wizard-rework/src/CMakeLists.txt?rev=42573&r1=42572&r2=42573&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/src/CMakeLists.txt (original)
+++ branches/tmp/coolo/wizard-rework/src/CMakeLists.txt Sun Dec 2 17:14:25 2007
@@ -2,7 +2,6 @@
ADD_DEFINITIONS(
-DY2LOG=\\\"QT4\\\" ${QT_DEFINITIONS}
--DQT3_SUPPORT
-DQT_LOCALEDIR=\\\"${CMAKE_INSTALL_PREFIX}/share/qt4/translations\\\"
-DICONDIR=\\"${Y2QT_ICONDIR}\\"
-DLOCALEDIR=\\\"${Y2QT_LOCALEDIR}\\\"
Modified: branches/tmp/coolo/wizard-rework/src/YQDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/wizard-rework/src/YQDialog.cc?rev=42573&r1=42572&r2=42573&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/src/YQDialog.cc (original)
+++ branches/tmp/coolo/wizard-rework/src/YQDialog.cc Sun Dec 2 17:14:25 2007
@@ -39,32 +39,32 @@
// like "Above", "Below" etc. that clash with some Qt headers.
#include
+#define YQMainDialogWFlags Qt::Window
-YQDialog::YQDialog( const YWidgetOpt & opt,
- QWidget * qt_parent,
- bool default_size )
- : QWidget( qt_parent,
- default_size ? Qt::Widget : Qt::Window ) // WFlags
- , YDialog( opt )
+#define YQPopupDialogWFlags Qt::Widget
+
+YQDialog::YQDialog( QWidget * qParent,
+ YDialogType dialogType,
+ YDialogColorMode colorMode )
+ : QWidget( qParent,
+ dialogType == YMainDialog ? YQMainDialogWFlags : YQPopupDialogWFlags )
+ , YDialog( dialogType, colorMode )
{
_userResized = false;
_focusButton = 0;
_defaultButton = 0;
setWidgetRep( this );
- setCaption( hasDefaultSize() ? "YaST2" : "" );
+ setWindowTitle( dialogType == YMainDialog ? "YaST2" : "" );
setFocusPolicy( Qt::StrongFocus );
- if ( ! default_size )
- setWindowModality( Qt::WindowModal );
-
- if ( hasWarnColor() || hasInfoColor() )
+ if ( colorMode != YDialogNormalColor )
{
QColor normalBackground ( 0, 128, 0 );
QColor inputFieldBackground ( 0, 96, 0 );
QColor text = Qt::white;
- if ( hasInfoColor() )
+ if ( colorMode == YDialogInfoColor )
{
normalBackground = QColor ( 238, 232, 170 ); // PaleGoldenrod
}
@@ -76,31 +76,6 @@
warnPalette.setNormal( normalColors );
setPalette( warnPalette );
}
-
- _qFrame = new Q3Frame ( this );
- bool decorate = ! hasDefaultSize() && ! YQUI::ui()->haveWM();
-
-#if 0
- if ( hasSmallDecorations() )
- {
- // None of this works (yet). :-((
-
- clearWFlags( getWFlags() );
- setWFlags( Qt::WStyle_Customize | Qt::WStyle_DialogBorder | Qt::WStyle_StaysOnTop );
- // decorate = true;
- }
-#endif
-
- if ( decorate )
- {
- _qFrame->setFrameStyle ( Q3Frame::Box | Q3Frame::Raised );
- _qFrame->setLineWidth(2);
- _qFrame->setMidLineWidth(3);
- }
- else
- {
- _qFrame->setFrameStyle ( Q3Frame::NoFrame );
- }
}
@@ -113,7 +88,7 @@
{
int preferredWidth;
- if ( hasDefaultSize() )
+ if ( dialogType() == YMainDialog )
{
if ( userResized() )
preferredWidth = _userSize.width();
@@ -122,7 +97,7 @@
}
else
{
- preferredWidth = YDialog::preferredWidth() + 2 * decorationWidth();
+ preferredWidth = YDialog::preferredWidth();
}
int screenWidth = qApp->desktop()->width();
@@ -141,7 +116,7 @@
{
int preferredHeight;
- if ( hasDefaultSize() )
+ if ( dialogType() == YMainDialog )
{
if ( userResized() )
preferredHeight = _userSize.height();
@@ -150,7 +125,7 @@
}
else
{
- preferredHeight = YDialog::preferredHeight() + 2 * decorationWidth();
+ preferredHeight = YDialog::preferredHeight();
}
int screenHeight = qApp->desktop()->height();
@@ -165,19 +140,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 );
}
@@ -191,16 +157,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 );
}
@@ -243,6 +202,9 @@
_defaultButton = findDefaultButton( childrenBegin(), childrenEnd() );
+ YDialog::setDefaultButton( 0 ); // prevent complaints about multiple default buttons
+ YDialog::setDefaultButton( _defaultButton );
+
return _defaultButton;
}
@@ -349,6 +311,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 )
@@ -427,7 +396,7 @@
void
-YQDialog::setDefaultButton( YQGenericButton * newDefaultButton )
+YQDialog::setDefaultButton( YPushButton * newDefaultButton )
{
if ( _defaultButton &&
newDefaultButton &&
@@ -441,13 +410,13 @@
else
{
y2error( "Too many `opt(`default) PushButtons: [%s]",
- (const char *) newDefaultButton->text() );
+ newDefaultButton->label().c_str() );
newDefaultButton->setDefaultButton( false );
return;
}
}
- _defaultButton = newDefaultButton;
+ _defaultButton = dynamic_cast(newDefaultButton);
if ( _defaultButton )
{
@@ -457,6 +426,10 @@
if ( _defaultButton && ! _focusButton )
_defaultButton->showAsDefault( true );
}
+
+
+ YDialog::setDefaultButton( 0 ); // prevent complaints about multiple default buttons
+ YDialog::setDefaultButton( _defaultButton );
}
@@ -621,9 +594,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();
@@ -656,10 +629,10 @@
void
YQDialog::show()
{
- if ( ! hasDefaultSize() && qApp->mainWidget()->isVisible() )
- center( this, qApp->mainWidget() );
- else if ( isCentered() )
- center( this, qApp->desktop() );
+#if FIXME
+ if ( ! dialogType() == YMainDialog && qApp->mainWidget()->isVisible() )
+ center( this, qApp->mainWidget() );
+#endif
QWidget::show();
}
Modified: branches/tmp/coolo/wizard-rework/src/YQDialog.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/wizard-rework/src/YQDialog.h?rev=42573&r1=42572&r2=42573&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/src/YQDialog.h (original)
+++ branches/tmp/coolo/wizard-rework/src/YQDialog.h Sun Dec 2 17:14:25 2007
@@ -28,8 +28,6 @@
class YQGenericButton;
class YQWizard;
-class Q3Frame;
-
class YQDialog : public QWidget, public YDialog
{
@@ -37,17 +35,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
**/
@@ -88,12 +96,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();
@@ -136,7 +138,7 @@
* [Return] if no other button has the keyboard focus.
* 'newDefaultButton' may be 0 if the former default button is destroyed.
**/
- void setDefaultButton( YQGenericButton * newDefaultButton );
+ void setDefaultButton( YPushButton * newDefaultButton );
/**
* Ensure presence of no more than one single default button.
@@ -230,8 +232,6 @@
// Data members
//
- Q3Frame * _qFrame;
-
bool _userResized;
QSize _userSize;
Modified: branches/tmp/coolo/wizard-rework/src/YQInputField.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/wizard-rework/src/YQInputField.cc?rev=42573&r1=42572&r2=42573&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/src/YQInputField.cc (original)
+++ branches/tmp/coolo/wizard-rework/src/YQInputField.cc Sun Dec 2 17:14:25 2007
@@ -14,7 +14,7 @@
Author: Stefan Hundhammer
- textdomain "packages-qt"
+ Textdomain "packages-qt"
/-*/
Modified: branches/tmp/coolo/wizard-rework/src/YQUI.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/wizard-rework/src/YQUI.h?rev=42573&r1=42572&r2=42573&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/src/YQUI.h (original)
+++ branches/tmp/coolo/wizard-rework/src/YQUI.h Sun Dec 2 17:14:25 2007
@@ -340,13 +340,6 @@
YEvent * pollInput();
/**
- * Create a dialog.
- *
- * Reimplemented from YUI.
- **/
- YDialog * createDialog( YWidgetOpt & opt );
-
- /**
* Show and activate a dialog.
*
* Reimplemented from YUI.
Modified: branches/tmp/coolo/wizard-rework/src/YQUI_core.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/wizard-rework/src/YQUI_core.cc?rev=42573&r1=42572&r2=42573&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/src/YQUI_core.cc (original)
+++ branches/tmp/coolo/wizard-rework/src/YQUI_core.cc Sun Dec 2 17:14:25 2007
@@ -521,6 +521,8 @@
}
+#warning obsolete
+#if 0
YDialog * YQUI::createDialog( YWidgetOpt & opt )
{
init_ui();
@@ -542,6 +544,7 @@
return dialog;
}
+#endif
void YQUI::showDialog( YDialog * dialog )
@@ -554,7 +557,7 @@
return;
}
- if ( dialog->hasDefaultSize() )
+ if ( dialog->dialogType() == YMainDialog )
{
_widget_stack->addWidget ( qw );
_widget_stack->setCurrentWidget( qw );
@@ -592,7 +595,7 @@
return;
}
- if ( dialog->hasDefaultSize() )
+ if ( dialog->dialogType() == YMainDialog )
{
_widget_stack->removeWidget( qw );
}
@@ -600,6 +603,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.
@@ -608,6 +613,7 @@
_popup_stack.pop_back();
else
y2error( "Popup dialog stack corrupted!" );
+#endif
}
}
Modified: branches/tmp/coolo/wizard-rework/src/YQWidgetFactory.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/wizard-rework/src/YQWidgetFactory.cc?rev=42573&r1=42572&r2=42573&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/src/YQWidgetFactory.cc (original)
+++ branches/tmp/coolo/wizard-rework/src/YQWidgetFactory.cc Sun Dec 2 17:14:25 2007
@@ -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
//
Modified: branches/tmp/coolo/wizard-rework/src/YQWidgetFactory.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/wizard-rework/src/YQWidgetFactory.h?rev=42573&r1=42572&r2=42573&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/src/YQWidgetFactory.h (original)
+++ branches/tmp/coolo/wizard-rework/src/YQWidgetFactory.h Sun Dec 2 17:14:25 2007
@@ -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
Modified: branches/tmp/coolo/wizard-rework/src/pkg/YQPkgConflictDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/wizard-rework/src/pkg/YQPkgConflictDialog.cc?rev=42573&r1=42572&r2=42573&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/src/pkg/YQPkgConflictDialog.cc (original)
+++ branches/tmp/coolo/wizard-rework/src/pkg/YQPkgConflictDialog.cc Sun Dec 2 17:14:25 2007
@@ -361,7 +361,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
Modified: branches/tmp/coolo/wizard-rework/src/pkg/YQPkgRepoFilterView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/wizard-rework/src/pkg/YQPkgRepoFilterView.cc?rev=42573&r1=42572&r2=42573&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/src/pkg/YQPkgRepoFilterView.cc (original)
+++ branches/tmp/coolo/wizard-rework/src/pkg/YQPkgRepoFilterView.cc Sun Dec 2 17:14:25 2007
@@ -97,7 +97,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 );
Q_CHECK_PTR( _secondaryFilters );
Modified: branches/tmp/coolo/wizard-rework/yast2-qt4.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/wizard-rework/yast2-qt4.spec.in?rev=42573&r1=42572&r2=42573&view=diff
==============================================================================
--- branches/tmp/coolo/wizard-rework/yast2-qt4.spec.in (original)
+++ branches/tmp/coolo/wizard-rework/yast2-qt4.spec.in Sun Dec 2 17:14:25 2007
@@ -5,8 +5,8 @@
BuildRequires: dbus-1-devel boost-devel libzypp-devel curl-devel docbook-xsl-stylesheets doxygen libdrm-devel libjpeg-devel libxcrypt-devel libxslt perl-XML-Writer libqt4-devel rpm-devel sgml-skel update-desktop-files yast2-devtools yast2-core-devel hal-devel
Summary: -
-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:/usr/lib/YaST2/servers/qt
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org