summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <sandmann@daimi.au.dk>2010-11-09 08:46:15 -0500
committerSøren Sandmann Pedersen <sandmann@daimi.au.dk>2011-06-29 02:48:21 -0400
commite0e8eedcfb54a5f3ee819e9bf9259afcdf56d7f9 (patch)
treeed8df375308c92065dc5a8f4f3f28ddcda6780d0
parent5fb0535143c0bb6aec1a99450308e143df119f0e (diff)
Reorder columns
-rw-r--r--sysprof.c13
-rw-r--r--sysprof.glade4
-rw-r--r--treeviewutils.c6
3 files changed, 15 insertions, 8 deletions
diff --git a/sysprof.c b/sysprof.c
index c7d81de..90a0b0f 100644
--- a/sysprof.c
+++ b/sysprof.c
@@ -387,9 +387,9 @@ enum
enum
{
- DESCENDANTS_NAME,
DESCENDANTS_SELF,
DESCENDANTS_CUMULATIVE,
+ DESCENDANTS_NAME,
DESCENDANTS_OBJECT
};
@@ -448,9 +448,9 @@ fill_descendants_tree (Application *app)
tree_store =
foo_tree_store_new (4,
- G_TYPE_STRING,
G_TYPE_DOUBLE,
G_TYPE_DOUBLE,
+ G_TYPE_STRING,
G_TYPE_POINTER);
if (app->profile)
@@ -1267,7 +1267,7 @@ set_sizes (GtkWindow *window,
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
- width = 5 * (monitor.width / 13);
+ width = 3 * (monitor.width / 8);
height = 0.9 * monitor.height;
gtk_window_resize (window, width, height);
@@ -1478,13 +1478,14 @@ build_gui (Application *app)
/* descendants view */
gtk_tree_view_set_enable_search (app->descendants_view, FALSE);
- col = add_plain_text_column (app->descendants_view, _("Descendants"),
- DESCENDANTS_NAME);
add_double_format_column (app->descendants_view, _("Self"),
DESCENDANTS_SELF, PCT_FORMAT);
- add_double_format_column (app->descendants_view, _("Cumulative"),
+ add_double_format_column (app->descendants_view, _("Total"),
DESCENDANTS_CUMULATIVE, PCT_FORMAT);
+ col = add_plain_text_column (app->descendants_view, _("Name"),
+ DESCENDANTS_NAME);
gtk_tree_view_column_set_expand (col, TRUE);
+ gtk_tree_view_set_expander_column (app->descendants_view, col);
/* screenshot window */
diff --git a/sysprof.glade b/sysprof.glade
index 4263841..9433f1b 100644
--- a/sysprof.glade
+++ b/sysprof.glade
@@ -689,7 +689,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">True</property>
- <property name="rules_hint">True</property>
+ <property name="rules_hint">False</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
<property name="fixed_height_mode">False</property>
@@ -718,7 +718,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">True</property>
- <property name="rules_hint">True</property>
+ <property name="rules_hint">False</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
<property name="fixed_height_mode">False</property>
diff --git a/treeviewutils.c b/treeviewutils.c
index 20d7777..a73de20 100644
--- a/treeviewutils.c
+++ b/treeviewutils.c
@@ -31,6 +31,8 @@ typedef struct
GtkSortType default_order;
} SortInfo;
+#define PADDING 12
+
static void
set_sort_info (GtkTreeView *view,
GtkTreeViewColumn *column,
@@ -142,6 +144,9 @@ add_plain_text_column (GtkTreeView *view, const gchar *title, gint model_column)
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
+#if 0
+ g_object_set (renderer, "xpad", PADDING, NULL);
+#endif
column = gtk_tree_view_column_new_with_attributes (title, renderer,
"text", model_column,
NULL);
@@ -210,6 +215,7 @@ add_double_format_column (GtkTreeView *view,
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "xalign", 1.0, NULL);
+ g_object_set (renderer, "xpad", PADDING, NULL);
column = gtk_tree_view_column_new ();
gtk_tree_view_column_set_title (column, title);