X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtktreesortable.c;h=1987d77972894ea7649be46417ff15c57553ad4b;hb=10862a344aa8fb44e6045343ddf65eb0d14cc1b2;hp=f9ad6fb3b33b777e4f0228d86789944bb8a7b8ec;hpb=55704fc7c1b5429bf8cc7e8100893b01898a9fe8;p=~andy%2Fgtk diff --git a/gtk/gtktreesortable.c b/gtk/gtktreesortable.c index f9ad6fb3b..1987d7797 100644 --- a/gtk/gtktreesortable.c +++ b/gtk/gtktreesortable.c @@ -18,8 +18,11 @@ */ +#include #include "gtktreesortable.h" #include "gtkmarshalers.h" +#include "gtkintl.h" +#include "gtkalias.h" static void gtk_tree_sortable_base_init (gpointer g_class); @@ -30,7 +33,7 @@ gtk_tree_sortable_get_type (void) if (! tree_sortable_type) { - static const GTypeInfo tree_sortable_info = + const GTypeInfo tree_sortable_info = { sizeof (GtkTreeSortableIface), /* class_size */ gtk_tree_sortable_base_init, /* base_init */ @@ -44,7 +47,7 @@ gtk_tree_sortable_get_type (void) }; tree_sortable_type = - g_type_register_static (G_TYPE_INTERFACE, "GtkTreeSortable", + g_type_register_static (G_TYPE_INTERFACE, I_("GtkTreeSortable"), &tree_sortable_info, 0); g_type_interface_add_prerequisite (tree_sortable_type, GTK_TYPE_TREE_MODEL); @@ -60,7 +63,7 @@ gtk_tree_sortable_base_init (gpointer g_class) if (! initialized) { - g_signal_new ("sort_column_changed", + g_signal_new (I_("sort_column_changed"), GTK_TYPE_TREE_SORTABLE, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkTreeSortableIface, sort_column_changed), @@ -92,10 +95,12 @@ gtk_tree_sortable_sort_column_changed (GtkTreeSortable *sortable) * @order: The #GtkSortType to be filled in * * Fills in @sort_column_id and @order with the current sort column and the - * order, if applicable. If the sort column is not set, then FALSE is returned, - * and the values in @sort_column_id and @order are unchanged. - * - * Return value: %TRUE, if the sort column has been set + * order. It returns %TRUE unless the @sort_column_id is + * %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or + * %GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID. + * + * Return value: %TRUE if the sort column is not one of the special sort + * column ids. **/ gboolean gtk_tree_sortable_get_sort_column_id (GtkTreeSortable *sortable, @@ -147,8 +152,8 @@ gtk_tree_sortable_set_sort_column_id (GtkTreeSortable *sortable, * gtk_tree_sortable_set_sort_func: * @sortable: A #GtkTreeSortable * @sort_column_id: the sort column id to set the function for - * @sort_func: The sorting function - * @user_data: User data to pass to the sort func, or %NULL + * @sort_func: The comparison function + * @user_data: User data to pass to @sort_func, or %NULL * @destroy: Destroy notifier of @user_data, or %NULL * * Sets the comparison function used when sorting to be @sort_func. If the @@ -165,6 +170,7 @@ gtk_tree_sortable_set_sort_func (GtkTreeSortable *sortable, GtkTreeSortableIface *iface; g_return_if_fail (GTK_IS_TREE_SORTABLE (sortable)); + g_return_if_fail (sort_func != NULL); iface = GTK_TREE_SORTABLE_GET_IFACE (sortable); @@ -178,13 +184,14 @@ gtk_tree_sortable_set_sort_func (GtkTreeSortable *sortable, /** * gtk_tree_sortable_set_default_sort_func: * @sortable: A #GtkTreeSortable - * @sort_func: The sorting function - * @user_data: User data to pass to the sort func, or %NULL + * @sort_func: The comparison function + * @user_data: User data to pass to @sort_func, or %NULL * @destroy: Destroy notifier of @user_data, or %NULL * - * Sets the default comparison function used when sorting to be @sort_func. If - * the current sort column id of @sortable is - * %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using this function. + * Sets the default comparison function used when sorting to be @sort_func. + * If the current sort column id of @sortable is + * %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using + * this function. * * If @sort_func is %NULL, then there will be no default comparison function. * This means that once the model has been sorted, it can't go back to the @@ -233,3 +240,6 @@ gtk_tree_sortable_has_default_sort_func (GtkTreeSortable *sortable) return (* iface->has_default_sort_func) (sortable); } + +#define __GTK_TREE_SORTABLE_C__ +#include "gtkaliasdef.c"