[gnome-mines/arnaudb/wip/gtk4: 21/40] Adapt to IconTheme API.




commit e8e3255fe7ab45352e889707cdb4949ebdc0fa10
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Mon Apr 13 23:52:52 2020 +0200

    Adapt to IconTheme API.

 src/gnome-mines.vala | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-mines.vala b/src/gnome-mines.vala
index 781c121..5e5bd0c 100644
--- a/src/gnome-mines.vala
+++ b/src/gnome-mines.vala
@@ -134,12 +134,12 @@ public class Mines : Gtk.Application
             theme_path = Path.build_path (Path.DIR_SEPARATOR_S, DATA_DIRECTORY, "themes", theme);
         }
         if (!is_switch) {
-            IconTheme.get_default ().append_search_path (theme_path);
+            IconTheme.get_for_display (Gdk.Display.get_default ()).add_search_path (theme_path);
         } else {
-            string[] icon_search_path;
-            IconTheme.get_default ().get_search_path (out icon_search_path);
+            IconTheme icon_theme = IconTheme.get_for_display (Gdk.Display.get_default ());
+            string[] icon_search_path = icon_theme.get_search_path ();
             icon_search_path[icon_search_path.length - 1] = theme_path;
-            IconTheme.get_default ().set_search_path (icon_search_path);
+            icon_theme.set_search_path (icon_search_path);
         }
 
         var theme_css_path = Path.build_filename (theme_path, "theme.css");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]