anjuta r4248 - in trunk: . libanjuta
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4248 - in trunk: . libanjuta
- Date: Thu, 11 Sep 2008 21:18:00 +0000 (UTC)
Author: jhs
Date: Thu Sep 11 21:18:00 2008
New Revision: 4248
URL: http://svn.gnome.org/viewvc/anjuta?rev=4248&view=rev
Log:
2008-09-10 Rob Bradford <rob robster org uk>
* libanjuta/anjuta-status.c (anjuta_status_dispose),
anjuta_status_instance_init), (anjuta_status_progress_add_ticks):
Fix #529468: Use weak pointers to avoid acting on widgets that have
been destroyed.
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/libanjuta/anjuta-status.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Thu Sep 11 21:18:00 2008
@@ -963,11 +963,11 @@
if test -n "$SVN_INCLUDE" ; then
SVN_INCLUDE="-I$SVN_INCLUDE"
if test x != "x$SVN_LIB" ; then
- SVN_LIB="-L$SVN_LIB $APR_LIBS -lsvn_client-1 -lsvn_subr-1"
+ SVN_LIB="-L$SVN_LIB $APR_LIBS $NEON_LIBS -lsvn_client-1 -lsvn_subr-1"
else
- SVN_LIB="$APR_LIBS -lsvn_client-1 -lsvn_subr-1"
+ SVN_LIB="$APR_LIBS $NEON_LIBS -lsvn_client-1 -lsvn_subr-1"
fi
- SVN_CFLAGS="$APR_CFLAGS"
+ SVN_CFLAGS="$APR_CFLAGS $NEON_CFLAGS"
fi
AM_CONDITIONAL(BUILD_SVN, [test -n "$SVN_INCLUDE"])
Modified: trunk/libanjuta/anjuta-status.c
==============================================================================
--- trunk/libanjuta/anjuta-status.c (original)
+++ trunk/libanjuta/anjuta-status.c Thu Sep 11 21:18:00 2008
@@ -125,6 +125,21 @@
(gpointer*)(gpointer)&status->priv->window);
status->priv->window = NULL;
}
+ if (status->priv->progress_bar)
+ {
+ g_object_remove_weak_pointer (G_OBJECT (status->priv->progress_bar),
+ (gpointer)&status->priv->progress_bar);
+ gtk_widget_destroy (status->priv->progress_bar);
+ status->priv->progress_bar = NULL;
+ }
+ if (status->priv->status_bar)
+ {
+ g_object_remove_weak_pointer (G_OBJECT (status->priv->status_bar),
+ (gpointer)&status->priv->status_bar);
+ gtk_widget_destroy (status->priv->status_bar);
+ status->priv->status_bar = NULL;
+ }
+
G_OBJECT_CLASS (parent_class)->dispose (widget);
}
@@ -135,9 +150,13 @@
status->priv->progress_bar = gtk_progress_bar_new ();
gtk_box_pack_start (GTK_BOX (status), status->priv->progress_bar, FALSE, TRUE, 0);
gtk_widget_show (status->priv->progress_bar);
+ g_object_add_weak_pointer (G_OBJECT (status->priv->progress_bar),
+ (gpointer)&status->priv->progress_bar);
status->priv->status_bar = gtk_statusbar_new ();
gtk_box_pack_start (GTK_BOX (status), status->priv->status_bar, TRUE, TRUE, 0);
gtk_widget_show (status->priv->status_bar);
+ g_object_add_weak_pointer (G_OBJECT(status->priv->status_bar),
+ (gpointer)&status->priv->status_bar);
status->priv->status_message = gtk_statusbar_get_context_id (GTK_STATUSBAR (status->priv->status_bar),
"status-message");
status->priv->push_message = gtk_statusbar_get_context_id (GTK_STATUSBAR (status->priv->status_bar),
@@ -438,16 +457,19 @@
}
else
{
- gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (status->priv->progress_bar),
- percentage);
- gtk_widget_queue_draw (GTK_WIDGET (status->priv->status_bar));
- gtk_widget_queue_draw (GTK_WIDGET (status->priv->progress_bar));
- if (GTK_WIDGET(status->priv->progress_bar)->window != NULL &&
- GDK_IS_WINDOW(GTK_WIDGET(status->priv->progress_bar)->window))
- gdk_window_process_updates (GTK_WIDGET(status->priv->progress_bar)->window, TRUE);
- if (GTK_WIDGET(status->priv->status_bar)->window != NULL &&
- GDK_IS_WINDOW(GTK_WIDGET(status->priv->status_bar)->window))
- gdk_window_process_updates (GTK_WIDGET(status->priv->status_bar)->window, TRUE);
+ if (status->priv->progress_bar && status->priv->status_bar)
+ {
+ gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (status->priv->progress_bar),
+ percentage);
+ gtk_widget_queue_draw (GTK_WIDGET (status->priv->status_bar));
+ gtk_widget_queue_draw (GTK_WIDGET (status->priv->progress_bar));
+ if (GTK_WIDGET(status->priv->progress_bar)->window != NULL &&
+ GDK_IS_WINDOW(GTK_WIDGET(status->priv->progress_bar)->window))
+ gdk_window_process_updates (GTK_WIDGET(status->priv->progress_bar)->window, TRUE);
+ if (GTK_WIDGET(status->priv->status_bar)->window != NULL &&
+ GDK_IS_WINDOW(GTK_WIDGET(status->priv->status_bar)->window))
+ gdk_window_process_updates (GTK_WIDGET(status->priv->status_bar)->window, TRUE);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]