mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
New function. Update screenshot window when rows are expanded and
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.
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
8b66aa02f8
commit
35de8d36a0
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
||||
18
sysprof.c
18
sysprof.c
@ -1050,7 +1050,7 @@ compute_text_width (GtkTreeView *view,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
int *width = data;
|
||||
int *width = data;
|
||||
char *name;
|
||||
|
||||
get_data (view, iter, &name, NULL, NULL);
|
||||
@ -1094,8 +1094,6 @@ set_monospace (GtkWidget *widget)
|
||||
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)
|
||||
@ -1123,6 +1121,16 @@ update_screenshot_window (Application *app)
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
@ -1434,6 +1442,10 @@ build_gui (Application *app)
|
||||
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));
|
||||
|
||||
Reference in New Issue
Block a user