]> saetta.ns0.it Git - libgdaex/commitdiff
GdaExGrid: added sortable column from model.
authorAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Thu, 3 Oct 2013 07:31:21 +0000 (09:31 +0200)
committerAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Thu, 3 Oct 2013 07:31:21 +0000 (09:31 +0200)
src/grid.c

index 68c9b99bebb48ad88c828e6df8fc36a4577aaadf..d41ffeb69fef361f27a3cbd4d25f7785400866d4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  grid.c
  *
- *  Copyright (C) 2010-2011 Andrea Zagli <azagli@libero.it>
+ *  Copyright (C) 2010-2013 Andrea Zagli <azagli@libero.it>
  *
  *  This file is part of libgdaex.
  *  
@@ -408,6 +408,11 @@ static GtkTreeView
                                                                        gtk_tree_view_column_add_attribute (vcolumn, (GtkCellRenderer *)cells->data, "text", col);
                                                                }
 
+                                                       if (gdaex_grid_column_get_reorderable (gcolumn))
+                                                               {
+                                                                       gtk_tree_view_column_set_sort_column_id (vcolumn, col);
+                                                               }
+
                                                        gtk_tree_view_append_column (GTK_TREE_VIEW (view), vcolumn);
                                                }
                                }