Author: sh-sh-sh Date: Thu Apr 3 16:01:02 2008 New Revision: 46036 URL: http://svn.opensuse.org/viewcvs/yast?rev=46036&view=rev Log: return button press on help button if no help text specified Modified: trunk/libyui/src/YDialog.cc Modified: trunk/libyui/src/YDialog.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YDialog.cc?rev=46036&r1=46035&r2=46036&view=diff ============================================================================== --- trunk/libyui/src/YDialog.cc (original) +++ trunk/libyui/src/YDialog.cc Thu Apr 3 16:01:02 2008 @@ -279,7 +279,7 @@ yuiDebug() << "Found help text for " << widget << endl; helpText = widget->helpText(); } - + widget = widget->parent(); } @@ -287,16 +287,22 @@ { yuiMilestone() << "Showing help text" << endl; showText( helpText, true ); + + // Don't return the event from this help button - + // get back into event loop + delete event; + event = 0; + yuiMilestone() << "Help dialog closed" << endl; } - else - yuiWarning() << "No help text in dialog " << this << endl; - - delete event; - event = 0; + else // No help text + { + // Return the event from this help button + yuiWarning() << "No help text in " << this << endl; + } } } - + } while ( ! event ); return event; @@ -471,7 +477,7 @@ YUI::widgetFactory()->createRichText( vbox, text, ! useRichText ); YPushButton * okButton = YUI::widgetFactory()->createPushButton( vbox, "&OK" ); okButton->setDefaultButton(); - + YEvent * event = dialog->waitForEvent(); if ( event ) @@ -481,7 +487,7 @@ catch ( YUIException exception ) { // Don't let the application die just because help couldn't be displayed. - + YUI_CAUGHT( exception ); } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org