static void phidias_items_classic_set_model (PhidiasItemsViewer *self, GtkTreeModel *items) { GtkTreeModel *sorter; PhidiasItemsClassic *item; item = PHIDIAS_ITEMS_CLASSIC (self); webkit_web_view_load_html_string (WEBKIT_WEB_VIEW (item->priv->description), "", "file://"); sorter = gtk_tree_view_get_model (GTK_TREE_VIEW (item->priv->list)); if (sorter != NULL) g_object_unref (sorter); sorter = gtk_tree_model_sort_new_with_model (items); gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sorter), ITEM_INFO_DATE, GTK_SORT_DESCENDING); gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (sorter), ITEM_INFO_DATE, sort_items, NULL, NULL); gtk_tree_view_set_model (GTK_TREE_VIEW (item->priv->list), sorter); scroll_to_position (item); }
void PaginationBar::go_last() throw() { scroll_to_position(total_ - 1); }
void PaginationBar::go_first() throw() { scroll_to_position(0); }