Author: sh-sh-sh Date: Mon Apr 14 17:12:16 2008 New Revision: 46606 URL: http://svn.opensuse.org/viewcvs/yast?rev=46606&view=rev Log: support for wizard dialogs Modified: trunk/libyui/VERSION trunk/libyui/package/yast2-libyui.changes trunk/libyui/src/YApplication.h trunk/libyui/src/YDialog.cc trunk/libyui/src/YDialog.h trunk/libyui/src/YTypes.h trunk/libyui/src/YUISymbols.h trunk/qt/VERSION.cmake trunk/qt/package/yast2-qt.changes trunk/qt/src/YQApplication.h trunk/qt/src/YQDialog.cc trunk/qt/src/YQDialog.h trunk/qt/yast2-qt.spec.in trunk/yast2/VERSION trunk/yast2/library/wizard/src/Wizard.ycp trunk/yast2/package/yast2.changes trunk/yast2/yast2.spec.in trunk/ycp-ui-bindings/VERSION trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes trunk/ycp-ui-bindings/src/YCP_UI.cc trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in Modified: trunk/libyui/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/VERSION?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/libyui/VERSION (original) +++ trunk/libyui/VERSION Mon Apr 14 17:12:16 2008 @@ -1 +1 @@ -2.16.43 +2.16.44 Modified: trunk/libyui/package/yast2-libyui.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/package/yast2-libyui.changes?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/libyui/package/yast2-libyui.changes (original) +++ trunk/libyui/package/yast2-libyui.changes Mon Apr 14 17:12:16 2008 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Mon Apr 14 16:38:12 CEST 2008 - sh@suse.de + +- Added dialog type YWizardDialog for main dialogs that will + contain a wizard (equivalent to YMainDialog if + YApplication::hasWizardDialogSupport() returns false) +- V 2.16.44 + +------------------------------------------------------------------- Fri Apr 11 18:17:05 CEST 2008 - sh@suse.de - Reverted last changes - sub-wizards seem to be a dead end Modified: trunk/libyui/src/YApplication.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YApplication.h?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/libyui/src/YApplication.h (original) +++ trunk/libyui/src/YApplication.h Mon Apr 14 17:12:16 2008 @@ -356,6 +356,7 @@ virtual bool hasFullUtf8Support() = 0; virtual bool richTextSupportsTable() = 0; virtual bool leftHandedMouse() = 0; + virtual bool hasWizardDialogSupport() { return false; } private: Modified: trunk/libyui/src/YDialog.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YDialog.cc?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/libyui/src/YDialog.cc (original) +++ trunk/libyui/src/YDialog.cc Mon Apr 14 17:12:16 2008 @@ -153,6 +153,24 @@ } +bool +YDialog::isMainDialog() +{ + switch ( priv->dialogType ) + { + case YMainDialog: return true; + case YWizardDialog: return true; + case YPopupDialog: return false; + + // Intentionally omitting the 'default' case so the compiler can + // catch unhandled enum values + } + + /*NOTREACHED*/ + return false; +} + + YDialogColorMode YDialog::colorMode() const { Modified: trunk/libyui/src/YDialog.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YDialog.h?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/libyui/src/YDialog.h (original) +++ trunk/libyui/src/YDialog.h Mon Apr 14 17:12:16 2008 @@ -198,11 +198,17 @@ void recalcLayout(); /** - * Return this dialog's type (YMainDialog / YPopupDialog). + * Return this dialog's type (YMainDialog / YPopupDialog /YWizardDialog). **/ YDialogType dialogType() const; /** + * Return 'true' if this dialog is a dialog of main dialog size: + * YMainDialog or YWizardDialog. + **/ + bool isMainDialog(); + + /** * Return this dialog's color mode. **/ YDialogColorMode colorMode() const; Modified: trunk/libyui/src/YTypes.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YTypes.h?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/libyui/src/YTypes.h (original) +++ trunk/libyui/src/YTypes.h Mon Apr 14 17:12:16 2008 @@ -58,7 +58,8 @@ enum YDialogType { YMainDialog, - YPopupDialog + YPopupDialog, + YWizardDialog }; Modified: trunk/libyui/src/YUISymbols.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YUISymbols.h?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/libyui/src/YUISymbols.h (original) +++ trunk/libyui/src/YUISymbols.h Mon Apr 14 17:12:16 2008 @@ -221,6 +221,7 @@ #define YUIOpt_updateMode "updateMode" #define YUIOpt_vstretch "vstretch" #define YUIOpt_warncolor "warncolor" +#define YUIOpt_wizardDialog "wizardDialog" #define YUIOpt_youMode "youMode" #define YUIOpt_zeroHeight "zeroHeight" #define YUIOpt_zeroWidth "zeroWidth" @@ -282,6 +283,7 @@ #define YUICap_HasAnimationSupport "HasAnimationSupport" #define YUICap_HasIconSupport "HasIconSupport" #define YUICap_HasFullUtf8Support "HasFullUtf8Support" +#define YUICap_HasWizardDialogSupport "HasWizardDialogSupport" #define YUICap_RichTextSupportsTable "RichTextSupportsTable" #define YUICap_LeftHandedMouse "LeftHandedMouse" Modified: trunk/qt/VERSION.cmake URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/VERSION.cmake?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/qt/VERSION.cmake (original) +++ trunk/qt/VERSION.cmake Mon Apr 14 17:12:16 2008 @@ -1,3 +1,3 @@ SET(VERSION_MAJOR "2") SET(VERSION_MINOR "16") -SET(VERSION_PATCH "38") +SET(VERSION_PATCH "39") Modified: trunk/qt/package/yast2-qt.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/package/yast2-qt.changes?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/qt/package/yast2-qt.changes (original) +++ trunk/qt/package/yast2-qt.changes Mon Apr 14 17:12:16 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Apr 14 16:44:41 CEST 2008 - sh@suse.de + +- Added new UI capability YQApplication::hasWizardDialogSupport() +- V 2.16.39 + +------------------------------------------------------------------- Sun Apr 13 19:50:21 CEST 2008 - coolo@suse.de - use only working area on seconday wizards Modified: trunk/qt/src/YQApplication.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQApplication.h?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/qt/src/YQApplication.h (original) +++ trunk/qt/src/YQApplication.h Mon Apr 14 17:12:16 2008 @@ -287,6 +287,7 @@ virtual bool hasAnimationSupport() { return true; } virtual bool hasFullUtf8Support() { return true; } virtual bool richTextSupportsTable() { return true; } + virtual bool hasWizardDialogSupport() { return true; } virtual bool leftHandedMouse(); Modified: trunk/qt/src/YQDialog.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQDialog.cc?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/qt/src/YQDialog.cc (original) +++ trunk/qt/src/YQDialog.cc Mon Apr 14 17:12:16 2008 @@ -47,7 +47,7 @@ YQDialog::YQDialog( YDialogType dialogType, YDialogColorMode colorMode ) : QWidget( chooseParent( dialogType ), - dialogType == YMainDialog ? YQMainDialogWFlags : YQPopupDialogWFlags ) + dialogType == YPopupDialog ? YQPopupDialogWFlags : YQMainDialogWFlags ) , YDialog( dialogType, colorMode ) { setWidgetRep( this ); @@ -75,15 +75,15 @@ setPalette( warnPalette ); } - if ( dialogType == YMainDialog && - QWidget::parent() != YQMainWinDock::mainWinDock() ) + if ( isMainDialog() && QWidget::parent() != YQMainWinDock::mainWinDock() ) { setWindowFlags( YQPopupDialogWFlags ); } - if ( dialogType != YMainDialog ) + + if ( ! isMainDialog() ) setWindowModality( Qt::ApplicationModal ); - if ( dialogType == YMainDialog && QWidget::parent() == YQMainWinDock::mainWinDock() ) + if ( isMainDialog() && QWidget::parent() == YQMainWinDock::mainWinDock() ) { YQMainWinDock::mainWinDock()->add( this ); } @@ -92,12 +92,15 @@ YQDialog::~YQDialog() { - if ( dialogType() == YMainDialog ) + if ( isMainDialog() ) { YQMainWinDock::mainWinDock()->remove( this ); + // orphaned main dialogs are handled gracefully in YQWMainWinDock::remove() } + if ( _defaultButton ) _defaultButton->forgetDialog(); + if ( _focusButton ) _focusButton->forgetDialog(); } @@ -108,7 +111,7 @@ { QWidget * parent = YQMainWinDock::mainWinDock()->window(); - if ( dialogType == YMainDialog && + if ( ( dialogType == YMainDialog || dialogType == YWizardDialog ) && YQMainWinDock::mainWinDock()->couldDock() ) { yuiDebug() << "Adding dialog to mainWinDock" << endl; @@ -142,7 +145,7 @@ { int preferredWidth; - if ( dialogType() == YMainDialog ) + if ( isMainDialog() ) { if ( userResized() ) preferredWidth = _userSize.width(); @@ -173,7 +176,7 @@ { int preferredHeight; - if ( dialogType() == YMainDialog ) + if ( isMainDialog() ) { if ( userResized() ) preferredHeight = _userSize.height(); Modified: trunk/qt/src/YQDialog.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQDialog.h?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/qt/src/YQDialog.h (original) +++ trunk/qt/src/YQDialog.h Mon Apr 14 17:12:16 2008 @@ -37,7 +37,13 @@ /** * Constructor. * - * 'dialogType' is one of YMainDialog or YPopupDialog. + * 'dialogType' is one of YMainDialog, YWizardDialog, or YPopupDialog. + * + * The Qt UI supports YWizardDialogs. They are handled very much like + * YMainDialogs, except for wizard dialogs that are opened over a wizard + * with a steps panel on the left side, in which case that new wizard + * dialog will be resized and moved so the steps panel from the wizard + * below will remain visible. * * 'colorMode' can be set to YDialogWarnColor to use very bright "warning" * colors or YDialogInfoColor to use more prominent, yet not quite as Modified: trunk/qt/yast2-qt.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/yast2-qt.spec.in?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/qt/yast2-qt.spec.in (original) +++ trunk/qt/yast2-qt.spec.in Mon Apr 14 17:12:16 2008 @@ -16,8 +16,8 @@ Summary: - BuildRequires: yast2-devtools >= 2.16.3 -BuildRequires: yast2-libyui-devel >= 2.16.43 -Requires: yast2-libyui >= 2.16.43 +BuildRequires: yast2-libyui-devel >= 2.16.44 +Requires: yast2-libyui >= 2.16.44 Requires: yast2_theme >= 2.16.1 Provides: yast2_ui Provides: y2base:/usr/lib/YaST2/servers/qt Modified: trunk/yast2/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/VERSION?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/yast2/VERSION (original) +++ trunk/yast2/VERSION Mon Apr 14 17:12:16 2008 @@ -1 +1 @@ -2.16.50 +2.16.51 Modified: trunk/yast2/library/wizard/src/Wizard.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/wizard/src/Wizard.ycp?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/yast2/library/wizard/src/Wizard.ycp (original) +++ trunk/yast2/library/wizard/src/Wizard.ycp Mon Apr 14 17:12:16 2008 @@ -186,7 +186,7 @@ * @return term term describing the dialog. **/ global term GenericDialog( term button_box ) { - return `VBox( `id(`WizardDialog), + return `VBox( `id(`WizardDialog ), `ReplacePoint( `id(`topmenu ), `Empty() ), `HBox( `HSpacing(1), @@ -286,7 +286,7 @@ * @param dialog a wizard dialog, e.g. Wizard::GenericDialog() **/ global void OpenDialog( term dialog ) { - UI::OpenDialog( `opt(`defaultsize), dialog ); + UI::OpenDialog( `opt(`wizardDialog ), dialog ); } @@ -298,7 +298,7 @@ { if ( haveFancyUI() ) { - UI::OpenDialog(`opt(`defaultsize ), + UI::OpenDialog(`opt(`wizardDialog ), `Wizard(`back, Label::BackButton(), `abort, Label::AbortButton(), `next, Label::NextButton() ) ); @@ -319,7 +319,7 @@ { if ( haveFancyUI() ) { - UI::OpenDialog(`opt(`defaultsize ), + UI::OpenDialog(`opt(`wizardDialog ), `Wizard(`no_back_button, "", `cancel, Label::CancelButton(), `accept, Label::AcceptButton() ) ); @@ -342,7 +342,7 @@ { if ( haveFancyUI() ) { - UI::OpenDialog(`opt(`defaultsize ), + UI::OpenDialog(`opt(`wizardDialog ), `Wizard(`no_back_button, "", `cancel, Label::CancelButton(), `ok, Label::OKButton() ) ); @@ -366,7 +366,7 @@ { if ( haveFancyUI() ) { - UI::OpenDialog(`opt(`defaultsize ), + UI::OpenDialog(`opt(`wizardDialog ), `Wizard(`apply, _( "&Apply" ), `abort, Label::AbortButton(), `finish, Label::FinishButton() ) ); @@ -386,7 +386,7 @@ { if ( haveFancyUI() ) { - UI::OpenDialog(`opt(`defaultsize ), + UI::OpenDialog(`opt(`wizardDialog ), `Wizard(`opt(`stepsEnabled), `no_back_button, "", `cancel, Label::CancelButton(), @@ -410,7 +410,7 @@ { if ( haveFancyUI() ) { - UI::OpenDialog(`opt(`defaultsize ), + UI::OpenDialog(`opt(`wizardDialog ), `Wizard(`opt(`stepsEnabled), `no_back_button, "", `abort, Label::AbortButton(), @@ -433,7 +433,7 @@ { if ( haveFancyUI() ) { - UI::OpenDialog(`opt(`defaultsize ), + UI::OpenDialog(`opt(`wizardDialog ), `Wizard(`opt(`stepsEnabled), `back, Label::BackButton(), `abort, Label::AbortButton(), @@ -471,7 +471,7 @@ if ( button_box == nil ) button_box = BackAbortNextButtonBox(); - UI::OpenDialog(`opt(`defaultsize), + UI::OpenDialog(`opt(`wizardDialog ), GenericDialog( button_box ) ); if ( help_space_contents != nil ) @@ -1340,7 +1340,7 @@ { if ( haveFancyUI() ) { - UI::OpenDialog(`opt(`defaultsize ), + UI::OpenDialog(`opt(`wizardDialog ), `Wizard(`opt(`treeEnabled), `back, Label::BackButton(), `abort, Label::AbortButton(), Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Mon Apr 14 17:12:16 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Apr 14 16:42:44 CEST 2008 - sh@suse.de + +- Open wizard dialogs with `opt(`wizardDialog) in Wizard.ycp +- V 2.16.51 + +------------------------------------------------------------------- Mon Apr 14 14:16:55 CEST 2008 - lslezak@suse.cz - Products.ycp - the target and the sources must be initialized Modified: trunk/yast2/yast2.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/yast2.spec.in?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/yast2/yast2.spec.in (original) +++ trunk/yast2/yast2.spec.in Mon Apr 14 17:12:16 2008 @@ -13,7 +13,7 @@ # ag_process, sublist Requires: yast2-core >= 2.16.46 # Mod_UI -Requires: yast2-ycp-ui-bindings >= 2.16.37 +Requires: yast2-ycp-ui-bindings >= 2.16.44 # changed callback registration Requires: yast2-pkg-bindings >= 2.16.23 Modified: trunk/ycp-ui-bindings/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/VERSION?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/ycp-ui-bindings/VERSION (original) +++ trunk/ycp-ui-bindings/VERSION Mon Apr 14 17:12:16 2008 @@ -1 +1 @@ -2.16.43 +2.16.44 Modified: trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes (original) +++ trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes Mon Apr 14 17:12:16 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Mon Apr 14 16:39:51 CEST 2008 - sh@suse.de + +- Added `opt(`wizardDialog) to UI::OpenDialog(): + Open a dialog in YWizardDialog mode (if supported by UI) +- V 2.16.44 + +------------------------------------------------------------------- Fri Apr 11 18:17:47 CEST 2008 - sh@suse.de - Reverted last changes - sub-wizards seem to be a dead end Modified: trunk/ycp-ui-bindings/src/YCP_UI.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/src/YCP_UI.cc?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/ycp-ui-bindings/src/YCP_UI.cc (original) +++ trunk/ycp-ui-bindings/src/YCP_UI.cc Mon Apr 14 17:12:16 2008 @@ -505,6 +505,12 @@ * * <tt>`defaultsize</tt> is an alias for <tt>`mainDialog</tt>. * + * <tt>`wizardDialog</tt> is a main dialog that will contain a wizard widget. + * For UIs that don't support this kind of specialized dialog, this is + * equivalent to <tt>`mainDialog</tt> -- see also the + * <tt>HasWizardDialogSupport</tt> entry of the map returned by + * <tt>UI::GetDisplayInfo()</tt>. + * * The <tt>`warncolor</tt> option displays the entire dialog in a bright * warning color. * @@ -538,7 +544,8 @@ if ( optList->value(o)->isSymbol() ) { if ( optList->value(o)->asSymbol()->symbol() == YUIOpt_mainDialog ) dialogType = YMainDialog; - if ( optList->value(o)->asSymbol()->symbol() == YUIOpt_defaultsize ) dialogType = YMainDialog; + else if ( optList->value(o)->asSymbol()->symbol() == YUIOpt_defaultsize ) dialogType = YMainDialog; + else if ( optList->value(o)->asSymbol()->symbol() == YUIOpt_wizardDialog ) dialogType = YWizardDialog; else if ( optList->value(o)->asSymbol()->symbol() == YUIOpt_infocolor ) colorMode = YDialogInfoColor; else if ( optList->value(o)->asSymbol()->symbol() == YUIOpt_warncolor ) colorMode = YDialogWarnColor; else if ( optList->value(o)->asSymbol()->symbol() == YUIOpt_decorated ) {} // obsolete @@ -555,6 +562,9 @@ try { + if ( dialogType == YWizardDialog && ! YUI::yApp()->hasWizardDialogSupport() ) + dialogType = YMainDialog; + YDialog * dialog = YUI::widgetFactory()->createDialog( dialogType, colorMode ); YUI_CHECK_NEW( dialog ); Modified: trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in?rev=46606&r1=46605&r2=46606&view=diff ============================================================================== --- trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in (original) +++ trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in Mon Apr 14 17:12:16 2008 @@ -19,8 +19,8 @@ # libycp includes crypto built-ins BuildRequires: libxcrypt-devel -Requires: yast2-libyui >= 2.16.43 -BuildRequires: yast2-libyui-devel >= 2.16.43 +Requires: yast2-libyui >= 2.16.44 +BuildRequires: yast2-libyui-devel >= 2.16.44 # libyui ImplPtr BuildRequires: boost-devel -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org