Hello community,
here is the log from the commit of package yast2-ycp-ui-bindings for
openSUSE:Factory checked in at 2020-01-04 19:20:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ycp-ui-bindings (Old)
and /work/SRC/openSUSE:Factory/.yast2-ycp-ui-bindings.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-ycp-ui-bindings"
Sat Jan 4 19:20:35 2020 rev:77 rq:757902 version:4.2.7
Changes:
--------
---
/work/SRC/openSUSE:Factory/yast2-ycp-ui-bindings/yast2-ycp-ui-bindings.changes
2019-12-14 12:04:32.447391922 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-ycp-ui-bindings.new.6675/yast2-ycp-ui-bindings.changes
2020-01-04 19:20:39.449119059 +0100
@@ -1,0 +2,6 @@
+Wed Dec 18 14:56:39 CET 2019 - [email protected]
+
+- handle sort key in parser for table item (bsc#1140018)
+- 4.2.7
+
+-------------------------------------------------------------------
Old:
----
yast2-ycp-ui-bindings-4.2.6.tar.bz2
New:
----
yast2-ycp-ui-bindings-4.2.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ycp-ui-bindings.spec ++++++
--- /var/tmp/diff_new_pack.2vDjII/_old 2020-01-04 19:20:40.389119476 +0100
+++ /var/tmp/diff_new_pack.2vDjII/_new 2020-01-04 19:20:40.389119476 +0100
@@ -17,11 +17,11 @@
# YUIWidget_CustomStatusItemSelector
-%define min_yui_version 3.8.4
+%define min_yui_version 3.9.1
%define yui_so 11
Name: yast2-ycp-ui-bindings
-Version: 4.2.6
+Version: 4.2.7
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-ycp-ui-bindings-4.2.6.tar.bz2 ->
yast2-ycp-ui-bindings-4.2.7.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ycp-ui-bindings-4.2.6/examples/Table-sort-key.rb
new/yast2-ycp-ui-bindings-4.2.7/examples/Table-sort-key.rb
--- old/yast2-ycp-ui-bindings-4.2.6/examples/Table-sort-key.rb 1970-01-01
01:00:00.000000000 +0100
+++ new/yast2-ycp-ui-bindings-4.2.7/examples/Table-sort-key.rb 2019-12-18
17:41:45.000000000 +0100
@@ -0,0 +1,46 @@
+# encoding: utf-8
+
+module Yast
+ class TableSortingClient < Client
+ def main
+ Yast.import "UI"
+ UI.OpenDialog(
+ VBox(
+ Label("Disk"),
+ MinSize(
+ 30,
+ 10,
+ Table(
+ Header("Device", Right("Size")),
+ [
+ Item(Id(1),
+ term(:cell, term(:sortKey, "sd0a001"), "sda1"),
+ term(:cell, term(:sortKey, "10240"), "10.00 MiB")),
+ Item(Id(2),
+ term(:cell, term(:sortKey, "sd0a010"), "sda10"),
+ term(:cell, term(:sortKey, "2"), "2.00 KiB")),
+ Item(Id(3),
+ term(:cell, term(:sortKey, "sd0a002"), "sda2"),
+ term(:cell, term(:sortKey, "256"), "0.25 MiB")),
+ Item(Id(4),
+ term(:cell, term(:sortKey, "sd0b"), "sdb"),
+ term(:cell, term(:sortKey, "32"), "32.00 KiB")),
+ Item(Id(5),
+ term(:cell, term(:sortKey, "sd0b2"), "sdb2"),
+ term(:cell, term(:sortKey, "4"), "4.00 KiB")),
+ Item(Id(6),
+ term(:cell, term(:sortKey, "sdaa"), "sdaa"),
+ term(:cell, term(:sortKey, "512"), "0.50 MiB"))
+ ]
+ )
+ ),
+ PushButton("&OK")
+ )
+ )
+ UI.UserInput
+ UI.CloseDialog
+ end
+ end
+end
+
+Yast::TableSortingClient.new.main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ycp-ui-bindings-4.2.6/examples/Table3.rb
new/yast2-ycp-ui-bindings-4.2.7/examples/Table3.rb
--- old/yast2-ycp-ui-bindings-4.2.6/examples/Table3.rb 2019-12-12
09:54:57.000000000 +0100
+++ new/yast2-ycp-ui-bindings-4.2.7/examples/Table3.rb 2019-12-18
17:41:45.000000000 +0100
@@ -5,6 +5,9 @@
class Table3Client < Client
def main
Yast.import "UI"
+
+ # items are on purpose not sorted
+
@foodItems = [
Item(Id(3), "Spaghetti", 8),
Item(Id(4), "Steak Sandwich", 12),
@@ -17,7 +20,10 @@
Item(Id(1), "Audi", 50000),
Item(Id(2), "VW", 40000),
Item(Id(3), "BMW", 60000),
- Item(Id(3), "Porsche", 80000)
+ Item(Id(3), "Porsche", 80000),
+ Item(Id(4), "Bentley", 200000),
+ Item(Id(5), "Bugatti", 23000000),
+ Item(Id(6), "Lada", 8000)
]
@itemLists = [@foodItems, @carItems]
@@ -30,7 +36,7 @@
MinSize(
30,
10,
- Table(Id(:table), Header("Name", "Price"), @foodItems)
+ Table(Id(:table), Header("Name", Right("Price")), @foodItems)
),
Right(
HBox(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ycp-ui-bindings-4.2.6/examples/Table4.rb
new/yast2-ycp-ui-bindings-4.2.7/examples/Table4.rb
--- old/yast2-ycp-ui-bindings-4.2.6/examples/Table4.rb 2019-12-12
09:54:57.000000000 +0100
+++ new/yast2-ycp-ui-bindings-4.2.7/examples/Table4.rb 2019-12-18
17:41:45.000000000 +0100
@@ -14,10 +14,13 @@
Id(:table),
Header("Name", "Price"),
[
+ # items are on purpose not sorted
Item(Id(1), "Chili", 6),
Item(Id(2), "Salami Baguette", nil),
Item(Id(3), "Spaghetti", 8),
- Item(Id(4), "Steak Sandwich", 12)
+ Item(Id(4), "Steak Sandwich", 12),
+ Item(Id(5), "Pizza", 10),
+ Item(Id(6), "Artichoke", 4)
]
)
),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ycp-ui-bindings-4.2.6/package/yast2-ycp-ui-bindings.changes
new/yast2-ycp-ui-bindings-4.2.7/package/yast2-ycp-ui-bindings.changes
--- old/yast2-ycp-ui-bindings-4.2.6/package/yast2-ycp-ui-bindings.changes
2019-12-12 09:54:57.000000000 +0100
+++ new/yast2-ycp-ui-bindings-4.2.7/package/yast2-ycp-ui-bindings.changes
2019-12-18 17:41:45.000000000 +0100
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Dec 18 14:56:39 CET 2019 - [email protected]
+
+- handle sort key in parser for table item (bsc#1140018)
+- 4.2.7
+
+-------------------------------------------------------------------
Thu Dec 12 09:45:27 CET 2019 - [email protected]
- require correct libyui so version 11 (bsc#1132247)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ycp-ui-bindings-4.2.6/package/yast2-ycp-ui-bindings.spec
new/yast2-ycp-ui-bindings-4.2.7/package/yast2-ycp-ui-bindings.spec
--- old/yast2-ycp-ui-bindings-4.2.6/package/yast2-ycp-ui-bindings.spec
2019-12-12 09:54:57.000000000 +0100
+++ new/yast2-ycp-ui-bindings-4.2.7/package/yast2-ycp-ui-bindings.spec
2019-12-18 17:41:45.000000000 +0100
@@ -16,11 +16,11 @@
#
# YUIWidget_CustomStatusItemSelector
-%define min_yui_version 3.8.4
+%define min_yui_version 3.9.1
%define yui_so 11
Name: yast2-ycp-ui-bindings
-Version: 4.2.6
+Version: 4.2.7
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ycp-ui-bindings-4.2.6/src/YCPTableItem.h
new/yast2-ycp-ui-bindings-4.2.7/src/YCPTableItem.h
--- old/yast2-ycp-ui-bindings-4.2.6/src/YCPTableItem.h 2019-12-12
09:54:57.000000000 +0100
+++ new/yast2-ycp-ui-bindings-4.2.7/src/YCPTableItem.h 2019-12-18
17:41:45.000000000 +0100
@@ -78,12 +78,12 @@
void setId( const YCPValue & newId ) { _id = newId; }
/**
- * Create a new cell and add it (even if both 'label' and
- * 'iconName' are empty).
+ * Create a new cell and add it (even if all 'label', 'iconName'
+ * and 'sortKey' are empty).
**/
- void addCell( const YCPString & label, const YCPString & iconName )
- { YTableItem::addCell( label->value(), iconName->value() ); }
-
+ void addCell( const YCPString & label, const YCPString & iconName, const
YCPString & sortKey )
+ { YTableItem::addCell( label->value(), iconName->value(),
sortKey->value() ); }
+
void addCell( const YCPString & label )
{ YTableItem::addCell( label->value() ); }
@@ -102,7 +102,7 @@
private:
-
+
YCPValue _id;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ycp-ui-bindings-4.2.6/src/YCPTableItemParser.cc
new/yast2-ycp-ui-bindings-4.2.7/src/YCPTableItemParser.cc
--- old/yast2-ycp-ui-bindings-4.2.6/src/YCPTableItemParser.cc 2019-12-12
09:54:57.000000000 +0100
+++ new/yast2-ycp-ui-bindings-4.2.7/src/YCPTableItemParser.cc 2019-12-18
17:41:45.000000000 +0100
@@ -153,7 +153,7 @@
if ( ! item->hasId() ) // No ID specified?
{
// Use the first non-empty cell label as ID for the entire item
-
+
for ( YTableCellConstIterator it = item->cellsBegin();
! item->hasId() && it != item->cellsEnd();
++it )
@@ -178,9 +178,11 @@
{
YCPString label = YCPNull();
YCPString iconName = YCPNull();
- const char * usage = "Expected `cell(`icon(\"myicon.png\"), \"mylabel\")";
+ YCPString sortKey = YCPNull();
+
+ const char * usage = "Expected `cell(`icon(\"myicon.png\"),
`sortKey(\"sda001\"), \"mylabel\")";
- if ( cellTerm->size() < 1 || cellTerm->size() > 2 )
+ if ( cellTerm->size() < 1 || cellTerm->size() > 3 )
YUI_THROW( YCPDialogSyntaxErrorException( usage, cellTerm ) );
for ( int i=0; i < cellTerm->size(); ++i )
@@ -194,16 +196,23 @@
label = arg->asString();
}
- else if ( arg->isTerm() ) // `icon("myicon.png")
+ else if ( arg->isTerm() ) // `icon("myicon.png") or
`sortKey("sda001")
{
- YCPTerm iconTerm = arg->asTerm();
+ YCPTerm term = arg->asTerm();
- if ( iconTerm->name() == YUISymbol_icon &&
- iconTerm->size() == 1 &&
- iconTerm->value(0)->isString() &&
+ if ( term->name() == YUISymbol_icon &&
+ term->size() == 1 &&
+ term->value(0)->isString() &&
iconName.isNull() ) // no icon name yet
{
- iconName = iconTerm->value(0)->asString();
+ iconName = term->value(0)->asString();
+ }
+ else if ( term->name() == YUISymbol_sortKey &&
+ term->size() == 1 &&
+ term->value(0)->isString() &&
+ sortKey.isNull() ) // no sort key yet
+ {
+ sortKey = term->value(0)->asString();
}
else
YUI_THROW( YCPDialogSyntaxErrorException( usage, cellTerm ) );
@@ -221,9 +230,12 @@
if ( label.isNull() )
label = YCPString( "" );
-
+
if ( iconName.isNull() )
iconName = YCPString( "" );
-
- parent->addCell( label, iconName );
+
+ if ( sortKey.isNull() )
+ sortKey = YCPString( "" );
+
+ parent->addCell( label, iconName, sortKey );
}