* Add a new dialog, Sort Dialog (WID-DIA021).
[modest] / src / widgets / modest-header-view.h
index d753de0..dbfb5d9 100644 (file)
@@ -55,6 +55,7 @@ struct _ModestHeaderView {
 };
 
 #define MODEST_HEADER_VIEW_COLUMN    "header-view-column"
+#define MODEST_HEADER_VIEW_FLAG_SORT "header-view-flags-sort"
 
 typedef enum _ModestHeaderViewColumn {
        MODEST_HEADER_VIEW_COLUMN_FROM            = 0,
@@ -170,13 +171,15 @@ TnyFolder *modest_header_view_get_folder (ModestHeaderView *self);
  * modest_header_view_set_columns:
  * @self: a ModestHeaderView instance
  * @columns: a list of ModestHeaderViewColumn
+ * @type: #TnyFolderType type
  * 
  * set the columns for this ModestHeaderView.
  *  
  * Returns: TRUE if it succeeded, FALSE otherwise
  */
 gboolean modest_header_view_set_columns (ModestHeaderView *self,
-                                        const GList *columns);
+                                        const GList *columns,
+                                        TnyFolderType type);
 /**
  * modest_header_view_get_columns:
  * @self: a ModestHeaderView instance
@@ -186,7 +189,7 @@ gboolean modest_header_view_set_columns (ModestHeaderView *self,
  * with g_object_get_data MODEST_HEADER_VIEW_COLUMN (#define),
  * and which contains the corresponding ModestHeaderViewColumn
  *  
- * Returns: newly allocated list of column ids, or NULL in case of no columns or error
+ * Returns: newly allocated list of #GtkTreeViewColumns objects, or NULL in case of no columns or error
  * You must free the list with g_list_free
  */
 GList*  modest_header_view_get_columns (ModestHeaderView *self);
@@ -265,8 +268,57 @@ void
 _modest_header_view_change_selection (GtkTreeSelection *selection,
                                      gpointer user_data);
 
+/**
+ * modest_header_view_get_sort_column_id:
+ * @self: a #ModestHeaderView
+ * @type: #TnyFolderType type
+ * 
+ * Gets the selected logical columnd id for sorting.
+ **/
+gint
+modest_header_view_get_sort_column_id (ModestHeaderView *self, TnyFolderType type);
+
+/**
+ * modest_header_view_get_sort_type:
+ * @self: a #ModestHeaderView
+ * @type: #TnyFolderType type
+ * 
+ * Gets the selected sort type.
+ **/
+GtkSortType
+modest_header_view_get_sort_type (ModestHeaderView *self, TnyFolderType type);
+
+/**
+ * modest_header_view_set_sort_params:
+ * @self: a #ModestHeaderView
+ * @sort_colid: logical column id to sort
+ * @sort_type: #GtkSortType sort type
+ * @type: #TnyFolderType type
+ * 
+ * Sets the logical columnd id and sort type for sorting operations.
+ **/
+void
+modest_header_view_set_sort_params (ModestHeaderView *self, guint sort_colid, GtkSortType sort_type, TnyFolderType type);
+
+/**
+ * modest_header_view_set_sort_params:
+ * @self: a #ModestHeaderView
+ * @sort_colid: logical column id to sort
+ * @sort_type: #GtkSortType sort type
+ * 
+ * Sorts headers treeview by logical column id, @sort_colid, using a 
+ * @sort_type sorting method. In addition, new headder settings will be 
+ * stored in @self object. 
+ **/
+void
+modest_header_view_sort_by_column_id (ModestHeaderView *self, 
+                                     guint sort_colid,
+                                     GtkSortType sort_type);
+
+
 G_END_DECLS
 
 
+
 #endif /* __MODEST_HEADER_VIEW_H__ */