Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gtk gtk
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,432
    • Issues 1,432
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 246
    • Merge requests 246
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • gtkgtk
  • Issues
  • #794

Closed
Open
Created Mar 27, 2017 by Bugzilla@bugzilla-migration💬Reporter

GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID does not work for gtk_tree_sortable_set_sort_column_id

Submitted by 12oClocker

Assigned to gtk..@..tk.org

Link to original bug (#780568)

Description

per documentation here... https://developer.gnome.org/gtk3/stable/GtkTreeSortable.html#GTK-TREE-SORTABLE-UNSORTED-SORT-COLUMN-ID:CAPS

And per documentation here... https://developer.gnome.org/gtk3/3.22/GtkTreeSortable.html#GTK-TREE-SORTABLE-UNSORTED-SORT-COLUMN-ID:CAPS

GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID should be able to disable sorting when used with gtk_tree_view_column_set_sort_column_id, but instead it does not work, we get the error message... Gtk-CRITICAL **:gtk_tree_view_column_set_sort_column_id: assertion 'sort_column_id >= -1' failed

This is because in source code... file: gtk+-3.22.0/gtk/gtktreeviewcolumn.c" function: gtk_tree_view_column_set_sort_column_id line: 2641 the following line of... g_return_if_fail (sort_column_id >= -1); should actually be... g_return_if_fail (sort_column_id >= -2);

It is desirable for this feature to work, because users may want to disable sorting on a treeview that was previously sorted. Simply changing the -1 to -2 on line 2641 of file /gtk/gtktreeviewcolumn.c should fix the issue.

Assignee
Assign to
Time tracking