font-manager 0.9.4 fails to compile against gtk4 4.22: the Gtk.DragIcon.get_for_drag binding changed in the gtk4 vapi, producing 'use new operator' errors in Collections.vala and FontList.vala that broke home-manager-path for all desktop hosts. 0.9.4 is the latest upstream release (master unfixed too); the fix is upstream PR FontManager/font-manager#468, already carried by nixpkgs master but predating our locked nixpkgs and nixpkgs-master inputs. Vendor the patch as an overlay mod, following the aardvark-dns pattern. Drop once the nixpkgs lock carries it.
38 lines
1.6 KiB
Diff
38 lines
1.6 KiB
Diff
From e2ad529a88929bbc76906ac78260dacf4d8c8c6b Mon Sep 17 00:00:00 2001
|
|
From: Jan Baier <jan.baier@amagical.net>
|
|
Date: Fri, 1 May 2026 17:25:25 +0200
|
|
Subject: [PATCH] Fix compilation error with newer Vala versions
|
|
|
|
Fixes #467
|
|
---
|
|
src/font-manager/Collections.vala | 2 +-
|
|
src/font-manager/FontList.vala | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/font-manager/Collections.vala b/src/font-manager/Collections.vala
|
|
index 5e7f5cdb..43531e54 100644
|
|
--- a/src/font-manager/Collections.vala
|
|
+++ b/src/font-manager/Collections.vala
|
|
@@ -523,7 +523,7 @@ namespace FontManager {
|
|
var row = ((CollectionListRow) source.widget);
|
|
var drag_icon = new Gtk.Label(row.item_label.label);
|
|
drag_icon.add_css_class("FontManagerListRowDrag");
|
|
- var gtk_drag_icon = (Gtk.DragIcon) Gtk.DragIcon.get_for_drag(drag);
|
|
+ var gtk_drag_icon = new Gtk.DragIcon.get_for_drag(drag);
|
|
gtk_drag_icon.set_child(drag_icon);
|
|
return;
|
|
}
|
|
diff --git a/src/font-manager/FontList.vala b/src/font-manager/FontList.vala
|
|
index c8b170cb..9720dc2b 100644
|
|
--- a/src/font-manager/FontList.vala
|
|
+++ b/src/font-manager/FontList.vala
|
|
@@ -669,7 +669,7 @@ namespace FontManager {
|
|
widget_set_name(drag_count, "FontManagerListDragCount");
|
|
drag_icon.add_overlay(drag_count);
|
|
drag_count.set_label(selected_items.length.to_string());
|
|
- var gtk_drag_icon = (Gtk.DragIcon) Gtk.DragIcon.get_for_drag(drag);
|
|
+ var gtk_drag_icon = new Gtk.DragIcon.get_for_drag(drag);
|
|
gtk_drag_icon.set_child(drag_icon);
|
|
return;
|
|
}
|