#include "control-data.h"
GtkMathViewControlData*
-gtk_math_view_control_data_new(GtkMathView *math_view)
+gtk_math_view_control_data_new(BonoboControl* control, GtkMathView *math_view)
{
GtkMathViewControlData *cd = g_new(GtkMathViewControlData,1);
+ cd->control = control; /* we don't ref the control this is a weak pointer */
cd->math_view = math_view;
gtk_widget_ref(GTK_WIDGET(math_view));
cd->item_factory = NULL;
gtk_math_view_control_data_destroy(GtkMathViewControlData* cd)
{
GdomeException exc = 0;
+ cd->control = NULL; /* don't unref the control, see above */
gtk_widget_unref(GTK_WIDGET(cd->math_view));
cd->math_view = NULL;
if (cd->item_factory != NULL)