Hello community,
here is the log from the commit of package yast2-core
checked in at Thu Dec 6 16:58:35 CET 2007.
--------
--- yast2-core/yast2-core.changes 2007-12-05 14:54:47.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-core/yast2-core.changes 2007-12-06 16:35:40.565137000 +0100
@@ -1,0 +2,11 @@
+Thu Dec 6 16:28:04 CET 2007 - sh@suse.de
+
+- Fixed bug #345819 (input fields too small):
+ Introduced bug compatibility mode for TextEntry widget;
+ when used with the old name `TextEntry(), `opt(`hstretch)
+ is automatically assumed; with the new name `InputField() it
+ behaves like specified.
+
+- V 2.16.14
+
+-------------------------------------------------------------------
Old:
----
yast2-core-2.16.13.tar.bz2
New:
----
yast2-core-2.16.14.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-core.spec ++++++
--- /var/tmp/diff_new_pack.p20292/_old 2007-12-06 16:58:17.000000000 +0100
+++ /var/tmp/diff_new_pack.p20292/_new 2007-12-06 16:58:17.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-core (Version 2.16.13)
+# spec file for package yast2-core (Version 2.16.14)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-core
-Version: 2.16.13
+Version: 2.16.14
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-core-2.16.13.tar.bz2
+Source0: yast2-core-2.16.14.tar.bz2
Prefix: /usr
# obviously
BuildRequires: gcc-c++
@@ -86,7 +86,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-core-2.16.13
+%setup -n yast2-core-2.16.14
%build
%{prefix}/bin/y2tool y2autoconf
@@ -163,6 +163,13 @@
%doc %{prefix}/share/doc/packages/yast2-core
/usr/share/YaST2/data/devtools/bin/generateYCPWrappers
%changelog
+* Thu Dec 06 2007 - sh@suse.de
+- Fixed bug #345819 (input fields too small):
+ Introduced bug compatibility mode for TextEntry widget;
+ when used with the old name `TextEntry(), `opt(`hstretch)
+ is automatically assumed; with the new name `InputField() it
+ behaves like specified.
+- V 2.16.14
* Wed Dec 05 2007 - sh@suse.de
- Fixed YMenuEvent( string ) handling:
=> Fixed bug #346158: Hyperlinks don't work
++++++ yast2-core-2.16.13.tar.bz2 -> yast2-core-2.16.14.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.13/libyui/doc/examples/bullshit.ycp new/yast2-core-2.16.14/libyui/doc/examples/bullshit.ycp
--- old/yast2-core-2.16.13/libyui/doc/examples/bullshit.ycp 2007-12-03 14:24:19.000000000 +0100
+++ new/yast2-core-2.16.14/libyui/doc/examples/bullshit.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,126 +0,0 @@
-// Advanced example of using the Wizard widget.
-//
-// Note: YCP applications are discouraged from using the Wizard widget directly.
-// Use the Wizard module instead.
-
-{
-
- list<map> base_installation_steps =
- [
- $[ "id": "language", "label": "Language" ],
- $[ "id": "proposal", "label": "Installation Settings" ],
- $[ "id": "do_resize", "label": "Perform Installation" ],
- $[ "id": "prepdisk", "label": "Perform Installation" ],
- $[ "id": "kickoff", "label": "Perform Installation" ],
- $[ "id": "rpmcopy", "label": "Perform Installation" ],
- $[ "id": "finish", "label": "Perform Installation" ]
- ];
-
- list<map> config_steps =
- [
- $[ "id": "root", "label": "Root Password" ],
- $[ "id": "proposal_net", "label": "Network" ],
- $[ "id": "ask_net_test", "label": "Network" ],
- $[ "id": "do_net_test", "label": "Network" ],
- $[ "id": "you", "label": "Online Update" ],
- $[ "id": "auth", "label": "Users" ],
- $[ "id": "user", "label": "Users" ],
- $[ "id": "suseconfig", "label": "Clean Up" ],
- $[ "id": "release_notes", "label": "Release Notes" ],
- $[ "id": "proposal_hw", "label": "Device Configuration" ]
- ];
-
- list<map> steps = flatten( [ base_installation_steps, config_steps ] );
-
-
- define void show_step( integer no )
- ``{
- string current_id = lookup( steps[ no ]:nil, "id", "");
-
- UI::ReplaceWidget(`id(`contents),
- `VBox(
- `Heading( "Current workflow step:" ),
- `VSpacing(0.5),
- `Label( current_id )
- ) );
-
- UI::WizardCommand(`SetCurrentStep( current_id ) );
- };
-
- if ( ! UI::HasSpecialWidget(`Wizard) )
- {
- y2error( "This works only with UIs that provide the wizard widget!" );
- return;
- }
-
- string help_text =
- "<p>This is a help text.</p>"
- + "<p>It should be helpful.</p>"
- + "<p>If it isn't helpful, it should rather not be called a <i>help text</i>.</p>";
-
- UI::OpenDialog(`opt(`defaultsize ),
- `Wizard(`opt(`stepsEnabled),
- `back, "&Back",
- `abort, "Ab&ort",
- `next, "&Next" ) );
-
- // UI::DumpWidgetTree();
-
- UI::WizardCommand(`SetDialogIcon( "/usr/share/YaST2/theme/SuSELinux/icons/22x22/apps/user_add.png" ) );
- UI::WizardCommand(`SetDialogHeading( "Welcome to the YaST2 installation" ) );
- UI::WizardCommand(`SetHelpText( help_text ) );
- UI::WizardCommand(`ShowReleaseNotesButton( "&Release Notes", "release_notes" ) );
-
- UI::WizardCommand(`AddStepHeading( "Base Installation" ) );
-
- foreach ( map step, base_installation_steps, ``{
- UI::WizardCommand(`AddStep( step["label"]:"", step["id"]:"" ) );
- });
-
-
- UI::WizardCommand(`AddStepHeading( "Configuration" ) );
-
- foreach ( map step, config_steps, ``{
- UI::WizardCommand(`AddStep( step["label"]:"", step["id"]:"" ) );
- });
-
-
- integer current_step = 0;
- show_step( 0 );
-
- while( true )
- {
- symbol button = (symbol) UI::UserInput();
-
- if ( button == `abort || button == `cancel )
- break;
-
- if ( button == `back )
- {
- if ( UI::WidgetExists(`id(`next) ) )
- {
- y2warning( "Yes!" );
- }
- UI::WizardCommand(`EnableNextButton( false ) );
- }
-
- if ( button == `next || button == `back )
- {
- if ( button == `next && current_step+1 < size( steps ) )
- {
- current_step = current_step+1;
-
- if ( current_step > 2 )
- UI::WizardCommand(`HideReleaseNotesButton() );
- }
-
- if ( button == `back && current_step > 0 )
- current_step = current_step-1;
-
- show_step( current_step );
- }
- }
-
- UI::CloseDialog();
-
-}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.13/libyui/doc/examples/PopupStressTest.ycp new/yast2-core-2.16.14/libyui/doc/examples/PopupStressTest.ycp
--- old/yast2-core-2.16.13/libyui/doc/examples/PopupStressTest.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-core-2.16.14/libyui/doc/examples/PopupStressTest.ycp 2007-12-05 20:00:02.000000000 +0100
@@ -0,0 +1,58 @@
+// Popup stress test: Pop up dialogs and close them all the time
+{
+ UI::OpenDialog(`opt(`defaultsize ),
+ `VBox(
+ `Heading( "Pop-up Stress Test" ),
+ `VSpacing( 5 ),
+ `Label( "Sit back and watch the pop-up dialogs.\n" +
+ "\n" +
+ "Experiment with minimizing this application\n" +
+ "and with working with some other application\n" +
+ "while this is running." ),
+ `Bottom(`Right(`PushButton(`id(`cancel), `opt(`default), "&Close" ) ) )
+ )
+ );
+
+ while ( true )
+ {
+ if ( UI::TimeoutUserInput(3*1000) == `cancel )
+ break;
+
+ UI::OpenDialog(`VBox(
+ `Heading("Annoying pop-up #1" ),
+ `PushButton(`id(`cancel), `opt(`default), "&Cancel" )
+ )
+ );
+
+ if ( UI::TimeoutUserInput(3*1000) == `cancel )
+ {
+ UI::CloseDialog();
+ break;
+ }
+
+ UI::OpenDialog(`VBox(
+ `Heading("Annoying pop-up #2" ),
+ `PushButton(`id(`cancel), `opt(`default), "&Cancel" )
+ )
+ );
+
+ if ( UI::TimeoutUserInput(3*1000) == `cancel )
+ {
+ UI::CloseDialog();
+ UI::CloseDialog();
+ break;
+ }
+
+ UI::CloseDialog(); // close pop-up #2
+
+ if ( UI::TimeoutUserInput(3*1000) == `cancel )
+ {
+ UI::CloseDialog();
+ break;
+ }
+
+ UI::CloseDialog(); // close pop-up #1
+ }
+
+ UI::CloseDialog();
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.13/libyui/src/YCPDialogParser.cc new/yast2-core-2.16.14/libyui/src/YCPDialogParser.cc
--- old/yast2-core-2.16.13/libyui/src/YCPDialogParser.cc 2007-11-30 16:08:27.000000000 +0100
+++ new/yast2-core-2.16.14/libyui/src/YCPDialogParser.cc 2007-12-06 16:32:59.000000000 +0100
@@ -252,7 +252,7 @@
else if ( s == YUIWidget_Right ) w = parseAlignment ( p, opt, term, ol, n, YAlignEnd, YAlignUnchanged );
else if ( s == YUIWidget_SelectionBox ) w = parseSelectionBox ( p, opt, term, ol, n );
else if ( s == YUIWidget_Table ) w = parseTable ( p, opt, term, ol, n );
- else if ( s == YUIWidget_TextEntry ) w = parseInputField ( p, opt, term, ol, n, false );
+ else if ( s == YUIWidget_TextEntry ) w = parseInputField ( p, opt, term, ol, n, false, true ); // bugCompatibilityMode
else if ( s == YUIWidget_Top ) w = parseAlignment ( p, opt, term, ol, n, YAlignUnchanged, YAlignBegin );
else if ( s == YUIWidget_Tree ) w = parseTree ( p, opt, term, ol, n );
else if ( s == YUIWidget_VBox ) w = parseLayoutBox ( p, opt, term, ol, n, YD_VERT );
@@ -1551,13 +1551,23 @@
* @note You can and should set a keyboard shortcut within the
* label. When the user presses the hotkey, the corresponding text entry widget
* will get the keyboard focus.
+ *
+ * @note Bug compatibility mode: If used as TextEntry(), `opt(`hstretch)
+ * is automatically added (with a warning in the log about that fact)
+ * to avoid destroying dialogs written before fixing a geometry bug
+ * in the widget. The bug had caused all TextEntry widgets to be
+ * horizontally stretchable, so they consumed all the horizontal
+ * space they could get, typically making them as wide as the dialog.
+ * When used with the new name InputField(), they use a reasonable
+ * default width. You can still add `opt(`hstretch), of course.
**/
YWidget *
YCPDialogParser::parseInputField( YWidget * parent, YWidgetOpt & opt,
const YCPTerm & term, const YCPList & optList, int argnr,
- bool passwordMode )
+ bool passwordMode, bool bugCompatibilityMode )
{
+ static bool postedBugCompatibilityWarning = false;
if ( term->size() - argnr < 1 || term->size() - argnr > 2
|| !term->value(argnr)->isString()
@@ -1590,6 +1600,28 @@
if ( shrinkable )
inputField->setShrinkable();
+ else if ( bugCompatibilityMode )
+ {
+ inputField->setStretchable( YD_HORIZ, true );
+
+ if ( ! postedBugCompatibilityWarning )
+ {
+ y2warning( "\n"
+ "\nUsing `TextEntry() in bug compatibiltiy mode."
+ "\nThis is equivalent to `InputField(`opt(`hstretch), ...)."
+ "\nThis makes the field grab as much space horizontally as it can get,"
+ "\ntypically making it stretch across the entire width of the dialog."
+ "\nWithout this hstretch, the field will take a reasonable default width."
+ "\n"
+ "\nIf this `hstretch is really desired, please use `InputField(`opt(`hstretch), ...)."
+ "\nIf it is not, please use `InputField() without `hstretch."
+ "\n\n"
+ );
+
+ postedBugCompatibilityWarning = true;
+ }
+ }
+
return inputField;
}
@@ -3211,7 +3243,7 @@
nextButtonLabel,
wizardMode );
YUI_CHECK_NEW( wizard );
-
+
// All wizard widgets have a fixed ID `wizard
YWidgetID * wizardId = new YCPValueWidgetID( YCPSymbol( YWizardID ) );
wizard->setId( wizardId );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.13/libyui/src/YCPDialogParser.h new/yast2-core-2.16.14/libyui/src/YCPDialogParser.h
--- old/yast2-core-2.16.13/libyui/src/YCPDialogParser.h 2007-11-16 12:43:24.000000000 +0100
+++ new/yast2-core-2.16.14/libyui/src/YCPDialogParser.h 2007-12-06 14:38:28.000000000 +0100
@@ -197,7 +197,7 @@
**/
static YWidget * parseInputField( YWidget *parent, YWidgetOpt & opt,
const YCPTerm & term, const YCPList & optList, int argnr,
- bool passwordMode );
+ bool passwordMode, bool bugCompatibilityMode = false );
static YWidget * parseMultiLineEdit( YWidget *parent, YWidgetOpt & opt,
const YCPTerm & term, const YCPList & optList, int argnr );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.13/libyui/src/YEvent.cc new/yast2-core-2.16.14/libyui/src/YEvent.cc
--- old/yast2-core-2.16.13/libyui/src/YEvent.cc 2007-12-05 14:39:04.000000000 +0100
+++ new/yast2-core-2.16.14/libyui/src/YEvent.cc 2007-12-05 15:01:49.000000000 +0100
@@ -287,7 +287,7 @@
YSimpleEvent::YSimpleEvent( EventType eventType,
const string & id )
: YEvent( eventType )
- , _id( YCPString( id.c_str() ) )
+ , _id( YCPString( id ) )
{
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.13/libyui/src/YUI_builtins.cc new/yast2-core-2.16.14/libyui/src/YUI_builtins.cc
--- old/yast2-core-2.16.13/libyui/src/YUI_builtins.cc 2007-12-04 15:40:43.000000000 +0100
+++ new/yast2-core-2.16.14/libyui/src/YUI_builtins.cc 2007-12-05 19:12:41.000000000 +0100
@@ -23,6 +23,7 @@
#define VERBOSE_REPLACE_WIDGET 0
#define VERBOSE_EVENTS 0
+#define VERBOSE_DISCARDED_EVENTS 0
#include
#include // pipe()
@@ -666,6 +667,18 @@
// Yes, really y2debug() - this may legitimately happen.
y2debug( "Discarding event from widget from foreign dialog" );
+#if VERBOSE_DISCARDED_EVENTS
+ y2debug( "Expected: %p (widgetRep %p), received: %p (widgetRep %p)",
+ YDialog::currentDialog(),
+ YDialog::currentDialog()->widgetRep(),
+ widgetEvent->widget()->findDialog(),
+ widgetEvent->widget()->findDialog()->widgetRep() );
+ y2debug( "Event widget: " );
+ widgetEvent->widget()->findDialog()->dumpWidgetTree();
+ y2debug( "Current dialog:" );
+ YDialog::currentDialog()->dumpWidgetTree();
+#endif
+
delete widgetEvent;
return 0;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.13/VERSION new/yast2-core-2.16.14/VERSION
--- old/yast2-core-2.16.13/VERSION 2007-12-05 14:50:48.000000000 +0100
+++ new/yast2-core-2.16.14/VERSION 2007-12-06 16:27:59.000000000 +0100
@@ -1 +1 @@
-2.16.13
+2.16.14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org