mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-07 13:40:57 +00:00
Right justify numbers
Thu Mar 31 21:18:13 2005 Søren Sandmann <sandmann@redhat.com> * treeviewutils.c (add_double_format_column): Right justify numbers * sysprof.c (build_gui): Add a space after the numbers * sysprof.c (on_callers_row_activated): Focus object view * sysprof.c (on_descendants_row_activated): Focus new descendants tree.
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
39162c394a
commit
5f280920c5
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
Thu Mar 31 21:18:13 2005 Søren Sandmann <sandmann@redhat.com>
|
||||||
|
|
||||||
|
* treeviewutils.c (add_double_format_column): Right justify numbers
|
||||||
|
|
||||||
|
* sysprof.c (build_gui): Add a space after the numbers
|
||||||
|
|
||||||
|
* sysprof.c (on_callers_row_activated): Focus object view
|
||||||
|
|
||||||
|
* sysprof.c (on_descendants_row_activated): Focus new descendants
|
||||||
|
tree.
|
||||||
|
|
||||||
Thu Mar 31 19:51:51 2005 Søren Sandmann <sandmann@redhat.com>
|
Thu Mar 31 19:51:51 2005 Søren Sandmann <sandmann@redhat.com>
|
||||||
|
|
||||||
* sysprof-module.c (do_generate): Walk all threads, not just all
|
* sysprof-module.c (do_generate): Walk all threads, not just all
|
||||||
|
|||||||
1
TODO
1
TODO
@ -20,6 +20,7 @@ Before 1.0:
|
|||||||
- give profiles on the command line
|
- give profiles on the command line
|
||||||
- autoconfuscate?
|
- autoconfuscate?
|
||||||
- .desktop file
|
- .desktop file
|
||||||
|
- Consider expanding a few more levels of a new descendants tree
|
||||||
|
|
||||||
Before 1.2:
|
Before 1.2:
|
||||||
|
|
||||||
|
|||||||
28
sysprof.c
28
sysprof.c
@ -944,8 +944,6 @@ really_goto_object (Application *app, ProfileObject *object)
|
|||||||
|
|
||||||
gtk_tree_view_set_cursor (app->object_view, path, 0, FALSE);
|
gtk_tree_view_set_cursor (app->object_view, path, 0, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_widget_grab_focus (GTK_WIDGET (app->object_view));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -976,7 +974,11 @@ on_descendants_row_activated (GtkTreeView *tree_view,
|
|||||||
GtkTreeViewColumn *column,
|
GtkTreeViewColumn *column,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
goto_object (data, tree_view, path, DESCENDANTS_OBJECT);
|
Application *app = data;
|
||||||
|
|
||||||
|
goto_object (app, tree_view, path, DESCENDANTS_OBJECT);
|
||||||
|
|
||||||
|
gtk_widget_grab_focus (GTK_WIDGET (app->descendants_view));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -985,7 +987,11 @@ on_callers_row_activated (GtkTreeView *tree_view,
|
|||||||
GtkTreeViewColumn *column,
|
GtkTreeViewColumn *column,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
goto_object (data, tree_view, path, CALLERS_OBJECT);
|
Application *app = data;
|
||||||
|
|
||||||
|
goto_object (app, tree_view, path, CALLERS_OBJECT);
|
||||||
|
|
||||||
|
gtk_widget_grab_focus (GTK_WIDGET (app->object_view));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1108,9 +1114,9 @@ build_gui (Application *app)
|
|||||||
|
|
||||||
/* object view */
|
/* object view */
|
||||||
app->object_view = (GtkTreeView *)glade_xml_get_widget (xml, "object_view");
|
app->object_view = (GtkTreeView *)glade_xml_get_widget (xml, "object_view");
|
||||||
col = add_plain_text_column (app->object_view, _("Functions"), OBJECT_NAME);
|
% col = add_plain_text_column (app->object_view, _("Functions"), OBJECT_NAME);
|
||||||
add_double_format_column (app->object_view, _("Self"), OBJECT_SELF, "%.2f");
|
add_double_format_column (app->object_view, _("Self"), OBJECT_SELF, "%.2f ");
|
||||||
add_double_format_column (app->object_view, _("Total"), OBJECT_TOTAL, "%.2f");
|
add_double_format_column (app->object_view, _("Total"), OBJECT_TOTAL, "%.2f ");
|
||||||
selection = gtk_tree_view_get_selection (app->object_view);
|
selection = gtk_tree_view_get_selection (app->object_view);
|
||||||
g_signal_connect (selection, "changed", G_CALLBACK (on_object_selection_changed), app);
|
g_signal_connect (selection, "changed", G_CALLBACK (on_object_selection_changed), app);
|
||||||
|
|
||||||
@ -1119,8 +1125,8 @@ build_gui (Application *app)
|
|||||||
/* callers view */
|
/* callers view */
|
||||||
app->callers_view = (GtkTreeView *)glade_xml_get_widget (xml, "callers_view");
|
app->callers_view = (GtkTreeView *)glade_xml_get_widget (xml, "callers_view");
|
||||||
col = add_plain_text_column (app->callers_view, _("Callers"), CALLERS_NAME);
|
col = add_plain_text_column (app->callers_view, _("Callers"), CALLERS_NAME);
|
||||||
add_double_format_column (app->callers_view, _("Self"), CALLERS_SELF, "%.2f");
|
add_double_format_column (app->callers_view, _("Self"), CALLERS_SELF, "%.2f ");
|
||||||
add_double_format_column (app->callers_view, _("Total"), CALLERS_TOTAL, "%.2f");
|
add_double_format_column (app->callers_view, _("Total"), CALLERS_TOTAL, "%.2f ");
|
||||||
g_signal_connect (app->callers_view, "row-activated",
|
g_signal_connect (app->callers_view, "row-activated",
|
||||||
G_CALLBACK (on_callers_row_activated), app);
|
G_CALLBACK (on_callers_row_activated), app);
|
||||||
|
|
||||||
@ -1129,8 +1135,8 @@ build_gui (Application *app)
|
|||||||
/* descendants view */
|
/* descendants view */
|
||||||
app->descendants_view = (GtkTreeView *)glade_xml_get_widget (xml, "descendants_view");
|
app->descendants_view = (GtkTreeView *)glade_xml_get_widget (xml, "descendants_view");
|
||||||
col = add_plain_text_column (app->descendants_view, _("Descendants"), DESCENDANTS_NAME);
|
col = add_plain_text_column (app->descendants_view, _("Descendants"), DESCENDANTS_NAME);
|
||||||
add_double_format_column (app->descendants_view, _("Self"), DESCENDANTS_SELF, "%.2f");
|
add_double_format_column (app->descendants_view, _("Self"), DESCENDANTS_SELF, "%.2f ");
|
||||||
add_double_format_column (app->descendants_view, _("Cumulative"), DESCENDANTS_NON_RECURSE, "%.2f");
|
add_double_format_column (app->descendants_view, _("Cumulative"), DESCENDANTS_NON_RECURSE, "%.2f ");
|
||||||
g_signal_connect (app->descendants_view, "row-activated",
|
g_signal_connect (app->descendants_view, "row-activated",
|
||||||
G_CALLBACK (on_descendants_row_activated), app);
|
G_CALLBACK (on_descendants_row_activated), app);
|
||||||
|
|
||||||
|
|||||||
@ -145,11 +145,12 @@ add_double_format_column (GtkTreeView *view, const gchar *title, gint model_colu
|
|||||||
ColumnInfo *column_info = g_new (ColumnInfo, 1);
|
ColumnInfo *column_info = g_new (ColumnInfo, 1);
|
||||||
|
|
||||||
renderer = gtk_cell_renderer_text_new ();
|
renderer = gtk_cell_renderer_text_new ();
|
||||||
|
g_object_set (renderer, "xalign", 1.0, NULL);
|
||||||
|
|
||||||
column = gtk_tree_view_column_new ();
|
column = gtk_tree_view_column_new ();
|
||||||
gtk_tree_view_column_set_title (column, title);
|
gtk_tree_view_column_set_title (column, title);
|
||||||
gtk_tree_view_column_pack_start (column, renderer, TRUE);
|
gtk_tree_view_column_pack_start (column, renderer, TRUE);
|
||||||
gtk_tree_view_column_set_resizable (column, TRUE);
|
gtk_tree_view_column_set_resizable (column, FALSE);
|
||||||
|
|
||||||
column_info->column = model_column;
|
column_info->column = model_column;
|
||||||
column_info->format = g_strdup (format);
|
column_info->format = g_strdup (format);
|
||||||
|
|||||||
Reference in New Issue
Block a user