diff --git a/plug-ins/screenshot/meson.build b/plug-ins/screenshot/meson.build index 5e48aecda6..da187564a1 100644 --- a/plug-ins/screenshot/meson.build +++ b/plug-ins/screenshot/meson.build @@ -8,11 +8,36 @@ plugin_sources = [ 'screenshot.c', ] +screenshot_icons_images = [ + 'screenshot-icon.png', +] + +resourcename = 'screenshot-icons' +xml_content = '\n' +xml_content += '\n' +xml_content += ' \n' +foreach file : screenshot_icons_images + xml_content+=' '+ file +'\n' +endforeach +xml_content += ' \n' +xml_content += '\n' + +xml_file = configure_file( + output: resourcename + '.gresource.xml', + command: [ 'echo', xml_content ], + capture: true, +) + +plugin_sources += gnome.compile_resources( + resourcename, + xml_file, + c_name: resourcename.underscorify(), +) + if platform_windows plugin_sources += windows.compile_resources('screenshot-win32.rc') endif - screenshot = executable('screenshot', plugin_sources, dependencies: [ diff --git a/plug-ins/screenshot/screenshot-icon.h b/plug-ins/screenshot/screenshot-icon.h deleted file mode 100644 index 4e4de0cb78..0000000000 --- a/plug-ins/screenshot/screenshot-icon.h +++ /dev/null @@ -1,80 +0,0 @@ -/* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ - -#ifdef __SUNPRO_C -#pragma align 4 (screenshot_icon) -#endif -#ifdef __GNUC__ -static const guint8 screenshot_icon[] __attribute__ ((__aligned__ (4))) = -#else -static const guint8 screenshot_icon[] = -#endif -{ "" - /* Pixbuf magic (0x47646b50) */ - "GdkP" - /* length: header (24) + pixel_data (1582) */ - "\0\0\6F" - /* pixdata_type (0x2010002) */ - "\2\1\0\2" - /* rowstride (88) */ - "\0\0\0X" - /* width (22) */ - "\0\0\0\26" - /* height (22) */ - "\0\0\0\26" - /* pixel_data: */ - "\213\0\0\0\0\1\242\242\242\5\203\242\242\242\31\221\0\0\0\0\2\27\27\26" - "D\40\40\40\372\203)))\375\2\32\32\32\362\26\26\25""0\217\0\0\0\0\2\2" - "\2\2\322\307\310\307\377\203\377\377\377\377\2\263\263\262\363\0\0\0" - "\314\217\0\0\0\0\2\6\6\6\334\206\207\205\377\202\252\253\251\377\3\252" - "\252\251\377ghe\376\1\1\1\320\217\0\0\0\0\2\11\11\11\346./-\345\202G" - "HE\25\3JKH\32""01/\364\5\5\5\333\212\0\0\0\0\17\26\26\25\31\26\26\25" - "0\26\26\25g\0\0\0\314+,+\331LMK\375EFD\362ffe\347iig\346lmk\346RSQ\362" - "\13\13\13\360\0\0\0\314\2\2\2\321\26\26\25V\203\0\0\0\0#\26\26\25\31" - "\26\26\25""0\26\26\25n\3\3\3\331\2\2\2\332JJI\355\215\215\215\372\246" - "\246\246\347\267\270\266\362\177\202~\377BC\77\377TUR\377\\]Y\377gid" - "\377[]X\377\204\206\204\374wxw\276\224\225\224\314LLK\343\26\26\25D\0" - "\0\0\0\26\26\25D\3\3\3\341\17\17\17\373ghg\377\237\240\236\377\273\274" - "\272\377\302\303\300\377\272\273\270\377\200\201\177\377zzz\377tws\377" - "\220\223\217\377\221\225\221\377\224\227\223\377\202\226\232\226\377" - "K\177\202}\377xyu\377\217\221\215\377\226\227\226\365\0\0\0\371\0\0\0" - "\0\2\2\2\330\257\261\257\377\275\276\273\377\262\263\260\377UWT\377Q" - "SP\377suq\377]^[\377\304\304\304\377\303\303\303\377kmi\377MNJ\377WZ" - "X\377[`_\377aeb\377gid\377}\200{\377SUQ\377FGE\377\200\201\200\377\12" - "\12\12\357\0\0\0\0\4\4\4\345xyv\377\241\242\236\377\210\212\205\377v" - "xt\377\220\222\217\377GIF\377+,)\377```\377jji\377UXV\377y\204\210\377" - "\203\215\220\377~\204\207\377flo\377PW\\\377SWU\377JLI\377452\377tut" - "\377\12\12\12\357\0\0\0\0\4\4\4\344opm\377\221\223\217\377}\177{\377" - "\215\217\213\377`b_\377()'\377*+)\377785\377VXV\377u~\202\377nsu\377" - "VYZ\377OST\377OQS\377JOP\377^cd\377698\377!\"!\377llk\377\12\12\12\357" - "\0\0\0\0\3\3\3\345npl\377\220\221\216\377\202UWS\377\24GIF\377\40!\37" - "\377*+)\3779:7\377^ce\377NRT\377UXY\377(,.\377\22\24\25\377!$&\377IL" - "M\3778=\77\377RVX\377''&\377klk\377\12\12\12\357\0\0\0\1\3\3\3\345no" - "l\377\220\221\216\377\202UWS\377\24GIF\377\40!\37\377*+)\3778:8\377T" - "XY\377289\377\23\25\26\377\16\16\16\377\1\1\1\377\2\2\2\377\24\25\25" - "\377.34\377289\377011\377aa`\377\11\11\11\360\0\0\0\3\3\3\3\345nol\377" - "\204\205\202\377\202UWS\377\24GIF\377\40!\37\377*+)\377\77BA\37728:\377" - "\34\40!\377\31\32\32\377\377\377\377\377hhh\377\40\40\40\377\22\22\22" - "\377.00\377.46\377:>\77\377`a`\377\11\11\10\361\0\0\0\7\3\3\3\345mok" - "\377z{x\377\202UWS\377\24GIF\377\40!\37\377*+)\377HJI\377.46\377\25\27" - "\30\377\40\40\40\377hhh\377\232\232\232\377}}}\377'''\3779;;\377/57\377" - "599\377``_\377\11\11\10\362\0\0\0\15\3\3\3\345lnk\377rsp\377\202UWS\377" - "\24GIF\377\40!\37\377,-*\377>@>\377.46\377\35\37\40\377\1\1\1\377888" - "\377\214\214\214\377\213\213\213\377AAA\377JKK\377/57\3776:;\377WXV\377" - "\6\6\6\364\0\0\0\21\0\0\0\371\201\202\177\377mok\377\202UWS\377iGIF\377" - "MNM\377RRR\372ghg\364[`b\377+/0\377\17\17\17\377\"\"\"\377'''\377HHH" - "\377\263\263\263\377SUU\377W\\^\377CFF\374<<<\376\20\20\17\317\0\0\0" - "\20\24\24\23]\4\4\4\353\177\177~\375|}z\373}~|\374hih\3769:9\371\0\0" - "\0\347\0\0\0\351\7\7\7\367.46\377256\377\40\40\40\377(((\377:::\377`" - "ab\3779>\77\377\11\13\13\376\0\0\0\353\0\0\0\300\14\14\13H\0\0\0\15\0" - "\0\0\4\23\23\22L\0\0\0\332\0\0\0\341\0\0\0\346\0\0\0\341\14\14\13{\0" - "\0\0V\0\0\0a\0\0\0l\10\11\11\371\\^_\377LOP\377ILL\377LOQ\377QUV\377" - "\16\17\17\377\34\37\40\244\0\0\0`\0\0\0""4\0\0\0\27\0\0\0\7\0\0\0\1\0" - "\0\0\3\0\0\0\10\0\0\0\21\0\0\0\34\0\0\0'\0\0\0""0\0\0\0""6\0\0\0=\0\0" - "\0A\0\0\0F\4\5\5\355\12\13\13\371\17\20\20\376\15\16\16\375\10\10\11" - "\365\7\10\11j\0\0\0G\0\0\0-\0\0\0\30\0\0\0\13\0\0\0\4\0\0\0\0\0\0\0\1" - "\0\0\0\2\0\0\0\4\0\0\0\11\0\0\0\16\0\0\0\23\0\0\0\31\0\0\0\35\0\0\0!" - "\0\0\0#\0\0\0$\0\0\0%\0\0\0$\0\0\0&\0\0\0%\0\0\0\36\0\0\0\27\0\0\0\20" - "\0\0\0\10\0\0\0\3\0\0\0\1\204\0\0\0\0\5\0\0\0\1\0\0\0\2\0\0\0\4\0\0\0" - "\5\0\0\0\6\202\0\0\0\10\11\0\0\0\11\0\0\0\7\0\0\0\10\0\0\0\5\0\0\0\7" - "\0\0\0\6\0\0\0\5\0\0\0\3\0\0\0\1\202\0\0\0\0" -}; diff --git a/plug-ins/screenshot/screenshot-icon.png b/plug-ins/screenshot/screenshot-icon.png new file mode 100644 index 0000000000..316840a5da Binary files /dev/null and b/plug-ins/screenshot/screenshot-icon.png differ diff --git a/plug-ins/screenshot/screenshot.c b/plug-ins/screenshot/screenshot.c index c13f43c1cf..3af22b3ad3 100644 --- a/plug-ins/screenshot/screenshot.c +++ b/plug-ins/screenshot/screenshot.c @@ -28,7 +28,6 @@ #include "screenshot.h" #include "screenshot-freedesktop.h" -#include "screenshot-icon.h" #include "screenshot-osx.h" #include "screenshot-x11.h" #include "screenshot-win32.h" @@ -166,10 +165,8 @@ screenshot_create_procedure (GimpPlugIn *plug_in, "1998 - 2008", "v1.1 (2008/04)"); - gimp_procedure_set_icon_pixbuf (procedure, - gdk_pixbuf_new_from_inline (-1, screenshot_icon, - FALSE, NULL)); + gdk_pixbuf_new_from_resource ("/org/gimp/screenshot-icons/screenshot-icon.png", NULL)); GIMP_PROC_ARG_ENUM (procedure, "run-mode", "Run mode",