After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 775539 - [suggestion/patch] Desensitise GtkComboBox if its model only has 1 row
[suggestion/patch] Desensitise GtkComboBox if its model only has 1 row
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-12-02 23:12 UTC by Daniel Boles
Modified: 2018-05-02 17:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ComboBox: Desensitise if the model only has 1 row (1.05 KB, patch)
2016-12-02 23:19 UTC, Daniel Boles
none Details | Review

Description Daniel Boles 2016-12-02 23:12:44 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
Comment 1 Daniel Boles 2016-12-02 23:19:24 UTC
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.
Comment 2 GNOME Infrastructure Team 2018-05-02 17:49:24 UTC
-- 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.