diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..dd575c1 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ + +all: spaceapi-gtk + +spaceapi-gtk: spaceapi-gtk.c + $(CC) -Wall -g `pkg-config --cflags --libs gtk+-2.0 --libs libcurl --libs json-c --libs libnotify` -DLIBNOTIFY -o spaceapi-gtk spaceapi-gtk.c + +clean: + rm -f spaceapi-gtk diff --git a/pesthoernchen.h b/pesthoernchen.h new file mode 100644 index 0000000..41a16e0 --- /dev/null +++ b/pesthoernchen.h @@ -0,0 +1,575 @@ +/* + * This file contais the pixbuf data for the panel icon. + */ + +static const GdkPixdata icon_black_pixbuf = { + 0x47646b50, /* Pixbuf magic: 'GdkP' */ + 24 + 3417, /* header length + pixel_data length */ + 0x2010002, /* pixdata_type */ + 192, /* rowstride */ + 48, /* width */ + 48, /* height */ + /* pixel_data: */ + (guint8 *) + "\377\0\0\0\0\243\0\0\0\0\7\0\0\0\12\0\0\0""9\0\0\0W\0\0\0o\0\0\0f\0\0" + "\0V\0\0\0$\247\0\0\0\0\3\0\0\0;\0\0\0\254\0\0\0\365\206\0\0\0\377\3\0" + "\0\0\327\0\0\0d\0\0\0\4\226\0\0\0\0\1\0\0\0""7\204\0\0\0U\1\0\0\0B\206" + "\0\0\0\0\2\0\0\0\34\0\0\0\261\213\0\0\0\377\2\0\0\0\325\0\0\0""8\206" + "\0\0\0\0\1\0\0\0D\202\0\0\0\210\1\0\0\0\217\204\0\0\0\231\4\0\0\0\241" + "\0\0\0\252\0\0\0\235\0\0\0\20\203\0\0\0\0\1\0\0\0\240\204\0\0\0\377\1" + "\0\0\0\267\205\0\0\0\0\2\0\0\0""9\0\0\0\352\215\0\0\0\377\2\0\0\0\373" + "\0\0\0v\205\0\0\0\0\1\0\0\0b\212\0\0\0\377\1\0\0\0\23\203\0\0\0\0\1\0" + "\0\0\226\204\0\0\0\377\1\0\0\0\264\204\0\0\0\0\2\0\0\0""7\0\0\0\365\220" + "\0\0\0\377\2\0\0\0\224\0\0\0\2\203\0\0\0\0\1\0\0\0Q\211\0\0\0\377\2\0" + "\0\0\375\0\0\0\1\203\0\0\0\0\1\0\0\0\207\204\0\0\0\377\1\0\0\0\300\203" + "\0\0\0\0\2\0\0\0\24\0\0\0\350\222\0\0\0\377\1\0\0\0\207\203\0\0\0\0\1" + "\0\0\0@\211\0\0\0\377\1\0\0\0\353\204\0\0\0\0\1\0\0\0n\204\0\0\0\377" + "\1\0\0\0\347\203\0\0\0\0\1\0\0\0\246\224\0\0\0\377\1\0\0\0W\202\0\0\0" + "\0\1\0\0\0<\211\0\0\0\377\1\0\0\0\327\204\0\0\0\0\1\0\0\0Q\205\0\0\0" + "\377\4\0\0\0\17\0\0\0\0\0\0\0,\0\0\0\375\224\0\0\0\377\4\0\0\0\352\0" + "\0\0\24\0\0\0\0\0\0\0D\211\0\0\0\377\1\0\0\0\256\204\0\0\0\0\1\0\0\0" + "3\205\0\0\0\377\3\0\0\0K\0\0\0\0\0\0\0\223\226\0\0\0\377\3\0\0\0\217" + "\0\0\0\0\0\0\0R\211\0\0\0\377\1\0\0\0\201\204\0\0\0\0\2\0\0\0\14\0\0" + "\0\375\204\0\0\0\377\3\0\0\0\221\0\0\0\0\0\0\0\345\206\0\0\0\377\4\0" + "\0\0\320\0\0\0\233\0\0\0\226\0\0\0\376\204\0\0\0\377\13\0\0\0\371\0\0" + "\0\221\0\0\0H\0\0\0=\0\0\0S\0\0\0\234\0\0\0\372\0\0\0\377\0\0\0\363\0" + "\0\0\23\0\0\0{\211\0\0\0\377\1\0\0\0Q\205\0\0\0\0\1\0\0\0\325\204\0\0" + "\0\377\2\0\0\0\331\0\0\0\"\204\0\0\0\377\3\0\0\0\345\0\0\0\203\0\0\0" + "#\203\0\0\0\0\1\0\0\0\241\203\0\0\0\377\2\0\0\0\373\0\0\0B\205\0\0\0" + "\0\5\0\0\0I\0\0\0\375\0\0\0\377\0\0\0g\0\0\0\253\210\0\0\0\377\2\0\0" + "\0\372\0\0\0\17\205\0\0\0\0\1\0\0\0\226\205\0\0\0\377\1\0\0\0\207\202" + "\0\0\0\377\3\0\0\0\376\0\0\0i\0\0\0\5\205\0\0\0\0\1\0\0\0*\202\0\0\0" + "\377\2\0\0\0\360\0\0\0\237\207\0\0\0\0\4\0\0\0\231\0\0\0\377\0\0\0\273" + "\0\0\0\327\210\0\0\0\377\1\0\0\0\276\206\0\0\0\0\1\0\0\0K\205\0\0\0\377" + "\1\0\0\0\371\202\0\0\0\377\1\0\0\0\276\210\0\0\0\0\4\0\0\0\366\0\0\0" + "\363\0\0\0\210\0\0\0i\207\0\0\0\0\3\0\0\0""6\0\0\0\377\0\0\0\374\211" + "\0\0\0\377\1\0\0\0l\206\0\0\0\0\2\0\0\0\11\0\0\0\357\204\0\0\0\377\4" + "\0\0\0\354\0\0\0\362\0\0\0\377\0\0\0\245\207\0\0\0\0\5\0\0\0\5\0\0\0" + "\314\0\0\0\255\0\0\0Y\0\0\0\223\207\0\0\0\0\3\0\0\0<\0\0\0\324\0\0\0" + "\240\210\0\0\0\377\2\0\0\0\364\0\0\0\20\207\0\0\0\0\1\0\0\0\224\204\0" + "\0\0\377\4\0\0\0\363\0\0\0}\0\0\0\377\0\0\0\257\207\0\0\0\0\6\0\0\0\"" + "\0\0\0\262\0\0\0\223\0\0\0""3\0\0\0\334\0\0\0\1\206\0\0\0\0\3\0\0\0l" + "\0\0\0\235\0\0\0\330\210\0\0\0\377\1\0\0\0\233\210\0\0\0\0\1\0\0\0-\205" + "\0\0\0\377\4\0\0\0o\0\0\0\377\0\0\0\333\0\0\0\6\206\0\0\0\0\6\0\0\0D" + "\0\0\0\220\0\0\0\177\0\0\0\16\0\0\0\377\0\0\0<\205\0\0\0\0\4\0\0\0""8" + "\0\0\0\344\0\0\0\226\0\0\0\315\207\0\0\0\377\2\0\0\0\376\0\0\0""0\211" + "\0\0\0\0\1\0\0\0\271\204\0\0\0\377\1\0\0\0i\202\0\0\0\377\2\0\0\0\301" + "\0\0\0""7\205\0\0\0\0\6\0\0\0q\0\0\0l\0\0\0)\0\0\0\0\0\0\0\347\0\0\0" + "\237\203\0\0\0\0\6\0\0\0A\0\0\0\274\0\0\0\375\0\0\0\377\0\0\0\243\0\0" + "\0\272\207\0\0\0\377\1\0\0\0\244\212\0\0\0\0\2\0\0\0""2\0\0\0\376\203" + "\0\0\0\377\1\0\0\0^\204\0\0\0\377\7\0\0\0\343\0\0\0\201\0\0\0\23\0\0" + "\0\0\0\0\0\1\0\0\0\300\0\0\0D\202\0\0\0\0\5\0\0\0\302\0\0\0\366\0\0\0" + "B\0\0\0Y\0\0\0\276\204\0\0\0\377\2\0\0\0\300\0\0\0\241\206\0\0\0\377" + "\2\0\0\0\367\0\0\0\37\213\0\0\0\0\1\0\0\0\243\203\0\0\0\377\1\0\0\0i" + "\206\0\0\0\377\5\0\0\0\364\0\0\0\264\0\0\0\310\0\0\0\377\0\0\0-\202\0" + "\0\0\0\1\0\0\0\236\210\0\0\0\377\2\0\0\0\336\0\0\0~\206\0\0\0\377\1\0" + "\0\0\211\214\0\0\0\0\2\0\0\0\21\0\0\0\341\202\0\0\0\377\2\0\0\0w\0\0" + "\0\374\211\0\0\0\377\1\0\0\0""4\202\0\0\0\0\1\0\0\0\244\210\0\0\0\377" + "\2\0\0\0\345\0\0\0\201\205\0\0\0\377\2\0\0\0\324\0\0\0\11\215\0\0\0\0" + "\5\0\0\0>\0\0\0\372\0\0\0\377\0\0\0\213\0\0\0\327\211\0\0\0\377\1\0\0" + "\0a\202\0\0\0\0\1\0\0\0\337\210\0\0\0\377\2\0\0\0\311\0\0\0\251\204\0" + "\0\0\377\2\0\0\0\370\0\0\0.\217\0\0\0\0\4\0\0\0Z\0\0\0\374\0\0\0\331" + "\0\0\0\224\211\0\0\0\377\3\0\0\0\253\0\0\0\30\0\0\0*\211\0\0\0\377\2" + "\0\0\0~\0\0\0\365\204\0\0\0\377\1\0\0\0n\221\0\0\0\0\3\0\0\0f\0\0\0\376" + "\0\0\0\313\211\0\0\0\377\3\0\0\0\367\0\0\0z\0\0\0\307\210\0\0\0\377\2" + "\0\0\0\361\0\0\0\305\204\0\0\0\377\1\0\0\0\207\223\0\0\0\0\2\0\0\0X\0" + "\0\0\371\212\0\0\0\377\1\0\0\0\375\216\0\0\0\377\2\0\0\0\224\0\0\0\1" + "\224\0\0\0\0\2\0\0\0>\0\0\0\345\226\0\0\0\377\2\0\0\0\366\0\0\0h\227" + "\0\0\0\0\22\0\0\0\25\0\0\0\262\0\0\0\373\0\0\0\335\0\0\0\372\0\0\0\343" + "\0\0\0\341\0\0\0\377\0\0\0\235\0\0\0""4\0\0\0\342\0\0\0,\0\0\0d\0\0\0" + "\375\0\0\0\246\0\0\0\351\0\0\0\377\0\0\0\335\204\0\0\0\377\2\0\0\0\321" + "\0\0\0,\205\0\0\0\0\4\0\0\0&\0\0\0V\0\0\0C\0\0\0\6\211\0\0\0\0\5\0\0" + "\0\26\0\0\0q\0\0\0\231\0\0\0q\0\0\0\11\203\0\0\0\0\6\0\0\0\221\0\0\0" + "\0\0\0\0\205\0\0\0""1\0\0\0\7\0\0\0\327\202\0\0\0\0\1\0\0\0\263\202\0" + "\0\0\0\12\0\0\0\301\0\0\0\0\0\0\0i\0\0\0p\0\0\0\0\0\0\0\332\0\0\0\377" + "\0\0\0\335\0\0\0c\0\0\0\4\205\0\0\0\0\2\0\0\0\202\0\0\0\376\202\0\0\0" + "\377\2\0\0\0\333\0\0\0$\207\0\0\0\0\2\0\0\0S\0\0\0\363\203\0\0\0\377" + "\2\0\0\0\304\0\0\0\2\202\0\0\0\0\6\0\0\0\205\0\0\0'\0\0\0\227\0\0\0!" + "\0\0\0\4\0\0\0\256\202\0\0\0\0\1\0\0\0\257\202\0\0\0\0\10\0\0\0\263\0" + "\0\0\0\0\0\0]\0\0\0Z\0\0\0\0\0\0\0\264\0\0\0N\0\0\0\3\206\0\0\0\0\1\0" + "\0\0U\205\0\0\0\377\1\0\0\0\314\206\0\0\0\0\2\0\0\0\27\0\0\0\365\205" + "\0\0\0\377\1\0\0\0A\202\0\0\0\0\21\0\0\0\3\0\0\0r\0\0\0\226\0\0\0\256" + "\0\0\0\262\0\0\0\327\0\0\0\237\0\0\0\214\0\0\0\350\0\0\0w\0\0\0~\0\0" + "\0\361\0\0\0\225\0\0\0\305\0\0\0\271\0\0\0\251\0\0\0y\210\0\0\0\0\1\0" + "\0\0\274\206\0\0\0\377\1\0\0\0\"\205\0\0\0\0\1\0\0\0O\206\0\0\0\377\1" + "\0\0\0S\205\0\0\0\0\21\0\0\0\1\0\0\0\16\0\0\0\0\0\0\0\27\0\0\0\"\0\0" + "\0#\0\0\0@\0\0\0G\0\0\0\15\0\0\0""6\0\0\0.\0\0\0\"\0\0\0-\0\0\0\3\0\0" + "\0\0\0\0\0\21\0\0\0""0\203\0\0\0""3\3\0\0\0\77\0\0\0E\0\0\0\354\206\0" + "\0\0\377\1\0\0\0\30\205\0\0\0\0\1\0\0\0""6\206\0\0\0\377\1\0\0\0\344" + "\202\0\0\0\335\1\0\0\0\351\202\0\0\0\356\5\0\0\0\243\0\0\0\0\0\0\0\13" + "\0\0\0\324\0\0\0\367\202\0\0\0\377\2\0\0\0c\0\0\0\204\204\0\0\0\377\4" + "\0\0\0v\0\0\0\0\0\0\0%\0\0\0\364\213\0\0\0\377\1\0\0\0\270\207\0\0\0" + "\0\2\0\0\0\206\0\0\0\337\211\0\0\0\377\4\0\0\0\366\0\0\0\"\0\0\0\0\0" + "\0\0\217\203\0\0\0\377\4\0\0\0\305\0\0\0\1\0\0\0\14\0\0\0\344\203\0\0" + "\0\377\4\0\0\0\367\0\0\0)\0\0\0\0\0\0\0m\212\0\0\0\377\2\0\0\0\376\0" + "\0\0""4\206\0\0\0\0\2\0\0\0\6\0\0\0\251\212\0\0\0\377\4\0\0\0v\0\0\0" + "\0\0\0\0""6\0\0\0\374\202\0\0\0\377\2\0\0\0\373\0\0\0/\202\0\0\0\0\1" + "\0\0\0Z\204\0\0\0\377\4\0\0\0\316\0\0\0\6\0\0\0\1\0\0\0\300\211\0\0\0" + "\377\3\0\0\0\351\0\0\0\321\0\0\0\23\205\0\0\0\0\1\0\0\0\207\212\0\0\0" + "\377\4\0\0\0\320\0\0\0\4\0\0\0\2\0\0\0\320\203\0\0\0\377\1\0\0\0\216" + "\203\0\0\0\0\2\0\0\0\1\0\0\0\305\204\0\0\0\377\4\0\0\0\225\0\0\0\7\0" + "\0\0#\0\0\0\363\202\0\0\0\377\2\0\0\0\376\0\0\0\361\206\0\0\0\377\1\0" + "\0\0v\205\0\0\0\0\1\0\0\0\330\205\0\0\0\377\2\0\0\0\220\0\0\0\330\203" + "\0\0\0\335\4\0\0\0""9\0\0\0""8\0\0\0\211\0\0\0\334\202\0\0\0\377\2\0" + "\0\0\355\0\0\0\16\204\0\0\0\0\2\0\0\0(\0\0\0\327\204\0\0\0\377\3\0\0" + "\0\344\0\0\0=\0\0\0\\\202\0\0\0\252\2\0\0\0\216\0\0\0\277\206\0\0\0\377" + "\1\0\0\0\217\205\0\0\0\0\1\0\0\0\275\205\0\0\0\377\1\0\0\0\213\204\0" + "\0\0\0\2\0\0\0U\0\0\0\375\205\0\0\0\377\1\0\0\0\256\204\0\0\0\0\1\0\0" + "\0K\206\0\0\0\377\2\0\0\0\357\0\0\0\31\203\0\0\0\0\1\0\0\0\256\206\0" + "\0\0\377\1\0\0\0H\205\0\0\0\0\1\0\0\0S\205\0\0\0\377\1\0\0\0\215\204" + "\0\0\0\0\1\0\0\0\306\206\0\0\0\377\1\0\0\0\321\204\0\0\0\0\1\0\0\0\247" + "\207\0\0\0\377\1\0\0\0y\203\0\0\0\0\2\0\0\0I\0\0\0\374\204\0\0\0\377" + "\1\0\0\0\230\207\0\0\0\0\1\0\0\0\212\203\0\0\0\377\2\0\0\0\365\0\0\0" + "'\204\0\0\0\0\1\0\0\0\304\202\0\0\0\377\2\0\0\0\334\0\0\0\326\202\0\0" + "\0\377\1\0\0\0p\204\0\0\0\0\1\0\0\0f\203\0\0\0\377\2\0\0\0\344\0\0\0" + "\317\202\0\0\0\377\1\0\0\0i\204\0\0\0\0\5\0\0\0""3\0\0\0\245\0\0\0\271" + "\0\0\0\225\0\0\0A\211\0\0\0\0\4\0\0\0Z\0\0\0\305\0\0\0\277\0\0\0<\205" + "\0\0\0\0\7\0\0\0P\0\0\0\374\0\0\0\363\0\0\0M\0\0\0f\0\0\0\242\0\0\0G" + "\206\0\0\0\0\10\0\0\0O\0\0\0\226\0\0\0o\0\0\0\25\0\0\0\255\0\0\0\377" + "\0\0\0\310\0\0\0\17\234\0\0\0\0\2\0\0\0\"\0\0\0\16\217\0\0\0\0\2\0\0" + "\0\36\0\0\0\1\377\0\0\0\0\376\0\0\0\0", +}; + +static const GdkPixdata icon_orange_pixbuf = { + 0x47646b50, /* Pixbuf magic: 'GdkP' */ + 24 + 3515, /* header length + pixel_data length */ + 0x2010002, /* pixdata_type */ + 192, /* rowstride */ + 48, /* width */ + 48, /* height */ + /* pixel_data: */ + (guint8 *) + "\377\0\0\0\0\243\0\0\0\0\7;\24\0\15}2\0\\\2158\0\210\2107\0\237\2169" + "\0\231\2117\0\206y2\0=\247\0\0\0\0\3w/\0\\\262G\0\336\356_\0\376\206" + "\377f\0\377\3\310P\0\365\2179\0\2303\0\0\5\226\0\0\0\0\1}3\0Z\204\205" + "5\0\202\1x0\0f\206\0\0\0\0\3]%\0)\261F\0\341\375e\0\377\212\377f\0\377" + "\2\312Q\0\365u/\0W\206\0\0\0\0\1x1\0h\202\236@\0\300\1\243A\0\307\204" + "\250C\0\317\4\256F\0\327\261F\0\335\265H\0\330\2078\0\40\203\0\0\0\0" + "\1\270I\0\333\204\377f\0\377\1\275K\0\347\205\0\0\0\0\2t.\0X\336Y\0\374" + "\215\377f\0\377\2\367c\0\377\2106\0\245\205\0\0\0\0\1\217:\0\226\212" + "\377f\0\377\1[$\0\34\203\0\0\0\0\1\252D\0\316\204\377f\0\377\1\270I\0" + "\345\204\0\0\0\0\2p.\0T\352]\0\376\217\377f\0\377\3\376f\0\377\233>\0" + "\307\0\0\0\2\203\0\0\0\0\1\2055\0}\211\377f\0\377\2\366b\0\377\0\0\0" + "\1\203\0\0\0\0\1\232>\0\275\204\377f\0\377\1\306P\0\355\203\0\0\0\0\2" + "h(\0\40\332W\0\373\222\377f\0\377\1\222:\0\270\203\0\0\0\0\1x/\0b\211" + "\377f\0\377\1\342Z\0\374\204\0\0\0\0\1\223;\0\243\204\377f\0\377\1\333" + "W\0\373\203\0\0\0\0\1\252D\0\330\223\377f\0\377\2\374e\0\377\2013\0\202" + "\202\0\0\0\0\1z1\0^\211\377f\0\377\1\317S\0\366\204\0\0\0\0\1\2127\0" + "\201\204\377f\0\377\5\376f\0\377\223>\0!\0\0\0\0h+\0B\372d\0\377\224" + "\377f\0\377\4\333W\0\374E\35\0\32\0\0\0\0\2148\0q\211\377f\0\377\1\266" + "I\0\341\204\0\0\0\0\1t/\0Q\205\377f\0\377\3\232>\0\203\0\0\0\0\233>\0" + "\306\226\377f\0\377\3\234>\0\304\0\0\0\0\226<\0\210\211\377f\0\377\1" + "\241A\0\274\204\0\0\0\0\2""3\21\0\17\367c\0\377\204\377f\0\377\3\256" + "F\0\315\0\0\0\0\325V\0\372\205\377f\0\377\5\376f\0\377\322T\0\365\262" + "H\0\325\264H\0\324\376f\0\377\204\377f\0\377\13\365b\0\377\245B\0\312" + "\223:\0{\2106\0g\230=\0\212\260G\0\325\370c\0\377\377f\0\377\351]\0\376" + "5\25\0\30\236\77\0\265\211\377f\0\377\1\2014\0{\205\0\0\0\0\1\313Q\0" + "\365\204\377f\0\377\3\325U\0\370F\35\0,\374e\0\377\203\377f\0\377\3\344" + "[\0\374\242@\0\276\2025\0\77\203\0\0\0\0\1\256F\0\327\203\377f\0\377" + "\2\370c\0\377\2034\0k\205\0\0\0\0\5\2118\0w\372d\0\377\377f\0\377\207" + "6\0\227\257F\0\335\210\377f\0\377\2\366b\0\377Y!\0\27\205\0\0\0\0\1\245" + "B\0\315\205\377f\0\377\1\222:\0\270\202\377f\0\377\3\373d\0\377\224;" + "\0\237`\40\0\10\205\0\0\0\0\5c)\0>\375e\0\377\377f\0\377\361`\0\376\254" + "E\0\325\207\0\0\0\0\4\254D\0\321\377f\0\377\303N\0\353\326V\0\367\210" + "\377f\0\377\1\276L\0\353\206\0\0\0\0\1\2003\0t\205\377f\0\377\1\371d" + "\0\377\202\377f\0\377\1\304N\0\354\210\0\0\0\0\4\353^\0\376\352]\0\376" + "\236\77\0\277\231=\0\242\207\0\0\0\0\3w/\0V\377f\0\377\374e\0\377\211" + "\377f\0\377\1\2179\0\240\206\0\0\0\0\2.\27\0\13\350]\0\375\204\377f\0" + "\377\4\354^\0\376\357_\0\376\377f\0\377\263H\0\333\207\0\0\0\0\5\0\0" + "\0\5\317S\0\364\301M\0\345\2137\0\212\257F\0\317\207\0\0\0\0\3\2148\0" + "h\332W\0\370\262G\0\330\210\377f\0\377\2\347\\\0\376F\27\0\26\207\0\0" + "\0\0\1\251C\0\315\204\377f\0\377\4\361`\0\376\235\77\0\266\377f\0\377" + "\276L\0\344\207\0\0\0\0\6y1\0""9\267I\0\343\244B\0\312q-\0O\332W\0\371" + "\0\0\0\1\206\0\0\0\0\3\236@\0\250\263G\0\327\271I\0\363\210\377f\0\377" + "\1\234\77\0\314\210\0\0\0\0\2w1\0I\375e\0\377\204\377f\0\377\4~2\0\232" + "\377f\0\377\332W\0\371U\34\0\11\206\0\0\0\0\6\216:\0s\243A\0\310\202" + "4\0\253-\17\0\21\372d\0\377\2056\0d\205\0\0\0\0\4\2117\0a\351]\0\374" + "\245B\0\314\303N\0\361\207\377f\0\377\2\371d\0\377^&\0D\211\0\0\0\0\1" + "\273K\0\347\204\377f\0\377\1\2003\0\225\202\377f\0\377\2\305O\0\355{" + "1\0Y\205\0\0\0\0\6\240@\0\256\222:\0\242C\35\0""5\0\0\0\0\340Y\0\374" + "\262G\0\330\203\0\0\0\0\6\2107\0k\300L\0\352\375e\0\377\377f\0\377\263" + "H\0\333\267I\0\347\207\377f\0\377\1\256E\0\331\212\0\0\0\0\2\2013\0U" + "\374e\0\377\203\377f\0\377\2\221:\0\222\372d\0\377\203\377f\0\377\7\321" + "T\0\371\226<\0\266k)\0\37\0\0\0\0\0\0\0\1\306P\0\355\2055\0o\202\0\0" + "\0\0\5\312Q\0\357\366b\0\377\2147\0o\2219\0\216\301M\0\353\204\377f\0" + "\377\2\277L\0\353\255E\0\327\206\377f\0\377\2\353^\0\376[\"\0-\213\0" + "\0\0\0\1\250C\0\326\203\377f\0\377\2\226<\0\241\360`\0\377\205\377f\0" + "\377\5\362`\0\376\301M\0\347\322T\0\363\377f\0\377\2148\0R\202\0\0\0" + "\0\1\265I\0\331\210\377f\0\377\2\307O\0\367\252D\0\276\206\377f\0\377" + "\1\2138\0\267\214\0\0\0\0\2m.\0\34\334X\0\372\202\377f\0\377\2\233>\0" + "\260\346\\\0\377\211\377f\0\377\1\2137\0\\\202\0\0\0\0\1\303N\0\342\210" + "\377f\0\377\2\323U\0\372\251D\0\300\205\377f\0\377\2\320S\0\366.\27\0" + "\13\215\0\0\0\0\5r.\0^\364b\0\377\377f\0\377\253E\0\310\312Q\0\366\211" + "\377f\0\377\1\220:\0\225\202\0\0\0\0\1\353^\0\374\210\377f\0\377\2\274" + "K\0\356\276L\0\342\204\377f\0\377\2\355_\0\377s-\0I\217\0\0\0\0\4\202" + "5\0\207\371d\0\377\331V\0\370\237@\0\310\211\377f\0\377\3\266I\0\340" + "W$\0#\2014\0I\211\377f\0\377\2\217:\0\260\354^\0\376\203\377f\0\377\2" + "\374e\0\377z1\0\227\221\0\0\0\0\3\2055\0\225\370c\0\377\311P\0\362\211" + "\377f\0\377\3\363a\0\377\227=\0\260\302N\0\357\210\377f\0\377\2\361`" + "\0\376\320S\0\362\204\377f\0\377\1\243A\0\301\223\0\0\0\0\2\1773\0\203" + "\361`\0\377\212\377f\0\377\1\371d\0\377\216\377f\0\377\2\243A\0\313\0" + "\0\0\1\224\0\0\0\0\2s.\0_\332W\0\373\226\377f\0\377\2\362a\0\377\223" + ":\0\236\227\0\0\0\0\23`(\0\40\263H\0\342\366b\0\377\331W\0\371\367c\0" + "\377\340Y\0\373\336Y\0\373\377f\0\377\256E\0\325\2044\0Y\336Y\0\373\201" + "3\0K\231>\0\235\373d\0\377\271J\0\337\353^\0\375\376f\0\377\322T\0\370" + "\376f\0\377\203\377f\0\377\2\302N\0\362z1\0I\205\0\0\0\0\4b(\0""9\200" + "4\0\200m,\0b@\40\0\10\211\0\0\0\0\5]'\0!\2158\0\243\245B\0\316\224<\0" + "\247.\27\0\13\203\0\0\0\0\6\241@\0\307\0\0\0\0\245B\0\301\2034\0T].\0" + "\13\314R\0\366\202\0\0\0\0\1\277L\0\347\202\0\0\0\0\12\305O\0\355\0\0" + "\0\0\233>\0\244\243B\0\257\0\0\0\0\342[\0\372\377f\0\377\317R\0\370\207" + "6\0\223\0\0\0\4\205\0\0\0\0\2\230=\0\270\367c\0\377\202\377f\0\377\2" + "\322T\0\370r,\0:\207\0\0\0\0\2\2013\0}\343Z\0\376\203\377f\0\377\2\264" + "H\0\352\0\0\0\2\202\0\0\0\0\6\2128\0\263z/\0A\262G\0\323\2005\0:3\0\0" + "\5\262G\0\340\202\0\0\0\0\1\301N\0\346\202\0\0\0\0\10\271J\0\344\0\0" + "\0\0\231=\0\226\2127\0\213\0\0\0\0\304O\0\351\2023\0x\0\0\0\3\206\0\0" + "\0\0\2\2004\0\200\376f\0\377\204\377f\0\377\1\306O\0\362\206\0\0\0\0" + "\2c+\0$\355^\0\376\205\377f\0\377\1r/\0b\202\0\0\0\0\21@\0\0\4\221:\0" + "\247\245B\0\315\250C\0\334\266I\0\343\315R\0\366\253D\0\325\245B\0\306" + "\336Y\0\374\221:\0\253\226<\0\263\353^\0\376\245A\0\313\311Q\0\360\270" + "J\0\347\262H\0\335\220:\0\254\210\0\0\0\0\1\274L\0\351\206\377f\0\377" + "\1g'\0""4\205\0\0\0\0\1\2158\0\177\206\377f\0\377\1\2013\0}\205\0\0\0" + "\0\27\0\0\0\1\40\20\0\20\0\0\0\0\13\0\0\30m+\0""6\225:\0F\2014\0go-\0" + "g0\20\0\20:\27\0B/\23\0""6\25\7\0%I\36\0;\0\0\0\3\0\0\0\0\\)\0\31r/\0" + "Lo.\0N\2025\0V\2157\0\\\2012\0e\2076\0q\347]\0\375\205\377f\0\377\2\371" + "d\0\377H\40\0\40\205\0\0\0\0\1u0\0U\206\377f\0\377\4\333W\0\373\322T" + "\0\370\333X\0\372\340Y\0\374\202\337Y\0\375\12\233>\0\321\0\0\0\0c+\0" + "\22\306O\0\364\354^\0\376\357`\0\377\377f\0\377\226;\0\233\2128\0\263" + "\356_\0\377\203\377f\0\377\4\224<\0\253\0\0\0\0p+\0;\357_\0\376\213\377" + "f\0\377\1\261F\0\344\207\0\0\0\0\2\227<\0\272\334X\0\372\211\377f\0\377" + "\4\355^\0\376g'\0""4\0\0\0\0\242@\0\306\203\377f\0\377\4\312Q\0\360\200" + "\0\0\2@\40\0\20\332W\0\373\203\377f\0\377\4\362a\0\377z0\0E\0\0\0\0\225" + ";\0\244\212\377f\0\377\2\374e\0\377y1\0T\206\0\0\0\0\2$\0\0\7\242A\0" + "\327\212\377f\0\377\4\230<\0\255\0\0\0\0u0\0U\370c\0\377\202\377f\0\377" + "\2\371d\0\377\2003\0P\202\0\0\0\0\2\2025\0\207\376f\0\377\203\377f\0" + "\377\4\315R\0\363U\34\0\11\0\0\0\1\304O\0\355\211\377f\0\377\3\346\\" + "\0\375\305O\0\363a#\0\35\205\0\0\0\0\1\230=\0\274\212\377f\0\377\4\317" + "S\0\364U+\0\6\0\0\0\2\304N\0\362\203\377f\0\377\1\251C\0\311\203\0\0" + "\0\0\2\0\0\0\1\255E\0\351\204\377f\0\377\4\255E\0\320].\0\13y0\0;\361" + "`\0\376\203\377f\0\377\1\367c\0\377\206\377f\0\377\1\234>\0\260\205\0" + "\0\0\0\1\315R\0\366\205\377f\0\377\2\233>\0\304\333X\0\371\202\322T\0" + "\370\5\310Q\0\367\2014\0]t/\0V\240\77\0\301\327V\0\371\202\377f\0\377" + "\2\345\\\0\375d,\0\27\204\0\0\0\0\2M\35\0""5\320S\0\367\204\377f\0\377" + "\3\324U\0\372p-\0[\2179\0\217\202\261F\0\335\2\242A\0\305\307O\0\356" + "\206\377f\0\377\1\237\77\0\305\205\0\0\0\0\1\275K\0\352\205\377f\0\377" + "\1\236\77\0\302\204\0\0\0\0\2\2116\0\204\367c\0\377\205\377f\0\377\1" + "\250C\0\334\204\0\0\0\0\2\2003\0t\375e\0\377\205\377f\0\377\2\344[\0" + "\375Z\"\0%\203\0\0\0\0\1\264I\0\341\205\377f\0\377\2\376f\0\377q.\0j" + "\205\0\0\0\0\2\2025\0~\376f\0\377\204\377f\0\377\1\234\77\0\302\204\0" + "\0\0\0\1\301M\0\356\206\377f\0\377\1\305O\0\363\204\0\0\0\0\1\252D\0" + "\331\207\377f\0\377\1\2169\0\253\203\0\0\0\0\2t/\0l\360`\0\377\203\377" + "f\0\377\2\376f\0\377\233>\0\311\207\0\0\0\0\2\230<\0\276\376f\0\377\202" + "\377f\0\377\2\355^\0\376h+\0;\204\0\0\0\0\1\275K\0\355\202\377f\0\377" + "\5\325U\0\371\327V\0\367\377f\0\377\374e\0\377\2116\0\240\204\0\0\0\0" + "\2\2055\0\224\376f\0\377\202\377f\0\377\2\333W\0\373\323T\0\365\202\377" + "f\0\377\1\221:\0\236\204\0\0\0\0\5s-\0P\254D\0\331\263G\0\345\235\77" + "\0\311q-\0a\211\0\0\0\0\4\2004\0\205\301M\0\356\275L\0\353w1\0^\205\0" + "\0\0\0\7z1\0w\366b\0\377\354^\0\376\2066\0z\2055\0\224\252D\0\326x/\0" + "l\206\0\0\0\0\10\2013\0y\247C\0\316\224;\0\245Z!\0\37\245B\0\333\376" + "f\0\377\302N\0\357d,\0\27\234\0\0\0\0\2Q!\0/9\34\0\22\217\0\0\0\0\2""7" + "\25\0%\0\0\0\1\377\0\0\0\0\376\0\0\0\0", +}; + +static const GdkPixdata icon_red_pixbuf = { + 0x47646b50, /* Pixbuf magic: 'GdkP' */ + 24 + 3515, /* header length + pixel_data length */ + 0x2010002, /* pixdata_type */ + 192, /* rowstride */ + 48, /* width */ + 48, /* height */ + /* pixel_data: */ + (guint8 *) + "\377\0\0\0\0\243\0\0\0\0\7;\0\0\15}\0\0\\\215\0\0\210\210\0\0\237\216" + "\0\0\231\211\0\0\206y\0\0=\247\0\0\0\0\3w\0\0\\\262\0\0\336\356\0\0\376" + "\206\377\0\0\377\3\310\0\0\365\217\0\0\2303\0\0\5\226\0\0\0\0\1}\0\0" + "Z\204\205\0\0\202\1x\0\0f\206\0\0\0\0\3]\0\0)\261\0\0\341\375\0\0\377" + "\212\377\0\0\377\2\312\0\0\365u\0\0W\206\0\0\0\0\1x\0\0h\202\236\0\0" + "\300\1\243\0\0\307\204\250\0\0\317\4\256\0\0\327\261\0\0\335\265\0\0" + "\330\207\0\0\40\203\0\0\0\0\1\270\0\0\333\204\377\0\0\377\1\275\0\0\347" + "\205\0\0\0\0\2t\0\0X\336\0\0\374\215\377\0\0\377\2\367\0\0\377\210\0" + "\0\245\205\0\0\0\0\1\217\0\0\226\212\377\0\0\377\1[\0\0\34\203\0\0\0" + "\0\1\252\0\0\316\204\377\0\0\377\1\270\0\0\345\204\0\0\0\0\2p\0\0T\352" + "\0\0\376\217\377\0\0\377\3\376\0\0\377\233\0\0\307\0\0\0\2\203\0\0\0" + "\0\1\205\0\0}\211\377\0\0\377\2\366\0\0\377\0\0\0\1\203\0\0\0\0\1\232" + "\0\0\275\204\377\0\0\377\1\306\0\0\355\203\0\0\0\0\2h\0\0\40\332\0\0" + "\373\222\377\0\0\377\1\222\0\0\270\203\0\0\0\0\1x\0\0b\211\377\0\0\377" + "\1\342\0\0\374\204\0\0\0\0\1\223\0\0\243\204\377\0\0\377\1\333\0\0\373" + "\203\0\0\0\0\1\252\0\0\330\223\377\0\0\377\2\374\0\0\377\201\0\0\202" + "\202\0\0\0\0\1z\0\0^\211\377\0\0\377\1\317\0\0\366\204\0\0\0\0\1\212" + "\0\0\201\204\377\0\0\377\5\376\0\0\377\223\0\0!\0\0\0\0h\0\0B\372\0\0" + "\377\224\377\0\0\377\4\333\0\0\374E\0\0\32\0\0\0\0\214\0\0q\211\377\0" + "\0\377\1\266\0\0\341\204\0\0\0\0\1t\0\0Q\205\377\0\0\377\3\232\0\0\203" + "\0\0\0\0\233\0\0\306\226\377\0\0\377\3\234\0\0\304\0\0\0\0\226\0\0\210" + "\211\377\0\0\377\1\241\0\0\274\204\0\0\0\0\2""3\0\0\17\367\0\0\377\204" + "\377\0\0\377\3\256\0\0\315\0\0\0\0\325\0\0\372\205\377\0\0\377\5\376" + "\0\0\377\322\0\0\365\262\0\0\325\264\0\0\324\376\0\0\377\204\377\0\0" + "\377\13\365\0\0\377\245\0\0\312\223\0\0{\210\0\0g\230\0\0\212\260\0\0" + "\325\370\0\0\377\377\0\0\377\351\0\0\3765\0\0\30\236\0\0\265\211\377" + "\0\0\377\1\201\0\0{\205\0\0\0\0\1\313\0\0\365\204\377\0\0\377\3\325\0" + "\0\370F\0\0,\374\0\0\377\203\377\0\0\377\3\344\0\0\374\242\0\0\276\202" + "\0\0\77\203\0\0\0\0\1\256\0\0\327\203\377\0\0\377\2\370\0\0\377\203\0" + "\0k\205\0\0\0\0\5\211\0\0w\372\0\0\377\377\0\0\377\207\0\0\227\257\0" + "\0\335\210\377\0\0\377\2\366\0\0\377Y\0\0\27\205\0\0\0\0\1\245\0\0\315" + "\205\377\0\0\377\1\222\0\0\270\202\377\0\0\377\3\373\0\0\377\224\0\0" + "\237`\0\0\10\205\0\0\0\0\5c\0\0>\375\0\0\377\377\0\0\377\361\0\0\376" + "\254\0\0\325\207\0\0\0\0\4\254\0\0\321\377\0\0\377\303\0\0\353\326\0" + "\0\367\210\377\0\0\377\1\276\0\0\353\206\0\0\0\0\1\200\0\0t\205\377\0" + "\0\377\1\371\0\0\377\202\377\0\0\377\1\304\0\0\354\210\0\0\0\0\4\353" + "\0\0\376\352\0\0\376\236\0\0\277\231\0\0\242\207\0\0\0\0\3w\0\0V\377" + "\0\0\377\374\0\0\377\211\377\0\0\377\1\217\0\0\240\206\0\0\0\0\2.\0\0" + "\13\350\0\0\375\204\377\0\0\377\4\354\0\0\376\357\0\0\376\377\0\0\377" + "\263\0\0\333\207\0\0\0\0\5\0\0\0\5\317\0\0\364\301\0\0\345\213\0\0\212" + "\257\0\0\317\207\0\0\0\0\3\214\0\0h\332\0\0\370\262\0\0\330\210\377\0" + "\0\377\2\347\0\0\376F\0\0\26\207\0\0\0\0\1\251\0\0\315\204\377\0\0\377" + "\4\361\0\0\376\235\0\0\266\377\0\0\377\276\0\0\344\207\0\0\0\0\6y\0\0" + "9\267\0\0\343\244\0\0\312q\0\0O\332\0\0\371\0\0\0\1\206\0\0\0\0\3\236" + "\0\0\250\263\0\0\327\271\0\0\363\210\377\0\0\377\1\234\0\0\314\210\0" + "\0\0\0\2w\0\0I\375\0\0\377\204\377\0\0\377\4~\0\0\232\377\0\0\377\332" + "\0\0\371U\0\0\11\206\0\0\0\0\6\216\0\0s\243\0\0\310\202\0\0\253-\0\0" + "\21\372\0\0\377\205\0\0d\205\0\0\0\0\4\211\0\0a\351\0\0\374\245\0\0\314" + "\303\0\0\361\207\377\0\0\377\2\371\0\0\377^\0\0D\211\0\0\0\0\1\273\0" + "\0\347\204\377\0\0\377\1\200\0\0\225\202\377\0\0\377\2\305\0\0\355{\0" + "\0Y\205\0\0\0\0\6\240\0\0\256\222\0\0\242C\0\0""5\0\0\0\0\340\0\0\374" + "\262\0\0\330\203\0\0\0\0\6\210\0\0k\300\0\0\352\375\0\0\377\377\0\0\377" + "\263\0\0\333\267\0\0\347\207\377\0\0\377\1\256\0\0\331\212\0\0\0\0\2" + "\201\0\0U\374\0\0\377\203\377\0\0\377\2\221\0\0\222\372\0\0\377\203\377" + "\0\0\377\7\321\0\0\371\226\0\0\266k\0\0\37\0\0\0\0\0\0\0\1\306\0\0\355" + "\205\0\0o\202\0\0\0\0\5\312\0\0\357\366\0\0\377\214\0\0o\221\0\0\216" + "\301\0\0\353\204\377\0\0\377\2\277\0\0\353\255\0\0\327\206\377\0\0\377" + "\2\353\0\0\376[\0\0-\213\0\0\0\0\1\250\0\0\326\203\377\0\0\377\2\226" + "\0\0\241\360\0\0\377\205\377\0\0\377\5\362\0\0\376\301\0\0\347\322\0" + "\0\363\377\0\0\377\214\0\0R\202\0\0\0\0\1\265\0\0\331\210\377\0\0\377" + "\2\307\0\0\367\252\0\0\276\206\377\0\0\377\1\213\0\0\267\214\0\0\0\0" + "\2m\0\0\34\334\0\0\372\202\377\0\0\377\2\233\0\0\260\346\0\0\377\211" + "\377\0\0\377\1\213\0\0\\\202\0\0\0\0\1\303\0\0\342\210\377\0\0\377\2" + "\323\0\0\372\251\0\0\300\205\377\0\0\377\2\320\0\0\366.\0\0\13\215\0" + "\0\0\0\5r\0\0^\364\0\0\377\377\0\0\377\253\0\0\310\312\0\0\366\211\377" + "\0\0\377\1\220\0\0\225\202\0\0\0\0\1\353\0\0\374\210\377\0\0\377\2\274" + "\0\0\356\276\0\0\342\204\377\0\0\377\2\355\0\0\377s\0\0I\217\0\0\0\0" + "\4\202\0\0\207\371\0\0\377\331\0\0\370\237\0\0\310\211\377\0\0\377\3" + "\266\0\0\340W\0\0#\201\0\0I\211\377\0\0\377\2\217\0\0\260\354\0\0\376" + "\203\377\0\0\377\2\374\0\0\377z\0\0\227\221\0\0\0\0\3\205\0\0\225\370" + "\0\0\377\311\0\0\362\211\377\0\0\377\3\363\0\0\377\227\0\0\260\302\0" + "\0\357\210\377\0\0\377\2\361\0\0\376\320\0\0\362\204\377\0\0\377\1\243" + "\0\0\301\223\0\0\0\0\2\177\0\0\203\361\0\0\377\212\377\0\0\377\1\371" + "\0\0\377\216\377\0\0\377\2\243\0\0\313\0\0\0\1\224\0\0\0\0\2s\0\0_\332" + "\0\0\373\226\377\0\0\377\2\362\0\0\377\223\0\0\236\227\0\0\0\0\23`\0" + "\0\40\263\0\0\342\366\0\0\377\331\0\0\371\367\0\0\377\340\0\0\373\336" + "\0\0\373\377\0\0\377\256\0\0\325\204\0\0Y\336\0\0\373\201\0\0K\231\0" + "\0\235\373\0\0\377\271\0\0\337\353\0\0\375\376\0\0\377\322\0\0\370\376" + "\0\0\377\203\377\0\0\377\2\302\0\0\362z\0\0I\205\0\0\0\0\4b\0\0""9\200" + "\0\0\200m\0\0b@\0\0\10\211\0\0\0\0\5]\0\0!\215\0\0\243\245\0\0\316\224" + "\0\0\247.\0\0\13\203\0\0\0\0\6\241\0\0\307\0\0\0\0\245\0\0\301\203\0" + "\0T]\0\0\13\314\0\0\366\202\0\0\0\0\1\277\0\0\347\202\0\0\0\0\12\305" + "\0\0\355\0\0\0\0\233\0\0\244\243\0\0\257\0\0\0\0\342\0\0\372\377\0\0" + "\377\317\0\0\370\207\0\0\223\0\0\0\4\205\0\0\0\0\2\230\0\0\270\367\0" + "\0\377\202\377\0\0\377\2\322\0\0\370r\0\0:\207\0\0\0\0\2\201\0\0}\343" + "\0\0\376\203\377\0\0\377\2\264\0\0\352\0\0\0\2\202\0\0\0\0\6\212\0\0" + "\263z\0\0A\262\0\0\323\200\0\0:3\0\0\5\262\0\0\340\202\0\0\0\0\1\301" + "\0\0\346\202\0\0\0\0\10\271\0\0\344\0\0\0\0\231\0\0\226\212\0\0\213\0" + "\0\0\0\304\0\0\351\202\0\0x\0\0\0\3\206\0\0\0\0\2\200\0\0\200\376\0\0" + "\377\204\377\0\0\377\1\306\0\0\362\206\0\0\0\0\2c\0\0$\355\0\0\376\205" + "\377\0\0\377\1r\0\0b\202\0\0\0\0\21@\0\0\4\221\0\0\247\245\0\0\315\250" + "\0\0\334\266\0\0\343\315\0\0\366\253\0\0\325\245\0\0\306\336\0\0\374" + "\221\0\0\253\226\0\0\263\353\0\0\376\245\0\0\313\311\0\0\360\270\0\0" + "\347\262\0\0\335\220\0\0\254\210\0\0\0\0\1\274\0\0\351\206\377\0\0\377" + "\1g\0\0""4\205\0\0\0\0\1\215\0\0\177\206\377\0\0\377\1\201\0\0}\205\0" + "\0\0\0\27\0\0\0\1\40\0\0\20\0\0\0\0\13\0\0\30m\0\0""6\225\0\0F\201\0" + "\0go\0\0g0\0\0\20:\0\0B/\0\0""6\25\0\0%I\0\0;\0\0\0\3\0\0\0\0\\\0\0\31" + "r\0\0Lo\0\0N\202\0\0V\215\0\0\\\201\0\0e\207\0\0q\347\0\0\375\205\377" + "\0\0\377\2\371\0\0\377H\0\0\40\205\0\0\0\0\1u\0\0U\206\377\0\0\377\4" + "\333\0\0\373\322\0\0\370\333\0\0\372\340\0\0\374\202\337\0\0\375\12\233" + "\0\0\321\0\0\0\0c\0\0\22\306\0\0\364\354\0\0\376\357\0\0\377\377\0\0" + "\377\226\0\0\233\212\0\0\263\356\0\0\377\203\377\0\0\377\4\224\0\0\253" + "\0\0\0\0p\0\0;\357\0\0\376\213\377\0\0\377\1\261\0\0\344\207\0\0\0\0" + "\2\227\0\0\272\334\0\0\372\211\377\0\0\377\4\355\0\0\376g\0\0""4\0\0" + "\0\0\242\0\0\306\203\377\0\0\377\4\312\0\0\360\200\0\0\2@\0\0\20\332" + "\0\0\373\203\377\0\0\377\4\362\0\0\377z\0\0E\0\0\0\0\225\0\0\244\212" + "\377\0\0\377\2\374\0\0\377y\0\0T\206\0\0\0\0\2$\0\0\7\242\0\0\327\212" + "\377\0\0\377\4\230\0\0\255\0\0\0\0u\0\0U\370\0\0\377\202\377\0\0\377" + "\2\371\0\0\377\200\0\0P\202\0\0\0\0\2\202\0\0\207\376\0\0\377\203\377" + "\0\0\377\4\315\0\0\363U\0\0\11\0\0\0\1\304\0\0\355\211\377\0\0\377\3" + "\346\0\0\375\305\0\0\363a\0\0\35\205\0\0\0\0\1\230\0\0\274\212\377\0" + "\0\377\4\317\0\0\364U\0\0\6\0\0\0\2\304\0\0\362\203\377\0\0\377\1\251" + "\0\0\311\203\0\0\0\0\2\0\0\0\1\255\0\0\351\204\377\0\0\377\4\255\0\0" + "\320]\0\0\13y\0\0;\361\0\0\376\203\377\0\0\377\1\367\0\0\377\206\377" + "\0\0\377\1\234\0\0\260\205\0\0\0\0\1\315\0\0\366\205\377\0\0\377\2\233" + "\0\0\304\333\0\0\371\202\322\0\0\370\5\310\0\0\367\201\0\0]t\0\0V\240" + "\0\0\301\327\0\0\371\202\377\0\0\377\2\345\0\0\375d\0\0\27\204\0\0\0" + "\0\2M\0\0""5\320\0\0\367\204\377\0\0\377\3\324\0\0\372p\0\0[\217\0\0" + "\217\202\261\0\0\335\2\242\0\0\305\307\0\0\356\206\377\0\0\377\1\237" + "\0\0\305\205\0\0\0\0\1\275\0\0\352\205\377\0\0\377\1\236\0\0\302\204" + "\0\0\0\0\2\211\0\0\204\367\0\0\377\205\377\0\0\377\1\250\0\0\334\204" + "\0\0\0\0\2\200\0\0t\375\0\0\377\205\377\0\0\377\2\344\0\0\375Z\0\0%\203" + "\0\0\0\0\1\264\0\0\341\205\377\0\0\377\2\376\0\0\377q\0\0j\205\0\0\0" + "\0\2\202\0\0~\376\0\0\377\204\377\0\0\377\1\234\0\0\302\204\0\0\0\0\1" + "\301\0\0\356\206\377\0\0\377\1\305\0\0\363\204\0\0\0\0\1\252\0\0\331" + "\207\377\0\0\377\1\216\0\0\253\203\0\0\0\0\2t\0\0l\360\0\0\377\203\377" + "\0\0\377\2\376\0\0\377\233\0\0\311\207\0\0\0\0\2\230\0\0\276\376\0\0" + "\377\202\377\0\0\377\2\355\0\0\376h\0\0;\204\0\0\0\0\1\275\0\0\355\202" + "\377\0\0\377\5\325\0\0\371\327\0\0\367\377\0\0\377\374\0\0\377\211\0" + "\0\240\204\0\0\0\0\2\205\0\0\224\376\0\0\377\202\377\0\0\377\2\333\0" + "\0\373\323\0\0\365\202\377\0\0\377\1\221\0\0\236\204\0\0\0\0\5s\0\0P" + "\254\0\0\331\263\0\0\345\235\0\0\311q\0\0a\211\0\0\0\0\4\200\0\0\205" + "\301\0\0\356\275\0\0\353w\0\0^\205\0\0\0\0\7z\0\0w\366\0\0\377\354\0" + "\0\376\206\0\0z\205\0\0\224\252\0\0\326x\0\0l\206\0\0\0\0\10\201\0\0" + "y\247\0\0\316\224\0\0\245Z\0\0\37\245\0\0\333\376\0\0\377\302\0\0\357" + "d\0\0\27\234\0\0\0\0\2Q\0\0/9\0\0\22\217\0\0\0\0\2""7\0\0%\0\0\0\1\377" + "\0\0\0\0\376\0\0\0\0", +}; + +static const GdkPixdata icon_yellow_pixbuf = { + 0x47646b50, /* Pixbuf magic: 'GdkP' */ + 24 + 3515, /* header length + pixel_data length */ + 0x2010002, /* pixdata_type */ + 192, /* rowstride */ + 48, /* width */ + 48, /* height */ + /* pixel_data: */ + (guint8 *) + "\377\0\0\0\0\243\0\0\0\0\7;'\0\15}d\0\\\215q\0\210\210m\0\237\216q\0" + "\231\211n\0\206y`\0=\247\0\0\0\0\3w^\0\\\262\216\0\336\356\277\0\376" + "\206\377\314\0\377\3\310\240\0\365\217r\0\23033\0\5\226\0\0\0\0\1}c\0" + "Z\204\205j\0\202\1x_\0f\206\0\0\0\0\3]K\0)\261\216\0\341\375\312\0\377" + "\212\377\314\0\377\2\312\241\0\365u^\0W\206\0\0\0\0\1x`\0h\202\236~\0" + "\300\1\243\203\0\307\204\250\206\0\317\4\256\214\0\327\261\215\0\335" + "\265\220\0\330\207p\0\40\203\0\0\0\0\1\270\223\0\333\204\377\314\0\377" + "\1\275\227\0\347\205\0\0\0\0\2t]\0X\336\261\0\374\215\377\314\0\377\2" + "\367\306\0\377\210l\0\245\205\0\0\0\0\1\217r\0\226\212\377\314\0\377" + "\1[I\0\34\203\0\0\0\0\1\252\210\0\316\204\377\314\0\377\1\270\223\0\345" + "\204\0\0\0\0\2p[\0T\352\273\0\376\217\377\314\0\377\3\376\313\0\377\233" + "|\0\307\0\0\0\2\203\0\0\0\0\1\205j\0}\211\377\314\0\377\2\366\305\0\377" + "\0\0\0\1\203\0\0\0\0\1\232{\0\275\204\377\314\0\377\1\306\236\0\355\203" + "\0\0\0\0\2hP\0\40\332\257\0\373\222\377\314\0\377\1\222t\0\270\203\0" + "\0\0\0\1x`\0b\211\377\314\0\377\1\342\264\0\374\204\0\0\0\0\1\223u\0" + "\243\204\377\314\0\377\1\333\260\0\373\203\0\0\0\0\1\252\210\0\330\223" + "\377\314\0\377\2\374\312\0\377\201h\0\202\202\0\0\0\0\1zb\0^\211\377" + "\314\0\377\1\317\246\0\366\204\0\0\0\0\1\212o\0\201\204\377\314\0\377" + "\5\376\313\0\377\223t\0!\0\0\0\0hU\0B\372\310\0\377\224\377\314\0\377" + "\4\333\257\0\374E;\0\32\0\0\0\0\214q\0q\211\377\314\0\377\1\266\222\0" + "\341\204\0\0\0\0\1t^\0Q\205\377\314\0\377\3\232{\0\203\0\0\0\0\233|\0" + "\306\226\377\314\0\377\3\234}\0\304\0\0\0\0\226x\0\210\211\377\314\0" + "\377\1\241\201\0\274\204\0\0\0\0\2""3\"\0\17\367\306\0\377\204\377\314" + "\0\377\3\256\213\0\315\0\0\0\0\325\252\0\372\205\377\314\0\377\5\376" + "\313\0\377\322\251\0\365\262\216\0\325\264\220\0\324\376\313\0\377\204" + "\377\314\0\377\13\365\304\0\377\245\205\0\312\223v\0{\210m\0g\230z\0" + "\212\260\215\0\325\370\306\0\377\377\314\0\377\351\273\0\3765+\0\30\236" + "\177\0\265\211\377\314\0\377\1\201h\0{\205\0\0\0\0\1\313\242\0\365\204" + "\377\314\0\377\3\325\253\0\370F:\0,\374\312\0\377\203\377\314\0\377\3" + "\344\266\0\374\242\202\0\276\202i\0\77\203\0\0\0\0\1\256\214\0\327\203" + "\377\314\0\377\2\370\306\0\377\203i\0k\205\0\0\0\0\5\211m\0w\372\310" + "\0\377\377\314\0\377\207l\0\227\257\215\0\335\210\377\314\0\377\2\366" + "\305\0\377YC\0\27\205\0\0\0\0\1\245\204\0\315\205\377\314\0\377\1\222" + "t\0\270\202\377\314\0\377\3\373\311\0\377\224w\0\237`@\0\10\205\0\0\0" + "\0\5cN\0>\375\312\0\377\377\314\0\377\361\301\0\376\254\212\0\325\207" + "\0\0\0\0\4\254\212\0\321\377\314\0\377\303\234\0\353\326\253\0\367\210" + "\377\314\0\377\1\276\230\0\353\206\0\0\0\0\1\200e\0t\205\377\314\0\377" + "\1\371\307\0\377\202\377\314\0\377\1\304\235\0\354\210\0\0\0\0\4\353" + "\274\0\376\352\273\0\376\236}\0\277\231{\0\242\207\0\0\0\0\3w_\0V\377" + "\314\0\377\374\312\0\377\211\377\314\0\377\1\217s\0\240\206\0\0\0\0\2" + "..\0\13\350\271\0\375\204\377\314\0\377\4\354\275\0\376\357\277\0\376" + "\377\314\0\377\263\217\0\333\207\0\0\0\0\5\0\0\0\5\317\245\0\364\301" + "\232\0\345\213o\0\212\257\214\0\317\207\0\0\0\0\3\214q\0h\332\257\0\370" + "\262\217\0\330\210\377\314\0\377\2\347\271\0\376F:\0\26\207\0\0\0\0\1" + "\251\210\0\315\204\377\314\0\377\4\361\301\0\376\235~\0\266\377\314\0" + "\377\276\230\0\344\207\0\0\0\0\6yb\0""9\267\222\0\343\244\203\0\312q" + "Z\0O\332\256\0\371\0\0\0\1\206\0\0\0\0\3\236~\0\250\263\220\0\327\271" + "\224\0\363\210\377\314\0\377\1\234}\0\314\210\0\0\0\0\2w^\0I\375\312" + "\0\377\204\377\314\0\377\4~e\0\232\377\314\0\377\332\256\0\371U9\0\11" + "\206\0\0\0\0\6\216q\0s\243\202\0\310\202h\0\253-\36\0\21\372\310\0\377" + "\205k\0d\205\0\0\0\0\4\211n\0a\351\272\0\374\245\205\0\314\303\234\0" + "\361\207\377\314\0\377\2\371\307\0\377^K\0D\211\0\0\0\0\1\273\225\0\347" + "\204\377\314\0\377\1\200g\0\225\202\377\314\0\377\2\305\235\0\355{a\0" + "Y\205\0\0\0\0\6\240\200\0\256\222t\0\242C5\0""5\0\0\0\0\340\263\0\374" + "\262\217\0\330\203\0\0\0\0\6\210n\0k\300\232\0\352\375\312\0\377\377" + "\314\0\377\263\217\0\333\267\223\0\347\207\377\314\0\377\1\256\213\0" + "\331\212\0\0\0\0\2\201f\0U\374\312\0\377\203\377\314\0\377\2\221s\0\222" + "\372\310\0\377\203\377\314\0\377\7\321\247\0\371\226x\0\266kR\0\37\0" + "\0\0\0\0\0\0\1\306\236\0\355\205j\0o\202\0\0\0\0\5\312\241\0\357\366" + "\305\0\377\214q\0o\221u\0\216\301\232\0\353\204\377\314\0\377\2\277\231" + "\0\353\255\213\0\327\206\377\314\0\377\2\353\274\0\376[J\0-\213\0\0\0" + "\0\1\250\207\0\326\203\377\314\0\377\2\226x\0\241\360\300\0\377\205\377" + "\314\0\377\5\362\302\0\376\301\233\0\347\322\250\0\363\377\314\0\377" + "\214p\0R\202\0\0\0\0\1\265\221\0\331\210\377\314\0\377\2\307\237\0\367" + "\252\211\0\276\206\377\314\0\377\1\213o\0\267\214\0\0\0\0\2m[\0\34\334" + "\260\0\372\202\377\314\0\377\2\233}\0\260\346\270\0\377\211\377\314\0" + "\377\1\213o\0\\\202\0\0\0\0\1\303\234\0\342\210\377\314\0\377\2\323\251" + "\0\372\251\207\0\300\205\377\314\0\377\2\320\247\0\366..\0\13\215\0\0" + "\0\0\5r\\\0^\364\303\0\377\377\314\0\377\253\210\0\310\312\242\0\366" + "\211\377\314\0\377\1\220s\0\225\202\0\0\0\0\1\353\274\0\374\210\377\314" + "\0\377\2\274\226\0\356\276\227\0\342\204\377\314\0\377\2\355\276\0\377" + "s[\0I\217\0\0\0\0\4\202h\0\207\371\307\0\377\331\256\0\370\237\200\0" + "\310\211\377\314\0\377\3\266\222\0\340WI\0#\201i\0I\211\377\314\0\377" + "\2\217r\0\260\354\275\0\376\203\377\314\0\377\2\374\312\0\377zb\0\227" + "\221\0\0\0\0\3\205j\0\225\370\306\0\377\311\241\0\362\211\377\314\0\377" + "\3\363\302\0\377\227x\0\260\302\234\0\357\210\377\314\0\377\2\361\301" + "\0\376\320\246\0\362\204\377\314\0\377\1\243\201\0\301\223\0\0\0\0\2" + "\177e\0\203\361\301\0\377\212\377\314\0\377\1\371\307\0\377\216\377\314" + "\0\377\2\243\203\0\313\0\0\0\1\224\0\0\0\0\2s[\0_\332\257\0\373\226\377" + "\314\0\377\2\362\302\0\377\223v\0\236\227\0\0\0\0\23`P\0\40\263\217\0" + "\342\366\305\0\377\331\256\0\371\367\306\0\377\340\263\0\373\336\262" + "\0\373\377\314\0\377\256\213\0\325\204j\0Y\336\262\0\373\201f\0K\231" + "z\0\235\373\311\0\377\271\225\0\337\353\273\0\375\376\313\0\377\322\250" + "\0\370\376\313\0\377\203\377\314\0\377\2\302\233\0\362zb\0I\205\0\0\0" + "\0\4bQ\0""9\200f\0\200mX\0b@@\0\10\211\0\0\0\0\5]M\0!\215q\0\243\245" + "\203\0\316\224w\0\247..\0\13\203\0\0\0\0\6\241\201\0\307\0\0\0\0\245" + "\204\0\301\203g\0T]F\0\13\314\244\0\366\202\0\0\0\0\1\277\230\0\347\202" + "\0\0\0\0\12\305\235\0\355\0\0\0\0\233|\0\244\243\203\0\257\0\0\0\0\342" + "\266\0\372\377\314\0\377\317\246\0\370\207l\0\223\0\0\0\4\205\0\0\0\0" + "\2\230z\0\270\367\306\0\377\202\377\314\0\377\2\322\250\0\370r\\\0:\207" + "\0\0\0\0\2\201f\0}\343\266\0\376\203\377\314\0\377\2\264\220\0\352\0" + "\0\0\2\202\0\0\0\0\6\212o\0\263zb\0A\262\217\0\323\200e\0:33\0\5\262" + "\216\0\340\202\0\0\0\0\1\301\232\0\346\202\0\0\0\0\10\271\224\0\344\0" + "\0\0\0\231z\0\226\212n\0\213\0\0\0\0\304\235\0\351\202h\0x\0\0\0\3\206" + "\0\0\0\0\2\200f\0\200\376\313\0\377\204\377\314\0\377\1\306\236\0\362" + "\206\0\0\0\0\2cN\0$\355\276\0\376\205\377\314\0\377\1r[\0b\202\0\0\0" + "\0\21@@\0\4\221t\0\247\245\204\0\315\250\206\0\334\266\222\0\343\315" + "\244\0\366\253\210\0\325\245\203\0\306\336\261\0\374\221t\0\253\226x" + "\0\263\353\274\0\376\245\204\0\313\311\240\0\360\270\224\0\347\262\216" + "\0\335\220t\0\254\210\0\0\0\0\1\274\227\0\351\206\377\314\0\377\1gS\0" + "4\205\0\0\0\0\1\215p\0\177\206\377\314\0\377\1\201f\0}\205\0\0\0\0\27" + "\0\0\0\1\40\40\0\20\0\0\0\0\13\13\0\30mU\0""6\225x\0F\201h\0goY\0g0\40" + "\0\20:.\0B/&\0""6\25\16\0%I=\0;\0\0\0\3\0\0\0\0\\G\0\31r[\0LoX\0N\202" + "h\0V\215r\0\\\201h\0e\207l\0q\347\270\0\375\205\377\314\0\377\2\371\307" + "\0\377H8\0\40\205\0\0\0\0\1u]\0U\206\377\314\0\377\4\333\260\0\373\322" + "\250\0\370\333\257\0\372\340\263\0\374\202\337\262\0\375\12\233|\0\321" + "\0\0\0\0cU\0\22\306\236\0\364\354\275\0\376\357\277\0\377\377\314\0\377" + "\226x\0\233\212o\0\263\356\276\0\377\203\377\314\0\377\4\224v\0\253\0" + "\0\0\0p[\0;\357\277\0\376\213\377\314\0\377\1\261\215\0\344\207\0\0\0" + "\0\2\227y\0\272\334\260\0\372\211\377\314\0\377\4\355\276\0\376gS\0""4" + "\0\0\0\0\242\202\0\306\203\377\314\0\377\4\312\242\0\360\200\200\0\2" + "@0\0\20\332\257\0\373\203\377\314\0\377\4\362\302\0\377z`\0E\0\0\0\0" + "\225x\0\244\212\377\314\0\377\2\374\312\0\377ya\0T\206\0\0\0\0\2$$\0" + "\7\242\202\0\327\212\377\314\0\377\4\230y\0\255\0\0\0\0u]\0U\370\306" + "\0\377\202\377\314\0\377\2\371\307\0\377\200f\0P\202\0\0\0\0\2\202h\0" + "\207\376\313\0\377\203\377\314\0\377\4\315\244\0\363U9\0\11\0\0\0\1\304" + "\235\0\355\211\377\314\0\377\3\346\267\0\375\305\235\0\363aO\0\35\205" + "\0\0\0\0\1\230z\0\274\212\377\314\0\377\4\317\245\0\364UU\0\6\0\0\0\2" + "\304\235\0\362\203\377\314\0\377\1\251\206\0\311\203\0\0\0\0\2\0\0\0" + "\1\255\212\0\351\204\377\314\0\377\4\255\213\0\320]F\0\13y_\0;\361\301" + "\0\376\203\377\314\0\377\1\367\306\0\377\206\377\314\0\377\1\234}\0\260" + "\205\0\0\0\0\1\315\244\0\366\205\377\314\0\377\2\233|\0\304\333\257\0" + "\371\202\322\250\0\370\5\310\240\0\367\201h\0]t\\\0V\240\200\0\301\327" + "\254\0\371\202\377\314\0\377\2\345\267\0\375dN\0\27\204\0\0\0\0\2M\77" + "\0""5\320\246\0\367\204\377\314\0\377\3\324\251\0\372pZ\0[\217r\0\217" + "\202\261\215\0\335\2\242\201\0\305\307\240\0\356\206\377\314\0\377\1" + "\237\177\0\305\205\0\0\0\0\1\275\226\0\352\205\377\314\0\377\1\236~\0" + "\302\204\0\0\0\0\2\211n\0\204\367\306\0\377\205\377\314\0\377\1\250\206" + "\0\334\204\0\0\0\0\2\200e\0t\375\312\0\377\205\377\314\0\377\2\344\266" + "\0\375ZE\0%\203\0\0\0\0\1\264\220\0\341\205\377\314\0\377\2\376\313\0" + "\377q[\0j\205\0\0\0\0\2\202g\0~\376\313\0\377\204\377\314\0\377\1\234" + "}\0\302\204\0\0\0\0\1\301\232\0\356\206\377\314\0\377\1\305\235\0\363" + "\204\0\0\0\0\1\252\210\0\331\207\377\314\0\377\1\216q\0\253\203\0\0\0" + "\0\2t\\\0l\360\300\0\377\203\377\314\0\377\2\376\313\0\377\233|\0\311" + "\207\0\0\0\0\2\230y\0\276\376\313\0\377\202\377\314\0\377\2\355\276\0" + "\376hR\0;\204\0\0\0\0\1\275\230\0\355\202\377\314\0\377\5\325\252\0\371" + "\327\253\0\367\377\314\0\377\374\312\0\377\211n\0\240\204\0\0\0\0\2\205" + "k\0\224\376\313\0\377\202\377\314\0\377\2\333\260\0\373\323\251\0\365" + "\202\377\314\0\377\1\221t\0\236\204\0\0\0\0\5s\\\0P\254\211\0\331\263" + "\220\0\345\235~\0\311qY\0a\211\0\0\0\0\4\200h\0\205\301\232\0\356\275" + "\227\0\353w_\0^\205\0\0\0\0\7zc\0w\366\305\0\377\354\275\0\376\206k\0" + "z\205k\0\224\252\210\0\326xa\0l\206\0\0\0\0\10\201g\0y\247\206\0\316" + "\224w\0\245ZJ\0\37\245\205\0\333\376\313\0\377\302\234\0\357dN\0\27\234" + "\0\0\0\0\2QA\0/9+\0\22\217\0\0\0\0\2""7)\0%\0\0\0\1\377\0\0\0\0\376\0" + "\0\0\0", +}; + diff --git a/spaceapi-gtk b/spaceapi-gtk new file mode 100755 index 0000000..1625d07 Binary files /dev/null and b/spaceapi-gtk differ diff --git a/spaceapi-gtk.c b/spaceapi-gtk.c new file mode 100644 index 0000000..dc71f4e --- /dev/null +++ b/spaceapi-gtk.c @@ -0,0 +1,232 @@ +/* + * CCCHH Door Information System for UNIX + * Author: hanez, Haeger + * Thanks to: atari, beh and eisbaer + * + * License (Beerware License): + * As long as you retain this notice you can do whatever you want with this + * stuff. If we meet some day, and you think this stuff is worth it, you can buy + * me a beer in return hanez and all other contributers + * + * TODO: + * - Add door open/close date to notification and status + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#if LIBNOTIFY +#include +#endif + +#include "pesthoernchen.h" + +struct string { + char *ptr; + size_t len; +}; + +static char *name = "Dooris for UNIX"; +static char *statusurl = "https://www.hamburg.ccc.de/dooris/status.json"; +static char *agent = "Dooris-for-UNIX/0.42"; + +// The delay for polling the dooris service. Adjust this before compiling +int delay = 900000; // ms. aka 15 minutes + +bool door_open = false; +bool old_door_open = false; + +GtkStatusIcon *tray_icon; + +bool do_it(); +void invoke_notification(); + +void init_string(struct string *s) { + s->len = 0; + s->ptr = malloc(s->len+1); + if (s->ptr == NULL) { + fprintf(stderr, "malloc() failed\n"); + exit(EXIT_FAILURE); + } + s->ptr[0] = '\0'; +} + +size_t writefunc(void *ptr, size_t size, size_t nmemb, struct string *s) { + size_t new_len = s->len + size*nmemb; + s->ptr = realloc(s->ptr, new_len+1); + if (s->ptr == NULL) { + fprintf(stderr, "realloc() failed\n"); + exit(EXIT_FAILURE); + } + memcpy(s->ptr+s->len, ptr, size*nmemb); + s->ptr[new_len] = '\0'; + s->len = new_len; + + return size*nmemb; +} + +void tray_icon_on_click(GtkStatusIcon *status_icon, gpointer user_data) { + do_it(); +} + +void get_bouncer_data() { + CURL *curl; + CURLcode res; + + struct json_object *response_json_object; + struct json_object *door_json_object; + struct json_object *leaf_json_object; + + bool door_status; + int door_last_change; + + struct string s; + + printf("Called get_bouncer_data()\n"); + + old_door_open = door_open; + + init_string(&s); + + curl = curl_easy_init(); + if(!curl) { + fprintf(stderr, "curl_easy_init() failed.\n"); + return; + } + + curl_easy_setopt(curl, CURLOPT_URL, statusurl); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writefunc); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); + curl_easy_setopt(curl, CURLOPT_USERAGENT, agent); + + res = curl_easy_perform(curl); + + curl_easy_cleanup(curl); + + if(res != CURLE_OK) { + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); + return; + } + + response_json_object = json_tokener_parse(s.ptr); + free(s.ptr); + + // door objects + door_json_object = json_object_object_get(response_json_object, "state"); + + leaf_json_object = json_object_object_get(door_json_object, "open"); + door_status = json_object_get_int(leaf_json_object); + //door_status = true; + leaf_json_object = json_object_object_get(door_json_object, "lastchange"); + door_last_change = json_object_get_int(leaf_json_object); + + // free door object + json_object_put(door_json_object); + + // free leaf object + //json_object_put(leaf_json_object); + + // free response object + // json_object_put(response_json_object); + + printf("Door status: = %d\n", door_status); + printf("Door last change: = %d\n", door_last_change); + + if (door_status == true) { + door_open = true; + } else { + door_open = false; + } +} + +void invoke_notification() { + char door[20]; + + if (door_open == true) { + snprintf(door, 20, "Door open..."); + } else { + snprintf(door, 20, "Door closed..."); + } + + gtk_status_icon_set_tooltip(tray_icon, door); + +#if LIBNOTIFY + NotifyNotification *n; + + notify_init(name); + n = notify_notification_new(name, door, NULL); + //notify_notification_set_timeout(n, 10000); + + if (door_open == true) { + notify_notification_set_icon_from_pixbuf(n, gdk_pixbuf_from_pixdata( + &icon_yellow_pixbuf, + true, + NULL)); + } else { + notify_notification_set_icon_from_pixbuf(n, gdk_pixbuf_from_pixdata( + &icon_red_pixbuf, + true, + NULL)); + } + notify_notification_show(n, NULL); + g_object_unref(G_OBJECT(n)); +#endif +} + +void set_status() { + if (door_open == true) { + printf("Set to status: open\n"); + gtk_status_icon_set_from_pixbuf(tray_icon, + gdk_pixbuf_from_pixdata(&icon_yellow_pixbuf, + true, + NULL)); + } else { + printf("Set to status: closed\n"); + gtk_status_icon_set_from_pixbuf(tray_icon, + gdk_pixbuf_from_pixdata(&icon_red_pixbuf, + true, + NULL)); + } +} + +bool do_it() { + get_bouncer_data(); + set_status(); + + if (door_open != old_door_open) { + invoke_notification(); + } + return true; +} + +int main(int argc, char **argv) { + gtk_init(&argc, &argv); + + tray_icon = gtk_status_icon_new(); + g_signal_connect(G_OBJECT(tray_icon), "activate", + G_CALLBACK(tray_icon_on_click), NULL); + + gtk_status_icon_set_visible(tray_icon, true); + + do_it(); + + // DEBUG STUFF + //door_open = true; + //set_status(); + // END DEBUG STUFF + + invoke_notification(); + + gtk_timeout_add(delay, (GtkFunction)do_it, (gpointer)NULL); + + gtk_main(); + + return 0; +}