anjuta r3679 - in trunk: . plugins/valgrind
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r3679 - in trunk: . plugins/valgrind
- Date: Sat, 16 Feb 2008 20:15:16 +0000 (GMT)
Author: jhs
Date: Sat Feb 16 20:15:16 2008
New Revision: 3679
URL: http://svn.gnome.org/viewvc/anjuta?rev=3679&view=rev
Log:
2008-02-16 Johannes Schmid <jhs gnome org>
* plugins/valgrind/plugin.c: (valgrind_activate),
(ipreferences_merge), (ipreferences_unmerge):
* plugins/valgrind/vgactions.c: (vg_actions_run):
* plugins/valgrind/vgdefaultview.c: (valgrind_view_load_log):
Fixed crasher when starting valgrind because of strange prefs handling and
#516641 â Valgrind: Load Log does not clear list
Modified:
trunk/ChangeLog
trunk/plugins/valgrind/plugin.c
trunk/plugins/valgrind/vgactions.c
trunk/plugins/valgrind/vgdefaultview.c
Modified: trunk/plugins/valgrind/plugin.c
==============================================================================
--- trunk/plugins/valgrind/plugin.c (original)
+++ trunk/plugins/valgrind/plugin.c Sat Feb 16 20:15:16 2008
@@ -574,6 +574,10 @@
valgrind_set_busy_status (valgrind, FALSE);
valgrind_update_ui (valgrind);
+ /* Create prefs */
+ valgrind->general_prefs = valgrind_plugin_prefs_get_anj_prefs ();
+ valgrind->val_prefs = valgrind_plugin_prefs_new ();
+
initialized = TRUE;
return TRUE;
}
@@ -650,12 +654,9 @@
GdkPixbuf* pixbuf;
AnjutaValgrindPlugin* valgrind = ANJUTA_PLUGIN_VALGRIND (ipref);
- valgrind->general_prefs = valgrind_plugin_prefs_get_anj_prefs ();
- valgrind->val_prefs = valgrind_plugin_prefs_new ();
-
pixbuf = gdk_pixbuf_new_from_file (PACKAGE_PIXMAPS_DIR"/"ICON_FILE, NULL);
- g_object_ref(valgrind->general_prefs);
+ gtk_widget_show (valgrind->general_prefs);
anjuta_preferences_dialog_add_page (ANJUTA_PREFERENCES_DIALOG (anjuta_preferences_get_dialog (prefs)),
"Valgrind", _("Valgrind"), pixbuf, valgrind->general_prefs);
g_object_unref (pixbuf);
@@ -665,15 +666,10 @@
ipreferences_unmerge(IAnjutaPreferences* ipref, AnjutaPreferences* prefs, GError** e)
{
AnjutaValgrindPlugin* valgrind = ANJUTA_PLUGIN_VALGRIND (ipref);
-
anjuta_preferences_dialog_remove_page(ANJUTA_PREFERENCES_DIALOG (anjuta_preferences_get_dialog (prefs)),
_("Valgrind"));
-
- g_object_unref (valgrind->general_prefs);
- g_object_unref (valgrind->val_prefs);
-
- valgrind->general_prefs = NULL;
- valgrind->val_prefs = NULL;
+ /* Recreate object as it gets destroyed in the remove_page method */
+ valgrind->general_prefs = valgrind_plugin_prefs_get_anj_prefs ();
}
static void
Modified: trunk/plugins/valgrind/vgactions.c
==============================================================================
--- trunk/plugins/valgrind/vgactions.c (original)
+++ trunk/plugins/valgrind/vgactions.c Sat Feb 16 20:15:16 2008
@@ -276,6 +276,7 @@
g_ptr_array_free (args, TRUE);
close (logfd[1]);
+ vg_tool_view_clear(VG_TOOL_VIEW (priv->view));
vg_tool_view_connect (VG_TOOL_VIEW (priv->view), logfd[0]);
priv->gio = g_io_channel_unix_new (logfd[0]);
Modified: trunk/plugins/valgrind/vgdefaultview.c
==============================================================================
--- trunk/plugins/valgrind/vgdefaultview.c (original)
+++ trunk/plugins/valgrind/vgdefaultview.c Sat Feb 16 20:15:16 2008
@@ -674,6 +674,7 @@
if ((fd = open (filename, O_RDONLY)) != -1) {
vg_tool_view_connect (tool, fd);
}
+ valgrind_view_clear(tool);
vg_actions_set_pid (actions, (pid_t)-1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]