[gnome-mines/arnaudb/wip/gtk4: 29/41] Adapt to IconTheme API.



commit 6ba0b0a96dbf75ba5da0fbab3a9f133b9ebc6abe
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 e148ce3..7211e10 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]