+2005-11-29 Soeren Sandmann <sandmann@redhat.com>
+
+ * sysprof.c (on_descendants_row_expanded_or_collapsed): New
+ function. Update screenshot window when rows are expanded and
+ collapsed.
+
2005-11-23 Soeren Sandmann <sandmann@redhat.com>
* sysprof.c (update_screenshot_window): Update the screenshot
GtkTreeIter *iter,
gpointer data)
{
- int *width = data;
+ int *width = data;
char *name;
get_data (view, iter, &name, NULL, NULL);
static void
update_screenshot_window (Application *app)
{
- typedef gboolean (* GtkTreeModelForeachFunc) (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data);
-
/* FIXME: clear the text buffer here */
if (app->descendants)
}
static void
+on_descendants_row_expanded_or_collapsed (GtkTreeView *tree,
+ GtkTreeIter *iter,
+ GtkTreePath *path,
+ Application *app)
+{
+ update_screenshot_window (app);
+}
+
+
+static void
on_object_selection_changed (GtkTreeSelection *selection,
gpointer data)
{
add_double_format_column (app->descendants_view, _("Cumulative"), DESCENDANTS_NON_RECURSE, "%.2f ");
g_signal_connect (app->descendants_view, "row-activated",
G_CALLBACK (on_descendants_row_activated), app);
+ g_signal_connect (app->descendants_view, "row_expanded",
+ G_CALLBACK (on_descendants_row_expanded_or_collapsed), app);
+ g_signal_connect (app->descendants_view, "row_collapsed",
+ G_CALLBACK (on_descendants_row_expanded_or_collapsed), app);
gtk_tree_view_column_set_expand (col, TRUE);
gtk_widget_grab_focus (GTK_WIDGET (app->object_view));