diff --git a/.gitignore b/.gitignore
index bb6a18c..86a98e8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,7 +10,7 @@ locale/Makefile
GNUmakefile
.gitignore
simple-md5sum
-inlined-icons.h
+inlined-icons.c
help-dialogs.h
dvdisaster
build.h
diff --git a/GNUmakefile.template b/GNUmakefile.template
index 10c80b1..df6c772 100644
--- a/GNUmakefile.template
+++ b/GNUmakefile.template
@@ -122,10 +122,6 @@ ${BUILDTMP}/closure.o : src/closure.c $(ICONS)
@echo "Compiling:" src/closure.c
@$(CC) $(COPTS) -c src/closure.c -o $@
-${BUILDTMP}/icon-factory.o : src/icon-factory.c $(ICONS)
- @echo "Compiling:" src/icon-factory.c
- @$(CC) $(COPTS) -c src/icon-factory.c -o $@
-
# Building the dvdisaster binary
dvdisaster: $(ICONS) $(OFILES)
@@ -141,28 +137,9 @@ dvdisaster: $(ICONS) $(OFILES)
else $(MAKE) --no-print-directory -C locale; \
fi
-# gdk-pixbuf-csource sometimes produces truncated output, so we have to ensure the output
-# is valid before appending it to inlined-icons.h:
-src/inlined-icons.h: icons/read.png icons/create.png icons/scan.png icons/fix.png icons/verify.png icons/strip.png icons/open-ecc.png icons/open-img.png icons/cd.png icons/gtk-help.png icons/gtk-index.png icons/gtk-preferences.png icons/gtk-quit.png icons/gtk-stop.png icons/tooltip.png icons/nothing.png
- @echo "Building:" src/inlined-icons.h
- @rm -f src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_read icons/read.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_create icons/create.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_scan icons/scan.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_fix icons/fix.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_verify icons/verify.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_strip icons/strip.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_open_ecc icons/open-ecc.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_open_img icons/open-img.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_cd icons/cd.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_gtk_help icons/gtk-help.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_gtk_index icons/gtk-index.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_gtk_preferences icons/gtk-preferences.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_gtk_quit icons/gtk-quit.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_gtk_stop icons/gtk-stop.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_tooltip icons/tooltip.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @while gdk-pixbuf-csource --raw --name=dvdisaster_nothing icons/nothing.png >src/.icons.tmp; do grep -q '"};' src/.icons.tmp && break; done; cat src/.icons.tmp >>src/inlined-icons.h
- @rm -f src/.icons.tmp
+src/inlined-icons.c: icons/icons.gresource.xml icons/cd.svg icons/create.svg icons/fix.svg icons/help.svg icons/log.svg icons/open-ecc.svg icons/open-img.svg icons/preferences.svg icons/quit.svg icons/read-symbolic.svg icons/scan.svg icons/stop.svg icons/strip.svg icons/verify.svg
+ @echo "Generating:" $(ICONS)
+ glib-compile-resources --generate-source --target=$(ICONS) --sourcedir=icons icons/icons.gresource.xml
$(BUILDTMP)/rs-encoder-sse2.o: src/rs-encoder-sse2.c
@echo "Compiling:" src/rs-encoder-sse2.c
diff --git a/configure b/configure
index d2d5937..972f225 100755
--- a/configure
+++ b/configure
@@ -155,9 +155,9 @@ if ! EXECUTE_PROGRAM "xgettext --help" xgettext \
fi
if test "$cfg_with_gui" == "yes"; then
- if ! EXECUTE_PROGRAM "gdk-pixbuf-csource --help" gdk_pixbuf_csource ; then
- echo "* gdk-pixbuf not installed"
- echo "* or path to gdk-pixbuf-csource is missing."
+ if ! EXECUTE_PROGRAM "glib-compile-resources --help" gdk_pixbuf_csource ; then
+ echo "* glib-compile-resources not installed"
+ echo "* or path to glib-compile-resources is missing."
exit 1
fi
fi
@@ -233,7 +233,7 @@ echo
echo -e "\nCFG_CFILES = $cfiles" >> Makefile.config
echo "CFG_OFILES = $ofiles" >> Makefile.config
if test "$cfg_with_gui" == "yes"; then
- echo "ICONS = src/inlined-icons.h" >> Makefile.config
+ echo "ICONS = src/inlined-icons.c" >> Makefile.config
fi
# Create the method wrapper
diff --git a/icons/README b/icons/README
deleted file mode 100644
index 91822aa..0000000
--- a/icons/README
+++ /dev/null
@@ -1,4 +0,0 @@
-Files starting with "gtk-" have been taken from
-the GTK+ 2.18 distribution in order to override
-theming and keep the GUI consistent with the
-online documentation.
diff --git a/icons/blank-mask.ppm b/icons/blank-mask.ppm
deleted file mode 100644
index 4038501..0000000
Binary files a/icons/blank-mask.ppm and /dev/null differ
diff --git a/icons/blank.png b/icons/blank.png
deleted file mode 100644
index e14977e..0000000
Binary files a/icons/blank.png and /dev/null differ
diff --git a/icons/cd.png b/icons/cd.png
deleted file mode 100644
index a808e21..0000000
Binary files a/icons/cd.png and /dev/null differ
diff --git a/icons/cd.svg b/icons/cd.svg
new file mode 100644
index 0000000..fd5475c
--- /dev/null
+++ b/icons/cd.svg
@@ -0,0 +1,87 @@
+
diff --git a/icons/create.fig b/icons/create.fig
deleted file mode 100644
index 9572455..0000000
--- a/icons/create.fig
+++ /dev/null
@@ -1,20 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Metric
-A4
-100.00
-Single
--2
-1200 2
-5 1 0 20 0 7 50 0 -1 0.000 0 1 0 0 6300.000 8775.000 6300 6525 4050 8775 6300 11025
-5 1 0 20 0 7 50 0 -1 0.000 0 0 0 0 6300.000 4275.000 6300 2025 8550 4275 6300 6525
-5 1 0 1 0 7 50 0 10 0.000 0 1 0 0 11474.998 10456.000 11475 10119 11138 10457 11475 10793
-5 1 0 1 0 7 55 0 20 0.000 0 0 0 0 11475.002 9782.000 11475 9445 11812 9781 11475 10119
-5 1 0 1 0 7 59 0 10 0.000 0 0 0 0 11475.000 10125.000 11475 9450 12150 10125 11475 10800
-1 3 0 20 0 7 50 0 -1 0.000 1 0.0000 6300 4275 569 569 6300 4275 6869 4275
-1 3 0 20 0 7 50 0 -1 0.000 1 0.0000 6300 8775 544 544 6300 8775 6844 8775
-1 3 0 20 0 7 50 0 -1 0.000 1 0.0000 6300 6525 4494 4494 6300 6525 10794 6525
-1 3 0 1 0 7 50 0 10 0.000 1 0.0000 11475 9781 85 85 11475 9781 11560 9781
-1 3 0 1 0 7 45 0 20 0.000 1 0.0000 11475 10457 81 81 11475 10457 11557 10457
-1 1 0 1 0 7 60 0 20 0.000 1 0.0000 11475 10125 675 673 11475 10125 12149 10125
diff --git a/icons/create.png b/icons/create.png
deleted file mode 100644
index fc2230c..0000000
Binary files a/icons/create.png and /dev/null differ
diff --git a/icons/create.svg b/icons/create.svg
new file mode 100644
index 0000000..3b8c039
--- /dev/null
+++ b/icons/create.svg
@@ -0,0 +1,14 @@
+
diff --git a/icons/fix.png b/icons/fix.png
deleted file mode 100644
index 53c519b..0000000
Binary files a/icons/fix.png and /dev/null differ
diff --git a/icons/fix.svg b/icons/fix.svg
new file mode 100644
index 0000000..19b453b
--- /dev/null
+++ b/icons/fix.svg
@@ -0,0 +1,3 @@
+
diff --git a/icons/gtk-help.png b/icons/gtk-help.png
deleted file mode 100644
index b00fbd8..0000000
Binary files a/icons/gtk-help.png and /dev/null differ
diff --git a/icons/gtk-index.png b/icons/gtk-index.png
deleted file mode 100644
index 0967a61..0000000
Binary files a/icons/gtk-index.png and /dev/null differ
diff --git a/icons/gtk-preferences.png b/icons/gtk-preferences.png
deleted file mode 100644
index 2596f3c..0000000
Binary files a/icons/gtk-preferences.png and /dev/null differ
diff --git a/icons/gtk-quit.png b/icons/gtk-quit.png
deleted file mode 100644
index 0c9de64..0000000
Binary files a/icons/gtk-quit.png and /dev/null differ
diff --git a/icons/gtk-stop.png b/icons/gtk-stop.png
deleted file mode 100644
index 54e1cb3..0000000
Binary files a/icons/gtk-stop.png and /dev/null differ
diff --git a/icons/help.svg b/icons/help.svg
new file mode 100644
index 0000000..4dc0261
--- /dev/null
+++ b/icons/help.svg
@@ -0,0 +1,75 @@
+
diff --git a/icons/icons.gresource.xml b/icons/icons.gresource.xml
new file mode 100644
index 0000000..ade7388
--- /dev/null
+++ b/icons/icons.gresource.xml
@@ -0,0 +1,20 @@
+
+
+
+ cd.svg
+ create.svg
+ fix.svg
+ help.svg
+ log.svg
+ open-ecc.svg
+ open-img.svg
+ preferences.svg
+ quit.svg
+ read-symbolic.svg
+ scan.svg
+ stop.svg
+ strip.svg
+ verify.svg
+
+
+
diff --git a/icons/image.fig b/icons/image.fig
deleted file mode 100644
index 1606d16..0000000
--- a/icons/image.fig
+++ /dev/null
@@ -1,12 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Metric
-A4
-100.00
-Single
--2
-1200 2
-4 0 0 50 -1 18 160 0.0000 4 1695 6750 1980 8235 00111\001
-4 0 0 50 -1 18 160 0.0000 4 1695 6750 1935 3240 01110\001
-4 0 0 50 -1 18 160 0.0000 4 1695 6750 1935 5670 10011\001
diff --git a/icons/log.svg b/icons/log.svg
new file mode 100644
index 0000000..edf0748
--- /dev/null
+++ b/icons/log.svg
@@ -0,0 +1,64 @@
+
diff --git a/icons/nothing.png b/icons/nothing.png
deleted file mode 100644
index ac4fd07..0000000
Binary files a/icons/nothing.png and /dev/null differ
diff --git a/icons/open-ecc.png b/icons/open-ecc.png
deleted file mode 100644
index 3f7f346..0000000
Binary files a/icons/open-ecc.png and /dev/null differ
diff --git a/icons/open-ecc.svg b/icons/open-ecc.svg
new file mode 100644
index 0000000..02dd35b
--- /dev/null
+++ b/icons/open-ecc.svg
@@ -0,0 +1,42 @@
+
diff --git a/icons/open-img.png b/icons/open-img.png
deleted file mode 100644
index a7adbca..0000000
Binary files a/icons/open-img.png and /dev/null differ
diff --git a/icons/open-img.svg b/icons/open-img.svg
new file mode 100644
index 0000000..01a86dd
--- /dev/null
+++ b/icons/open-img.svg
@@ -0,0 +1,34 @@
+
diff --git a/icons/preferences.svg b/icons/preferences.svg
new file mode 100644
index 0000000..00abbca
--- /dev/null
+++ b/icons/preferences.svg
@@ -0,0 +1,41 @@
+
diff --git a/icons/puzzle.fig b/icons/puzzle.fig
deleted file mode 100644
index 9dfdf44..0000000
--- a/icons/puzzle.fig
+++ /dev/null
@@ -1,35 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Metric
-A4
-100.00
-Single
--2
-1200 2
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
- 4950 2700 9450 2700 9450 7650 4950 7650 4950 2700
-2 1 0 20 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
- 3150 2700 10845 2700
-2 1 0 20 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
- 3150 7650 10800 7650
-2 1 0 20 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
- 4950 900 4950 9000
-2 1 0 20 0 7 5 -1 -1 0.000 0 0 -1 0 0 2
- 9450 900 9450 9045
-3 0 0 20 0 7 50 -1 -1 0.000 0 0 0 7
- 6525 2700 6300 2250 6300 1575 7200 1080 8100 1575 8100 2250
- 7875 2700
- 0.000 1.000 1.000 1.000 1.000 1.000 0.000
-3 0 0 20 0 7 50 -1 -1 0.000 0 0 0 7
- 4950 4275 4500 4050 3825 4050 3330 4950 3825 5850 4500 5850
- 4950 5625
- 0.000 1.000 1.000 1.000 1.000 1.000 0.000
-3 0 0 20 0 7 50 -1 -1 0.000 0 0 0 7
- 9450 4320 9000 4095 8325 4095 7830 4995 8325 5895 9000 5895
- 9450 5670
- 0.000 1.000 1.000 1.000 1.000 1.000 0.000
-3 0 0 20 0 7 50 -1 -1 0.000 0 0 0 7
- 6525 7650 6300 7200 6300 6525 7200 6030 8100 6525 8100 7200
- 7875 7650
- 0.000 1.000 1.000 1.000 1.000 1.000 0.000
diff --git a/icons/quit.svg b/icons/quit.svg
new file mode 100644
index 0000000..d76ae07
--- /dev/null
+++ b/icons/quit.svg
@@ -0,0 +1,31 @@
+
diff --git a/icons/read-symbolic.svg b/icons/read-symbolic.svg
new file mode 100644
index 0000000..b51940e
--- /dev/null
+++ b/icons/read-symbolic.svg
@@ -0,0 +1,5 @@
+
diff --git a/icons/read.png b/icons/read.png
deleted file mode 100644
index a28fafa..0000000
Binary files a/icons/read.png and /dev/null differ
diff --git a/icons/scan.fig b/icons/scan.fig
deleted file mode 100644
index 7065ad9..0000000
--- a/icons/scan.fig
+++ /dev/null
@@ -1,35 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Metric
-A4
-100.00
-Single
--2
-1200 2
-2 1 0 20 0 7 50 0 -1 0.000 0 0 -1 0 0 2
- 1710 7965 1080 7965
-2 1 0 20 0 7 50 0 -1 0.000 0 0 -1 0 0 2
- 1710 6165 1080 6165
-2 1 0 20 0 7 50 0 -1 0.000 0 0 -1 0 0 2
- 1710 4365 1080 4365
-2 1 0 20 0 7 50 0 -1 0.000 0 0 -1 0 0 2
- 3960 7965 3960 8460
-2 1 0 20 0 7 50 0 -1 0.000 0 0 -1 0 0 2
- 1710 2565 1125 2565
-2 1 0 20 0 7 50 0 -1 0.000 0 0 -1 0 0 2
- 6210 7965 6210 8415
-2 1 0 20 0 7 50 0 -1 0.000 0 0 -1 0 0 2
- 8460 7965 8460 8415
-2 1 0 20 0 7 50 0 -1 0.000 0 0 -1 0 0 2
- 10710 7965 10710 8415
-2 1 0 20 0 7 50 0 -1 0.000 0 0 -1 0 0 2
- 1710 765 1125 765
-2 1 0 20 0 7 50 0 -1 0.000 0 0 -1 0 0 2
- 1710 8010 1710 8505
-2 1 0 20 0 7 50 0 -1 0.000 0 0 -1 0 0 3
- 1710 450 1710 7965 11160 7965
-3 0 0 30 1 7 51 0 -1 0.000 0 0 0 8
- 1755 5580 2160 4545 2700 3870 3420 3195 4590 2385 6435 1710
- 8865 1260 11205 1170
- 0.000 1.000 1.000 1.000 1.000 1.000 1.000 0.000
diff --git a/icons/scan.png b/icons/scan.png
deleted file mode 100644
index 6127ce5..0000000
Binary files a/icons/scan.png and /dev/null differ
diff --git a/icons/scan.svg b/icons/scan.svg
new file mode 100644
index 0000000..e109341
--- /dev/null
+++ b/icons/scan.svg
@@ -0,0 +1,4 @@
+
diff --git a/icons/source/medium.svg b/icons/source/medium.svg
deleted file mode 100644
index 86de240..0000000
--- a/icons/source/medium.svg
+++ /dev/null
@@ -1,626 +0,0 @@
-
-
-
-
diff --git a/icons/stop.svg b/icons/stop.svg
new file mode 100644
index 0000000..09ebbe8
--- /dev/null
+++ b/icons/stop.svg
@@ -0,0 +1,169 @@
+
+
+
diff --git a/icons/strip.png b/icons/strip.png
deleted file mode 100644
index f0f7b30..0000000
Binary files a/icons/strip.png and /dev/null differ
diff --git a/icons/strip.svg b/icons/strip.svg
new file mode 100644
index 0000000..39e51ab
--- /dev/null
+++ b/icons/strip.svg
@@ -0,0 +1,17 @@
+
diff --git a/icons/tooltip.png b/icons/tooltip.png
deleted file mode 100644
index e7716ed..0000000
Binary files a/icons/tooltip.png and /dev/null differ
diff --git a/icons/verify.fig b/icons/verify.fig
deleted file mode 100644
index cff340b..0000000
--- a/icons/verify.fig
+++ /dev/null
@@ -1,27 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Metric
-A4
-100.00
-Single
--2
-1200 2
-6 8595 9495 15885 16785
-5 1 0 20 0 7 50 0 -1 0.000 0 1 0 0 12240.000 14871.000 12240 13140 10509 14871 12240 16602
-5 1 0 20 0 7 50 0 -1 0.000 0 0 0 0 12240.000 11409.000 12240 9678 13971 11409 12240 13140
-1 3 0 20 0 7 50 0 -1 0.000 1 0.0000 12240 14871 500 500 12240 14871 12740 14871
-1 3 0 20 0 7 50 0 -1 0.000 1 0.0000 12240 13140 3457 3457 12240 13140 15697 13140
-1 3 0 20 0 7 50 0 -1 0.000 1 0.0000 12240 11409 500 500 12240 11409 12740 11409
--6
-6 1665 2520 7200 9270
-6 1665 2520 7200 9270
-4 0 0 50 -1 18 160 0.0000 4 1695 6750 1710 9270 00111\001
-4 0 0 50 -1 18 160 0.0000 4 1695 6750 1665 4275 01110\001
-4 0 0 50 -1 18 160 0.0000 4 1695 6750 1665 6705 10011\001
--6
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
- 1350 2250 16200 2250 16200 17100 1350 17100 1350 2250
-2 1 0 30 0 7 50 -1 -1 0.000 0 1 -1 0 0 2
- 12600 5805 4905 13905
diff --git a/icons/verify.png b/icons/verify.png
deleted file mode 100644
index 1004796..0000000
Binary files a/icons/verify.png and /dev/null differ
diff --git a/icons/verify.svg b/icons/verify.svg
new file mode 100644
index 0000000..08b6a77
--- /dev/null
+++ b/icons/verify.svg
@@ -0,0 +1,18 @@
+
diff --git a/src/closure.c b/src/closure.c
index 98a30ff..4bdf28f 100644
--- a/src/closure.c
+++ b/src/closure.c
@@ -24,10 +24,6 @@
#include "dvdisaster.h"
-#ifdef WITH_GUI_YES
- #include "inlined-icons.h"
-#endif
-
#ifdef SYS_MINGW
#include
diff --git a/src/dvdisaster.h b/src/dvdisaster.h
index 454e8a2..dba460a 100644
--- a/src/dvdisaster.h
+++ b/src/dvdisaster.h
@@ -877,14 +877,6 @@ int SearchPlausibleSector(struct _RawBuffer*, int);
int BruteForceSearchPlausibleSector(struct _RawBuffer*);
int AckHeuristic(struct _RawBuffer*);
-/***
- *** icon-factory.c
- ***/
-
-#ifdef WITH_GUI_YES
-void GuiCreateIconFactory();
-#endif
-
/***
*** image.c
***/
diff --git a/src/icon-factory.c b/src/icon-factory.c
deleted file mode 100644
index 26cf084..0000000
--- a/src/icon-factory.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* dvdisaster: Additional error correction for optical media.
- * Copyright (C) 2004-2017 Carsten Gnoerlich.
- * Copyright (C) 2019-2021 The dvdisaster development team.
- *
- * Email: support@dvdisaster.org
- *
- * This file is part of dvdisaster.
- *
- * dvdisaster is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * dvdisaster is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with dvdisaster. If not, see .
- */
-
-/*** src type: only GUI code ***/
-
-#ifdef WITH_GUI_YES
-#include "dvdisaster.h"
-
-#include "inlined-icons.h"
-
-/***
- *** Create our icon factory
- ***/
-
-static GdkPixbuf* create_icon(GtkIconFactory *ifact, char *name, const guint8 *inline_data)
-{ GdkPixbuf *pb;
- GtkIconSet *iset;
- int width, height, rowstride;
-
- /* gdk_pixbuf_new_from_inline() deprecated; recommended to replace with GResource XML crap.
- One day I'll get rid of GTK+. I swear.
-
- pb = gdk_pixbuf_new_from_inline(-1, inline_data, FALSE, NULL);
- */
-
- rowstride = (inline_data[12] << 24) + (inline_data[13] << 16) + (inline_data[14] << 8) + inline_data[15];
- width = (inline_data[16] << 24) + (inline_data[17] << 16) + (inline_data[18] << 8) + inline_data[19];
- height = (inline_data[20] << 24) + (inline_data[21] << 16) + (inline_data[22] << 8) + inline_data[23];
-
- pb = gdk_pixbuf_new_from_data(inline_data+24, GDK_COLORSPACE_RGB, TRUE, 8,
- width, height, rowstride, NULL, NULL);
-
- iset = gtk_icon_set_new_from_pixbuf(pb);
-
- gtk_icon_factory_add(ifact, name, iset);
- return pb;
-}
-
-void GuiCreateIconFactory()
-{ GtkIconFactory *ifact;
-
- /*** Create and register our icon factory */
-
- ifact = gtk_icon_factory_new();
- gtk_icon_factory_add_default(ifact);
-
- /*** Our action icons */
-
- create_icon(ifact, "dvdisaster-open-ecc", dvdisaster_open_ecc);
- create_icon(ifact, "dvdisaster-open-img", dvdisaster_open_img);
- create_icon(ifact, "dvdisaster-cd", dvdisaster_cd);
-
- create_icon(ifact, "dvdisaster-read", dvdisaster_read);
- Closure->windowIcon = create_icon(ifact, "dvdisaster-create", dvdisaster_create);
- create_icon(ifact, "dvdisaster-scan", dvdisaster_scan);
- create_icon(ifact, "dvdisaster-fix", dvdisaster_fix);
- create_icon(ifact, "dvdisaster-verify", dvdisaster_verify);
- create_icon(ifact, "dvdisaster-strip", dvdisaster_strip);
-
- /*** Tooltip icon in preferences */
- create_icon(ifact, "dvdisaster-tooltip", dvdisaster_tooltip);
- create_icon(ifact, "dvdisaster-nothing", dvdisaster_nothing);
-
- /*** Stock GTK icons to defeat theming */
-
- create_icon(ifact, "dvdisaster-gtk-help", dvdisaster_gtk_help);
- create_icon(ifact, "dvdisaster-gtk-index", dvdisaster_gtk_index);
- create_icon(ifact, "dvdisaster-gtk-preferences", dvdisaster_gtk_preferences);
- create_icon(ifact, "dvdisaster-gtk-quit", dvdisaster_gtk_quit);
- create_icon(ifact, "dvdisaster-gtk-stop", dvdisaster_gtk_stop);
-}
-#endif /* WITH_GUI_YES */
diff --git a/src/main-window.c b/src/main-window.c
index cd7804b..b5778ee 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -250,14 +250,13 @@ void GuiContinueWithAction(int action)
* Create the action buttons and the associated notebook pages
*/
-static GtkWidget *create_button(char *label, char *icon)
+static GtkWidget *create_button(char *label, char *icon, gint scale)
{ GtkWidget *button,*box,*image,*lab;
char *utf_label = g_locale_to_utf8(label, -1, NULL, NULL, NULL);
-
button = gtk_button_new();
box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
- image = gtk_image_new_from_stock(icon, GTK_ICON_SIZE_LARGE_TOOLBAR);
+ image = gtk_image_new_from_icon_name(icon, GTK_ICON_SIZE_LARGE_TOOLBAR);
lab = gtk_label_new(utf_label);
g_free(utf_label);
@@ -275,6 +274,8 @@ static GtkWidget* create_action_bar(GtkNotebook *notebook)
int window_number = FIRST_CREATE_WINDOW;
unsigned int i;
+ gint scale = gtk_widget_get_scale_factor(GTK_WIDGET(notebook));
+
outer_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_box_set_homogeneous(GTK_BOX(outer_vbox), TRUE);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); /* needed for vertical spacing */
@@ -282,7 +283,7 @@ static GtkWidget* create_action_bar(GtkNotebook *notebook)
/*** Read */
- Closure->readButton = wid = create_button(_("button|Read"), "dvdisaster-read");
+ Closure->readButton = wid = create_button(_("button|Read"), "read", scale);
g_signal_connect(G_OBJECT(wid), "clicked", G_CALLBACK(action_cb), (gpointer)ACTION_READ);
gtk_box_pack_start(GTK_BOX(vbox), wid, FALSE, FALSE, 0);
GuiAttachTooltip(wid, _("tooltip|Read Image"),
@@ -300,7 +301,7 @@ static GtkWidget* create_action_bar(GtkNotebook *notebook)
/*** Create */
- Closure->createButton = wid = create_button(_("button|Create"), "dvdisaster-create");
+ Closure->createButton = wid = create_button(_("button|Create"), "create", scale);
g_signal_connect(G_OBJECT(wid), "clicked", G_CALLBACK(action_cb), (gpointer)ACTION_CREATE);
gtk_box_pack_start(GTK_BOX(vbox), wid, FALSE, FALSE, 0);
GuiAttachTooltip(wid, _("tooltip|Create error correction data"),
@@ -308,7 +309,7 @@ static GtkWidget* create_action_bar(GtkNotebook *notebook)
/*** Scan */
- Closure->scanButton = wid = create_button(_("button|Scan"), "dvdisaster-scan");
+ Closure->scanButton = wid = create_button(_("button|Scan"), "scan", scale);
g_signal_connect(G_OBJECT(wid), "clicked", G_CALLBACK(action_cb), (gpointer)ACTION_SCAN);
gtk_box_pack_start(GTK_BOX(vbox), wid, FALSE, FALSE, 0);
GuiAttachTooltip(wid, _("tooltip|Scan medium"),
@@ -316,7 +317,7 @@ static GtkWidget* create_action_bar(GtkNotebook *notebook)
/*** Fix */
- Closure->fixButton = wid = create_button(_("button|Fix"), "dvdisaster-fix");
+ Closure->fixButton = wid = create_button(_("button|Fix"), "fix", scale);
g_signal_connect(G_OBJECT(wid), "clicked", G_CALLBACK(action_cb), (gpointer)ACTION_FIX);
gtk_box_pack_start(GTK_BOX(vbox), wid, FALSE, FALSE, 0);
GuiAttachTooltip(wid, _("tooltip|Repair image"),
@@ -324,7 +325,7 @@ static GtkWidget* create_action_bar(GtkNotebook *notebook)
/*** Verify */
- Closure->testButton = wid = create_button(_("button|Verify"), "dvdisaster-verify");
+ Closure->testButton = wid = create_button(_("button|Verify"), "verify", scale);
g_signal_connect(G_OBJECT(wid), "clicked", G_CALLBACK(action_cb), (gpointer)ACTION_VERIFY);
gtk_box_pack_start(GTK_BOX(vbox), wid, FALSE, FALSE, 0);
GuiAttachTooltip(wid, _("tooltip|Consistency check"),
@@ -332,7 +333,7 @@ static GtkWidget* create_action_bar(GtkNotebook *notebook)
/*** Strip */
- Closure->stripButton = wid = create_button(_("button|Strip"), "dvdisaster-strip");
+ Closure->stripButton = wid = create_button(_("button|Strip"), "strip", scale);
g_signal_connect(G_OBJECT(wid), "clicked", G_CALLBACK(action_cb), (gpointer)ACTION_STRIP);
gtk_box_pack_start(GTK_BOX(vbox), wid, FALSE, FALSE, 0);
GuiAttachTooltip(wid, _("tooltip|Strip ECC"),
@@ -340,7 +341,7 @@ static GtkWidget* create_action_bar(GtkNotebook *notebook)
/*** Stop */
- wid = create_button(_("button|Stop"), "dvdisaster-gtk-stop");
+ wid = create_button(_("button|Stop"), "stop", scale);
g_signal_connect(G_OBJECT(wid), "clicked", G_CALLBACK(action_cb), (gpointer)ACTION_STOP);
gtk_box_pack_end(GTK_BOX(vbox), wid, FALSE, FALSE, 0);
GuiAttachTooltip(wid, _("tooltip|Abort action"),
@@ -409,9 +410,9 @@ void GuiCreateMainWindow(int *argc, char ***argv)
gtk_init(argc, argv);
- /*** Create our icons */
+ /*** Set path to our icons */
- GuiCreateIconFactory();
+ gtk_icon_theme_add_resource_path(gtk_icon_theme_get_default(), "/dvdisaster/");
/*** Open the main window */
@@ -495,8 +496,7 @@ void GuiCreateMainWindow(int *argc, char ***argv)
box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add(GTK_CONTAINER(button), box);
- icon = gtk_image_new_from_stock("dvdisaster-gtk-index", GTK_ICON_SIZE_SMALL_TOOLBAR);
-
+ icon = gtk_image_new_from_icon_name("log", GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_box_pack_start(GTK_BOX(box), icon, FALSE, FALSE, 2);
wid = gtk_label_new(_utf("View log"));
diff --git a/src/menubar.c b/src/menubar.c
index c8fbc84..8afe27a 100644
--- a/src/menubar.c
+++ b/src/menubar.c
@@ -446,7 +446,7 @@ GtkWidget *GuiCreateToolBar(GtkWidget *parent)
gtk_box_pack_start(GTK_BOX(box), ebox, FALSE, FALSE, 0);
GuiAttachTooltip(ebox, _("tooltip|Drive selection"),
_("Use the nearby drop-down list to select the input drive."));
- icon = gtk_image_new_from_stock("dvdisaster-cd", GTK_ICON_SIZE_LARGE_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("cd", GTK_ICON_SIZE_LARGE_TOOLBAR);
gtk_container_add(GTK_CONTAINER(ebox), icon);
Closure->driveCombo = combo_box = gtk_combo_box_text_new();
@@ -480,7 +480,7 @@ GtkWidget *GuiCreateToolBar(GtkWidget *parent)
/*** Image file selection */
- icon = gtk_image_new_from_stock("dvdisaster-open-img", GTK_ICON_SIZE_LARGE_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("open-img", GTK_ICON_SIZE_LARGE_TOOLBAR);
button = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
gtk_container_add(GTK_CONTAINER(button), icon);
@@ -508,7 +508,7 @@ GtkWidget *GuiCreateToolBar(GtkWidget *parent)
/*** Ecc file selection */
- icon = gtk_image_new_from_stock("dvdisaster-open-ecc", GTK_ICON_SIZE_LARGE_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("open-ecc", GTK_ICON_SIZE_LARGE_TOOLBAR);
button = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
gtk_container_add(GTK_CONTAINER(button), icon);
@@ -537,7 +537,7 @@ GtkWidget *GuiCreateToolBar(GtkWidget *parent)
/*** Preferences button */
- icon = gtk_image_new_from_stock("dvdisaster-gtk-preferences", GTK_ICON_SIZE_LARGE_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("preferences", GTK_ICON_SIZE_LARGE_TOOLBAR);
Closure->prefsButton = prefs = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(prefs), GTK_RELIEF_NONE);
gtk_container_add(GTK_CONTAINER(prefs), icon);
@@ -549,7 +549,7 @@ GtkWidget *GuiCreateToolBar(GtkWidget *parent)
/*** Help button */
- icon = gtk_image_new_from_stock("dvdisaster-gtk-help", GTK_ICON_SIZE_LARGE_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("help", GTK_ICON_SIZE_LARGE_TOOLBAR);
Closure->helpButton = help = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(help), GTK_RELIEF_NONE);
gtk_container_add(GTK_CONTAINER(help), icon);
@@ -560,7 +560,7 @@ GtkWidget *GuiCreateToolBar(GtkWidget *parent)
/*** Quit button */
- icon = gtk_image_new_from_stock("dvdisaster-gtk-quit", GTK_ICON_SIZE_LARGE_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("quit", GTK_ICON_SIZE_LARGE_TOOLBAR);
quit = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(quit), GTK_RELIEF_NONE);
gtk_container_add(GTK_CONTAINER(quit), icon);
diff --git a/src/rs02-window.c b/src/rs02-window.c
index baf66b5..042cc7c 100644
--- a/src/rs02-window.c
+++ b/src/rs02-window.c
@@ -825,7 +825,7 @@ void CreateRS02PrefsPage(Method *method, GtkWidget *parent)
g_signal_connect(G_OBJECT(wl->cdButtonA), "clicked", G_CALLBACK(query_cb), wl);
gtk_grid_attach(GTK_GRID(grid), wl->cdButtonA, 3, 2, 1, 1);
- icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("edit-undo", GTK_ICON_SIZE_SMALL_TOOLBAR);
wl->cdUndoButtonA = gtk_button_new();
gtk_container_add(GTK_CONTAINER(wl->cdUndoButtonA), icon);
g_signal_connect(G_OBJECT(wl->cdUndoButtonA), "clicked", G_CALLBACK(query_cb), wl);
@@ -844,7 +844,7 @@ void CreateRS02PrefsPage(Method *method, GtkWidget *parent)
g_signal_connect(G_OBJECT(wl->cdButtonB), "clicked", G_CALLBACK(query_cb), wl);
gtk_box_pack_start(GTK_BOX(hbox), wl->cdButtonB, FALSE, FALSE, 0);
- icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("edit-undo", GTK_ICON_SIZE_SMALL_TOOLBAR);
wl->cdUndoButtonB = gtk_button_new();
gtk_container_add(GTK_CONTAINER(wl->cdUndoButtonB), icon);
g_signal_connect(G_OBJECT(wl->cdUndoButtonB), "clicked", G_CALLBACK(query_cb), wl);
@@ -888,7 +888,7 @@ void CreateRS02PrefsPage(Method *method, GtkWidget *parent)
g_signal_connect(G_OBJECT(wl->dvdButton1A), "clicked", G_CALLBACK(query_cb), wl);
gtk_grid_attach(GTK_GRID(grid), wl->dvdButton1A, 3, 3, 1, 1);
- icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("edit-undo", GTK_ICON_SIZE_SMALL_TOOLBAR);
wl->dvdUndoButton1A = gtk_button_new();
gtk_container_add(GTK_CONTAINER(wl->dvdUndoButton1A), icon);
g_signal_connect(G_OBJECT(wl->dvdUndoButton1A), "clicked", G_CALLBACK(query_cb), wl);
@@ -907,7 +907,7 @@ void CreateRS02PrefsPage(Method *method, GtkWidget *parent)
g_signal_connect(G_OBJECT(wl->dvdButton1B), "clicked", G_CALLBACK(query_cb), wl);
gtk_box_pack_start(GTK_BOX(hbox), wl->dvdButton1B, FALSE, FALSE, 0);
- icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("edit-undo", GTK_ICON_SIZE_SMALL_TOOLBAR);
wl->dvdUndoButton1B = gtk_button_new();
gtk_container_add(GTK_CONTAINER(wl->dvdUndoButton1B), icon);
g_signal_connect(G_OBJECT(wl->dvdUndoButton1B), "clicked", G_CALLBACK(query_cb), wl);
@@ -951,7 +951,7 @@ void CreateRS02PrefsPage(Method *method, GtkWidget *parent)
g_signal_connect(G_OBJECT(wl->dvdButton2A), "clicked", G_CALLBACK(query_cb), wl);
gtk_grid_attach(GTK_GRID(grid), wl->dvdButton2A, 3, 4, 1, 1);
- icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("edit-undo", GTK_ICON_SIZE_SMALL_TOOLBAR);
wl->dvdUndoButton2A = gtk_button_new();
gtk_container_add(GTK_CONTAINER(wl->dvdUndoButton2A), icon);
g_signal_connect(G_OBJECT(wl->dvdUndoButton2A), "clicked", G_CALLBACK(query_cb), wl);
@@ -970,7 +970,7 @@ void CreateRS02PrefsPage(Method *method, GtkWidget *parent)
g_signal_connect(G_OBJECT(wl->dvdButton2B), "clicked", G_CALLBACK(query_cb), wl);
gtk_box_pack_start(GTK_BOX(hbox), wl->dvdButton2B, FALSE, FALSE, 0);
- icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("edit-undo", GTK_ICON_SIZE_SMALL_TOOLBAR);
wl->dvdUndoButton2B = gtk_button_new();
gtk_container_add(GTK_CONTAINER(wl->dvdUndoButton2B), icon);
g_signal_connect(G_OBJECT(wl->dvdUndoButton2B), "clicked", G_CALLBACK(query_cb), wl);
@@ -1014,7 +1014,7 @@ void CreateRS02PrefsPage(Method *method, GtkWidget *parent)
g_signal_connect(G_OBJECT(wl->bdButton1A), "clicked", G_CALLBACK(query_cb), wl);
gtk_grid_attach(GTK_GRID(grid), wl->bdButton1A, 3, 5, 1, 1);
- icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("edit-undo", GTK_ICON_SIZE_SMALL_TOOLBAR);
wl->bdUndoButton1A = gtk_button_new();
gtk_container_add(GTK_CONTAINER(wl->bdUndoButton1A), icon);
g_signal_connect(G_OBJECT(wl->bdUndoButton1A), "clicked", G_CALLBACK(query_cb), wl);
@@ -1033,7 +1033,7 @@ void CreateRS02PrefsPage(Method *method, GtkWidget *parent)
g_signal_connect(G_OBJECT(wl->bdButton1B), "clicked", G_CALLBACK(query_cb), wl);
gtk_box_pack_start(GTK_BOX(hbox), wl->bdButton1B, FALSE, FALSE, 0);
- icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("edit-undo", GTK_ICON_SIZE_SMALL_TOOLBAR);
wl->bdUndoButton1B = gtk_button_new();
gtk_container_add(GTK_CONTAINER(wl->bdUndoButton1B), icon);
g_signal_connect(G_OBJECT(wl->bdUndoButton1B), "clicked", G_CALLBACK(query_cb), wl);
@@ -1076,7 +1076,7 @@ void CreateRS02PrefsPage(Method *method, GtkWidget *parent)
g_signal_connect(G_OBJECT(wl->bdButton2A), "clicked", G_CALLBACK(query_cb), wl);
gtk_grid_attach(GTK_GRID(grid), wl->bdButton2A, 3, 6, 1, 1);
- icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("edit-undo", GTK_ICON_SIZE_SMALL_TOOLBAR);
wl->bdUndoButton2A = gtk_button_new();
gtk_container_add(GTK_CONTAINER(wl->bdUndoButton2A), icon);
g_signal_connect(G_OBJECT(wl->bdUndoButton2A), "clicked", G_CALLBACK(query_cb), wl);
@@ -1095,7 +1095,7 @@ void CreateRS02PrefsPage(Method *method, GtkWidget *parent)
g_signal_connect(G_OBJECT(wl->bdButton2B), "clicked", G_CALLBACK(query_cb), wl);
gtk_box_pack_start(GTK_BOX(hbox), wl->bdButton2B, FALSE, FALSE, 0);
- icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("edit-undo", GTK_ICON_SIZE_SMALL_TOOLBAR);
wl->bdUndoButton2B = gtk_button_new();
gtk_container_add(GTK_CONTAINER(wl->bdUndoButton2B), icon);
g_signal_connect(G_OBJECT(wl->bdUndoButton2B), "clicked", G_CALLBACK(query_cb), wl);
@@ -1138,7 +1138,7 @@ void CreateRS02PrefsPage(Method *method, GtkWidget *parent)
g_signal_connect(G_OBJECT(wl->bdButton3A), "clicked", G_CALLBACK(query_cb), wl);
gtk_grid_attach(GTK_GRID(grid), wl->bdButton3A, 3, 7, 1, 1);
- icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("edit-undo", GTK_ICON_SIZE_SMALL_TOOLBAR);
wl->bdUndoButton3A = gtk_button_new();
gtk_container_add(GTK_CONTAINER(wl->bdUndoButton3A), icon);
g_signal_connect(G_OBJECT(wl->bdUndoButton3A), "clicked", G_CALLBACK(query_cb), wl);
@@ -1157,7 +1157,7 @@ void CreateRS02PrefsPage(Method *method, GtkWidget *parent)
g_signal_connect(G_OBJECT(wl->bdButton3B), "clicked", G_CALLBACK(query_cb), wl);
gtk_box_pack_start(GTK_BOX(hbox), wl->bdButton3B, FALSE, FALSE, 0);
- icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("edit-undo", GTK_ICON_SIZE_SMALL_TOOLBAR);
wl->bdUndoButton3B = gtk_button_new();
gtk_container_add(GTK_CONTAINER(wl->bdUndoButton3B), icon);
g_signal_connect(G_OBJECT(wl->bdUndoButton3B), "clicked", G_CALLBACK(query_cb), wl);
@@ -1202,7 +1202,7 @@ void CreateRS02PrefsPage(Method *method, GtkWidget *parent)
g_signal_connect(G_OBJECT(wl->bdButton4A), "clicked", G_CALLBACK(query_cb), wl);
gtk_grid_attach(GTK_GRID(grid), wl->bdButton4A, 3, 8, 1, 1);
- icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("edit-undo", GTK_ICON_SIZE_SMALL_TOOLBAR);
wl->bdUndoButton4A = gtk_button_new();
gtk_container_add(GTK_CONTAINER(wl->bdUndoButton4A), icon);
g_signal_connect(G_OBJECT(wl->bdUndoButton4A), "clicked", G_CALLBACK(query_cb), wl);
@@ -1221,7 +1221,7 @@ void CreateRS02PrefsPage(Method *method, GtkWidget *parent)
g_signal_connect(G_OBJECT(wl->bdButton4B), "clicked", G_CALLBACK(query_cb), wl);
gtk_box_pack_start(GTK_BOX(hbox), wl->bdButton4B, FALSE, FALSE, 0);
- icon = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name("edit-undo", GTK_ICON_SIZE_SMALL_TOOLBAR);
wl->bdUndoButton4B = gtk_button_new();
gtk_container_add(GTK_CONTAINER(wl->bdUndoButton4B), icon);
g_signal_connect(G_OBJECT(wl->bdUndoButton4B), "clicked", G_CALLBACK(query_cb), wl);