MeanEYE / Sunflower

Small and highly customizable twin-panel file manager for Linux with support for plugins.
GNU General Public License v3.0
428 stars 42 forks source link

Update deprecated stock icons to named icons #455

Closed joshas closed 3 years ago

joshas commented 4 years ago

_prepare_icons() function sets fallback icons for file and directory using deprecated constants: Gtk.STOCK_FILE and Gtk.STOCK_DIRECTORY . According to GTK+ 3 docs they should be replaced by named icons: "text-x-generic" and "folder". https://github.com/MeanEYE/Sunflower/blob/6b4ad8db726764ce0153b5a45e3ca59d0eb68367/sunflower/icons.py#L25-L34

After replacing both icon constants has_icon() check becomes redundant, at least in "folder" case. Could this function be refactored by setting default icon names to "text-x-generic" and "folder", and removing has_icon() check and fallbacks?