Author: coolo
Date: Tue Dec 18 13:53:06 2007
New Revision: 43155
URL: http://svn.opensuse.org/viewcvs/yast?rev=43155&view=rev
Log:
cleaning up so I can merge
Modified:
branches/tmp/coolo/zone/core/libyui/doc/examples/TimezoneSelector.ycp
branches/tmp/coolo/zone/core/libyui/src/Makefile.am
branches/tmp/coolo/zone/core/libyui/src/YCPDialogParser.cc
branches/tmp/coolo/zone/core/libyui/src/YTimezoneSelector.cc
branches/tmp/coolo/zone/core/libyui/src/YTimezoneSelector.h
branches/tmp/coolo/zone/core/libyui/src/YUI_builtins.cc
Modified: branches/tmp/coolo/zone/core/libyui/doc/examples/TimezoneSelector.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/zone/core/libyui/doc/examples/TimezoneSelector.ycp?rev=43155&r1=43154&r2=43155&view=diff
==============================================================================
--- branches/tmp/coolo/zone/core/libyui/doc/examples/TimezoneSelector.ycp (original)
+++ branches/tmp/coolo/zone/core/libyui/doc/examples/TimezoneSelector.ycp Tue Dec 18 13:53:06 2007
@@ -53,7 +53,7 @@
// Only create a dialog with this kind of widget if it is supported
UI::OpenDialog(
`VBox(
- `TimezoneSelector(`id(`timezone), `opt(`notify), "/home/col/prod/yast2/core/libyui/doc/examples/caida_1280.jpg", examples),
+ `TimezoneSelector(`id(`timezone), `opt(`notify), "/home/col/prod/yast2/core/libyui/doc/examples/earth_2400.jpg", examples),
`PushButton(`id(`ok), `opt(`default), "&Close"),
`ComboBox(`id(`combozone), `opt(`notify),
"",
Modified: branches/tmp/coolo/zone/core/libyui/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/zone/core/libyui/src/Makefile.am?rev=43155&r1=43154&r2=43155&view=diff
==============================================================================
--- branches/tmp/coolo/zone/core/libyui/src/Makefile.am (original)
+++ branches/tmp/coolo/zone/core/libyui/src/Makefile.am Tue Dec 18 13:53:06 2007
@@ -87,9 +87,9 @@
YSquash.cc \
YTable.cc \
YTimeField.cc \
+ YTimezoneSelector.cc \
YTree.cc \
YWizard.cc \
- YTimezoneSelector.cc \
\
YRpmGroupsTree.cc \
YStringTree.cc \
@@ -188,7 +188,7 @@
YSquash.h \
YTable.h \
YTimeField.h \
- YTimezoneSelector.h \
+ YTimezoneSelector.h \
YTree.h \
YWizard.h \
\
Modified: branches/tmp/coolo/zone/core/libyui/src/YCPDialogParser.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/zone/core/libyui/src/YCPDialogParser.cc?rev=43155&r1=43154&r2=43155&view=diff
==============================================================================
--- branches/tmp/coolo/zone/core/libyui/src/YCPDialogParser.cc (original)
+++ branches/tmp/coolo/zone/core/libyui/src/YCPDialogParser.cc Tue Dec 18 13:53:06 2007
@@ -3265,9 +3265,14 @@
* @widgets TimezoneSelector
* @short Timezone selector map
* @class YTimezoneSelector
- * @arg string map
+ *
+ * @arg string pixmap path to a jpg or png of a world map - with 0°0° being the
+ * middle of the picture
+ * @arg map timezones a map of timezones. The map should be between e.g. Europe/London
+ * and the tooltip to be displayed ("United Kingdom")
+ *
* @usage if ( HasSpecialWidget( `TimezoneSelector ) {...
- * `TimezoneSelector( "world.jpg" )
+ * `TimezoneSelector( "world.jpg", timezones )
*
* @description
* An graphical timezone selector map
Modified: branches/tmp/coolo/zone/core/libyui/src/YTimezoneSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/zone/core/libyui/src/YTimezoneSelector.cc?rev=43155&r1=43154&r2=43155&view=diff
==============================================================================
--- branches/tmp/coolo/zone/core/libyui/src/YTimezoneSelector.cc (original)
+++ branches/tmp/coolo/zone/core/libyui/src/YTimezoneSelector.cc Tue Dec 18 13:53:06 2007
@@ -10,9 +10,9 @@
| (C) SuSE GmbH |
\----------------------------------------------------------------------/
- File: YMultiProgressMeter.cc
+ File: YTimezoneSelector.cc
- Author: Stefan Hundhammer
+ Author: Stephan Kulow
/-*/
Modified: branches/tmp/coolo/zone/core/libyui/src/YTimezoneSelector.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/zone/core/libyui/src/YTimezoneSelector.h?rev=43155&r1=43154&r2=43155&view=diff
==============================================================================
--- branches/tmp/coolo/zone/core/libyui/src/YTimezoneSelector.h (original)
+++ branches/tmp/coolo/zone/core/libyui/src/YTimezoneSelector.h Tue Dec 18 13:53:06 2007
@@ -25,9 +25,14 @@
{
protected:
/**
- * Constructor
+ * Constructor. This widget isn't doing much on it's own, but the
+ * UI may have some fancy use. @arg pixmap should be a png or jpg
+ * of a world map with centered 0°0° and the timezones are a map
+ * between zone.tab entry and user visible string.
+ *
+ * The widget is only displaying timezones/cities in that map
**/
- YTimezoneSelector( YWidget * parent,
+ YTimezoneSelector( YWidget *parent,
const string &pixmap,
const map &timezones );
Modified: branches/tmp/coolo/zone/core/libyui/src/YUI_builtins.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/zone/core/libyui/src/YUI_builtins.cc?rev=43155&r1=43154&r2=43155&view=diff
==============================================================================
--- branches/tmp/coolo/zone/core/libyui/src/YUI_builtins.cc (original)
+++ branches/tmp/coolo/zone/core/libyui/src/YUI_builtins.cc Tue Dec 18 13:53:06 2007
@@ -417,7 +417,7 @@
#if VERBOSE_EVENTS
y2debug( "UI::UserInput()" );
#endif
-
+
return doUserInput( YUIBuiltin_UserInput,
0, // timeout_millisec
true, // wait
@@ -445,7 +445,7 @@
#if VERBOSE_EVENTS
y2debug( "UI::PollInput()" );
#endif
-
+
return doUserInput( YUIBuiltin_PollInput,
0, // timeout_millisec
false, // wait
@@ -471,7 +471,7 @@
YCPValue YUI::evaluateTimeoutUserInput( const YCPInteger & timeout )
{
long timeout_millisec = timeout->value();
-
+
#if VERBOSE_EVENTS
y2debug( "UI::TimeoutUserInput( %d )", timeout_millisec );
#endif
@@ -496,12 +496,12 @@
YCPValue YUI::evaluateWaitForEvent( const YCPInteger & timeout )
{
long timeout_millisec = 0;
-
+
if ( ! timeout.isNull() )
{
timeout_millisec = timeout->value();
}
-
+
#if VERBOSE_EVENTS
y2debug( "UI::WaitForEvent( %d )", timeout_millisec );
#endif
@@ -580,7 +580,7 @@
if ( event )
{
-
+
if ( detailed )
input = event->ycpEvent(); // The event map
else
@@ -672,14 +672,14 @@
y2debug( "Expected: %p (widgetRep %p), received: %p (widgetRep %p)",
YDialog::currentDialog(),
YDialog::currentDialog()->widgetRep(),
- widgetEvent->widget()->findDialog(),
+ 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;
}
@@ -712,10 +712,10 @@
* distinct from the normal colors, but not as bright as warncolor.
*
* The <tt>`decorated</tt> option is now obsolete, but still accepted to keep
- * old code working.
+ * old code working.
*
* The <tt>`centered</tt> option is now obsolete, but still accepted to keep
- * old code working.
+ * old code working.
*
* @param term options
* @param term widget
@@ -728,7 +728,7 @@
{
YDialogType dialogType = YPopupDialog;
YDialogColorMode colorMode = YDialogNormalColor;
-
+
if ( ! opts.isNull() ) // evaluate `opt() contents
{
YCPList optList = opts->args();
@@ -752,7 +752,7 @@
blockEvents(); // Prevent self-generated events from UI built-ins.
bool ok = true;
-
+
try
{
YDialog * dialog = YUI::widgetFactory()->createDialog( dialogType, colorMode );
@@ -777,7 +777,7 @@
}
unblockEvents();
-
+
return YCPBoolean( ok );
}
@@ -839,11 +839,11 @@
YCPValue YUI::evaluateChangeWidget( const YCPValue & idValue, const YCPValue & property, const YCPValue & newValue )
{
YCPValue ret = YCPVoid();
-
+
try
{
blockEvents(); // We don't want self-generated events from UI::ChangeWidget().
-
+
if ( ! YCPDialogParser::isSymbolOrId( idValue ) )
{
YUI_THROW( YUISyntaxErrorException( string( "Expected `id(...) or `symbol, not " ) +
@@ -930,7 +930,7 @@
YCPValue YUI::evaluateQueryWidget( const YCPValue & idValue, const YCPValue & property )
{
YCPValue ret = YCPVoid();
-
+
try
{
if ( ! YCPDialogParser::isSymbolOrId( idValue ) )
@@ -1002,7 +1002,7 @@
YCPBoolean YUI::evaluateReplaceWidget( const YCPValue & idValue, const YCPTerm & newContentTerm )
{
bool success = true;
-
+
try
{
if ( ! YCPDialogParser::isSymbolOrId( idValue ) )
@@ -1044,11 +1044,11 @@
{
YUI_CAUGHT( exception );
success = false;
-
+
ycperror( "UI::ReplaceWidget() failed: UI::ReplaceWidget( %s, %s )",
idValue->toString().c_str(),
newContentTerm->toString().c_str() );
-
+
}
unblockEvents();
@@ -1063,7 +1063,7 @@
* @short Runs a wizard command
* @description
* Issues a command to a wizard widget with ID 'wizardId'.
- *
+ *
* <b>This builtin is not for general use. Use the Wizard.ycp module instead.</b>
*
* For available wizard commands see file YWizard.cc .
@@ -1685,7 +1685,7 @@
YUI::evaluateAskForExistingDirectory( const YCPString & startDir, const YCPString & headline )
{
string ret = app()->askForExistingDirectory( startDir->value(), headline->value() );
-
+
if ( ret.empty() )
return YCPVoid();
else
@@ -1710,7 +1710,7 @@
YCPValue YUI::evaluateAskForExistingFile( const YCPString & startWith, const YCPString & filter, const YCPString & headline )
{
string ret = app()->askForExistingFile( startWith->value(), filter->value(), headline->value() );
-
+
if ( ret.empty() )
return YCPVoid();
else
@@ -1735,7 +1735,7 @@
YCPValue YUI::evaluateAskForSaveFileName( const YCPString & startWith, const YCPString & filter, const YCPString & headline )
{
string ret = app()->askForSaveFileName( startWith->value(), filter->value(), headline->value() );
-
+
if ( ret.empty() )
return YCPVoid();
else
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org