fix tree vertical separator
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 7 Feb 2006 06:57:02 +0000 (06:57 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 7 Feb 2006 06:57:02 +0000 (06:57 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1516 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ChangeLog
ltt/branches/poly/configure.in
ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c
ltt/branches/poly/lttv/modules/gui/controlflow/processlist.h
ltt/branches/poly/lttv/modules/gui/detailedevents/events.c

index e0205719f14869da593eca574145d0ff7d4736ad..3f920be731fba25f0907ba11acbddc625cb0bdbe 100644 (file)
@@ -1,5 +1,7 @@
 LinuxTraceToolkit ChangeLog
 
+06/02/2006     LTTV 0.8.11
+                                               Fix GtkTreeView using "vertical-separator" style property.
 06/02/2006     LTTV 0.8.10
                                                Now handle correctly events with a 0xFFFF size (dynamically).
                                                Make lttd multithreaded.
index a7aa9214187a40932dbf82b6dbe0bb221773ff87..94ff42e447e1a32cdbca6babaaecc280314a9fe0 100644 (file)
@@ -23,7 +23,7 @@
 AC_PREREQ(2.57)
 AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
 #AC_WITH_LTDL  # not needed ?
-AM_INIT_AUTOMAKE(LinuxTraceToolkitViewer,0.8.10-06022006)
+AM_INIT_AUTOMAKE(LinuxTraceToolkitViewer,0.8.11-06022006)
 AM_CONFIG_HEADER(config.h)
 AM_PROG_LIBTOOL
 
index ce4c0926045103bacdbe842ed13232a731ab5536..d231055d1e07e0c066c05a873a557ff7f10dd852 100644 (file)
@@ -21,6 +21,7 @@
 #endif
 
 #include <gtk/gtk.h>
+#include <gdk/gdk.h>
 #include <glib.h>
 #include <string.h>
 #include <stdlib.h>
@@ -366,6 +367,10 @@ ProcessList *processlist_construct(void)
   renderer = gtk_cell_renderer_text_new ();
   process_list->renderer = renderer;
 
+       gint vertical_separator;
+       gtk_widget_style_get (GTK_WIDGET (process_list->process_list_widget),
+                       "vertical-separator", &vertical_separator,
+                       NULL);
   gtk_cell_renderer_get_size(renderer,
       GTK_WIDGET(process_list->process_list_widget),
       NULL,
@@ -373,12 +378,14 @@ ProcessList *processlist_construct(void)
       NULL,
       NULL,
       &process_list->cell_height);
-  
+       
   guint ypad;
   g_object_get(G_OBJECT(renderer), "ypad", &ypad, NULL);
 
   process_list->cell_height += ypad;
-  
+  process_list->cell_height += vertical_separator;
+       
+
   column = gtk_tree_view_column_new_with_attributes ( "Process",
                 renderer,
                 "text",
index 1e5f6e119578f9fb306cd3aca3028c05a440fd97..b2a6435a42e08e7f30c6f6d3a48857700d0c8ca9 100644 (file)
@@ -171,14 +171,20 @@ void copy_pixmap_to_screen(ProcessList *process_list,
     gint width, gint height);
 
 
-static inline gint get_cell_height(ProcessList *process_list, 
-               GtkTreeView *TreeView)
+static inline gint get_cell_height(GtkTreeView *TreeView)
 {
   gint height;
   GtkTreeViewColumn *column = gtk_tree_view_get_column(TreeView, 0);
   
   gtk_tree_view_column_cell_get_size(column, NULL, NULL, NULL, NULL, &height);
-  
+
+  gint vertical_separator;
+  gtk_widget_style_get (GTK_WIDGET (TreeView),
+      "vertical-separator", &vertical_separator,
+      NULL);
+
+  height += vertical_separator;
+
   return height;
 }
 
@@ -220,8 +226,7 @@ static inline gint processlist_get_pixels_from_data(  ProcessList *process_list,
                     &hashed_process_data->y_iter);
   path_indices =  gtk_tree_path_get_indices (tree_path);
 
-  *height = get_cell_height(process_list,
-      (GtkTreeView*)process_list->process_list_widget);
+  *height = get_cell_height((GtkTreeView*)process_list->process_list_widget);
   *y = *height * path_indices[0];
   gtk_tree_path_free(tree_path);
 
index 31ae4eb80b628847d3e2aa4ca372fd5603fcae2e..8a05d9c4246d71a0b9acb7b3ea692343171b2d51 100644 (file)
@@ -1077,6 +1077,14 @@ static __inline gint get_cell_height(GtkTreeView *TreeView)
   
   gtk_tree_view_column_cell_get_size(column, NULL, NULL, NULL, NULL, &height);
   
+
+  gint vertical_separator;
+  gtk_widget_style_get (GTK_WIDGET (TreeView),
+      "vertical-separator", &vertical_separator,
+      NULL);
+       
+       height += vertical_separator;
+
   return height;
 }
 
This page took 0.026392 seconds and 4 git commands to generate.