gtk-rs / gtk3-rs

Rust bindings for GTK 3
https://gtk-rs.org
MIT License
508 stars 90 forks source link

Rename "is_visible" method for more specialized traits #607

Open GuillaumeGomez opened 3 years ago

GuillaumeGomez commented 3 years ago

Because currently we have the following error when using it:

error[E0034]: multiple applicable items in scope
   --> src/display_network.rs:113:34
    |
113 |                 if !filter_entry.is_visible() || filter_entry.text_length() < 1 {
    |                                  ^^^^^^^^^^ multiple `is_visible` found
    |
    = note: candidate #1 is defined in an impl of the trait `CellRendererExt` for the type `O`
    = note: candidate #2 is defined in an impl of the trait `EntryExt` for the type `O`
    = note: candidate #3 is defined in an impl of the trait `TreeViewColumnExt` for the type `O`
    = note: candidate #4 is defined in an impl of the trait `WidgetExt` for the type `O`
help: disambiguate the associated function for candidate #1
    |
113 |                 if !CellRendererExt::is_visible(&filter_entry) || filter_entry.text_length() < 1 {
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #2
    |
113 |                 if !EntryExt::is_visible(&filter_entry) || filter_entry.text_length() < 1 {
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #3
    |
113 |                 if !TreeViewColumnExt::is_visible(&filter_entry) || filter_entry.text_length() < 1 {
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #4
    |
113 |                 if !WidgetExt::is_visible(&filter_entry) || filter_entry.text_length() < 1 {
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sdroege commented 3 years ago

Probably also affect gtk4 @bilelmoussaoui