Hello community,
here is the log from the commit of package yast2-libyui
checked in at Wed Apr 16 17:38:37 CEST 2008.
--------
--- yast2-libyui/yast2-libyui.changes 2008-04-14 17:12:33.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-libyui/yast2-libyui.changes 2008-04-16 16:37:44.540260000 +0200
@@ -1,0 +2,8 @@
+Wed Apr 16 12:24:44 CEST 2008 - sh@suse.de
+
+- Deleting events is now automatically handled by YDialog.
+ Simply remove all "delete event" calls.
+- Introduced uiThreadDestructor() (bnc #346987)
+- V 2.16.45
+
+-------------------------------------------------------------------
Old:
----
yast2-libyui-2.16.44.tar.bz2
New:
----
yast2-libyui-2.16.45.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-libyui.spec ++++++
--- /var/tmp/diff_new_pack.I13342/_old 2008-04-16 17:38:21.000000000 +0200
+++ /var/tmp/diff_new_pack.I13342/_new 2008-04-16 17:38:21.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-libyui (Version 2.16.44)
+# spec file for package yast2-libyui (Version 2.16.45)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,12 +12,12 @@
Name: yast2-libyui
-Version: 2.16.44
+Version: 2.16.45
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-libyui-2.16.44.tar.bz2
+Source0: yast2-libyui-2.16.45.tar.bz2
Prefix: /usr
Source1: yast2-libyui-rpmlintrc
BuildRequires: gcc-c++
@@ -70,7 +70,7 @@
Stefan Hundhammer
%prep
-%setup -n yast2-libyui-2.16.44
+%setup -n yast2-libyui-2.16.45
%build
%{prefix}/bin/y2tool y2autoconf
@@ -115,7 +115,13 @@
%dir %{_datadir}/cmake/Modules
%{_datadir}/cmake/Modules/*
%doc %{prefix}/share/doc/packages/yast2-libyui
+
%changelog
+* Wed Apr 16 2008 sh@suse.de
+- Deleting events is now automatically handled by YDialog.
+ Simply remove all "delete event" calls.
+- Introduced uiThreadDestructor() (bnc #346987)
+- V 2.16.45
* Mon Apr 14 2008 sh@suse.de
- Added dialog type YWizardDialog for main dialogs that will
contain a wizard (equivalent to YMainDialog if
++++++ yast2-libyui-2.16.44.tar.bz2 -> yast2-libyui-2.16.45.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-libyui-2.16.44/configure new/yast2-libyui-2.16.45/configure
--- old/yast2-libyui-2.16.44/configure 2008-04-09 17:41:08.000000000 +0200
+++ new/yast2-libyui-2.16.45/configure 2008-04-16 15:19:10.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for yast2-libyui 2.16.41.
+# Generated by GNU Autoconf 2.60 for yast2-libyui 2.16.45.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -713,8 +713,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-libyui'
PACKAGE_TARNAME='yast2-libyui'
-PACKAGE_VERSION='2.16.41'
-PACKAGE_STRING='yast2-libyui 2.16.41'
+PACKAGE_VERSION='2.16.45'
+PACKAGE_STRING='yast2-libyui 2.16.45'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1423,7 +1423,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-libyui 2.16.41 to adapt to many kinds of systems.
+\`configure' configures yast2-libyui 2.16.45 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1494,7 +1494,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-libyui 2.16.41:";;
+ short | recursive ) echo "Configuration of yast2-libyui 2.16.45:";;
esac
cat <<\_ACEOF
@@ -1600,7 +1600,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-libyui configure 2.16.41
+yast2-libyui configure 2.16.45
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1614,7 +1614,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-libyui $as_me 2.16.41, which was
+It was created by yast2-libyui $as_me 2.16.45, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -2415,7 +2415,7 @@
# Define the identity of the package.
PACKAGE='yast2-libyui'
- VERSION='2.16.41'
+ VERSION='2.16.45'
cat >>confdefs.h <<_ACEOF
@@ -2643,7 +2643,7 @@
-VERSION="2.16.41"
+VERSION="2.16.45"
RPMNAME="yast2-libyui"
MAINTAINER="Stefan Hundhammer "
@@ -22702,7 +22702,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-libyui $as_me 2.16.41, which was
+This file was extended by yast2-libyui $as_me 2.16.45, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -22755,7 +22755,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-libyui config.status 2.16.41
+yast2-libyui config.status 2.16.45
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-libyui-2.16.44/configure.in new/yast2-libyui-2.16.45/configure.in
--- old/yast2-libyui-2.16.44/configure.in 2008-04-09 17:40:56.000000000 +0200
+++ new/yast2-libyui-2.16.45/configure.in 2008-04-16 15:18:58.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.16.8 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-libyui, 2.16.41, http://bugs.opensuse.org/, yast2-libyui)
+AC_INIT(yast2-libyui, 2.16.45, http://bugs.opensuse.org/, yast2-libyui)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.16.41"
+VERSION="2.16.45"
RPMNAME="yast2-libyui"
MAINTAINER="Stefan Hundhammer "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-libyui-2.16.44/examples/HelloWorld.cc new/yast2-libyui-2.16.45/examples/HelloWorld.cc
--- old/yast2-libyui-2.16.44/examples/HelloWorld.cc 2008-02-21 13:51:53.000000000 +0100
+++ new/yast2-libyui-2.16.45/examples/HelloWorld.cc 2008-04-16 12:10:15.000000000 +0200
@@ -17,8 +17,6 @@
YUI::widgetFactory()->createLabel ( vbox, "Hello, World!" );
YUI::widgetFactory()->createPushButton( vbox, "&OK" );
- YEvent * event = dialog->waitForEvent();
- delete event;
-
+ dialog->waitForEvent();
dialog->destroy();
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-libyui-2.16.44/examples/SelectionBox1.cc new/yast2-libyui-2.16.45/examples/SelectionBox1.cc
--- old/yast2-libyui-2.16.44/examples/SelectionBox1.cc 2008-04-04 14:05:51.000000000 +0200
+++ new/yast2-libyui-2.16.45/examples/SelectionBox1.cc 2008-04-16 12:10:34.000000000 +0200
@@ -83,14 +83,6 @@
else
valueField->setValue( "<none>" );
}
-
-
- // YDialog::waitForEvent() allocates a new YEvent and transfers
- // ownership of the event to the caller, so the caller has to make
- // sure the memory for the event is deallocated after use.
- // Otherwise there will be a memory leak.
-
- delete event;
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-libyui-2.16.44/examples/SelectionBox2.cc new/yast2-libyui-2.16.45/examples/SelectionBox2.cc
--- old/yast2-libyui-2.16.44/examples/SelectionBox2.cc 2008-03-20 20:14:44.000000000 +0100
+++ new/yast2-libyui-2.16.45/examples/SelectionBox2.cc 2008-04-16 12:10:56.000000000 +0200
@@ -66,7 +66,7 @@
// depends on other widgets in the layout.
YAlignment * minSize = YUI::widgetFactory()->createMinSize( vbox, 40, 8 ); // minWidth, minHeight
-
+
// The SelectionBox. This is what this example all about.
// The other widgets are just here to allow some experimenting.
@@ -84,7 +84,7 @@
YUI::widgetFactory()->createVSpacing( vbox, 0.5 );
-
+
// Check boxes to allow toogling "notify" and "immediate" for the SelectionBox
YAlignment * leftAlignment = YUI::widgetFactory()->createLeft( vbox );
@@ -109,7 +109,7 @@
YUI::widgetFactory()->createVSpacing( vbox, 0.7 );
-
+
// "Close" button
YAlignment * rightAlignment = YUI::widgetFactory()->createRight( vbox );
@@ -188,14 +188,6 @@
valueField->setValue( "<none>" );
}
}
-
-
- // YDialog::waitForEvent() allocates a new YEvent and transfers
- // ownership of the event to the caller, so the caller has to make
- // sure the memory for the event is deallocated after use.
- // Otherwise there will be a memory leak.
-
- delete event;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-libyui-2.16.44/src/YDialog.cc new/yast2-libyui-2.16.45/src/YDialog.cc
--- old/yast2-libyui-2.16.44/src/YDialog.cc 2008-04-14 16:58:03.000000000 +0200
+++ new/yast2-libyui-2.16.45/src/YDialog.cc 2008-04-16 14:27:39.000000000 +0200
@@ -21,6 +21,7 @@
#include "YUILog.h"
#include "YDialog.h"
+#include "YEvent.h"
#include "YShortcutManager.h"
#include "YPushButton.h"
@@ -48,6 +49,7 @@
, shortcutCheckPostponed( false )
, defaultButton( 0 )
, isOpen( false )
+ , lastEvent( 0 )
{}
YDialogType dialogType;
@@ -55,6 +57,7 @@
bool shortcutCheckPostponed;
YPushButton * defaultButton;
bool isOpen;
+ YEvent * lastEvent;
};
@@ -79,6 +82,9 @@
yuiDebug() << "Destroying " << this << endl;
#endif
+ if ( priv->lastEvent )
+ deleteEvent( priv->lastEvent );
+
if ( ! _dialogStack.empty() && _dialogStack.top() == this )
{
_dialogStack.pop();
@@ -163,7 +169,7 @@
case YPopupDialog: return false;
// Intentionally omitting the 'default' case so the compiler can
- // catch unhandled enum values
+ // catch unhandled enum values
}
/*NOTREACHED*/
@@ -272,6 +278,9 @@
checkShortcuts( true );
}
+ if ( priv->lastEvent )
+ deleteEvent( priv->lastEvent );
+
YEvent * event = 0;
do
@@ -308,7 +317,7 @@
// Don't return the event from this help button -
// get back into event loop
- delete event;
+ deleteEvent( event );
event = 0;
yuiMilestone() << "Help dialog closed" << endl;
@@ -323,6 +332,8 @@
} while ( ! event );
+ priv->lastEvent = event;
+
return event;
}
@@ -337,6 +348,7 @@
open();
YEvent * event = filterInvalidEvents( pollEventInternal() );
+ priv->lastEvent = event;
// Nevermind if filterInvalidEvents() discarded an invalid event.
// pollInput() is normally called very often (in a loop), and most of the
@@ -369,7 +381,7 @@
// yuiDebug() << "Discarding event for widget that has become invalid" << endl;
- delete widgetEvent;
+ deleteEvent( widgetEvent );
return 0;
}
@@ -401,7 +413,7 @@
activate(); // try to force this dialog to the foreground
- delete widgetEvent;
+ deleteEvent( widgetEvent );
return 0;
}
@@ -411,6 +423,18 @@
}
+void
+YDialog::deleteEvent( YEvent * event )
+{
+ if ( event == priv->lastEvent )
+ priv->lastEvent = 0;
+
+ if ( event )
+ delete event;
+}
+
+
+
@@ -496,10 +520,7 @@
YPushButton * okButton = YUI::widgetFactory()->createPushButton( vbox, "&OK" );
okButton->setDefaultButton();
- YEvent * event = dialog->waitForEvent();
-
- if ( event )
- delete event;
+ dialog->waitForEvent();
dialog->destroy();
}
catch ( YUIException exception )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-libyui-2.16.44/src/YDialog.h new/yast2-libyui-2.16.45/src/YDialog.h
--- old/yast2-libyui-2.16.44/src/YDialog.h 2008-04-14 17:05:53.000000000 +0200
+++ new/yast2-libyui-2.16.45/src/YDialog.h 2008-04-16 12:09:28.000000000 +0200
@@ -21,12 +21,12 @@
#define YDialog_h
#include "YSingleChildContainerWidget.h"
-#include "YEvent.h"
#include <stack>
class YShortcutManager;
class YPushButton;
class YDialogPrivate;
+class YEvent;
// See YTypes.h for enum YDialogType and enum YDialogColorMode
@@ -92,8 +92,10 @@
* If open() has not been called for this dialog until now,
* it is called now.
*
- * Ownership of the event is transferred to the caller, i.e. the caller is
- * responsible for deleting it after use.
+ * The dialog retains ownership of the event and will delete it upon the
+ * next call to waitForEvent() or pollEvent() or when the dialog is
+ * deleted. This also means that the return value of this function can
+ * safely be ignored without fear of memory leaks.
*
* If this dialog is not the topmost dialog, an exception is thrown.
**/
@@ -106,11 +108,13 @@
* If open() has not been called for this dialog until now,
* it is called now.
*
- * Ownership of the event is transferred to the caller, i.e. the caller is
- * responsible for deleting it after use.
+ * The dialog retains ownership of the event and will delete it upon the
+ * next call to waitForEvent() or pollEvent() or when the dialog is
+ * deleted. This also means that the return value of this function can
+ * safely be ignored without fear of memory leaks.
*
* If this dialog is not the topmost dialog, an exception is thrown.
- **/
+ **/
YEvent * pollEvent();
/**
@@ -204,7 +208,7 @@
/**
* Return 'true' if this dialog is a dialog of main dialog size:
- * YMainDialog or YWizardDialog.
+ * YMainDialog or YWizardDialog.
**/
bool isMainDialog();
@@ -243,6 +247,11 @@
YPushButton * defaultButton() const;
/**
+ * Delete an event.
+ **/
+ void deleteEvent( YEvent * event );
+
+ /**
* Set this dialog's default button (the button that is activated when
* the user hits [Return] anywhere in this dialog). 0 means no default
* button.
@@ -287,7 +296,7 @@
* Derived classes are required to implement this.
**/
virtual YEvent * waitForEventInternal( int timeout_millisec ) = 0;
-
+
/**
* Check if a user event is pending. If there is one, return it.
* If there is none, do not wait for one - return 0.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-libyui-2.16.44/src/YEvent.cc new/yast2-libyui-2.16.45/src/YEvent.cc
--- old/yast2-libyui-2.16.44/src/YEvent.cc 2008-02-21 13:58:30.000000000 +0100
+++ new/yast2-libyui-2.16.45/src/YEvent.cc 2008-04-16 11:31:36.000000000 +0200
@@ -23,6 +23,7 @@
#include "YWidget.h"
#include "YEvent.h"
+#include "YDialog.h"
using std::string;
@@ -34,6 +35,7 @@
YEvent::YEvent( EventType eventType )
: _eventType( eventType )
{
+ _dialog = YDialog::currentDialog( false ); // don't throw
_serial = _nextSerial++;
if ( ++_activeEvents > 3 )
@@ -102,6 +104,8 @@
, _widget( widget )
, _reason( reason )
{
+ if ( widget )
+ setDialog( widget->findDialog() );
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-libyui-2.16.44/src/YEvent.h new/yast2-libyui-2.16.45/src/YEvent.h
--- old/yast2-libyui-2.16.44/src/YEvent.h 2008-03-20 20:13:23.000000000 +0100
+++ new/yast2-libyui-2.16.45/src/YEvent.h 2008-04-16 12:07:32.000000000 +0200
@@ -21,10 +21,13 @@
#include <string>
+#include "YDialog.h"
+#include "YSimpleEventHandler.h"
using std::string;
class YWidget;
class YItem;
+class YDialog;
/**
@@ -63,12 +66,6 @@
YEvent( EventType eventType = UnknownEvent );
/**
- * Virtual desctructor to force a polymorph object
- * so dynamic_cast<> can be used.
- **/
- virtual ~YEvent();
-
- /**
* Returns the event type.
**/
EventType eventType() const { return _eventType; }
@@ -95,7 +92,11 @@
**/
virtual YItem * item() const { return 0; }
-
+ /**
+ * Return the dialog this event belongs to or 0 if no dialog was set yet.
+ **/
+ YDialog * dialog() const { return _dialog; }
+
/**
* Returns the character representation of an event type.
**/
@@ -108,9 +109,35 @@
protected:
+
+ /**
+ * Set the dialog this event belongs to.
+ **/
+ void setDialog( YDialog * dia ) { _dialog = dia; }
+
+ /**
+ * Protected destructor - events can only be deleted via
+ * YDialog::deleteEvent(). The associated dialog will take care of this
+ * event and delete it when appropriate.
+ *
+ * This desctructor is virtual to force a polymorph object
+ * so dynamic_cast<> can be used.
+ **/
+ virtual ~YEvent();
+
+private:
+
+ friend void YDialog::deleteEvent( YEvent * event );
+ friend void YSimpleEventHandler::deleteEvent( YEvent * event );
+
+
+ //
+ // Data members
+ //
EventType _eventType;
unsigned long _serial;
+ YDialog * _dialog;
static unsigned long _nextSerial;
static int _activeEvents;
@@ -142,6 +169,18 @@
protected:
+ /**
+ * Protected destructor - events can only be deleted via
+ * YDialog::deleteEvent(). The associated dialog will take care of this
+ * event and delete it when appropriate.
+ **/
+ virtual ~YWidgetEvent() {}
+
+
+ //
+ // Data members
+ //
+
YWidget * _widget;
EventReason _reason;
};
@@ -176,6 +215,18 @@
YWidget * focusWidget() const { return _focusWidget; }
protected:
+
+ /**
+ * Protected destructor - events can only be deleted via
+ * YDialog::deleteEvent(). The associated dialog will take care of this
+ * event and delete it when appropriate.
+ **/
+ virtual ~YKeyEvent() {}
+
+
+ //
+ // Data members
+ //
string _keySymbol;
YWidget * _focusWidget;
@@ -212,6 +263,18 @@
string id() const { return _id; }
protected:
+
+ /**
+ * Protected destructor - events can only be deleted via
+ * YDialog::deleteEvent(). The associated dialog will take care of this
+ * event and delete it when appropriate.
+ **/
+ virtual ~YMenuEvent() {}
+
+
+ //
+ // Data members
+ //
YItem * _item;
string _id;
@@ -227,6 +290,15 @@
public:
YCancelEvent() : YEvent( CancelEvent ) {}
+
+
+protected:
+ /**
+ * Protected destructor - events can only be deleted via
+ * YDialog::deleteEvent(). The associated dialog will take care of this
+ * event and delete it when appropriate.
+ **/
+ virtual ~YCancelEvent() {}
};
@@ -239,6 +311,14 @@
public:
YDebugEvent() : YEvent( DebugEvent ) {}
+
+protected:
+ /**
+ * Protected destructor - events can only be deleted via
+ * YDialog::deleteEvent(). The associated dialog will take care of this
+ * event and delete it when appropriate.
+ **/
+ virtual ~YDebugEvent() {}
};
@@ -251,6 +331,14 @@
public:
YTimeoutEvent() : YEvent( TimeoutEvent ) {}
+
+protected:
+ /**
+ * Protected destructor - events can only be deleted via
+ * YDialog::deleteEvent(). The associated dialog will take care of this
+ * event and delete it when appropriate.
+ **/
+ virtual ~YTimeoutEvent() {}
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-libyui-2.16.44/src/YSimpleEventHandler.cc new/yast2-libyui-2.16.45/src/YSimpleEventHandler.cc
--- old/yast2-libyui-2.16.44/src/YSimpleEventHandler.cc 2008-02-21 13:58:30.000000000 +0100
+++ new/yast2-libyui-2.16.45/src/YSimpleEventHandler.cc 2008-04-16 12:07:49.000000000 +0200
@@ -50,7 +50,7 @@
#if VERBOSE_EVENTS
yuiDebug() << "Clearing pending event: " << YEvent::toString( _pendingEvent->eventType() ) << endl;
#endif
- delete _pendingEvent;
+ deleteEvent( _pendingEvent );
}
}
@@ -79,7 +79,7 @@
#endif
// Avoid memory leak: The event handler assumes ownership of the newly
// created event, so we have to clean it up here.
- delete event;
+ deleteEvent( event );
return;
}
@@ -96,7 +96,7 @@
* processed) by the generic UI.
**/
- delete _pendingEvent;
+ deleteEvent( _pendingEvent );
}
#if VERBOSE_EVENTS
@@ -128,3 +128,13 @@
_eventsBlocked = block;
}
+
+
+void YSimpleEventHandler::deleteEvent( YEvent * event )
+{
+ if ( event == _pendingEvent )
+ _pendingEvent = 0;
+
+ if ( event )
+ delete event;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-libyui-2.16.44/src/YSimpleEventHandler.h new/yast2-libyui-2.16.45/src/YSimpleEventHandler.h
--- old/yast2-libyui-2.16.44/src/YSimpleEventHandler.h 2008-02-21 13:58:30.000000000 +0100
+++ new/yast2-libyui-2.16.45/src/YSimpleEventHandler.h 2008-04-16 12:05:01.000000000 +0200
@@ -108,6 +108,12 @@
**/
bool eventsBlocked() const { return _eventsBlocked; }
+ /**
+ * Delete an event. Don't call this from the outside; this is public only
+ * because of limitations of C++ .
+ **/
+ void deleteEvent( YEvent * event );
+
protected:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-libyui-2.16.44/src/YUI.cc new/yast2-libyui-2.16.45/src/YUI.cc
--- old/yast2-libyui-2.16.44/src/YUI.cc 2008-03-20 20:05:40.000000000 +0100
+++ new/yast2-libyui-2.16.45/src/YUI.cc 2008-04-16 14:13:28.000000000 +0200
@@ -81,6 +81,13 @@
}
+void
+YUI::uiThreadDestructor()
+{
+ YDialog::deleteAllDialogs();
+}
+
+
YUI *
YUI::ui()
{
@@ -330,6 +337,7 @@
if ( _terminate_ui_thread )
{
+ uiThreadDestructor();
signalYCPThread();
yuiDebug() << "Shutting down UI main loop" << endl;
return;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-libyui-2.16.44/src/YUI.h new/yast2-libyui-2.16.45/src/YUI.h
--- old/yast2-libyui-2.16.44/src/YUI.h 2008-03-05 17:00:20.000000000 +0100
+++ new/yast2-libyui-2.16.45/src/YUI.h 2008-04-16 13:58:48.000000000 +0200
@@ -205,6 +205,11 @@
* UI-specific runPkgSelection method.
*
* Derived classes are required to implement this.
+ *
+ * The packageSelector's dialog will take care of the event and delete it
+ * when appropriate. The returned pointer is valid until the next call to
+ * YDialog::userInput(), YDialog::pollInput(), or YUI::runPkgSelection() or
+ * until the dialog with the packageSelector is destroyed.
**/
virtual YEvent * runPkgSelection( YWidget * packageSelector ) = 0;
@@ -240,6 +245,15 @@
friend void *start_ui_thread( void *ui_int );
/**
+ * Destructor for the UI thread. This will be called as the last thing the
+ * UI thread does.
+ *
+ * Derived classes can overwrite this. In most cases it makes sense to call
+ * this base class method in the new implementation.
+ **/
+ virtual void uiThreadDestructor();
+
+ /**
* Signals the ui thread by sending one byte through the pipe
* to it.
**/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-libyui-2.16.44/VERSION new/yast2-libyui-2.16.45/VERSION
--- old/yast2-libyui-2.16.44/VERSION 2008-04-14 15:04:19.000000000 +0200
+++ new/yast2-libyui-2.16.45/VERSION 2008-04-16 12:22:07.000000000 +0200
@@ -1 +1 @@
-2.16.44
+2.16.45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org