Skip to content

Commit

Permalink
klavaro: patch to use non-deprecated names for icons
Browse files Browse the repository at this point in the history
Started just wanting to fix the "gtk-strikethrough" icon,
but kept finding items marked deprecated.

This change may be incomplete, but all changes were to deprecated
icons (that used to be "stock", I think).

Icon name candidates were identified by extracting all used icon-name
values and checking which existed in my system's copy of the 'breeze' theme.

If missing, these were checked online to find the new replacement.

(I couldn't find an authoritative list of the replacements,
but looking each up finds the right deprecation warning)
  • Loading branch information
dtzWill committed Mar 14, 2022
1 parent 09c7cf2 commit 606eab0
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/games/klavaro/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
substituteInPlace src/tutor.c --replace '"espeak ' '"${espeak}/bin/espeak '
'';

patches = [ ./trans_lang_get_similar.patch ];
patches = [ ./icons.patch ./trans_lang_get_similar.patch ];

postInstall = ''
wrapProgram $out/bin/klavaro \
Expand Down
137 changes: 137 additions & 0 deletions pkgs/games/klavaro/icons.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
--- a/data/klavaro.glade (revision 137)
+++ b/data/klavaro.glade (working copy)
@@ -311,7 +311,7 @@
<object class="GtkImage" id="image24">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-delete</property>
+ <property name="icon-name">edit-delete</property>
</object>
<packing>
<property name="expand">False</property>
@@ -1232,7 +1232,7 @@
<object class="GtkImage" id="image27">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-delete</property>
+ <property name="icon-name">edit-delete</property>
</object>
<packing>
<property name="expand">False</property>
@@ -1352,7 +1352,7 @@
<object class="GtkImage" id="image23">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-open</property>
+ <property name="icon-name">document-open</property>
</object>
<packing>
<property name="expand">True</property>
@@ -1510,7 +1510,7 @@
<object class="GtkImage" id="image11">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-open</property>
+ <property name="icon-name">document-open</property>
<property name="icon_size">2</property>
</object>
<packing>
@@ -1557,7 +1557,7 @@
<object class="GtkImage" id="image6">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-paste</property>
+ <property name="icon-name">edit-paste</property>
<property name="icon_size">2</property>
</object>
<packing>
@@ -1604,7 +1604,7 @@
<object class="GtkImage" id="image19">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-delete</property>
+ <property name="icon-name">edit-delete</property>
<property name="icon_size">2</property>
</object>
<packing>
@@ -2051,7 +2051,7 @@
<object class="GtkImage" id="image14">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-delete</property>
+ <property name="icon-name">edit-delete</property>
</object>
<packing>
<property name="expand">False</property>
@@ -2343,7 +2343,7 @@
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-media-rewind</property>
+ <property name="icon-name">media-seek-backward</property>
<property name="icon_size">1</property>
</object>
</child>
@@ -2418,7 +2418,7 @@
<object class="GtkImage" id="image20">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-go-back</property>
+ <property name="icon-name">go-previous</property>
</object>
<packing>
<property name="expand">False</property>
@@ -2469,7 +2469,7 @@
<object class="GtkImage" id="image18">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-go-forward</property>
+ <property name="icon-name">go-next</property>
</object>
<packing>
<property name="expand">False</property>
@@ -2577,7 +2577,7 @@
<object class="GtkImage" id="image13">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-save</property>
+ <property name="icon-name">document-save</property>
</object>
<packing>
<property name="expand">False</property>
@@ -2825,7 +2825,7 @@
<object class="GtkImage" id="image_basic">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-strikethrough</property>
+ <property name="icon-name">format-text-strikethrough</property>
<property name="icon_size">6</property>
</object>
<packing>
@@ -2901,7 +2901,7 @@
<object class="GtkImage" id="image_adapt">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-bold</property>
+ <property name="icon-name">format-text-bold</property>
<property name="icon_size">6</property>
</object>
<packing>
@@ -3630,7 +3630,7 @@
<object class="GtkImage" id="image_top10_publish">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-goto-top</property>
+ <property name="icon-name">go-top</property>
</object>
<packing>
<property name="expand">False</property>
@@ -3678,7 +3678,7 @@
<object class="GtkImage" id="image_top10_update">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">gtk-goto-bottom</property>
+ <property name="icon-name">go-bottom</property>
</object>
<packing>
<property name="expand">False</property>

0 comments on commit 606eab0

Please sign in to comment.