[yast-commit] r38504 - in /branches/tmp/sh/mod-ui/core/libyui/src: ChangeLog YReplacePoint.cc YReplacePoint.h YUI.h YUI_builtins.cc YUI_widgets.cc YWidget.cc YWidget.h
![](https://seccdn.libravatar.org/avatar/d788d4d6ea7d5ed777eaa8feaaa2c1d8.jpg?s=120&d=mm&r=g)
Author: sh-sh-sh
Date: Mon Jun 18 14:52:03 2007
New Revision: 38504
URL: http://svn.opensuse.org/viewcvs/yast?rev=38504&view=rev
Log:
migrated ReplacePoint
Modified:
branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog
branches/tmp/sh/mod-ui/core/libyui/src/YReplacePoint.cc
branches/tmp/sh/mod-ui/core/libyui/src/YReplacePoint.h
branches/tmp/sh/mod-ui/core/libyui/src/YUI.h
branches/tmp/sh/mod-ui/core/libyui/src/YUI_builtins.cc
branches/tmp/sh/mod-ui/core/libyui/src/YUI_widgets.cc
branches/tmp/sh/mod-ui/core/libyui/src/YWidget.cc
branches/tmp/sh/mod-ui/core/libyui/src/YWidget.h
Modified: branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog?rev=38504&r1=38503&r2=38504&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/ChangeLog Mon Jun 18 14:52:03 2007
@@ -91,3 +91,11 @@
* label is now std::string , no longer YCPString
+* YReplacePoint:
+
+ * now derived from YSingleChildContainerWidget
+ * removed YWidget::isReplacePoint() / YReplacePoint::isReplacePoint()
+ * no more YContainerWidget::childAdded(),
+ reimplement YWidget::addChild() instead
+ (but remember to call YWidget::addChild() in that reimplemented function)
+
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YReplacePoint.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YReplacePoint.cc?rev=38504&r1=38503&r2=38504&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YReplacePoint.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YReplacePoint.cc Mon Jun 18 14:52:03 2007
@@ -19,14 +19,9 @@
#include "YReplacePoint.h"
-YReplacePoint::YReplacePoint( const YWidgetOpt & opt )
- : YContainerWidget( opt )
+YReplacePoint::YReplacePoint( YWidget * parent )
+ : YSingleChildContainerWidget( parent )
{
// NOP
}
-bool YReplacePoint::isReplacePoint() const
-{
- return true;
-}
-
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YReplacePoint.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YReplacePoint.h?rev=38504&r1=38503&r2=38504&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YReplacePoint.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YReplacePoint.h Mon Jun 18 14:52:03 2007
@@ -19,29 +19,21 @@
#ifndef YReplacePoint_h
#define YReplacePoint_h
-#include "YContainerWidget.h"
+#include "YSingleChildContainerWidget.h"
-/**
- * @short Implementation of the ReplacePoint widget.
- */
-class YReplacePoint : public YContainerWidget
+class YReplacePoint : public YSingleChildContainerWidget
{
public:
/**
* Constructor
- */
- YReplacePoint( const YWidgetOpt & opt );
+ **/
+ YReplacePoint( YWidget * parent );
/**
* Returns a descriptive name of this widget class for logging,
* debugging etc.
- */
+ **/
virtual const char * widgetClass() { return "YReplacePoint"; }
-
- /**
- * Inherited from YWidget. Returns true.
- */
- bool isReplacePoint() const;
};
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YUI.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YUI.h?rev=38504&r1=38503&r2=38504&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YUI.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YUI.h Mon Jun 18 14:52:03 2007
@@ -499,11 +499,6 @@
virtual YDialog *createDialog( YWidgetOpt & opt ) = 0;
/**
- * Creates a replace point.
- */
- virtual YContainerWidget *createReplacePoint( YWidget *parent, YWidgetOpt & opt ) = 0;
-
- /**
* Creates a squash widget
*/
virtual YContainerWidget *createSquash( YWidget *parent, YWidgetOpt & opt, bool hsquash, bool vsquash ) = 0;
@@ -1084,13 +1079,8 @@
/**
- * Helper function of createWidgetTree. Creates a replace point
- * @param parent the widget or dialog this widget is contained in
- * @param term The term specifying the widget, e.g. `ReplacePoint( `PushButton( "OK" ) )
- * @param optList The list of widget options( as specified with `opt( ... ) )
- * @param argnr the index of the first non-id and non-opt argument( 0, 1 or 2 )
- * @param rbg Pointer to the current radio button group
- */
+ * Helper function of createWidgetTree. Creates a replace point.
+ **/
YWidget *createReplacePoint( YWidget *parent, YWidgetOpt & opt,
const YCPTerm & term, const YCPList & optList, int argnr );
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YUI_builtins.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src/YUI_builtins.cc?rev=38504&r1=38503&r2=38504&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YUI_builtins.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YUI_builtins.cc Mon Jun 18 14:52:03 2007
@@ -1031,19 +1031,18 @@
}
YCPValue id = getId( id_value );
- YWidget *replacePoint = widgetWithId( id, true ); // reports error
- if ( ! replacePoint ) return YCPBoolean( false );
+ YWidget * widget = widgetWithId( id, true ); // reports error
+ if ( ! widget ) return YCPBoolean( false );
+
+ YReplacePoint * replacePoint = dynamic_cast
participants (1)
-
sh-sh-sh@svn.opensuse.org