Mailinglist Archive: opensuse-commit (1826 mails)
| < Previous | Next > |
commit yast2-ycp-ui-bindings
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Sat, 06 Sep 2008 05:18:32 +0200
- Message-id: <20080906031833.3DF06678171@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package yast2-ycp-ui-bindings
checked in at Sat Sep 6 05:18:32 CEST 2008.
--------
--- yast2-ycp-ui-bindings/yast2-ycp-ui-bindings.changes 2008-08-26
12:50:11.000000000 +0200
+++ yast2-ycp-ui-bindings/yast2-ycp-ui-bindings.changes 2008-09-04
15:38:06.047289000 +0200
@@ -1,0 +2,6 @@
+Thu Sep 4 15:34:30 CEST 2008 - sh@xxxxxxx
+
+- Added `opt(`relaxSanityCheck) for `ButtonBox (bnc #422612)
+- V 2.17.4
+
+-------------------------------------------------------------------
Old:
----
yast2-ycp-ui-bindings-2.17.3.tar.bz2
New:
----
yast2-ycp-ui-bindings-2.17.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ycp-ui-bindings.spec ++++++
--- /var/tmp/diff_new_pack.g29351/_old 2008-09-06 05:17:12.000000000 +0200
+++ /var/tmp/diff_new_pack.g29351/_new 2008-09-06 05:17:12.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-ycp-ui-bindings (Version 2.17.3)
+# spec file for package yast2-ycp-ui-bindings (Version 2.17.4)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-ycp-ui-bindings
-Version: 2.17.3
+Version: 2.17.4
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-ycp-ui-bindings-2.17.3.tar.bz2
+Source0: yast2-ycp-ui-bindings-2.17.4.tar.bz2
Prefix: /usr
BuildRequires: gcc-c++
BuildRequires: yast2-devtools
@@ -37,9 +37,8 @@
Conflicts: yast2-core < 2.16.38
# libycp includes crypto built-ins
BuildRequires: libxcrypt-devel
-# YUIOpt_repoMgr value
-Requires: yast2-libyui >= 2.17.6
-BuildRequires: yast2-libyui-devel >= 2.17.6
+Requires: yast2-libyui >= 2.17.7
+BuildRequires: yast2-libyui-devel >= 2.17.7
# libyui ImplPtr
BuildRequires: boost-devel
Summary: YaST2 - YCP Bindings for the YaST2 User Interface Engine
@@ -85,7 +84,7 @@
Matthias Kettner
%prep
-%setup -n yast2-ycp-ui-bindings-2.17.3
+%setup -n yast2-ycp-ui-bindings-2.17.4
%build
%{prefix}/bin/y2tool y2autoconf
@@ -124,6 +123,9 @@
%{_libdir}/pkgconfig/yast2-ycp-ui-bindings.pc
%doc %{prefix}/share/doc/packages/yast2-ycp-ui-bindings
%changelog
+* Thu Sep 04 2008 sh@xxxxxxx
+- Added `opt(`relaxSanityCheck) for `ButtonBox (bnc #422612)
+- V 2.17.4
* Thu Aug 21 2008 sh@xxxxxxx
- Added support for new YButtonBox widget (fate #303446)
- V 2.17.3
++++++ yast2-ycp-ui-bindings-2.17.3.tar.bz2 ->
yast2-ycp-ui-bindings-2.17.4.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/yast2-ycp-ui-bindings-2.17.3/examples/ButtonBox2.ycp
new/yast2-ycp-ui-bindings-2.17.4/examples/ButtonBox2.ycp
--- old/yast2-ycp-ui-bindings-2.17.3/examples/ButtonBox2.ycp 1970-01-01
01:00:00.000000000 +0100
+++ new/yast2-ycp-ui-bindings-2.17.4/examples/ButtonBox2.ycp 2008-08-27
12:30:30.000000000 +0200
@@ -0,0 +1,176 @@
+// Demo for common ButtonBox-based dialogs
+{
+ void showDialog( term buttonBox )
+ {
+ boolean success = (boolean)
+ UI::OpenDialog(
+ `VBox(
+ `HVCenter( `Label( "Hello, World!" ) ),
+ buttonBox
+ )
+ );
+
+ // Most YCP developers never use the return value of UI::OpenDialog().
+ // Many of them probably don't even know that it has a return value.
+ //
+ // Used properly, that return value can be used to recover from error
+ // situations that would otherwise abort the program - like in this
case.
+
+ if ( success )
+ {
+ UI::UserInput();
+ UI::CloseDialog();
+ }
+ }
+
+
+ void okCancelDialog()
+ {
+ showDialog( `ButtonBox(
+ `PushButton(`id(`ok ), "&OK" ),
+ `PushButton(`id(`cancel), "&Cancel" )
+ )
+ );
+ }
+
+
+ void yesNoDialog()
+ {
+ showDialog( `ButtonBox(
+ `PushButton(`id(`yes ), "&Yes" ),
+ `PushButton(`id(`no ), "&No" )
+ )
+ );
+ }
+
+
+ void continueCancelDialog()
+ {
+ showDialog( `ButtonBox(
+ `PushButton(`id(`continue ), "C&ontinue" ),
+ `PushButton(`id(`cancel ), "&Cancel" )
+ )
+ );
+ }
+
+
+ void okApplyCancelDialog()
+ {
+ showDialog( `ButtonBox(
+ `PushButton(`id(`ok ), "&OK" ),
+ `PushButton(`id(`apply ), "&Apply" ),
+ `PushButton(`id(`cancel), "&Cancel" )
+ )
+ );
+ }
+
+
+ void okApplyCancelHelpDialog()
+ {
+ showDialog( `ButtonBox(
+ `PushButton(`id(`ok ), "&OK" ),
+ `PushButton(`id(`apply ), "&Apply" ),
+ `PushButton(`id(`cancel), "&Cancel" ),
+ `PushButton(`id(`help ), "&Help" )
+ )
+ );
+ }
+
+
+ void okApplyCancelCustomHelpDialog()
+ {
+ showDialog( `ButtonBox(
+ `PushButton(`id(`ok ), "&OK" ),
+ `PushButton(`id(`apply ), "&Apply" ),
+ `PushButton(`id(`cancel ), "&Cancel" ),
+ `PushButton(`id(`custom1 ), "&Do Something" ),
+ `PushButton(`id(`custom2 ), "Do &More" ),
+ `PushButton(`id(`help ), "&Help" )
+ )
+ );
+ }
+
+
+ void okDialog()
+ {
+ showDialog( `ButtonBox(
+ `PushButton(`id(`ok ), "&OK" )
+ )
+ );
+ }
+
+
+ void okRetryDialog()
+ {
+ // This will throw an error:
+ // If there is more than one button in a button box, one of them must
+ // have the [OK] role and one must have the [Cancel] role.
+
+ showDialog( `ButtonBox(
+ `PushButton(`id(`ok ), "&OK" ),
+ `PushButton(`id(`retry ), "&Retry" )
+ )
+ );
+ }
+
+
+ void retryCancelDialog()
+ {
+ // Explicitly assigning the [OK] role to the [Retry] button
+
+ showDialog( `ButtonBox(
+ `PushButton(`id(`retry ), `opt(`okButton),
"&Retry" ),
+ `PushButton(`id(`cancel), "&Cancel" )
+ )
+ );
+ }
+
+
+
+
+ term buttons =
+ `VBox(
+ `PushButton(`id(`okCancel ), `opt(`hstretch), "&OK /
Cancel" ),
+ `PushButton(`id(`yesNo ), `opt(`hstretch), "&Yes / No" ),
+ `PushButton(`id(`continueCancel ), `opt(`hstretch), "C&ontinue /
Cancel" ),
+ `PushButton(`id(`okApply ), `opt(`hstretch), "OK / &Apply
/ Cancel" ),
+ `PushButton(`id(`okEtcHelp ), `opt(`hstretch), "OK / Apply /
Cancel / &Help" ),
+ `PushButton(`id(`okCustom ), `opt(`hstretch), "OK / Apply /
Cancel / C&ustom / Help" ),
+ `PushButton(`id(`okOnly ), `opt(`hstretch), "O&K" ),
+ `PushButton(`id(`okRetry ), `opt(`hstretch), "OK / Re&try
(Error!)" ),
+ `PushButton(`id(`retryCancel ), `opt(`hstretch), "&Retry /
Cancel" )
+ );
+
+ UI::OpenDialog(
+ `MarginBox( 1.0, 0.5,
+ `VBox(
+ `Heading( "ButtonBox Examples" ),
+ `VSpacing( 0.5 ),
+ `HVCenter( `HSquash( buttons ) ),
+ `VSpacing( 0.5 ),
+ `Right(`PushButton(`id(`close), "&Close" )
)
+ )
+ )
+ );
+
+ symbol button = nil;
+
+ repeat
+ {
+ button = (symbol) UI::UserInput();
+
+ if ( button == `okCancel ) okCancelDialog();
+ if ( button == `yesNo ) yesNoDialog();
+ if ( button == `continueCancel ) continueCancelDialog();
+ if ( button == `okApply ) okApplyCancelDialog();
+ if ( button == `okEtcHelp ) okApplyCancelHelpDialog();
+ if ( button == `okCustom ) okApplyCancelCustomHelpDialog();
+ if ( button == `okOnly ) okDialog();
+ if ( button == `okRetry ) okRetryDialog();
+ if ( button == `retryCancel ) retryCancelDialog();
+
+ } until ( button == `close || // [Close] button
+ button == `cancel ); // WM_CLOSE
+
+ UI::CloseDialog();
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore
old/yast2-ycp-ui-bindings-2.17.3/examples/ButtonBox3-relaxed.ycp
new/yast2-ycp-ui-bindings-2.17.4/examples/ButtonBox3-relaxed.ycp
--- old/yast2-ycp-ui-bindings-2.17.3/examples/ButtonBox3-relaxed.ycp
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-ycp-ui-bindings-2.17.4/examples/ButtonBox3-relaxed.ycp
2008-09-04 15:32:59.000000000 +0200
@@ -0,0 +1,21 @@
+// Example for ButtonBox: Relaxed sanity check.
+//
+// Normally, a ButtonBox with more than one button is required to have one
+// `okButton and one `cancelButton. With `opt(`relaxSanityCheck), this
+// requirement is not enforced.
+//
+// Still, that option should only be used in very rare exceptions.
+{
+ UI::OpenDialog(`VBox(
+ `HVCenter(
+ `Label( "Error: Your CPU is under water." )
+ ),
+ `ButtonBox(`opt(`relaxSanityCheck),
+ `PushButton(`id(`ok), "&OK" ),
+ `PushButton(`id(`details), "&Details..." )
+ )
+ )
+ );
+ UI::UserInput();
+ UI::CloseDialog();
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/yast2-ycp-ui-bindings-2.17.3/src/YCPDialogParser.cc
new/yast2-ycp-ui-bindings-2.17.4/src/YCPDialogParser.cc
--- old/yast2-ycp-ui-bindings-2.17.3/src/YCPDialogParser.cc 2008-08-22
12:01:31.000000000 +0200
+++ new/yast2-ycp-ui-bindings-2.17.4/src/YCPDialogParser.cc 2008-09-04
15:27:20.000000000 +0200
@@ -1069,15 +1069,16 @@
{
// Parse options
- bool debugLayout = false;
+ bool relaxSanityCheck = false;
for ( int o=0; o < optList->size(); o++ )
{
- if ( optList->value(o)->isSymbol() &&
optList->value(o)->asSymbol()->symbol() == YUIOpt_debugLayout ) debugLayout =
true;
+ if ( optList->value(o)->isSymbol() &&
optList->value(o)->asSymbol()->symbol() == YUIOpt_relaxSanityCheck )
relaxSanityCheck = true;
else logUnknownOption( term, optList->value(o) );
}
YButtonBox * buttonBox = YUI::widgetFactory()->createButtonBox( parent );
+ YUI_CHECK_NEW( buttonBox );
for ( int buttonNo=argnr; buttonNo < term->size(); buttonNo++ )
{
@@ -1127,6 +1128,12 @@
try
{
+ if ( relaxSanityCheck )
+ {
+ yuiMilestone() << "Relaxed sanity check for " << buttonBox << endl;
+ buttonBox->setSanityCheckRelaxed( relaxSanityCheck );
+ }
+
buttonBox->sanityCheck();
}
catch ( YUIException & exception )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/yast2-ycp-ui-bindings-2.17.3/VERSION
new/yast2-ycp-ui-bindings-2.17.4/VERSION
--- old/yast2-ycp-ui-bindings-2.17.3/VERSION 2008-08-21 18:41:23.000000000
+0200
+++ new/yast2-ycp-ui-bindings-2.17.4/VERSION 2008-09-04 15:33:19.000000000
+0200
@@ -1 +1 @@
-2.17.3
+2.17.4
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |