{"id":17929118,"url":"https://github.com/ekalin/kgtk3-combo-model","last_synced_at":"2026-04-30T16:32:49.666Z","repository":{"id":213931805,"uuid":"144195497","full_name":"ekalin/kgtk3-combo-model","owner":"ekalin","description":"Fixes GTK+ 3 combo behavior with Tree Models, allowing items with children to be selected","archived":false,"fork":false,"pushed_at":"2018-08-19T11:22:38.000Z","size":248,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T17:58:32.735Z","etag":null,"topics":["combo-box-widget","gtk3","perl","treeview"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ekalin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-08-09T19:34:01.000Z","updated_at":"2018-08-19T11:22:23.000Z","dependencies_parsed_at":"2023-12-24T12:25:58.608Z","dependency_job_id":"280b0f66-6d42-468f-9f78-bb6258fdbf79","html_url":"https://github.com/ekalin/kgtk3-combo-model","commit_stats":null,"previous_names":["ekalin/kgtk3-combo-model"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ekalin/kgtk3-combo-model","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekalin%2Fkgtk3-combo-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekalin%2Fkgtk3-combo-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekalin%2Fkgtk3-combo-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekalin%2Fkgtk3-combo-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ekalin","download_url":"https://codeload.github.com/ekalin/kgtk3-combo-model/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekalin%2Fkgtk3-combo-model/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32470879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["combo-box-widget","gtk3","perl","treeview"],"created_at":"2024-10-28T21:07:37.829Z","updated_at":"2026-04-30T16:32:49.652Z","avatar_url":"https://github.com/ekalin.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KGtk3ComboModel\n\nGtk+ 3 has removed the ability to select items in a GtkComboBox that have children. In Gtk+ 2 an extra item was added to the combos, allowing the parent item to be selected:\n\n![Combo in Gtk+ 2](gtk2.png)\n\nBut in Gtk+ 3 those items were removed, making it impossible to select \"Item with children\":\n\n![Combo in Gtk+ 3](gtk3.png)\n\n(See also [this bug report](https://gitlab.gnome.org/GNOME/gtk/issues/1229))\n\nThis package provides a work-around to restore the old functionality.\n\n\n## Installation\n\nYou can clone the repository and then do the standard\n\n```sh\n./autogen.sh\n./configure\nmake\nmake install\n```\n\nto build and install a shared library, then link your application to the library.\n\nOr just copy `kgtk3-combo-model.h`, `kgtk3-combo-model.c`, `kgtk3-combo-box.h`, `kgtk3-combo-box.c` to your application and use it directly.\n\n\n## Usage: KGtk3ComboBox\n\nYou can just replace existing uses of `GtkComboBox` with `KGtk3ComboBox`:\n\n```c\nGtkWidget *combo = kgtk3_combo_box_new_with_model(model);\n```\n\nand use it normally. The new combo will include extra itens corresponding to the parent item and a separator.\n\nSince it's a subclass of GtkComboBox, all methods of GtkComboBox still work, but if you need to set the model, use `kgtk3_combo_box_set_model()`.\n\nNote that the model used by the combo is not the model supplied in the constructor or with `kgtk3_combo_box_set_model()`, but a `KGtk3ComboModel` (see below). For basic operations such as getting data from the current iter, using the original model should work. But if you want to do other operations (such as moving the iter around), you should get the wrapped model (use the standard `gtk_combo_box_get_model()` function) and use that instead of the original model.\n\nFor a complete example, see (src/example-combo.c)\n\n\n## Usage: KGtk3ComboModel\n\nIf necessary, you can wrap the model manually. First, wrap your `GtkTreeModel` in `KGtk3ComboModel` with\n\n```c\nGtkTreeModel *wrapped_model = GTK_TREE_MODEL(kgtk3_combo_model_new(model));\n```\n\nand use `wrapped_model` in a regular combo. The wrapped model will include extra itens corresponding to the parent item and a separator.\n\nAn extra boolean column is added after all the columns of the base model. This column is `TRUE` for the separator items, and should be used in a row separator function, something like this:\n\n```c\ngboolean is_separator(GtkTreeModel *model, GtkTreeIter *iter, gpointer data)\n{\n  gint sep_col = kgtk3_combo_model_get_separator_column(KGTK3_COMBO_MODEL(model));\n  gboolean is_sep;\n  gtk_tree_model_get(model, iter, sep_col, \u0026is_sep, -1);\n  return is_sep;\n}\n\n...\n\ngtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(combo),\n                                     is_separator, NULL, NULL);\n```\n\nFor a complete example, see (src/example-model.c)\n\n\n## Perl binding\n\nThe [perl/](perl) subdirectory includes bindings allowing `KGtk3ComboModel` to be used in Perl programs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekalin%2Fkgtk3-combo-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fekalin%2Fkgtk3-combo-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekalin%2Fkgtk3-combo-model/lists"}