GNOME Bugzilla – Bug 775539
[suggestion/patch] Desensitise GtkComboBox if its model only has 1 row
Last modified: 2018-05-02 17:49:24 UTC
gtk_combobox_update_sensitivity() sets it to FALSE if the model has 0 rows. I'd argue that it should also do so if the model has only 1 row, as in that case, there is equally no purpose to clicking on it. A ComboBox with only 1 row can arise in any situation where the number is dynamic, but the main case I can think of is when setting up a GtkFileChooser with only 1 filter, which I don't think is an infrequent scenario. Desensitising then might save users the time of clicking on the CB and finding nothing interesting, just a menu popup that shows the same text as the button already did. :D
Created attachment 341279 [details] [review] ComboBox: Desensitise if the model only has 1 row > This was already done if it has 0 rows, and it is equally fruitless to > click on a CB whose model only has 1 row, so disable it then as well.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/714.