Hello community,
here is the log from the commit of package yast2-core
checked in at Fri Dec 21 20:34:02 CET 2007.
--------
--- yast2-core/yast2-core.changes 2007-12-18 17:15:45.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-core/yast2-core.changes 2007-12-21 18:37:14.330252000 +0100
@@ -1,0 +2,6 @@
+Fri Dec 21 18:29:30 CET 2007 - coolo@suse.de
+
+- support `CurrentItem to the timezone selector
+- V 2.16.17
+
+-------------------------------------------------------------------
Old:
----
yast2-core-2.16.16.tar.bz2
New:
----
yast2-core-2.16.17.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-core.spec ++++++
--- /var/tmp/diff_new_pack.jc5599/_old 2007-12-21 20:33:14.000000000 +0100
+++ /var/tmp/diff_new_pack.jc5599/_new 2007-12-21 20:33:14.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-core (Version 2.16.16)
+# spec file for package yast2-core (Version 2.16.17)
#
# 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.16
+Version: 2.16.17
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-core-2.16.16.tar.bz2
+Source0: yast2-core-2.16.17.tar.bz2
Prefix: /usr
# obviously
BuildRequires: gcc-c++
@@ -86,7 +86,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-core-2.16.16
+%setup -n yast2-core-2.16.17
%build
%{prefix}/bin/y2tool y2autoconf
@@ -163,6 +163,9 @@
%doc %{prefix}/share/doc/packages/yast2-core
/usr/share/YaST2/data/devtools/bin/generateYCPWrappers
%changelog
+* Fri Dec 21 2007 - coolo@suse.de
+- support `CurrentItem to the timezone selector
+- V 2.16.17
* Tue Dec 18 2007 - coolo@suse.de
- adding another optional widget: timezone selector
- V 2.16.16
++++++ yast2-core-2.16.16.tar.bz2 -> yast2-core-2.16.17.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.16/libyui/doc/examples/TimezoneSelector.ycp new/yast2-core-2.16.17/libyui/doc/examples/TimezoneSelector.ycp
--- old/yast2-core-2.16.16/libyui/doc/examples/TimezoneSelector.ycp 2007-12-18 17:12:24.000000000 +0100
+++ new/yast2-core-2.16.17/libyui/doc/examples/TimezoneSelector.ycp 2007-12-20 20:26:50.000000000 +0100
@@ -43,43 +43,51 @@
"US/Samoa" : "Samoa",
"US/Eastern" : "Eastern",
"Europe/London" : "United Kingdom",
- "America/New_York" : "Eastern"
-
+ "America/New_York" : "Eastern",
+ "Australia/Darwin" : "Northern Territory--Darwin",
+ "Australia/Brisbane" : "Queensland--Brisbane",
+ "Australia/South" : "South Australia--Adelaide",
+ "Australia/Sydney" : "New South Wales--Sydney",
+ "Australia/ACT" : "Australian Capital Territory--Canberra",
+ "Australia/Hobart" : "Tasmania--Hobart",
+ "Australia/Melbourne" : "Victoria--Melbourne",
+ "Australia/Perth" : "Western Australia--Perth"
];
// Ask the UI whether or not it supports this widget.
-
+
if ( UI::HasSpecialWidget(`TimezoneSelector) )
{
// Only create a dialog with this kind of widget if it is supported
UI::OpenDialog(
- `VBox(
+ `VBox(
`TimezoneSelector(`id(`timezone), `opt(`notify), Directory::themedir + "/current/worldmap/GLOBALeb10colshade.jpg", examples),
`PushButton(`id(`ok), `opt(`default), "&Close"),
- `ComboBox(`id(`combozone), `opt(`notify),
+ `ComboBox(`id(`combozone), `opt(`notify),
"",
[
- `item("Please select your timezone"),
`item(`id(`london), "Europe/London" ),
`item(`id(`prag), "Europe/Prague" ),
`item(`id(`ny), "America/New_York" )
] )
)
);
+ // preselect something
+ UI::ChangeWidget(`id(`timezone), `CurrentItem, "Europe/London");
}
else
{
// Always provide a fallback: Either try to create a simpler dialog
// without the special widget, or terminate with an error message.
UI::OpenDialog(
- `VBox(
+ `VBox(
`Label("Timezone Selector not supported!"),
`PushButton(`opt(`default), "&Oops!")
)
);
}
-
+
while( true )
{
symbol button = (symbol)UI::UserInput();
@@ -102,7 +110,7 @@
string zone=(string)UI::QueryWidget(`id(`timezone), `Value);
UI::ChangeWidget(`id(`combozone), `Value, zone);
}
- }
+ }
UI::CloseDialog();
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.16/libyui/src/YTimezoneSelector.cc new/yast2-core-2.16.17/libyui/src/YTimezoneSelector.cc
--- old/yast2-core-2.16.16/libyui/src/YTimezoneSelector.cc 2007-12-18 17:12:25.000000000 +0100
+++ new/yast2-core-2.16.17/libyui/src/YTimezoneSelector.cc 2007-12-20 20:26:50.000000000 +0100
@@ -23,7 +23,7 @@
#include "YUISymbols.h"
#include "YTimezoneSelector.h"
-class YTimezoneSelectorPrivate
+class YTimezoneSelectorPrivate
{
bool dummy;
};
@@ -51,6 +51,7 @@
if ( propSet.isEmpty() )
{
propSet.add( YProperty( YUIProperty_Value, YStringProperty ) );
+ propSet.add( YProperty( YUIProperty_CurrentItem, YStringProperty ) );
propSet.add( YWidget::propertySet() );
}
@@ -65,13 +66,15 @@
if ( propertyName == YUIProperty_Value )
{
- setCurrentZone( val.stringVal() );
+ setCurrentZone( val.stringVal(), true );
return true; // success -- no special handling necessary
}
- else
+ if ( propertyName == YUIProperty_CurrentItem )
{
- return YWidget::setProperty( propertyName, val );
+ setCurrentZone( val.stringVal(), false );
+ return true; // success -- no special handling necessary
}
+ return YWidget::setProperty( propertyName, val );
}
@@ -81,9 +84,7 @@
propertySet().check( propertyName ); // throws exceptions if not found
if ( propertyName == YUIProperty_Value ) return YPropertyValue( currentZone() );
- else
- {
- return YWidget::getProperty( propertyName );
- }
+ if ( propertyName == YUIProperty_CurrentItem ) return YPropertyValue( currentZone() );
+ return YWidget::getProperty( propertyName );
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.16/libyui/src/YTimezoneSelector.h new/yast2-core-2.16.17/libyui/src/YTimezoneSelector.h
--- old/yast2-core-2.16.16/libyui/src/YTimezoneSelector.h 2007-12-18 17:12:25.000000000 +0100
+++ new/yast2-core-2.16.17/libyui/src/YTimezoneSelector.h 2007-12-20 20:26:50.000000000 +0100
@@ -87,7 +87,7 @@
/**
* subclasses have to implement this to set value
*/
- virtual void setCurrentZone( const std::string &zone ) = 0;
+ virtual void setCurrentZone( const std::string &zone, bool zoom ) = 0;
private:
ImplPtr<YTimezoneSelectorPrivate> priv;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-core-2.16.16/VERSION new/yast2-core-2.16.17/VERSION
--- old/yast2-core-2.16.16/VERSION 2007-12-18 17:12:55.000000000 +0100
+++ new/yast2-core-2.16.17/VERSION 2007-12-21 18:29:24.000000000 +0100
@@ -1 +1 @@
-2.16.16
+2.16.17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org