diff -Nru gnapi-0.2.1-0ubuntu/AUTHORS gnapi-0.2.2-0ubuntu/AUTHORS --- gnapi-0.2.1-0ubuntu/AUTHORS 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/AUTHORS 2011-03-22 16:57:41.000000000 +0000 @@ -1,5 +1,5 @@ -Gnapi 0.2.1 +Gnapi 0.2.2 diff -Nru gnapi-0.2.1-0ubuntu/debian/changelog gnapi-0.2.2-0ubuntu/debian/changelog --- gnapi-0.2.1-0ubuntu/debian/changelog 2010-11-09 13:27:11.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/debian/changelog 2011-03-30 21:18:12.000000000 +0000 @@ -1,3 +1,9 @@ +gnapi (0.2.2-0ubuntu-1) maverick; urgency=low + + * stable version + + -- Wieslaw Spyra Tue, 09 Nov 2010 13:27:58 +0000 + gnapi (0.2.1-0ubuntu-3) maverick; urgency=low * stable version + some svn patches diff -Nru gnapi-0.2.1-0ubuntu/desktop/.svn/all-wcprops gnapi-0.2.2-0ubuntu/desktop/.svn/all-wcprops --- gnapi-0.2.1-0ubuntu/desktop/.svn/all-wcprops 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/desktop/.svn/all-wcprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 34 -/svnroot/gnapi/!svn/ver/39/desktop -END -gnapi.desktop -K 25 -svn:wc:ra_dav:version-url -V 47 -/svnroot/gnapi/!svn/ver/3/desktop/gnapi.desktop -END -gnapi-kde.desktop -K 25 -svn:wc:ra_dav:version-url -V 51 -/svnroot/gnapi/!svn/ver/3/desktop/gnapi-kde.desktop -END -gnapi-kde4.desktop -K 25 -svn:wc:ra_dav:version-url -V 53 -/svnroot/gnapi/!svn/ver/39/desktop/gnapi-kde4.desktop -END diff -Nru gnapi-0.2.1-0ubuntu/desktop/.svn/entries gnapi-0.2.2-0ubuntu/desktop/.svn/entries --- gnapi-0.2.1-0ubuntu/desktop/.svn/entries 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/desktop/.svn/entries 1970-01-01 00:00:00.000000000 +0000 @@ -1,130 +0,0 @@ -10 - -dir -48 -https://gnapi.svn.sourceforge.net/svnroot/gnapi/desktop -https://gnapi.svn.sourceforge.net/svnroot/gnapi - - - -2010-06-03T20:12:09.688651Z -39 -badenov - - - - - - - - - - - - - - -b5f4b304-0d56-4a30-a9d8-522935651cea - -gnapi.desktop -file - - - - -2010-08-14T20:11:30.594520Z -0c82bb565c3db296f6ed564f6be59487 -2009-12-26T11:14:08.101749Z -3 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -301 - -gnapi-kde.desktop -file - - - - -2010-08-14T20:11:30.594520Z -1e3e274cf5ad7459ab67323887b566c0 -2009-12-26T11:14:08.101749Z -3 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -662 - -gnapi-kde4.desktop -file - - - - -2010-08-14T20:11:30.594520Z -27f82bddf4d7ee046a334977767cf46e -2010-06-03T20:12:09.688651Z -39 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -707 - diff -Nru gnapi-0.2.1-0ubuntu/desktop/.svn/prop-base/gnapi.desktop.svn-base gnapi-0.2.2-0ubuntu/desktop/.svn/prop-base/gnapi.desktop.svn-base --- gnapi-0.2.1-0ubuntu/desktop/.svn/prop-base/gnapi.desktop.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/desktop/.svn/prop-base/gnapi.desktop.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 14 -svn:executable -V 0 - -END diff -Nru gnapi-0.2.1-0ubuntu/desktop/.svn/prop-base/gnapi-kde4.desktop.svn-base gnapi-0.2.2-0ubuntu/desktop/.svn/prop-base/gnapi-kde4.desktop.svn-base --- gnapi-0.2.1-0ubuntu/desktop/.svn/prop-base/gnapi-kde4.desktop.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/desktop/.svn/prop-base/gnapi-kde4.desktop.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 14 -svn:executable -V 0 - -END diff -Nru gnapi-0.2.1-0ubuntu/desktop/.svn/prop-base/gnapi-kde.desktop.svn-base gnapi-0.2.2-0ubuntu/desktop/.svn/prop-base/gnapi-kde.desktop.svn-base --- gnapi-0.2.1-0ubuntu/desktop/.svn/prop-base/gnapi-kde.desktop.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/desktop/.svn/prop-base/gnapi-kde.desktop.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 14 -svn:executable -V 0 - -END diff -Nru gnapi-0.2.1-0ubuntu/desktop/.svn/text-base/gnapi.desktop.svn-base gnapi-0.2.2-0ubuntu/desktop/.svn/text-base/gnapi.desktop.svn-base --- gnapi-0.2.1-0ubuntu/desktop/.svn/text-base/gnapi.desktop.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/desktop/.svn/text-base/gnapi.desktop.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -[Desktop Entry] -Version=1.0 -Name=Gnapi -Type=Application -GenericName=Subtitle downloader -Comment=Subtitle downloader -Exec=gnapi -Icon=/usr/share/pixmaps/gnapi/gnapi.png -Categories=AudioVideo; -Terminal=false -GenericName[pl_PL]=Program do pobierania napisów -Comment[pl_PL]=Program do pobierania napisów diff -Nru gnapi-0.2.1-0ubuntu/desktop/.svn/text-base/gnapi-kde4.desktop.svn-base gnapi-0.2.2-0ubuntu/desktop/.svn/text-base/gnapi-kde4.desktop.svn-base --- gnapi-0.2.1-0ubuntu/desktop/.svn/text-base/gnapi-kde4.desktop.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/desktop/.svn/text-base/gnapi-kde4.desktop.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Actions=downloadsubt; -X-KDE-ServiceTypes=KonqPopupMenu/Plugin -MimeType=video/x-flv;video/mpeg;video/x-mpeg;video/quicktime;video/x-quicktime;video/msvideo;video/x-msvideo;video/x-ms-asf-plugin;video/divx;video/vnd.divx;video/vnd.rn-realvideo;video/x-ms-asf;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmp;video/x-ms-wvx;video/x-mpeg2;video/mp4;video/3gpp;video/fli;video/x-fli;video/vnd.vivo;application/x-flash-video -Type=Service -ShowOnlyIn=KDE; - -[Desktop Action downloadsubt] -Icon=/usr/share/pixmaps/gnapi/gnapi.png -Name=Download subtitles with Gnapi -GenericName=Download subtitles with Gnapi -Name[pl]=Pobierz napisy z Gnapi -GenericName[pl]=Pobierz napisy z Gnapi -Exec=gnapi %F diff -Nru gnapi-0.2.1-0ubuntu/desktop/.svn/text-base/gnapi-kde.desktop.svn-base gnapi-0.2.2-0ubuntu/desktop/.svn/text-base/gnapi-kde.desktop.svn-base --- gnapi-0.2.1-0ubuntu/desktop/.svn/text-base/gnapi-kde.desktop.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/desktop/.svn/text-base/gnapi-kde.desktop.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -[Desktop Entry] -Version=1.0 -Encoding=UTF-8 -Name=Download subtitles with Gnapi -GenericName=Download subtitles with Gnapi -Icon=/usr/share/pixmaps/gnapi/gnapi.png -ServiceTypes=all/allfiles -MimeType=video/x-flv;video/mpeg;video/x-mpeg;video/quicktime;video/x-quicktime;video/msvideo;video/x-msvideo;video/x-ms-asf-plugin;video/divx;video/vnd.divx;video/vnd.rn-realvideo;video/x-ms-asf;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmp;video/x-ms-wvx;video/x-mpeg2;video/mp4;video/3gpp;video/fli;video/x-fli;video/vnd.vivo;application/x-flash-video -Type=Application -GenericName[pl_PL]=Pobierz napisy z Gnapi -Name[pl_PL]=Pobierz napisy z Gnapi -Exec=gnapi %F -ShowOnlyIn=KDE; diff -Nru gnapi-0.2.1-0ubuntu/docs/.svn/all-wcprops gnapi-0.2.2-0ubuntu/docs/.svn/all-wcprops --- gnapi-0.2.1-0ubuntu/docs/.svn/all-wcprops 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/docs/.svn/all-wcprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 31 -/svnroot/gnapi/!svn/ver/35/docs -END -copyright -K 25 -svn:wc:ra_dav:version-url -V 41 -/svnroot/gnapi/!svn/ver/21/docs/copyright -END -gnapi.1.gz -K 25 -svn:wc:ra_dav:version-url -V 42 -/svnroot/gnapi/!svn/ver/35/docs/gnapi.1.gz -END diff -Nru gnapi-0.2.1-0ubuntu/docs/.svn/entries gnapi-0.2.2-0ubuntu/docs/.svn/entries --- gnapi-0.2.1-0ubuntu/docs/.svn/entries 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/docs/.svn/entries 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -10 - -dir -48 -https://gnapi.svn.sourceforge.net/svnroot/gnapi/docs -https://gnapi.svn.sourceforge.net/svnroot/gnapi - - - -2010-05-02T14:09:16.014878Z -35 -badenov - - - - - - - - - - - - - - -b5f4b304-0d56-4a30-a9d8-522935651cea - -copyright -file - - - - -2010-08-14T20:11:30.582552Z -2c7802ddd84854df475a40e3de03df45 -2010-04-04T13:01:05.661687Z -21 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -409 - -gnapi.1.gz -file - - - - -2010-08-14T20:11:30.586520Z -5e33fddaa05de217c7a8b55c32af6ad0 -2010-05-02T14:09:16.014878Z -35 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -301 - diff -Nru gnapi-0.2.1-0ubuntu/docs/.svn/prop-base/copyright.svn-base gnapi-0.2.2-0ubuntu/docs/.svn/prop-base/copyright.svn-base --- gnapi-0.2.1-0ubuntu/docs/.svn/prop-base/copyright.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/docs/.svn/prop-base/copyright.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 14 -svn:executable -V 1 -* -END diff -Nru gnapi-0.2.1-0ubuntu/docs/.svn/prop-base/gnapi.1.gz.svn-base gnapi-0.2.2-0ubuntu/docs/.svn/prop-base/gnapi.1.gz.svn-base --- gnapi-0.2.1-0ubuntu/docs/.svn/prop-base/gnapi.1.gz.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/docs/.svn/prop-base/gnapi.1.gz.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff -Nru gnapi-0.2.1-0ubuntu/docs/.svn/text-base/copyright.svn-base gnapi-0.2.2-0ubuntu/docs/.svn/text-base/copyright.svn-base --- gnapi-0.2.1-0ubuntu/docs/.svn/text-base/copyright.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/docs/.svn/text-base/copyright.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -This package was debianized by Wieslaw Spyra on -Wed, 23 Jan 2008 23:54:01 +0100. - -It was downloaded from http://www.gnapi.pl - -Upstream Author: - - Wieslaw Spyra - -Copyright: - - Copyright (C) 2008 Wieslaw Spyra - -License: - -The Debian packaging is (C) 2008-2009, Wieslaw Spyra and -is licensed under the GPL. -You can see GPL license here: `/usr/share/common-licenses/GPL'. Binary files /tmp/qsp8z334Oy/gnapi-0.2.1-0ubuntu/docs/.svn/text-base/gnapi.1.gz.svn-base and /tmp/A3hywZicGi/gnapi-0.2.2-0ubuntu/docs/.svn/text-base/gnapi.1.gz.svn-base differ diff -Nru gnapi-0.2.1-0ubuntu/INSTALL gnapi-0.2.2-0ubuntu/INSTALL --- gnapi-0.2.1-0ubuntu/INSTALL 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/INSTALL 2011-03-22 16:57:41.000000000 +0000 @@ -1,5 +1,5 @@ -Gnapi 0.2.1 +Gnapi 0.2.2 @@ -19,7 +19,7 @@ - gmodule2.0, - libnautilus-extension, - gnome-vfs, - - libavcodec, libavutil, libavformat (or ffmpeg). + - libavcodec, libavutil, libavformat (or ffmpeg or libav). You need also: - C compiler (gcc or clang), diff -Nru gnapi-0.2.1-0ubuntu/Makefile gnapi-0.2.2-0ubuntu/Makefile --- gnapi-0.2.1-0ubuntu/Makefile 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/Makefile 2011-03-22 17:25:50.000000000 +0000 @@ -73,13 +73,14 @@ install -o root -g root -d ${DESTDIR}$(prefix)/usr/share/gnapi/ install -o root -g root -d ${DESTDIR}$(prefix)/usr/lib/gnapi/plugins/ install -o root -g root -d ${DESTDIR}$(prefix)/usr/lib/nautilus/extensions-2.0/ - install -o root -g root libnautilus-gnapi.so ${DESTDIR}$(prefix)/usr/lib/nautilus/extensions-2.0/ - install -o root -g root libnapi.so ${DESTDIR}$(prefix)/usr/lib/gnapi/plugins/ - install -o root -g root ./src/scan.glade ${DESTDIR}$(prefix)/usr/share/gnapi/ - install -o root -g root ./src/info.glade ${DESTDIR}$(prefix)/usr/share/gnapi/ - install -o root -g root ./src/plugins/napiprojekt/napi_config.glade ${DESTDIR}$(prefix)/usr/share/gnapi/ - install -o root -g root ./src/plugins/opensubtitles/os_config.glade ${DESTDIR}$(prefix)/usr/share/gnapi/ - install -o root -g root libopensub.so ${DESTDIR}$(prefix)/usr/lib/gnapi/plugins/ + install -o root -g root -m 644 libnautilus-gnapi.so ${DESTDIR}$(prefix)/usr/lib/nautilus/extensions-2.0/ + install -o root -g root -m 644 libnapi.so ${DESTDIR}$(prefix)/usr/lib/gnapi/plugins/ + install -o root -g root -m 644 ./src/scan.glade ${DESTDIR}$(prefix)/usr/share/gnapi/ + install -o root -g root -m 644 ./src/info.glade ${DESTDIR}$(prefix)/usr/share/gnapi/ + install -o root -g root -m 644 ./pixmaps/os.png ${DESTDIR}$(prefix)/usr/share/gnapi/ + install -o root -g root -m 644 ./src/plugins/napiprojekt/napi_config.glade ${DESTDIR}$(prefix)/usr/share/gnapi/ + install -o root -g root -m 644 ./src/plugins/opensubtitles/os_config.glade ${DESTDIR}$(prefix)/usr/share/gnapi/ + install -o root -g root -m 644 libopensub.so ${DESTDIR}$(prefix)/usr/lib/gnapi/plugins/ install -o root -g root -d ${DESTDIR}$(prefix)/usr/share/man/man1/ install -o root -g root -m 644 ./docs/gnapi.1.gz ${DESTDIR}$(prefix)/usr/share/man/man1/ install -o root -g root -d ${DESTDIR}$(prefix)/usr/share/applications/ @@ -110,6 +111,7 @@ rm -f ${DESTDIR}$(prefix)/usr/lib/gnapi/plugins/libnapi.so rm -f ${DESTDIR}$(prefix)/usr/lib/gnapi/plugins/libopensub.so rm -f ${DESTDIR}$(prefix)/usr/share/gnapi/info.glade + rm -f ${DESTDIR}$(prefix)/usr/share/gnapi/os.png rm -f ${DESTDIR}$(prefix)/usr/share/gnapi/napi_config.glade rm -f ${DESTDIR}$(prefix)/usr/share/gnapi/os_config.glade rm -f ${DESTDIR}$(prefix)/usr/share/gnapi/scan.glade Binary files /tmp/qsp8z334Oy/gnapi-0.2.1-0ubuntu/pixmaps/os.png and /tmp/A3hywZicGi/gnapi-0.2.2-0ubuntu/pixmaps/os.png differ diff -Nru gnapi-0.2.1-0ubuntu/pixmaps/.svn/all-wcprops gnapi-0.2.2-0ubuntu/pixmaps/.svn/all-wcprops --- gnapi-0.2.1-0ubuntu/pixmaps/.svn/all-wcprops 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/pixmaps/.svn/all-wcprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 34 -/svnroot/gnapi/!svn/ver/28/pixmaps -END -gnapi.png -K 25 -svn:wc:ra_dav:version-url -V 44 -/svnroot/gnapi/!svn/ver/11/pixmaps/gnapi.png -END -v-bo.png -K 25 -svn:wc:ra_dav:version-url -V 43 -/svnroot/gnapi/!svn/ver/11/pixmaps/v-bo.png -END -downloading.png -K 25 -svn:wc:ra_dav:version-url -V 50 -/svnroot/gnapi/!svn/ver/11/pixmaps/downloading.png -END -v-15.png -K 25 -svn:wc:ra_dav:version-url -V 42 -/svnroot/gnapi/!svn/ver/1/pixmaps/v-15.png -END -v-warn.png -K 25 -svn:wc:ra_dav:version-url -V 45 -/svnroot/gnapi/!svn/ver/28/pixmaps/v-warn.png -END -v-18.png -K 25 -svn:wc:ra_dav:version-url -V 43 -/svnroot/gnapi/!svn/ver/11/pixmaps/v-18.png -END diff -Nru gnapi-0.2.1-0ubuntu/pixmaps/.svn/entries gnapi-0.2.2-0ubuntu/pixmaps/.svn/entries --- gnapi-0.2.1-0ubuntu/pixmaps/.svn/entries 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/pixmaps/.svn/entries 1970-01-01 00:00:00.000000000 +0000 @@ -1,232 +0,0 @@ -10 - -dir -48 -https://gnapi.svn.sourceforge.net/svnroot/gnapi/pixmaps -https://gnapi.svn.sourceforge.net/svnroot/gnapi - - - -2010-04-06T17:39:30.436633Z -28 -badenov - - - - - - - - - - - - - - -b5f4b304-0d56-4a30-a9d8-522935651cea - -gnapi.png -file - - - - -2010-08-14T20:11:29.694540Z -34b330d3c4610789e919e9a718cc5c5d -2010-03-06T19:18:59.565932Z -11 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -13095 - -v-bo.png -file - - - - -2010-08-14T20:11:29.694540Z -2005b3f590d1033c3200ca08b0730bcb -2010-03-06T19:18:59.565932Z -11 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -2777 - -downloading.png -file - - - - -2010-08-14T20:11:29.701011Z -372ce4a99c6c1c3db57647780ddca20c -2010-03-06T19:18:59.565932Z -11 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -12684 - -v-15.png -file - - - - -2010-08-14T20:11:29.702536Z -92b66b0a5e5bc681be26e503387282b4 -2009-08-29T18:04:21.049818Z -1 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -3080 - -v-warn.png -file - - - - -2010-08-14T20:11:29.702536Z -6aad171f8444c69695a7d28c5f2dfc3f -2010-04-06T17:39:30.436633Z -28 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -2454 - -v-18.png -file - - - - -2010-08-14T20:11:29.702536Z -6ad661ed61718db0a945668fa3015fec -2010-03-06T19:18:59.565932Z -11 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -1661 - diff -Nru gnapi-0.2.1-0ubuntu/pixmaps/.svn/prop-base/downloading.png.svn-base gnapi-0.2.2-0ubuntu/pixmaps/.svn/prop-base/downloading.png.svn-base --- gnapi-0.2.1-0ubuntu/pixmaps/.svn/prop-base/downloading.png.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/pixmaps/.svn/prop-base/downloading.png.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -K 14 -svn:executable -V 0 - -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff -Nru gnapi-0.2.1-0ubuntu/pixmaps/.svn/prop-base/gnapi.png.svn-base gnapi-0.2.2-0ubuntu/pixmaps/.svn/prop-base/gnapi.png.svn-base --- gnapi-0.2.1-0ubuntu/pixmaps/.svn/prop-base/gnapi.png.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/pixmaps/.svn/prop-base/gnapi.png.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -K 14 -svn:executable -V 0 - -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff -Nru gnapi-0.2.1-0ubuntu/pixmaps/.svn/prop-base/v-15.png.svn-base gnapi-0.2.2-0ubuntu/pixmaps/.svn/prop-base/v-15.png.svn-base --- gnapi-0.2.1-0ubuntu/pixmaps/.svn/prop-base/v-15.png.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/pixmaps/.svn/prop-base/v-15.png.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -K 14 -svn:executable -V 0 - -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff -Nru gnapi-0.2.1-0ubuntu/pixmaps/.svn/prop-base/v-18.png.svn-base gnapi-0.2.2-0ubuntu/pixmaps/.svn/prop-base/v-18.png.svn-base --- gnapi-0.2.1-0ubuntu/pixmaps/.svn/prop-base/v-18.png.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/pixmaps/.svn/prop-base/v-18.png.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -K 14 -svn:executable -V 0 - -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff -Nru gnapi-0.2.1-0ubuntu/pixmaps/.svn/prop-base/v-bo.png.svn-base gnapi-0.2.2-0ubuntu/pixmaps/.svn/prop-base/v-bo.png.svn-base --- gnapi-0.2.1-0ubuntu/pixmaps/.svn/prop-base/v-bo.png.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/pixmaps/.svn/prop-base/v-bo.png.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -K 14 -svn:executable -V 0 - -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff -Nru gnapi-0.2.1-0ubuntu/pixmaps/.svn/prop-base/v-warn.png.svn-base gnapi-0.2.2-0ubuntu/pixmaps/.svn/prop-base/v-warn.png.svn-base --- gnapi-0.2.1-0ubuntu/pixmaps/.svn/prop-base/v-warn.png.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/pixmaps/.svn/prop-base/v-warn.png.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END Binary files /tmp/qsp8z334Oy/gnapi-0.2.1-0ubuntu/pixmaps/.svn/text-base/downloading.png.svn-base and /tmp/A3hywZicGi/gnapi-0.2.2-0ubuntu/pixmaps/.svn/text-base/downloading.png.svn-base differ Binary files /tmp/qsp8z334Oy/gnapi-0.2.1-0ubuntu/pixmaps/.svn/text-base/gnapi.png.svn-base and /tmp/A3hywZicGi/gnapi-0.2.2-0ubuntu/pixmaps/.svn/text-base/gnapi.png.svn-base differ Binary files /tmp/qsp8z334Oy/gnapi-0.2.1-0ubuntu/pixmaps/.svn/text-base/v-15.png.svn-base and /tmp/A3hywZicGi/gnapi-0.2.2-0ubuntu/pixmaps/.svn/text-base/v-15.png.svn-base differ Binary files /tmp/qsp8z334Oy/gnapi-0.2.1-0ubuntu/pixmaps/.svn/text-base/v-18.png.svn-base and /tmp/A3hywZicGi/gnapi-0.2.2-0ubuntu/pixmaps/.svn/text-base/v-18.png.svn-base differ Binary files /tmp/qsp8z334Oy/gnapi-0.2.1-0ubuntu/pixmaps/.svn/text-base/v-bo.png.svn-base and /tmp/A3hywZicGi/gnapi-0.2.2-0ubuntu/pixmaps/.svn/text-base/v-bo.png.svn-base differ Binary files /tmp/qsp8z334Oy/gnapi-0.2.1-0ubuntu/pixmaps/.svn/text-base/v-warn.png.svn-base and /tmp/A3hywZicGi/gnapi-0.2.2-0ubuntu/pixmaps/.svn/text-base/v-warn.png.svn-base differ diff -Nru gnapi-0.2.1-0ubuntu/po/pl/.svn/all-wcprops gnapi-0.2.2-0ubuntu/po/pl/.svn/all-wcprops --- gnapi-0.2.1-0ubuntu/po/pl/.svn/all-wcprops 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/po/pl/.svn/all-wcprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 32 -/svnroot/gnapi/!svn/ver/42/po/pl -END -gnapi.mo -K 25 -svn:wc:ra_dav:version-url -V 41 -/svnroot/gnapi/!svn/ver/42/po/pl/gnapi.mo -END diff -Nru gnapi-0.2.1-0ubuntu/po/pl/.svn/entries gnapi-0.2.2-0ubuntu/po/pl/.svn/entries --- gnapi-0.2.1-0ubuntu/po/pl/.svn/entries 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/po/pl/.svn/entries 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -10 - -dir -48 -https://gnapi.svn.sourceforge.net/svnroot/gnapi/po/pl -https://gnapi.svn.sourceforge.net/svnroot/gnapi - - - -2010-06-26T17:47:52.214576Z -42 -badenov - - - - - - - - - - - - - - -b5f4b304-0d56-4a30-a9d8-522935651cea - -gnapi.mo -file - - - - -2010-08-14T20:11:30.662575Z -8f93dae35071a5ed68e93353c59ef9e7 -2010-06-26T17:47:52.214576Z -42 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -5809 - diff -Nru gnapi-0.2.1-0ubuntu/po/pl/.svn/prop-base/gnapi.mo.svn-base gnapi-0.2.2-0ubuntu/po/pl/.svn/prop-base/gnapi.mo.svn-base --- gnapi-0.2.1-0ubuntu/po/pl/.svn/prop-base/gnapi.mo.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/po/pl/.svn/prop-base/gnapi.mo.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END Binary files /tmp/qsp8z334Oy/gnapi-0.2.1-0ubuntu/po/pl/.svn/text-base/gnapi.mo.svn-base and /tmp/A3hywZicGi/gnapi-0.2.2-0ubuntu/po/pl/.svn/text-base/gnapi.mo.svn-base differ diff -Nru gnapi-0.2.1-0ubuntu/po/.svn/all-wcprops gnapi-0.2.2-0ubuntu/po/.svn/all-wcprops --- gnapi-0.2.1-0ubuntu/po/.svn/all-wcprops 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/po/.svn/all-wcprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 29 -/svnroot/gnapi/!svn/ver/42/po -END -pl.po -K 25 -svn:wc:ra_dav:version-url -V 35 -/svnroot/gnapi/!svn/ver/42/po/pl.po -END diff -Nru gnapi-0.2.1-0ubuntu/po/.svn/entries gnapi-0.2.2-0ubuntu/po/.svn/entries --- gnapi-0.2.1-0ubuntu/po/.svn/entries 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/po/.svn/entries 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -10 - -dir -48 -https://gnapi.svn.sourceforge.net/svnroot/gnapi/po -https://gnapi.svn.sourceforge.net/svnroot/gnapi - - - -2010-06-26T17:47:52.214576Z -42 -badenov - - - - - - - - - - - - - - -b5f4b304-0d56-4a30-a9d8-522935651cea - -pl.po -file - - - - -2010-08-14T20:11:30.666544Z -4943b15a1c6b7ddbbf341043a8b87a80 -2010-06-26T17:47:52.214576Z -42 -badenov - - - - - - - - - - - - - - - - - - - - - -5850 - -pl -dir - diff -Nru gnapi-0.2.1-0ubuntu/po/.svn/text-base/pl.po.svn-base gnapi-0.2.2-0ubuntu/po/.svn/text-base/pl.po.svn-base --- gnapi-0.2.1-0ubuntu/po/.svn/text-base/pl.po.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/po/.svn/text-base/pl.po.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,278 +0,0 @@ -# Copyright (C) 2010 THE gnapi'S COPYRIGHT HOLDER -# This file is distributed under the same license as the gnapi package. -# , 2010. -# -msgid "" -msgstr "" -"Project-Id-Version: gnapi 2\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-12-26 02:41+0100\n" -"PO-Revision-Date: 2010-06-26 19:28+0100\n" -"Last-Translator: Wiesław Spyra \n" -"Language-Team: Polish\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -msgid "[Error] An unknown error occurred." -msgstr "[Błąd] Wystąpił nieznany błąd." - -msgid "[Error] Server busy." -msgstr "[Błąd] Serwer zajęty." - -msgid "[Error] Server busy or unpack problem." -msgstr "[Błąd] Serwer zajęty lub problem z rozpakowaniem." - -msgid "[Error] Can't unpack subtitles." -msgstr "[Błąd] Nie można rozpakować napisów." - -msgid "Not found!" -msgstr "Nie znaleziono napisów!" - -msgid "Downloaded succesfully!" -msgstr "Pobrano i rozpakowano napisy!" - -msgid "Canceled." -msgstr "Anulowano." - -#, c-format -msgid "[Warning] Codepage wasn't changed. %s.\n" -msgstr "[Uwaga] Strona kodowa pozostała niezmieniona. %s.\n" - -msgid "[Error] Can't load plugin." -msgstr "[Błąd] Nie można załadować wtyczki." - -msgid "[Error] Can't find function." -msgstr "[Błąd] Nie odnaleziono wymaganej funkcji." - -msgid "[Error] Memory allocation error!?\n" -msgstr "[Błąd] Błąd alokacji pamięci!? Gratulacje!\n" - -#, c-format -msgid "[Error] Can't load library %s.\n" -msgstr "[Błąd] Nie można załadować biblioteki %s.\n" - -#, c-format -msgid "[Info] Registred plugin: %s.\n" -msgstr "[Info] Wczytano wtyczkę: %s.\n" - -msgid "[Error] Can't open plugins directory!\n" -msgstr "[Błąd] Nie można otworzyć katalogu wtyczek!\n" - -#, c-format -msgid "[Info] Unregistred plugin: %s.\n" -msgstr "[Info] Wyładowano wtyczkę: %s.\n" - -msgid "Subtitles downloader." -msgstr "Program do pobierana napisów." - -msgid "About..." -msgstr "O programie..." - -msgid "Quit" -msgstr "Zamknij" - -msgid "Search directory..." -msgstr "Przeszukaj katalog..." - -msgid "Autodownload..." -msgstr "Pobierz automatycznie..." - -msgid "Download subtitles" -msgstr "Pobierz napisy" - -msgid "Send subtitles" -msgstr "Wyślij napisy" - -msgid "Report bad subtitles" -msgstr "Zgłoś niepasujące napisy" - -msgid "Options..." -msgstr "Opcje..." - -msgid "Select file" -msgstr "Wybierz plik" - -msgid "Configure Gnapi" -msgstr "Konfiguracja Gnapi" - -msgid "Change codepage of downloaded file" -msgstr "Zmień kodowanie pobranego pliku" - -msgid "Rewrite existing files" -msgstr "Nadpisz istniejące pliki" - -msgid "Download all files to:" -msgstr "Pobieraj wszystkie napisy do:" - -msgid "Change codepage from/to" -msgstr "Zmień kodowanie z/do" - -msgid "[Error] Can't open file! Write error. Check temporary directory permissions.\n" -msgstr "[Błąd] Nie można otworzyć pliku do zapisu. Sprawdź uprawnienia katalogu tymczasowego.\n" - -msgid "[Error] Can't open file! Read error.\n" -msgstr "[Błąd] Nie można otworzyć pliku do odczytu.\n" - -msgid "Other reason" -msgstr "Inny powód" - -msgid "Report has been sent." -msgstr "Zgłoszenie zostało wysłane." - -msgid "[Info] Report has been sent.\n" -msgstr "[Info] Zgłoszenie zostało wysłane.\n" - -msgid "Subtitles were been sent." -msgstr "Napisy zostały wysłane." - -msgid "[Info] Subtitles were been sent.\n" -msgstr "[Info] Napisy zostały wysłane.\n" - -msgid "Send report" -msgstr "Wyślij zgłoszenie" - -msgid "Select video file" -msgstr "Wybierz plik z filmem" - -msgid "Problem" -msgstr "Problem" - -msgid "Bad synchronization" -msgstr "Napisy wyświetlają się w nieodpowiednim momencie" - -msgid "Subtitles for other movie" -msgstr "Napisy są do zupełnie innego filmu" - -msgid "Translated by computer program" -msgstr "Napisy są przetłumaczone przez komputer - translator" - -msgid "Only part of subtitles" -msgstr "Jest to tylko część napisów" - -msgid "Close" -msgstr "Zamknij" - -msgid "Send" -msgstr "Wyślij" - -msgid "Comment" -msgstr "Komentarz" - -msgid "Treat as an improvement" -msgstr "Traktuj jako poprawkę" - -msgid "Configure plugin" -msgstr "Konfiguruj wtyczkę" - -msgid "Configure..." -msgstr "Konfiguruj..." - -msgid "Action" -msgstr "Akcja" - -msgid "Plugin" -msgstr "Wtyczka" - -msgid "Select directory" -msgstr "Wybierz katalog" - -msgid "Login" -msgstr "Użytkownik" - -msgid "Password" -msgstr "Hasło" - -msgid "Language" -msgstr "Język" - -msgid "7zip" -msgstr "7zip" - -msgid "Scan directory" -msgstr "Przeszukaj katalog" - -#libnautilus-gnapi -msgid "*** Gnapi extension loaded.\n" -msgstr "*** Gnapi: rozszerzenie załadowane.\n" - -msgid "*** Gnapi extension unloaded.\n" -msgstr "*** Gnapi: rozszerzenie wyładowane.\n" - -msgid "_Download subtitles" -msgstr "_Pobierz napisy" - -msgid "Download subtitles with Gnapi" -msgstr "Pobierz napisy z Gnapi" - -#end -msgid "*** Found request: %s.\n" -msgstr "*** Znaleziono argument: %s.\n" - -msgid "Download" -msgstr "Pobierz" - -msgid "Upload" -msgstr "Wyślij" - -msgid "Filename" -msgstr "Nazwa pliku" - -msgid "Icon" -msgstr "Ikona" - -msgid "Movie info" -msgstr "Informacje" - -msgid "Movie information" -msgstr "Informacje o filmie" - -msgid "File size: " -msgstr "Rozmiar pliku: " - -msgid "Resolution: " -msgstr "Rozdzielczość: " - -msgid "Duration: " -msgstr "Czas trwania: " - -msgid "FPS: " -msgstr "FPS: " - -msgid "Select" -msgstr "Wybierz" - -msgid "Show movie info..." -msgstr "Pokaż informacje o filmie..." - -msgid "en" -msgstr "pl" - -msgid "EN" -msgstr "PL" - -msgid "About plugin..." -msgstr "Infornacje o wtyczce..." - -msgid "[Error] OS plugin can't handle multiple files archives yet. Your files were saved here: %s.\n" -msgstr "[Błąd] Wtyczka OS nie obsługuje jeszcze archiwów wieloplikowych. Pliki zostały rozpakowane do: %s.\n" - -#, c-format -msgid "" -"%s %s\n" -"\n" -"Author: %s\n" -"%s\n" -"License: %s\n" -"Comment: %s" -msgstr "" -"%s %s\n" -"\n" -"Autor: %s\n" -"%s\n" -"Licencja: %s\n" -"Komentarz: %s" - -msgid "Download covers" -msgstr "Automatycznie pobieraj okładki" - diff -Nru gnapi-0.2.1-0ubuntu/README gnapi-0.2.2-0ubuntu/README --- gnapi-0.2.1-0ubuntu/README 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/README 2011-03-22 16:57:41.000000000 +0000 @@ -1,5 +1,5 @@ -Gnapi 0.2.1 +Gnapi 0.2.2 diff -Nru gnapi-0.2.1-0ubuntu/src/defaults.h gnapi-0.2.2-0ubuntu/src/defaults.h --- gnapi-0.2.1-0ubuntu/src/defaults.h 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/defaults.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * defaults.h * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as @@ -34,8 +34,8 @@ #define APP_AUTHOR "Wiesław Spyra " #define APP_SUMMARY _("Subtitles downloader.") -#define APP_COPYRIGHT "Copyright 2008-2010 (c) Wiesław Spyra" -#define APP_VERSION "0.2.1" +#define APP_COPYRIGHT "Copyright 2008-2011 (c) Wiesław Spyra" +#define APP_VERSION "0.2.2" #define APP_SITE "http://gnapi.sourceforge.net" #define APP_LOCALE_SHARE "/usr/share/locale" #define APP_LOCALE_CODEPAGE "UTF-8" diff -Nru gnapi-0.2.1-0ubuntu/src/gengine.c gnapi-0.2.2-0ubuntu/src/gengine.c --- gnapi-0.2.1-0ubuntu/src/gengine.c 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/gengine.c 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * gengine.c * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as @@ -30,11 +30,14 @@ #include "defaults.h" #include "gplugins.h" +#ifndef NOTIFY_CHECK_VERSION +#define notify_notification_new(title, body, icon) notify_notification_new(title, body, icon, NULL) +#endif + guint plInitialized = 0; GError* error = NULL; GConfClient *gcClient; - unsigned long get_file_size(const char *fname) { FILE *f = g_fopen(fname, "rb"); @@ -47,7 +50,8 @@ int is_file_exists(const char *fname) { - if (g_file_test(fname, G_FILE_TEST_EXISTS) && !g_file_test(fname, G_FILE_TEST_IS_DIR)) return TRUE; else return FALSE; + if (g_file_test(fname, G_FILE_TEST_EXISTS) && !g_file_test(fname, G_FILE_TEST_IS_DIR)) return TRUE; + else return FALSE; } char* get_file_contents(const char *fname, unsigned long fsize) @@ -114,7 +118,7 @@ { if (!notify_is_initted() && !notify_init(APP_NAME)) return; - NotifyNotification *notification = notify_notification_new_with_status_icon(title, body, icon, interface->gStatusIcon); + NotifyNotification *notification = notify_notification_new(title, body, icon); notify_notification_set_urgency(notification, NOTIFY_URGENCY_NORMAL); notify_notification_show(notification, &error); } diff -Nru gnapi-0.2.1-0ubuntu/src/gengine.h gnapi-0.2.2-0ubuntu/src/gengine.h --- gnapi-0.2.1-0ubuntu/src/gengine.h 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/gengine.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * gengine.h * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/gnapi.c gnapi-0.2.2-0ubuntu/src/gnapi.c --- gnapi-0.2.1-0ubuntu/src/gnapi.c 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/gnapi.c 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * gnapi.c * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as @@ -19,6 +19,7 @@ */ #include +#include #include /* setlocale */ #include "interface.h" diff -Nru gnapi-0.2.1-0ubuntu/src/gnapi-plugins.h gnapi-0.2.2-0ubuntu/src/gnapi-plugins.h --- gnapi-0.2.1-0ubuntu/src/gnapi-plugins.h 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/gnapi-plugins.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * gnapi-plugins.h * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/gplugins.c gnapi-0.2.2-0ubuntu/src/gplugins.c --- gnapi-0.2.1-0ubuntu/src/gplugins.c 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/gplugins.c 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * gplugins.c * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/gplugins.h gnapi-0.2.2-0ubuntu/src/gplugins.h --- gnapi-0.2.1-0ubuntu/src/gplugins.h 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/gplugins.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * gplugins.h * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as @@ -54,3 +54,4 @@ gint unregister_plugin(gchar *plug, gint i); #endif + diff -Nru gnapi-0.2.1-0ubuntu/src/http_post.c gnapi-0.2.2-0ubuntu/src/http_post.c --- gnapi-0.2.1-0ubuntu/src/http_post.c 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/http_post.c 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * http_post.c * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/http_post.h gnapi-0.2.2-0ubuntu/src/http_post.h --- gnapi-0.2.1-0ubuntu/src/http_post.h 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/http_post.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * http_post.h * - * Copyright(c) Wiesław Spyra , 2008-2009. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/interface.c gnapi-0.2.2-0ubuntu/src/interface.c --- gnapi-0.2.1-0ubuntu/src/interface.c 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/interface.c 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * interface.c * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as @@ -398,6 +398,7 @@ gdk_pixbuf_unref(interface->gIcon); gdk_pixbuf_unref(interface->gDlIcon); gdk_pixbuf_unref(interface->gLogo); + notify_uninit(); g_free(info_window); g_free(config_window); g_free(scan_window); diff -Nru gnapi-0.2.1-0ubuntu/src/interface.h gnapi-0.2.2-0ubuntu/src/interface.h --- gnapi-0.2.1-0ubuntu/src/interface.h 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/interface.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * interface.h * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as @@ -21,6 +21,9 @@ #ifndef INTERFACE_H #define INTERFACE_H +#include +#include + struct _Main_Interface { GtkWidget *gDialog; GtkWidget *gPopupMenu; diff -Nru gnapi-0.2.1-0ubuntu/src/license.h gnapi-0.2.2-0ubuntu/src/license.h --- gnapi-0.2.1-0ubuntu/src/license.h 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/license.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * license.h * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/napi.c gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/napi.c --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/napi.c 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/napi.c 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * napi.c * - * Copyright(c) Wiesław Spyra , 2008-2009. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/napi_common.c gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/napi_common.c --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/napi_common.c 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/napi_common.c 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * napi_common.c * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as @@ -72,29 +72,51 @@ return TRUE; } +/* hex2int */ +gint replace(gchar hex_value) +{ + gchar znak[2]; + sprintf(znak, "%c", hex_value); + if (strcmp(znak, "a") == 0) { return 10; } + if (strcmp(znak, "b") == 0) { return 11; } + if (strcmp(znak, "c") == 0) { return 12; } + if (strcmp(znak, "d") == 0) { return 13; } + if (strcmp(znak, "e") == 0) { return 14; } + if (strcmp(znak, "f") == 0) { return 15; } + if (strcmp(znak, "1") == 0) { return 1; } + if (strcmp(znak, "2") == 0) { return 2; } + if (strcmp(znak, "3") == 0) { return 3; } + if (strcmp(znak, "4") == 0) { return 4; } + if (strcmp(znak, "5") == 0) { return 5; } + if (strcmp(znak, "6") == 0) { return 6; } + if (strcmp(znak, "7") == 0) { return 7; } + if (strcmp(znak, "8") == 0) { return 8; } + if (strcmp(znak, "9") == 0) { return 9; } + return 0; +} + /* generate second hash from md5 */ gboolean second_hash(gchar *hash2, const gchar *md5) { gint idx[5] = {0xe, 0x3, 0x6, 0x8, 0x2}; gint mul[5] = {0x2, 0x2, 0x5, 0x4, 0x3}; gint add[5] = {0x0, 0xd, 0x10, 0xb, 0x5}; - gchar *single = ""; - gint i; + gchar b[8]; + int i; + + strcpy(b,""); for (i = 0; i <= 4; ++i) { - gint t, v, g; - t = add[i] + g_ascii_xdigit_value(md5[idx[i]]); - v = g_ascii_xdigit_value(md5[t]) * 16 + g_ascii_xdigit_value(md5[t + 1]); + int t, v, g; + char dd[14], vv[3]; + t = add[i] + replace(md5[idx[i]]); + v = replace(md5[t]) * 16 + replace(md5[t+1]); g = v * mul[i]; - gchar *dd = g_strdup_printf("%x", g); - dd = g_strreverse(dd); - gchar *vv = g_strdup_printf("%c", dd[0]); - single = g_strconcat(single, vv, NULL); - g_free(dd); - g_free(vv); + sprintf(dd, "%x", g); + sprintf(vv, "%c", dd[strlen(dd) - 1]); + strcat(b, vv); } - g_strlcpy(hash2, single, 6); - g_free(single); - return TRUE; + strcpy(hash2, b); + return TRUE; } diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/napi_common.h gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/napi_common.h --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/napi_common.h 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/napi_common.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * napi_common.h * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as @@ -29,9 +29,9 @@ #define PL_NAME "Napiprojekt" #define PL_AUTHOR "Wiesław Spyra" -#define PL_VERSION "0.2" +#define PL_VERSION "0.2.2" #define PL_LICENSE "GPLv3" -#define PL_COPY "(c) 2008-2010 Wiesław Spyra" +#define PL_COPY "(c) 2008-2011 Wiesław Spyra" #define PL_DESC "Napiprojekt plugin" #define PL_LIBNAME "libnapi.so" diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/napi_config.c gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/napi_config.c --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/napi_config.c 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/napi_config.c 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * napi_config.c * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/napi_config.h gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/napi_config.h --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/napi_config.h 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/napi_config.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * napi_config.h * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/napi.h gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/napi.h --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/napi.h 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/napi.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * napi.h * - * Copyright(c) Wiesław Spyra , 2008-2009. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/repbad.c gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/repbad.c --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/repbad.c 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/repbad.c 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * repbad.c * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/repbad.h gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/repbad.h --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/repbad.h 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/repbad.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * repbad.h * - * Copyright(c) Wiesław Spyra , 2008-2009. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/sendsubs.c gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/sendsubs.c --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/sendsubs.c 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/sendsubs.c 2011-03-22 16:57:41.000000000 +0000 @@ -1,6 +1,6 @@ /* * sendsubs.c - * Copyright(c) Wiesław Spyra , 2008-2009. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/sendsubs.h gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/sendsubs.h --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/sendsubs.h 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/sendsubs.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * sendsubs.h * - * Copyright(c) Wiesław Spyra , 2008-2009. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/all-wcprops gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/all-wcprops --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/all-wcprops 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/all-wcprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 50 -/svnroot/gnapi/!svn/ver/48/src/plugins/napiprojekt -END -napi_common.c -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/gnapi/!svn/ver/48/src/plugins/napiprojekt/napi_common.c -END -napi_config.h -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/gnapi/!svn/ver/42/src/plugins/napiprojekt/napi_config.h -END -repbad.h -K 25 -svn:wc:ra_dav:version-url -V 59 -/svnroot/gnapi/!svn/ver/31/src/plugins/napiprojekt/repbad.h -END -napi_common.h -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/gnapi/!svn/ver/42/src/plugins/napiprojekt/napi_common.h -END -napi_config.glade -K 25 -svn:wc:ra_dav:version-url -V 68 -/svnroot/gnapi/!svn/ver/42/src/plugins/napiprojekt/napi_config.glade -END -sendsubs.c -K 25 -svn:wc:ra_dav:version-url -V 61 -/svnroot/gnapi/!svn/ver/48/src/plugins/napiprojekt/sendsubs.c -END -napi.c -K 25 -svn:wc:ra_dav:version-url -V 57 -/svnroot/gnapi/!svn/ver/48/src/plugins/napiprojekt/napi.c -END -sendsubs.h -K 25 -svn:wc:ra_dav:version-url -V 61 -/svnroot/gnapi/!svn/ver/31/src/plugins/napiprojekt/sendsubs.h -END -napi.h -K 25 -svn:wc:ra_dav:version-url -V 57 -/svnroot/gnapi/!svn/ver/41/src/plugins/napiprojekt/napi.h -END -napi_config.c -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/gnapi/!svn/ver/42/src/plugins/napiprojekt/napi_config.c -END -repbad.c -K 25 -svn:wc:ra_dav:version-url -V 59 -/svnroot/gnapi/!svn/ver/43/src/plugins/napiprojekt/repbad.c -END diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/entries gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/entries --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/entries 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/entries 1970-01-01 00:00:00.000000000 +0000 @@ -1,402 +0,0 @@ -10 - -dir -48 -https://gnapi.svn.sourceforge.net/svnroot/gnapi/src/plugins/napiprojekt -https://gnapi.svn.sourceforge.net/svnroot/gnapi - - - -2010-10-07T21:53:34.023677Z -48 -badenov - - - - - - - - - - - - - - -b5f4b304-0d56-4a30-a9d8-522935651cea - -napi_common.c -file - - - - -2010-11-09T13:23:43.665865Z -85196fd324a890bc66afcfe53a1a08c3 -2010-10-07T21:53:34.023677Z -48 -badenov - - - - - - - - - - - - - - - - - - - - - -3097 - -napi_config.h -file - - - - -2010-08-14T20:11:30.114618Z -e03c2a53c8307d8859c107b3bb8a0bc3 -2010-06-26T17:47:52.214576Z -42 -badenov - - - - - - - - - - - - - - - - - - - - - -1096 - -repbad.h -file - - - - -2010-08-14T20:11:30.114618Z -f24b9083308c791ddf28bdd9a658c6e4 -2010-04-08T14:20:27.421904Z -31 -badenov - - - - - - - - - - - - - - - - - - - - - -1260 - -napi_common.h -file - - - - -2010-08-14T20:11:30.114618Z -a5d151bc43b5a45790c5e2abf7e9fb07 -2010-06-26T17:47:52.214576Z -42 -badenov - - - - - - - - - - - - - - - - - - - - - -2057 - -napi_config.glade -file - - - - -2010-08-14T20:11:30.114618Z -59b76cd6cec012326f4181502314fc32 -2010-06-26T17:47:52.214576Z -42 -badenov - - - - - - - - - - - - - - - - - - - - - -7459 - -sendsubs.c -file - - - - -2010-11-09T13:23:43.677866Z -d9d9ef45111499c4faaa03cb891de3f9 -2010-10-07T21:53:34.023677Z -48 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -7452 - -napi.c -file - - - - -2010-11-09T13:23:43.677866Z -ca2011d95b399350b6a3ad8bf6b015e9 -2010-10-07T21:53:34.023677Z -48 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -4700 - -sendsubs.h -file - - - - -2010-08-14T20:11:30.118579Z -90c54b44e93be932c51234f7b763911e -2010-04-08T14:20:27.421904Z -31 -badenov - - - - - - - - - - - - - - - - - - - - - -1349 - -napi.h -file - - - - -2010-08-14T20:11:30.122546Z -f3ba2fb76363d74a33f80a6169633f39 -2010-06-26T17:21:30.586537Z -41 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -1063 - -napi_config.c -file - - - - -2010-08-14T20:11:30.122546Z -05a315da77df63f71af7bc4938fc3d92 -2010-06-26T17:47:52.214576Z -42 -badenov - - - - - - - - - - - - - - - - - - - - - -3312 - -repbad.c -file - - - - -2010-08-14T20:11:30.122546Z -c48789895ba23d7a8306895dcfa358f6 -2010-07-26T10:15:44.106106Z -43 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -6812 - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/napi.c.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/napi.c.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/napi.c.svn-base 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/napi.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 14 -svn:executable -V 0 - -END diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/napi.h.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/napi.h.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/napi.h.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/napi.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 14 -svn:executable -V 0 - -END diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/repbad.c.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/repbad.c.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/repbad.c.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/repbad.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 14 -svn:executable -V 0 - -END diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/sendsubs.c.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/sendsubs.c.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/sendsubs.c.svn-base 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/prop-base/sendsubs.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 14 -svn:executable -V 0 - -END diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_common.c.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_common.c.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_common.c.svn-base 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_common.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,100 +0,0 @@ -/* - * napi_common.c - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "../../gnapi-plugins.h" -#include "../../http_post.h" -#include "napi_common.h" - -/* read plugin config from gconf */ -gboolean read_config() -{ - if (gc_config_get_str(GC_ZIP) == NULL) - nc.zip = g_strdup(GC_ZIPP); else - nc.zip = g_strdup(gc_config_get_str(GC_ZIP)); - if (gc_config_get_str(GC_TMP) == NULL) - nc.tmp = g_strdup(GC_TMPP); else - nc.tmp = g_strdup(gc_config_get_str(GC_TMP)); - if (gc_config_get_str(GC_LANG) == NULL) - nc.lang = g_strdup(GC_LANGP); else - nc.lang = g_strdup(gc_config_get_str(GC_LANG)); - if (gc_config_get_str(GC_USER) == NULL) - nc.user = g_strdup(""); else - nc.user = g_strdup(gc_config_get_str(GC_USER)); - if (gc_config_get_str(GC_PASS) == NULL) - nc.pass = g_strdup(""); else - nc.pass = g_strdup(gc_config_get_str(GC_PASS)); - nc.cover = gc_config_get_int(GC_COVER); - return TRUE; -} - -/* check login and password - can download as anonymous */ -gboolean check_user(const gchar *login, const gchar *password) -{ - if (!read_config()) return FALSE; - gchar *url = g_strdup_printf(CHECK_STRING, login, password); - HttpGet *http = new_http_get(url); - g_free(url); - if (http == NULL) return FALSE; - gboolean passed = g_str_has_prefix(http->data, PREFIX_OK); - hg_free(http); - return passed; -} - -/* generate md5 hash from first 10MB of file */ -gboolean md5_hash(gchar *md5, const gchar *fname) -{ - gsize fsize = get_file_size(fname); - if (fsize == 0) return FALSE; - if (fsize > 10485760) fsize = 10485760; - gchar *buffer = NULL; - buffer = get_file_contents(fname, fsize); - if (buffer == NULL) return FALSE; - g_strlcpy(md5, g_compute_checksum_for_data(G_CHECKSUM_MD5, (const guchar*)buffer, fsize), 33); - g_free(buffer); - return TRUE; -} - -/* generate second hash from md5 */ -gboolean second_hash(gchar *hash2, const gchar *md5) -{ - gint idx[5] = {0xe, 0x3, 0x6, 0x8, 0x2}; - gint mul[5] = {0x2, 0x2, 0x5, 0x4, 0x3}; - gint add[5] = {0x0, 0xd, 0x10, 0xb, 0x5}; - gchar *single = ""; - gint i; - for (i = 0; i <= 4; ++i) - { - gint t, v, g; - t = add[i] + g_ascii_xdigit_value(md5[idx[i]]); - v = g_ascii_xdigit_value(md5[t]) * 16 + g_ascii_xdigit_value(md5[t + 1]); - g = v * mul[i]; - gchar *dd = g_strdup_printf("%x", g); - dd = g_strreverse(dd); - gchar *vv = g_strdup_printf("%c", dd[0]); - single = g_strconcat(single, vv, NULL); - g_free(dd); - g_free(vv); - } - g_strlcpy(hash2, single, 6); - g_free(single); - return TRUE; -} - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_common.h.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_common.h.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_common.h.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_common.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -/* - * napi_common.h - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef NAPI_COMMON_H -#define NAPI_COMMON_H - -#include -#include -#include /* gettext */ - -#define _(String) gettext(String) - -#define PL_NAME "Napiprojekt" -#define PL_AUTHOR "Wiesław Spyra" -#define PL_VERSION "0.2" -#define PL_LICENSE "GPLv3" -#define PL_COPY "(c) 2008-2010 Wiesław Spyra" -#define PL_DESC "Napiprojekt plugin" -#define PL_LIBNAME "libnapi.so" - -#define GC_ZIP "/apps/gnapi/plugins/zip" -#define GC_ZIPP "7za" -#define GC_TMP "/apps/gnapi/plugins/tmp" -#define GC_TMPP "/tmp/" -#define GC_LANG "/apps/gnapi/plugins/libnapi/lang" -#define GC_LANGP _("EN") -#define GC_USER "/apps/gnapi/plugins/libnapi/user" -#define GC_PASS "/apps/gnapi/plugins/libnapi/pass" -#define GC_COVER "/apps/gnapi/plugins/libnapi/cover" - -#define NP_WINDOW "/usr/share/gnapi/napi_config.glade" - -#define PREFIX_OK "ok" - -#define CHECK_STRING "http://www.napiprojekt.pl/users_check.php?nick=%s&pswd=%s" - -/* config structure */ -typedef struct _nConfig { - char *zip; - char *lang; - char *user; - char *pass; - char *tmp; - int cover; -} nConfig; - -/* here is stored plugin configuration */ -nConfig nc; - -gboolean second_hash(gchar *hash2, const gchar *md5); -gboolean md5_hash(gchar *md5, const gchar *str); -gboolean check_user(const gchar *login, const gchar *password); -gboolean read_config(); - -#endif - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_config.c.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_config.c.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_config.c.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_config.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -/* - * napi_config.c - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "../../gnapi-plugins.h" -#include "napi_config.h" - -/* on config window close/hide */ -static gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data) -{ - gc_config_set_str(GC_ZIP, (char*)gtk_entry_get_text(GTK_ENTRY(napi_config_window->enZip))); - gc_config_set_str(GC_LANG, (char*)gtk_entry_get_text(GTK_ENTRY(napi_config_window->enLang))); - gc_config_set_str(GC_USER, (char*)gtk_entry_get_text(GTK_ENTRY(napi_config_window->enUser))); - gc_config_set_str(GC_PASS, (char*)gtk_entry_get_text(GTK_ENTRY(napi_config_window->enPass))); - gc_config_set_int(GC_COVER, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(napi_config_window->chCover))); - gtk_widget_hide(napi_config_window->napiConfigWindow); - return TRUE; -} - -/* create config window from xml file */ -static void create_napi_config_window() -{ - napi_config_window = g_malloc(sizeof(NapiConfigWindow)); - GtkBuilder *builder = gtk_builder_new(); - gtk_builder_add_from_file(builder, NP_WINDOW, NULL); - napi_config_window->napiConfigWindow = GTK_WIDGET(gtk_builder_get_object(builder, "wNapi")); - gtk_container_set_border_width(GTK_CONTAINER(napi_config_window->napiConfigWindow), 15); - napi_config_window->btClose = GTK_WIDGET(gtk_builder_get_object(builder, "cButton")); - napi_config_window->enUser = GTK_WIDGET(gtk_builder_get_object(builder, "eUser")); - napi_config_window->enPass = GTK_WIDGET(gtk_builder_get_object(builder, "ePass")); - napi_config_window->enZip = GTK_WIDGET(gtk_builder_get_object(builder, "eZip")); - napi_config_window->enLang = GTK_WIDGET(gtk_builder_get_object(builder, "eLang")); - napi_config_window->chCover = GTK_WIDGET(gtk_builder_get_object(builder, "cCover")); - g_signal_connect(G_OBJECT(napi_config_window->btClose), "clicked", G_CALLBACK(delete_event), NULL); - g_signal_connect(G_OBJECT(napi_config_window->napiConfigWindow), "delete_event", G_CALLBACK(delete_event), NULL); - gtk_builder_connect_signals (builder, NULL); - g_object_unref(G_OBJECT(builder)); -} - -/* function needed by Gnapi */ -int on_configure_plugin() -{ - if (!read_config()) return N_ERROR; - if (napi_config_window == NULL) create_napi_config_window(); - gtk_entry_set_text(GTK_ENTRY(napi_config_window->enUser), nc.user); - gtk_entry_set_text(GTK_ENTRY(napi_config_window->enPass), nc.pass); - gtk_entry_set_text(GTK_ENTRY(napi_config_window->enLang), nc.lang); - gtk_entry_set_text(GTK_ENTRY(napi_config_window->enZip), nc.zip); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(napi_config_window->chCover), nc.cover); - gtk_widget_show_all(napi_config_window->napiConfigWindow); - return N_OK; -} - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_config.glade.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_config.glade.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_config.glade.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_config.glade.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ - - - - - - 400 - Configure plugin - False - center - - - True - vertical - - - True - - - 100 - True - Login - - - False - False - 0 - - - - - True - True - - - - 1 - - - - - 0 - - - - - True - - - 100 - True - Password - - - False - False - 0 - - - - - True - True - False - - - - 1 - - - - - 1 - - - - - True - - - 100 - True - Language - - - False - False - 0 - - - - - True - True - - PL - - - 1 - - - - - 2 - - - - - True - - - 100 - True - 7zip - - - False - False - 0 - - - - - True - True - - 7z - - - 1 - - - - - 3 - - - - - Download covers - True - True - False - True - True - - - 4 - - - - - True - - - False - 5 - - - - - True - - - - - - Close - 120 - True - True - True - - - False - False - end - 1 - - - - - False - 6 - - - - - - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_config.h.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_config.h.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_config.h.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi_config.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -/* - * napi_config.h - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef NAPI_CONFIG_H -#define NAPI_CONFIG_H - -#include -#include "napi_common.h" - -typedef struct _NapiConfigWindow { - GtkWidget *napiConfigWindow; - GtkWidget *btClose; - GtkWidget *enUser; - GtkWidget *enPass; - GtkWidget *enZip; - GtkWidget *enLang; - GtkWidget *chCover; -} NapiConfigWindow; - -NapiConfigWindow *napi_config_window; - -#endif - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi.c.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi.c.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi.c.svn-base 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,161 +0,0 @@ -/* - * napi.c - * - * Copyright(c) Wiesław Spyra , 2008-2009. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include - -#include "repbad.h" -#include "sendsubs.h" -#include "napi_config.h" -#include "../../gnapi-plugins.h" -#include "../../http_post.h" -#include "napi_common.h" -#include "napi.h" - -/* function needed by Gnapi */ -void on_plugin_load(gPlugin *n) -{ - gPlugin napi; - napi.active = 1; - napi.canAutoDownload = 1; - napi.canDownload = 1; - napi.canUpload = 1; - napi.canReportBad = 1; - napi.canDoSth = 0; - napi.name = g_strdup(PL_NAME); - napi.author = g_strdup(PL_AUTHOR); - napi.version = g_strdup(PL_VERSION); - napi.license = g_strdup(PL_LICENSE); - napi.copyright = g_strdup(PL_COPY); - napi.comment = g_strdup(PL_DESC); - napi.libName = g_strdup(PL_LIBNAME); - *n = napi; -} - -/* download cover */ -static gboolean get_cover(const char *filename, const char *md5) -{ - gchar *f = g_strjoin("", filename, NULL); - gchar *url = g_strjoin("", COVER_STRING, md5, "&oceny=-1", NULL); - if (g_strrstr(f, ".") != NULL) g_strlcpy(g_strrstr(f, "."), ".jpg", 5); else f = g_strjoin("", f, ".jpg", NULL);////// - HttpGet *http = new_http_get(url); - if (http == NULL) return FALSE; - if (!g_file_set_contents(f, http->data, http->length, NULL)) return FALSE; - g_free(f); - g_free(url); - hg_free(http); - return TRUE; -} - -/* get packed and password protected 7z archive from np server */ -static gboolean get_file(const char *url, const char *md5) -{ - if (!read_config()) return FALSE; - HttpGet *http = new_http_get(url); - if (http == NULL) return FALSE; - gchar *fname = g_strjoin("", nc.tmp, md5, NULL); - if (!g_file_set_contents(fname, http->data, http->length, NULL)) return FALSE; - g_free(fname); - hg_free(http); - return TRUE; -} - -/* unpack and rename 7z archive */ -static gboolean un7z(char *filename, const char *md5) -{ - gchar *fname = g_build_filename(nc.tmp, md5, NULL); - gchar *newfname = g_build_filename(nc.tmp, g_basename(filename), NULL); - gchar *args = g_strdup_printf(S_Z_STRING, nc.zip, fname, newfname); - if (system(args)) return FALSE; - g_free(args); - if (gnapiConfig.rewrite == 0 && is_file_exists(filename)) - { - gint i = 0; - gchar num[5]; - sprintf(num, "%d", i); - gchar *frewrite = ""; - while (is_file_exists(frewrite = g_strjoin("", filename, ".", num, NULL))) - { - ++i; - sprintf(num, "%d", i); - } - if (g_rename(filename, frewrite)) return FALSE; - g_free(frewrite); - } - gsize fsize = get_file_size(newfname); - gchar *buffer = NULL; - buffer = get_file_contents(newfname, 0); - if (buffer == NULL) return FALSE; - g_remove(newfname); - if (!g_file_set_contents(filename, buffer, fsize, NULL)) return FALSE; - g_free(buffer); - g_remove(fname); - g_free(newfname); - g_free(fname); - return TRUE; -} - -/* function needed by Gnapi */ -int on_download_once(char *f) -{ - gchar *content, md5[33], hash2[6]; - - if (!read_config()) return N_ERROR; - if (!md5_hash(md5, f) || md5 == NULL) return N_ERROR; - if (!second_hash(hash2, md5) || hash2 == NULL) return N_ERROR; - g_print("NP-MD5: %s NP-Hash2: %s\n", md5, hash2); - gchar *url = g_strdup_printf(GET_STRING, nc.lang, md5, hash2, nc.user, nc.pass); - if (!get_file(url, md5)) return N_SERVER_BUSY; - g_free(url); - gchar *fmd5 = g_build_filename(nc.tmp, md5, NULL); - if (!g_file_get_contents(fmd5, &content, NULL, NULL)) return N_ERROR; - if (g_str_has_prefix(content, "NPc")) - { - g_remove(fmd5); - g_free(fmd5); - return N_NOT_FOUND; - } - g_free(fmd5); - if (g_strrstr(f, ".") != NULL) g_strlcpy(g_strrstr(f, "."), ".txt", 5); else f = g_strjoin("", f, ".txt", NULL);////// - if (g_strcmp0(gnapiConfig.downloadDir, "") != 0) - { - gchar *fnewf = g_build_filename(gnapiConfig.downloadDir, g_basename(f), NULL); - f = g_strdup(fnewf); - g_free(fnewf); - } - if (!un7z(f, md5)) return N_SERVER_BUSY_OR_CANT_UNPACK; - if (nc.cover) if (get_cover(f, md5)) return N_OK_CUSTOM; - return N_OK; -} - -/* function needed by Gnapi */ -int on_auto_download(char *f) -{ - return on_download_once(f); -} - -/* function needed by Gnapi */ -int on_plugin_unload() -{ - g_free(send_window); - g_free(napi_config_window); - g_free(report_window); - return N_OK; -} - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi.h.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi.h.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi.h.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/napi.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -/* - * napi.h - * - * Copyright(c) Wiesław Spyra , 2008-2009. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef NAPI_H -#define NAPI_H - -#define S_Z_STRING "%s x -y -so -bd -piBlm8NTigvru0Jr0 \"%s\" 2>/dev/null >\"%s\"" -#define GET_STRING "http://napiprojekt.pl/unit_napisy/dl.php?l=%s&f=%s&t=%s&v=other&kolejka=false&nick=%s&pass=%s&napios=linux" -#define COVER_STRING "http://napiprojekt.pl/okladka_pobierz.php?id=" - -#endif - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/repbad.c.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/repbad.c.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/repbad.c.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/repbad.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,146 +0,0 @@ -/* - * repbad.c - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "repbad.h" -#include "../../gnapi-plugins.h" -#include "../../http_post.h" - -static void comment_changed(GtkComboBox *widget, gpointer user_data) -{ - gchar *cb_text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(widget)); - if (g_strcmp0(cb_text, gettext("Other reason")) != 0) - gtk_widget_set_sensitive(report_window->txKmt, FALSE); else - gtk_widget_set_sensitive(report_window->txKmt, TRUE); - g_free(cb_text); -} - -static gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data) -{ - gtk_widget_hide(report_window->window); - return TRUE; -} - -static void send_report_real(gchar *comment) -{ - gchar md5[33]; - - GtkWidget *m_box = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "%s", ""); - g_signal_connect_swapped(m_box, "response", G_CALLBACK(gtk_widget_destroy), m_box); - if (!check_user(nc.user, nc.pass)) - { - gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(m_box), gettext("Bad password or username.")); - gtk_dialog_run(GTK_DIALOG(m_box)); - return; - } - gchar *fname = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(report_window->dialog)); - if (!md5_hash(md5, fname)) return; - g_free(fname); - HttpPost *soup_post = new_http_post(BAD_STRING); - hp_add_request_data(soup_post, "nick", nc.user); - hp_add_request_data(soup_post, "pass", nc.pass); - hp_add_request_data(soup_post, "l", nc.lang); - hp_add_request_data(soup_post, "md5", md5); - hp_add_request_data(soup_post, "kmt", comment); - hp_end_request(soup_post); - hp_add_request(soup_post); - gchar *utf = ""; - if (hp_send_request(soup_post) == 200) - utf = g_convert(soup_post->msg->response_body->data, soup_post->msg->response_body->length, "UTF-8", - "CP1250", NULL, NULL, NULL); else utf = g_strdup(gettext("Report has not been sent")); - hp_free(soup_post); - if (g_str_has_prefix(utf, "NPc")) - { - g_print(gettext("[Info] Report has been sent.\n")); - gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(m_box), gettext("Report has been sent.")); - } else { - g_print("[Info] %s.\n", utf); - gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(m_box), "%s.", utf); - } - gtk_dialog_run(GTK_DIALOG(m_box)); - g_free(utf); -} - -static void send_report(GtkWidget *widget, gpointer data) -{ - gtk_widget_hide(report_window->window); - gchar *current_text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(report_window->cbProblem)); - if (g_strcmp0(current_text, gettext("Other reason")) != 0) - { - send_report_real(current_text); - } else { - gchar *comment = ""; - comment = (gchar*)gtk_entry_get_text(GTK_ENTRY(report_window->txKmt)); - send_report_real(comment); - g_free(comment); - } - g_free(current_text); -} - -static void create_report_window() -{ - report_window = g_malloc(sizeof(ReportWindow)); - report_window->dialog = gtk_file_chooser_dialog_new(gettext("Select file"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); - report_window->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title(GTK_WINDOW(report_window->window),gettext("Send report")); - gtk_window_set_resizable(GTK_WINDOW(report_window->window), FALSE); - gtk_window_set_position(GTK_WINDOW(report_window->window), GTK_WIN_POS_CENTER); - g_signal_connect(G_OBJECT(report_window->window), "delete_event", G_CALLBACK(delete_event), NULL); - gtk_container_set_border_width(GTK_CONTAINER(report_window->window), 15); - report_window->table = gtk_table_new (4, 3, TRUE); - gtk_container_add (GTK_CONTAINER (report_window->window), report_window->table); - report_window->lbFile = gtk_label_new(gettext("Select video file")); - report_window->lbKmt = gtk_label_new(gettext("Problem")); - report_window->cbProblem = gtk_combo_box_new_text(); - report_window->txKmt = gtk_entry_new(); - gtk_combo_box_append_text(GTK_COMBO_BOX(report_window->cbProblem), gettext("Bad synchronization")); - gtk_combo_box_append_text(GTK_COMBO_BOX(report_window->cbProblem), gettext("Subtitles for other movie")); - gtk_combo_box_append_text(GTK_COMBO_BOX(report_window->cbProblem), gettext("Translated by computer program")); - gtk_combo_box_append_text(GTK_COMBO_BOX(report_window->cbProblem), gettext("Only part of subtitles")); - gtk_combo_box_append_text(GTK_COMBO_BOX(report_window->cbProblem), gettext("Other reason")); - report_window->quitbutton = gtk_button_new_with_label(gettext("Close")); - report_window->sendbutton = gtk_button_new_with_label(gettext("Send")); - report_window->bbFilm = gtk_file_chooser_button_new_with_dialog(report_window->dialog); - g_signal_connect(G_OBJECT(report_window->quitbutton), "clicked", G_CALLBACK(delete_event), NULL); - g_signal_connect(G_OBJECT(report_window->sendbutton), "clicked", G_CALLBACK(send_report), NULL); - g_signal_connect(G_OBJECT(report_window->cbProblem), "changed", G_CALLBACK(comment_changed), NULL); - report_window->separator = gtk_hseparator_new(); - gtk_widget_set_sensitive(report_window->txKmt, FALSE); - gtk_entry_set_max_length(GTK_ENTRY(report_window->txKmt), 200); - gtk_combo_box_set_active(GTK_COMBO_BOX(report_window->cbProblem), 0); - gtk_table_attach_defaults(GTK_TABLE(report_window->table), report_window->lbFile, 0, 1, 0, 1); - gtk_table_attach_defaults(GTK_TABLE(report_window->table), report_window->bbFilm, 1, 3, 0, 1); - gtk_table_attach_defaults(GTK_TABLE(report_window->table), report_window->lbKmt, 0, 1, 1, 2); - gtk_table_attach_defaults(GTK_TABLE(report_window->table), report_window->cbProblem, 1, 3, 1, 2); - gtk_table_attach_defaults(GTK_TABLE(report_window->table), report_window->txKmt, 1, 3, 2, 3); - gtk_table_attach_defaults(GTK_TABLE(report_window->table), report_window->separator, 0, 3, 3, 4); - gtk_table_attach_defaults(GTK_TABLE(report_window->table), report_window->sendbutton, 1, 2, 4, 5); - gtk_table_attach_defaults(GTK_TABLE(report_window->table), report_window->quitbutton, 2, 3, 4, 5); -} - -int on_report_bad() -{ - if (!read_config()) return N_ERROR; - if (report_window == NULL) create_report_window(); - gtk_window_set_modal(GTK_WINDOW(report_window->window), TRUE); - gtk_widget_show_all(report_window->window); - return 0; -} - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/repbad.h.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/repbad.h.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/repbad.h.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/repbad.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -/* - * repbad.h - * - * Copyright(c) Wiesław Spyra , 2008-2009. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef REPBAD_H -#define REPBAD_H - -#include -#include "napi_common.h" - -#define BAD_STRING "http://www.napiprojekt.pl/unit_napisy/zlenapisyadd.php" - -typedef struct _ReportWindow { - GtkWidget *window; - GtkWidget *lbFile; - GtkWidget *lbKmt; - GtkWidget *cbProblem; - GtkWidget *table; - GtkWidget *txKmt; - GtkWidget *separator; - GtkWidget *sendbutton; - GtkWidget *quitbutton; - GtkWidget *bbFilm; - GtkWidget *dialog; - GtkWidget *enUse; - GtkWidget *enPass; -} ReportWindow; - -ReportWindow *report_window; - -#endif - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/sendsubs.c.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/sendsubs.c.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/sendsubs.c.svn-base 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/sendsubs.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -/* - * sendsubs.c - * Copyright(c) Wiesław Spyra , 2008-2009. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "sendsubs.h" -#include "../../gnapi-plugins.h" -#include "../../http_post.h" - -static gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data) -{ - gtk_widget_hide(send_window->window); - return TRUE; -} - -int make_zip(gchar *fname, gchar *md5) -{ - gchar *buffer = get_file_contents(fname, 0); - gchar *ftxt = g_strjoin("", nc.tmp, md5, ".txt", NULL); - gsize fsize = get_file_size(fname); - if (!g_file_set_contents(ftxt, buffer, fsize, NULL)) return FALSE; - g_free(buffer); - gchar *fmd5 = g_build_filename(nc.tmp, md5, NULL); - gchar *args = g_strdup_printf(MAKE_S_Z, nc.zip, fmd5, fmd5); - g_free(fmd5); - gboolean status = g_spawn_command_line_sync(args, NULL, NULL, NULL, NULL); - g_free(args); - g_remove(ftxt); - g_free(ftxt); - if (status) return TRUE; else return FALSE; -} - -static void send_subtitles_real(gchar *fname) -{ - gchar md5[33], hash2[5]; - - if (fname == NULL) return; - gchar *text_file = g_build_filename(fname, NULL); - FilmInfo *movie_info = get_movie_info(fname); - if(!md5_hash(md5, text_file)) return; - if(!second_hash(hash2, md5)) return; - if (g_strrstr(text_file, ".") != NULL) g_strlcpy(g_strrstr(text_file, "."), ".txt", 5); else text_file = g_strjoin("", text_file, ".txt", NULL);////// - if (!is_file_exists(text_file)) return; - GtkWidget *m_box = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "%s", ""); - g_signal_connect_swapped(m_box, "response", G_CALLBACK(gtk_widget_destroy), m_box); - gchar *url = g_strdup_printf(SENDSUBS_STRING, movie_info->dur, movie_info->res, movie_info->fps, md5, movie_info->size); - HttpPost *soup_post = new_http_post(url); - hp_add_request_data(soup_post, "nick", nc.user); - hp_add_request_data(soup_post, "pass", nc.pass); - hp_add_request_data(soup_post, "l", nc.lang); - hp_add_request_data(soup_post, "s_hash", md5); - hp_add_request_data(soup_post, "kmt", (char*)gtk_entry_get_text(GTK_ENTRY(send_window->txKmt))); - hp_add_request_data(soup_post, "v", "other"); - hp_add_request_data(soup_post, "t", hash2); - hp_add_request_data(soup_post, "m_filename", (gchar*)g_basename(movie_info->filename)); - hp_add_request_data(soup_post, "MAX_FILE_SIZE", "512000"); - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(send_window->chFix))) - hp_add_request_data(soup_post, "poprawka", "true"); else - hp_add_request_data(soup_post, "poprawka", "false"); - if (!make_zip(text_file, md5)) return; - gchar *zip_file = g_strjoin("", nc.tmp, md5, ".zip", NULL); - gsize fsize = get_file_size(zip_file); - gchar *zip_content = NULL; - zip_content = get_file_contents(zip_file, 0); - if (zip_content == NULL) return; - g_remove(zip_file); - hp_add_request_file(soup_post, "plik", (gchar*)g_basename(zip_file), zip_content, fsize); - hp_add_request(soup_post); - gchar *utf = ""; - if (hp_send_request(soup_post) == 200) - utf = g_convert(soup_post->msg->response_body->data, soup_post->msg->response_body->length, "UTF-8", - "CP1250", NULL, NULL, NULL); else utf = g_strdup(gettext("Subtitles were not been sent"));//////////////////////////////////////////////////////////////// - g_free(zip_content); - g_free(movie_info); - g_free(text_file); - g_free(zip_file); - g_free(url); - hp_free(soup_post); - if (g_str_has_prefix(utf, "NPc0") || g_str_has_prefix(utf, "NPc2")) - { - gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(m_box), gettext("Subtitles were been sent.")); - g_print(gettext("[Info] Subtitles were been sent.\n")); - } else { - gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(m_box), "%s.", utf); - g_print("[Info] %s.\n", utf); - } - gtk_dialog_run(GTK_DIALOG(m_box)); - g_free(utf); -} - -static void send_subtitles(GtkWidget *widget, gpointer data) -{ - gtk_widget_hide(send_window->window); - gchar *fname = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(send_window->dialog)); - send_subtitles_real(fname); - g_free(fname); -} - -static void create_send_window() -{ - send_window = g_malloc(sizeof(SendWindow)); - send_window->dialog = gtk_file_chooser_dialog_new(gettext("Select file"), NULL, - GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); - send_window->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_window_set_title(GTK_WINDOW(send_window->window),gettext("Send subtitles")); - gtk_window_set_resizable(GTK_WINDOW(send_window->window), FALSE); - gtk_window_set_position(GTK_WINDOW(send_window->window), GTK_WIN_POS_CENTER); - g_signal_connect(G_OBJECT(send_window->window), "delete_event", G_CALLBACK(delete_event), NULL); - gtk_container_set_border_width(GTK_CONTAINER(send_window->window), 15); - send_window->table = gtk_table_new(4, 3, TRUE); - gtk_container_add(GTK_CONTAINER(send_window->window), send_window->table); - send_window->lbFile = gtk_label_new(gettext("Select video file")); - send_window->lbKmt = gtk_label_new(gettext("Comment")); - send_window->txKmt = gtk_entry_new(); - send_window->chFix = gtk_check_button_new_with_label(gettext("Treat as an improvement")); - send_window->quitbutton = gtk_button_new_with_label(gettext("Close")); - send_window->sendbutton = gtk_button_new_with_label(gettext("Send")); - send_window->bbFilm = gtk_file_chooser_button_new_with_dialog(send_window->dialog); - g_signal_connect(G_OBJECT(send_window->quitbutton), "clicked", G_CALLBACK(delete_event), NULL); - g_signal_connect(G_OBJECT(send_window->sendbutton), "clicked", G_CALLBACK(send_subtitles), NULL); - send_window->separator = gtk_hseparator_new(); - gtk_entry_set_max_length(GTK_ENTRY(send_window->txKmt), 200); - gtk_table_attach_defaults(GTK_TABLE(send_window->table), send_window->lbFile, 0, 1, 0, 1); - gtk_table_attach_defaults(GTK_TABLE(send_window->table), send_window->bbFilm, 1, 3, 0, 1); - gtk_table_attach_defaults(GTK_TABLE(send_window->table), send_window->chFix, 0, 3, 1, 2); - gtk_table_attach_defaults(GTK_TABLE(send_window->table), send_window->lbKmt, 0, 1, 2, 3); - gtk_table_attach_defaults(GTK_TABLE(send_window->table), send_window->txKmt, 1, 3, 2, 3); - gtk_table_attach_defaults(GTK_TABLE(send_window->table), send_window->separator, 0, 3, 3, 4); - gtk_table_attach_defaults(GTK_TABLE(send_window->table), send_window->sendbutton, 1, 2, 4, 5); - gtk_table_attach_defaults(GTK_TABLE(send_window->table), send_window->quitbutton, 2, 3, 4, 5); -} - -/* function needed by Gnapi */ -int on_send_subtitles() -{ - if (!read_config()) return N_ERROR; - if (send_window == NULL) create_send_window(); - gtk_window_set_modal(GTK_WINDOW(send_window->window), TRUE); - gtk_widget_show_all(send_window->window); - return TRUE; -} - -/* function needed by Gnapi */ -int on_send_subtitles_once(char *fname) -{ - if (!read_config()) return N_ERROR; - if (send_window == NULL) create_send_window(); - send_subtitles_real(fname); - return TRUE; -} - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/sendsubs.h.svn-base gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/sendsubs.h.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/napiprojekt/.svn/text-base/sendsubs.h.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/napiprojekt/.svn/text-base/sendsubs.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -/* - * sendsubs.h - * - * Copyright(c) Wiesław Spyra , 2008-2009. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef SENDSUBS_H -#define SENDSUBS_H - -#include -#include "napi_common.h" - -#define SENDSUBS_STRING "http://www.napiprojekt.pl/unit_napisy/upload.php?m_length=%.0f&m_resolution=%s&m_fps=%.2f&m_hash=%s&m_filesize=%li" -#define MAKE_S_Z "%s a -t7z -bd -y %s.zip -piBlm8NTigvru0Jr0 %s.txt" - -typedef struct _SendWindow { - GtkWidget *window; - GtkWidget *lbFile; - GtkWidget *lbKmt; - GtkWidget *table; - GtkWidget *txKmt; - GtkWidget *separator; - GtkWidget *sendbutton; - GtkWidget *quitbutton; - GtkWidget *bbFilm; - GtkWidget *dialog; - GtkWidget *chFix; -} SendWindow; - -SendWindow *send_window; - -#endif - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/nautilus/gnapi_nautilus.c gnapi-0.2.2-0ubuntu/src/plugins/nautilus/gnapi_nautilus.c --- gnapi-0.2.1-0ubuntu/src/plugins/nautilus/gnapi_nautilus.c 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/nautilus/gnapi_nautilus.c 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * gnapi_nautilus.c * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/nautilus/gnapi_nautilus.h gnapi-0.2.2-0ubuntu/src/plugins/nautilus/gnapi_nautilus.h --- gnapi-0.2.1-0ubuntu/src/plugins/nautilus/gnapi_nautilus.h 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/nautilus/gnapi_nautilus.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * gnapi_nautilus.h * - * Copyright(c) Wiesław Spyra , 2008-2009. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/nautilus/.svn/all-wcprops gnapi-0.2.2-0ubuntu/src/plugins/nautilus/.svn/all-wcprops --- gnapi-0.2.1-0ubuntu/src/plugins/nautilus/.svn/all-wcprops 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/nautilus/.svn/all-wcprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 47 -/svnroot/gnapi/!svn/ver/45/src/plugins/nautilus -END -gnapi_nautilus.c -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/gnapi/!svn/ver/45/src/plugins/nautilus/gnapi_nautilus.c -END -gnapi_nautilus.h -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/gnapi/!svn/ver/38/src/plugins/nautilus/gnapi_nautilus.h -END diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/nautilus/.svn/entries gnapi-0.2.2-0ubuntu/src/plugins/nautilus/.svn/entries --- gnapi-0.2.1-0ubuntu/src/plugins/nautilus/.svn/entries 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/nautilus/.svn/entries 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -10 - -dir -48 -https://gnapi.svn.sourceforge.net/svnroot/gnapi/src/plugins/nautilus -https://gnapi.svn.sourceforge.net/svnroot/gnapi - - - -2010-08-06T16:15:20.883721Z -45 -badenov - - - - - - - - - - - - - - -b5f4b304-0d56-4a30-a9d8-522935651cea - -gnapi_nautilus.c -file - - - - -2010-08-14T20:11:29.950527Z -a88b3a13f2694bd6d8ecffa59e1aa976 -2010-08-06T16:15:20.883721Z -45 -badenov - - - - - - - - - - - - - - - - - - - - - -3701 - -gnapi_nautilus.h -file - - - - -2010-08-14T20:11:29.950527Z -ce9f62b0975a8fa2b46c40eae23b5f43 -2010-06-03T19:19:10.940802Z -38 -badenov - - - - - - - - - - - - - - - - - - - - - -1186 - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/nautilus/.svn/text-base/gnapi_nautilus.c.svn-base gnapi-0.2.2-0ubuntu/src/plugins/nautilus/.svn/text-base/gnapi_nautilus.c.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/nautilus/.svn/text-base/gnapi_nautilus.c.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/nautilus/.svn/text-base/gnapi_nautilus.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ -/* - * gnapi_nautilus.c - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include -#include -#include - -#include "gnapi_nautilus.h" -#include - -static GType type = 0; - -static void on_menu_item_activate (NautilusMenuItem *menu_item, gpointer data) -{ - GList *files, *l; - gchar *args = "gnapi"; - - files = g_object_get_data(G_OBJECT(menu_item), "files"); - for (l = files; l != NULL; l = l->next) - { - NautilusFileInfo *file = NAUTILUS_FILE_INFO(l->data); - gchar *fname = g_file_get_path(nautilus_file_info_get_location(file)); - args = g_strjoin("", args, " \"", fname, "\"", NULL); - g_free(fname); - } - g_spawn_command_line_async(args, NULL); - g_free(args); -} - - -static GList* get_file_items(NautilusMenuProvider *provider, GtkWidget *window, GList *files) -{ - NautilusGnapi *gnapi; - NautilusMenuItem *menu_item; - GList *l; - - gnapi = G_TYPE_CHECK_INSTANCE_CAST(provider, type, NautilusGnapi); - for (l = files; l != NULL; l = l->next) - { - NautilusFileInfo *file = NAUTILUS_FILE_INFO(l->data); - if (!(nautilus_file_info_is_mime_type(file, "video/*") || nautilus_file_info_is_mime_type(file, "application/vnd.rn-realmedia"))) - return NULL; - if (nautilus_file_info_is_directory(file)) - return NULL; - } - menu_item = nautilus_menu_item_new("NautilusGnapi::gnapi", _("_Download subtitles"), _("Download subtitles with Gnapi"), "gtk-go-down"); - g_signal_connect(G_OBJECT(menu_item), "activate", G_CALLBACK(on_menu_item_activate), NULL); - g_object_set_data(G_OBJECT(menu_item), "gnapi", provider); - g_object_set_data_full(G_OBJECT(menu_item), "files", nautilus_file_info_list_copy(files), (GDestroyNotify)nautilus_file_info_list_free); - return g_list_append(NULL, menu_item); -} - - -static void menu_provider_iface_init(NautilusMenuProviderIface *iface) -{ - iface->get_file_items = get_file_items; -} - -static void nautilus_gnapi_init(NautilusGnapi *gnapi) -{ - g_print(_("*** Gnapi extension loaded.\n")); -} - -void nautilus_module_shutdown (void) -{ - g_print(_("*** Gnapi extension unloaded.\n")); -} - -void nautilus_module_initialize(GTypeModule *module) -{ - if (!type) - { - static const GTypeInfo info = {sizeof(NautilusGnapiClass), (GBaseInitFunc)NULL, (GBaseFinalizeFunc)NULL, (GClassInitFunc)NULL, NULL, NULL, - sizeof(NautilusGnapi), 0, (GInstanceInitFunc)nautilus_gnapi_init,}; - static const GInterfaceInfo menu_provider_iface_info = {(GInterfaceInitFunc)menu_provider_iface_init, NULL, NULL}; - type = g_type_module_register_type(module, G_TYPE_OBJECT, "NautilusGnapi", &info, 0); - g_type_module_add_interface(module, type, NAUTILUS_TYPE_MENU_PROVIDER, &menu_provider_iface_info); - } - bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR); - bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); -} - -void nautilus_module_list_types(const GType **types, int *num_types) -{ - static GType type_list[1]; - - type_list[0] = type; - *types = type_list; - *num_types = 1; -} - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/nautilus/.svn/text-base/gnapi_nautilus.h.svn-base gnapi-0.2.2-0ubuntu/src/plugins/nautilus/.svn/text-base/gnapi_nautilus.h.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/nautilus/.svn/text-base/gnapi_nautilus.h.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/nautilus/.svn/text-base/gnapi_nautilus.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -/* - * gnapi_nautilus.h - * - * Copyright(c) Wiesław Spyra , 2008-2009. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef GNAPI_NAUTILUS_H -#define GNAPI_NAUTILUS_H - -#include - -#define GETTEXT_PACKAGE "gnapi" -#define GNOMELOCALEDIR "/usr/share/locale" -#define GNOME_EXPLICIT_TRANSLATION_DOMAIN "gnapi" -#define HAVE_BIND_TEXTDOMAIN_CODESET 1 - -G_BEGIN_DECLS - -typedef struct _NautilusGnapi { - GObject parent; -} NautilusGnapi; - -typedef struct _NautilusGnapiClass { - GObjectClass parent_class; -} NautilusGnapiClass; - -G_END_DECLS - -#endif - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/os.c gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/os.c --- gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/os.c 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/os.c 2011-03-22 17:25:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * os.c * - * Copyright(c) Wiesław Spyra , 2008-2009. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as @@ -107,6 +107,7 @@ g_print("OS-hash: %s\n", hash); gchar *www = g_strjoin("", OS_URL, hash, OS_MODE, NULL); HttpGet *http = new_http_get(www); +//g_print("%s\n", www); g_free(www); if (http == NULL) return N_ERROR; gchar *regex_text = g_strjoin("", OS_REGEX_PRE, oc.lang, OS_REGEX_SUF, NULL); @@ -116,6 +117,7 @@ if (g_match_info_matches(match_info)) url = g_strjoin("", OS_WWW, g_match_info_fetch(match_info, 1), NULL); else url = NULL; +//g_print("%s\n", url); g_match_info_free(match_info); g_regex_unref(regex); g_free(regex_text); diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/os_config.c gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/os_config.c --- gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/os_config.c 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/os_config.c 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * os_config.c * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/os_config.glade gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/os_config.glade --- gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/os_config.glade 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/os_config.glade 2011-03-22 17:25:50.000000000 +0000 @@ -144,6 +144,37 @@ + + True + + + True + os.png + + + 0 + + + + + http://www.opensubtitles.org + True + True + True + True + none + http://www.opensubtitles.org + + + 1 + + + + + 5 + + + True @@ -168,7 +199,7 @@ False False - 5 + 6 diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/os_config.h gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/os_config.h --- gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/os_config.h 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/os_config.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * os_config.h * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/os.h gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/os.h --- gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/os.h 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/os.h 2011-03-22 17:25:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * os.h * - * Copyright(c) Wiesław Spyra , 2008-2009. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as @@ -27,9 +27,9 @@ #define PL_NAME "OpenSubtitles" #define PL_AUTHOR "Wiesław Spyra" -#define PL_VERSION "0.2" +#define PL_VERSION "0.2.2" #define PL_LICENSE "GPLv3" -#define PL_COPY "(c) 2008-2010 Wiesław Spyra" +#define PL_COPY "(c) 2008-2011 Wiesław Spyra" #define PL_DESC "OpenSubtitles database plugin" #define PL_LIBNAME "libopensub.so" @@ -43,7 +43,8 @@ #define GC_PASS "/apps/gnapi/plugins/libopensub/pass" #define OS_WINDOW "/usr/share/gnapi/os_config.glade" -#define OS_WWW "http://www.opensubtitles.org" +//#define OS_WWW "http://www.opensubtitles.org" +#define OS_WWW "" #define OS_URL "http://www.opensubtitles.org/search/sublanguageid-all/moviehash-" #define OS_MODE "/simplexml" #define OS_REGEX_PRE "(?:\\s*)(.+)(?:\\s*.+\\s*)(?:" diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/all-wcprops gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/all-wcprops --- gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/all-wcprops 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/all-wcprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 52 -/svnroot/gnapi/!svn/ver/48/src/plugins/opensubtitles -END -os_config.glade -K 25 -svn:wc:ra_dav:version-url -V 68 -/svnroot/gnapi/!svn/ver/28/src/plugins/opensubtitles/os_config.glade -END -os.c -K 25 -svn:wc:ra_dav:version-url -V 57 -/svnroot/gnapi/!svn/ver/48/src/plugins/opensubtitles/os.c -END -os.h -K 25 -svn:wc:ra_dav:version-url -V 57 -/svnroot/gnapi/!svn/ver/36/src/plugins/opensubtitles/os.h -END -os_config.c -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/gnapi/!svn/ver/38/src/plugins/opensubtitles/os_config.c -END -os_config.h -K 25 -svn:wc:ra_dav:version-url -V 64 -/svnroot/gnapi/!svn/ver/29/src/plugins/opensubtitles/os_config.h -END diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/entries gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/entries --- gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/entries 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/entries 1970-01-01 00:00:00.000000000 +0000 @@ -1,198 +0,0 @@ -10 - -dir -48 -https://gnapi.svn.sourceforge.net/svnroot/gnapi/src/plugins/opensubtitles -https://gnapi.svn.sourceforge.net/svnroot/gnapi - - - -2010-10-07T21:53:34.023677Z -48 -badenov - - - - - - - - - - - - - - -b5f4b304-0d56-4a30-a9d8-522935651cea - -os_config.glade -file - - - - -2010-08-14T20:11:29.874539Z -caf8274343b1417d520ca2a9c1783464 -2010-04-06T17:39:30.436633Z -28 -badenov - - - - - - - - - - - - - - - - - - - - - -6926 - -os.c -file - - - - -2010-11-09T13:23:43.645905Z -76c7f99ff6e81d3abb2584915f3990ac -2010-10-07T21:53:34.023677Z -48 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -6927 - -os.h -file - - - - -2010-08-14T20:11:29.874539Z -14b677d8d4e0857c22ef29a6c3a76386 -2010-05-02T17:56:14.108367Z -36 -badenov - - - - - - - - - - - - - - - - - - - - - -2279 - -os_config.c -file - - - - -2010-08-14T20:11:29.874539Z -1d27795965fe3c37c056da439745ccec -2010-06-03T19:19:10.940802Z -38 -badenov - - - - - - - - - - - - - - - - - - - - - -2441 - -os_config.h -file - - - - -2010-08-14T20:11:29.879728Z -473da52d739c3ef487100b5e2a35b7c9 -2010-04-07T18:51:47.553407Z -29 -badenov - - - - - - - - - - - - - - - - - - - - - -1034 - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/prop-base/os.c.svn-base gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/prop-base/os.c.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/prop-base/os.c.svn-base 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/prop-base/os.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 14 -svn:executable -V 0 - -END diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os_config.c.svn-base gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os_config.c.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os_config.c.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os_config.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -/* - * os_config.c - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include /* gettext */ - -#include "../../gnapi-plugins.h" -#include "os_config.h" -#include "os.h" - -static gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data) -{ - gc_config_set_str(GC_ZIP, (char*)gtk_entry_get_text(GTK_ENTRY(os_config_window->enZip))); - gc_config_set_str(GC_LANG, (char*)gtk_entry_get_text(GTK_ENTRY(os_config_window->enLang))); - gc_config_set_str(GC_USER, (char*)gtk_entry_get_text(GTK_ENTRY(os_config_window->enUser))); - gc_config_set_str(GC_PASS, (char*)gtk_entry_get_text(GTK_ENTRY(os_config_window->enPass))); - gtk_widget_hide(os_config_window->osConfigWindow); - return TRUE; -} - -void create_os_config_window() -{ - os_config_window = g_malloc(sizeof(OsConfigWindow)); - GtkBuilder *builder = gtk_builder_new(); - gtk_builder_add_from_file(builder, OS_WINDOW, NULL); - os_config_window->osConfigWindow = GTK_WIDGET(gtk_builder_get_object(builder, "wOs")); - gtk_container_set_border_width(GTK_CONTAINER(os_config_window->osConfigWindow), 15); - os_config_window->btClose = GTK_WIDGET(gtk_builder_get_object(builder, "cButton")); - os_config_window->enUser = GTK_WIDGET(gtk_builder_get_object(builder, "eUser")); - os_config_window->enPass = GTK_WIDGET(gtk_builder_get_object(builder, "ePass")); - os_config_window->enLang = GTK_WIDGET(gtk_builder_get_object(builder, "eLang")); - os_config_window->enZip = GTK_WIDGET(gtk_builder_get_object(builder, "eZip")); - g_signal_connect(G_OBJECT(os_config_window->btClose), "clicked", G_CALLBACK(delete_event), NULL); - g_signal_connect(G_OBJECT(os_config_window->osConfigWindow), "delete_event", G_CALLBACK(delete_event), NULL); - gtk_builder_connect_signals(builder, NULL); - g_object_unref(G_OBJECT(builder)); -} - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os_config.glade.svn-base gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os_config.glade.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os_config.glade.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os_config.glade.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,177 +0,0 @@ - - - - - - 400 - Configure plugin - False - center - - - True - vertical - - - True - - - 100 - True - Login - - - False - False - 0 - - - - - True - True - - - - 1 - - - - - 0 - - - - - True - - - 100 - True - Password - - - False - False - 0 - - - - - True - True - False - - - - 1 - - - - - 1 - - - - - True - - - 100 - True - Language - - - False - False - 0 - - - - - True - True - - PL - - - 1 - - - - - 2 - - - - - True - - - 100 - True - 7zip - - - False - False - 0 - - - - - True - True - - - - 1 - - - - - 3 - - - - - True - - - False - 5 - 4 - - - - - True - - - - - - Close - 120 - True - True - True - - - False - False - end - 1 - - - - - False - False - 5 - - - - - - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os_config.h.svn-base gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os_config.h.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os_config.h.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os_config.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -/* - * os_config.h - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef OS_CONFIG_H -#define OS_CONFIG_H - -#include - -typedef struct _Os_Config_Window { - GtkWidget *osConfigWindow; - GtkWidget *btClose; - GtkWidget *enUser; - GtkWidget *enPass; - GtkWidget *enLang; - GtkWidget *enZip; -} OsConfigWindow; - -void create_os_config_window(); - -#endif - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os.c.svn-base gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os.c.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os.c.svn-base 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,237 +0,0 @@ -/* - * os.c - * - * Copyright(c) Wiesław Spyra , 2008-2009. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include -#include - -#include "../../gnapi-plugins.h" -#include "../../http_post.h" -#include "os_config.h" -#include "os.h" - -char *hash = ""; -char *url = ""; - -void on_plugin_load(gPlugin *n) -/* funkcja wymagana przez gnapi */ -{ - gPlugin oss; - - oss.name = g_strdup(PL_NAME); - oss.author = g_strdup(PL_AUTHOR); - oss.version = g_strdup(PL_VERSION); - oss.license = g_strdup(PL_LICENSE); - oss.copyright = g_strdup(PL_COPY); - oss.comment = g_strdup(PL_DESC); - oss.libName = g_strdup(PL_LIBNAME); - oss.active = 1; - oss.canAutoDownload = 1; - oss.canDownload = 1; - oss.canUpload = 0; - oss.canReportBad = 0; - oss.canDoSth = 0; - *n = oss; -} - -/* read plugin config from gconf */ -int read_config() -{ - if (gc_config_get_str(GC_ZIP) == NULL) - oc.zip = g_strdup(GC_ZIPP); else - oc.zip = g_strdup(gc_config_get_str(GC_ZIP)); - if (gc_config_get_str(GC_TMP) == NULL) - oc.tmp = g_strdup(GC_TMPP); else - oc.tmp = g_strdup(gc_config_get_str(GC_TMP)); - if (gc_config_get_str(GC_LANG) == NULL) - oc.lang = g_strdup(GC_LANGP); else - oc.lang = g_strdup(gc_config_get_str(GC_LANG)); - if (gc_config_get_str(GC_USER) == NULL) - oc.user = g_strdup(""); else - oc.user = g_strdup(gc_config_get_str(GC_USER)); - if (gc_config_get_str(GC_PASS) == NULL) - oc.pass = g_strdup(""); else - oc.pass = g_strdup(gc_config_get_str(GC_PASS)); - return TRUE; -} - -unsigned long long get_os_hash(char *fname) -{ - /* - * Public Domain implementation by Kamil Dziobek. turbos11(at)gmail.com - * This code implements Gibest hash algorithm first use in Media Player Classics - * For more implementation(various languages and authors) see: - * http://trac.opensubtitles.org/projects/opensubtitles/wiki/HashSourceCodes - * - * -works only on little-endian procesor DEC, Intel and compatible - * -sizeof(unsigned long long) must be 8 - */ - - gint i; - unsigned long long t1 = 0; - unsigned long long buffer1[8192 * 2]; - - FILE *f = fopen(fname, "rb"); - if (f == NULL) return 0; - if (!fread(buffer1, 8192, 8, f)) return 0; - fseek(f, -65536, SEEK_END); - if (!fread(&buffer1[8192], 8192, 8, f)) return 0; - for (i = 0; i < 8192 * 2; i++) t1 += buffer1[i]; - t1 += ftell(f); - fclose(f); - return t1; -} - -static int search_subtitles(const gchar *fname) -{ - unsigned long long myhash = get_os_hash((gchar*)fname); - if (myhash == 0) return FALSE; - hash = g_strdup_printf("%llx", myhash); - g_print("OS-hash: %s\n", hash); - gchar *www = g_strjoin("", OS_URL, hash, OS_MODE, NULL); - HttpGet *http = new_http_get(www); - g_free(www); - if (http == NULL) return N_ERROR; - gchar *regex_text = g_strjoin("", OS_REGEX_PRE, oc.lang, OS_REGEX_SUF, NULL); - GMatchInfo *match_info; - GRegex *regex = g_regex_new(regex_text, G_REGEX_MULTILINE, 0, NULL); - g_regex_match(regex, http->data, 0, &match_info); - if (g_match_info_matches(match_info)) - url = g_strjoin("", OS_WWW, g_match_info_fetch(match_info, 1), NULL); - else url = NULL; - g_match_info_free(match_info); - g_regex_unref(regex); - g_free(regex_text); - hg_free(http); - return N_OK; -} - -static int download_subtitles(const gchar *fname) -{ - if (!read_config()) return FALSE; - HttpGet *http = new_http_get(url); - if (http == NULL) return FALSE; - gchar *nfname = g_strjoin("", oc.tmp, hash, OS_SUFFIX, NULL); - if (!g_file_set_contents(nfname, http->data, http->length, NULL)) return FALSE; - gchar *dir = g_strjoin("", oc.tmp, hash, NULL); - g_mkdir(dir, 0744); - gchar *args = g_strdup_printf(UZIP_STRING, oc.zip, dir, nfname); - if (system(args)) return FALSE; - g_remove(nfname); - g_free(nfname); - g_free(dir); - return N_OK; -} - -static int copy_subtitles(char *fname) -{ - gchar *dir = g_strjoin("", oc.tmp, hash, NULL); - GDir *flist = g_dir_open(dir, 0, NULL); - gchar *sname = ""; - gint count = 0; - while ((sname = g_strdup(g_dir_read_name(flist)))) - { - sname = g_strjoin("", dir, "/", sname, NULL); - if (g_str_has_suffix(sname, ".nfo")) g_remove(sname); else ++count; - } - g_dir_close(flist); - if (count > 1) - { - g_print(OS_NOT_SUPPORTED, dir); - return FALSE; - } - flist = g_dir_open(dir, 0, NULL); - sname = g_strjoin("", dir, "/", g_dir_read_name(flist), NULL); - g_dir_close(flist); - if (g_strrstr(fname, ".") != NULL) g_strlcpy(g_strrstr(fname, "."), ".txt", 5); else fname = g_strjoin("", fname, ".txt", NULL); - if (g_strcmp0(gnapiConfig.downloadDir, "") != 0) - { - gchar *fnewf = g_build_filename(gnapiConfig.downloadDir, g_basename(fname), NULL); - fname = g_strdup(fnewf); - g_free(fnewf); - } - if (gnapiConfig.rewrite == 0 && is_file_exists(fname)) - { - gint i = 0; - gchar num[5]; - sprintf(num, "%d", i); - gchar *frewrite = ""; - while (is_file_exists(frewrite = g_strjoin("", fname, ".", num, NULL))) - { - ++i; - sprintf(num, "%d", i); - } - if (g_rename(fname, frewrite)) return FALSE; - g_free(frewrite); - } - gsize fsize = get_file_size(sname); - gchar *buffer = NULL; - buffer = get_file_contents(sname, 0); -// g_print("%s\n\n%s", sname, buffer); - flist = g_dir_open(dir, 0, NULL); - while ((sname = g_strdup(g_dir_read_name(flist)))) - { - sname = g_strjoin("", dir, "/", sname, NULL); - g_remove(sname); - } - g_dir_close(flist); - if (!g_file_set_contents(fname, buffer, fsize, NULL)) return FALSE; - g_free(buffer); - g_rmdir(dir); - g_free(dir); - g_free(sname); - return TRUE; -} - -int on_download_once(char *f) -{ - if (!read_config()) return N_ERROR; - if (!search_subtitles(f)) return N_NOT_FOUND; - if (url == NULL || hash == NULL) return N_NOT_FOUND; - if (!download_subtitles(f)) return N_SERVER_BUSY_OR_CANT_UNPACK; - if (!copy_subtitles(f)) return N_SERVER_BUSY_OR_CANT_UNPACK; - return N_OK; -} - -int on_auto_download(char *f) -{ - return on_download_once(f); -} - -/* function needed by Gnapi */ -int on_configure_plugin() -{ - if (!read_config()) return N_ERROR; - if (os_config_window == NULL) create_os_config_window(); - gtk_entry_set_text(GTK_ENTRY(os_config_window->enZip), oc.zip); - gtk_entry_set_text(GTK_ENTRY(os_config_window->enUser), oc.user); - gtk_entry_set_text(GTK_ENTRY(os_config_window->enPass), oc.pass); - gtk_entry_set_text(GTK_ENTRY(os_config_window->enLang), oc.lang); - gtk_widget_show_all(os_config_window->osConfigWindow); - return N_OK; -} - -/* function needed by Gnapi */ -int on_plugin_unload() -{ - g_free(os_config_window); - return N_OK; -} - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os.h.svn-base gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os.h.svn-base --- gnapi-0.2.1-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os.h.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/opensubtitles/.svn/text-base/os.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -/* - * os.h - * - * Copyright(c) Wiesław Spyra , 2008-2009. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef OS_H -#define OS_H - -#include /* gettext */ - -#define _(String) gettext(String) - -#define PL_NAME "OpenSubtitles" -#define PL_AUTHOR "Wiesław Spyra" -#define PL_VERSION "0.2" -#define PL_LICENSE "GPLv3" -#define PL_COPY "(c) 2008-2010 Wiesław Spyra" -#define PL_DESC "OpenSubtitles database plugin" -#define PL_LIBNAME "libopensub.so" - -#define GC_ZIP "/apps/gnapi/plugins/zip" -#define GC_ZIPP "7za" -#define GC_TMP "/apps/gnapi/plugins/tmp" -#define GC_TMPP "/tmp/" -#define GC_LANG "/apps/gnapi/plugins/libopensub/lang" -#define GC_LANGP _("en") -#define GC_USER "/apps/gnapi/plugins/libopensub/user" -#define GC_PASS "/apps/gnapi/plugins/libopensub/pass" - -#define OS_WINDOW "/usr/share/gnapi/os_config.glade" -#define OS_WWW "http://www.opensubtitles.org" -#define OS_URL "http://www.opensubtitles.org/search/sublanguageid-all/moviehash-" -#define OS_MODE "/simplexml" -#define OS_REGEX_PRE "(?:\\s*)(.+)(?:\\s*.+\\s*)(?:" -#define OS_REGEX_SUF ")" -#define OS_SUFFIX ".zip" -#define OS_NOT_SUPPORTED _("[Error] OS plugin can't handle multiple files archives yet. Your files were saved here: %s.\n") - -#define UZIP_STRING "%s x -y -bd -piBlm8NTigvru0Jr0 -o\"%s\" \"%s\" 2>/dev/null >/dev/null" - -/* config structure */ -typedef struct _oConfig { - char *lang; - char *user; - char *pass; - char *tmp; - char *zip; -} oConfig; - -typedef struct _SearchResult { - char *ZipDownloadLink; -} SearchResult; - -OsConfigWindow *os_config_window; - -/* here is stored plugin configuration */ -oConfig oc; - -#endif - diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/.svn/all-wcprops gnapi-0.2.2-0ubuntu/src/plugins/.svn/all-wcprops --- gnapi-0.2.1-0ubuntu/src/plugins/.svn/all-wcprops 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/.svn/all-wcprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 38 -/svnroot/gnapi/!svn/ver/48/src/plugins -END diff -Nru gnapi-0.2.1-0ubuntu/src/plugins/.svn/entries gnapi-0.2.2-0ubuntu/src/plugins/.svn/entries --- gnapi-0.2.1-0ubuntu/src/plugins/.svn/entries 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/plugins/.svn/entries 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -10 - -dir -48 -https://gnapi.svn.sourceforge.net/svnroot/gnapi/src/plugins -https://gnapi.svn.sourceforge.net/svnroot/gnapi - - - -2010-10-07T21:53:34.023677Z -48 -badenov - - - - - - - - - - - - - - -b5f4b304-0d56-4a30-a9d8-522935651cea - -opensubtitles -dir - -nautilus -dir - -napiprojekt -dir - diff -Nru gnapi-0.2.1-0ubuntu/src/scan.c gnapi-0.2.2-0ubuntu/src/scan.c --- gnapi-0.2.1-0ubuntu/src/scan.c 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/scan.c 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * scan.c * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/scan.h gnapi-0.2.2-0ubuntu/src/scan.h --- gnapi-0.2.1-0ubuntu/src/scan.h 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/scan.h 2011-03-22 16:57:41.000000000 +0000 @@ -1,7 +1,7 @@ /* * scan.h * - * Copyright(c) Wiesław Spyra , 2008-2010. + * Copyright(c) Wiesław Spyra , 2008-2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 3 or later of the GNU General Public License as diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/all-wcprops gnapi-0.2.2-0ubuntu/src/.svn/all-wcprops --- gnapi-0.2.1-0ubuntu/src/.svn/all-wcprops 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/all-wcprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,101 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 30 -/svnroot/gnapi/!svn/ver/48/src -END -gnapi.c -K 25 -svn:wc:ra_dav:version-url -V 38 -/svnroot/gnapi/!svn/ver/44/src/gnapi.c -END -interface.c -K 25 -svn:wc:ra_dav:version-url -V 42 -/svnroot/gnapi/!svn/ver/44/src/interface.c -END -interface.h -K 25 -svn:wc:ra_dav:version-url -V 42 -/svnroot/gnapi/!svn/ver/28/src/interface.h -END -defaults.h -K 25 -svn:wc:ra_dav:version-url -V 41 -/svnroot/gnapi/!svn/ver/47/src/defaults.h -END -gengine.c -K 25 -svn:wc:ra_dav:version-url -V 40 -/svnroot/gnapi/!svn/ver/46/src/gengine.c -END -scan.glade -K 25 -svn:wc:ra_dav:version-url -V 41 -/svnroot/gnapi/!svn/ver/16/src/scan.glade -END -gengine.h -K 25 -svn:wc:ra_dav:version-url -V 40 -/svnroot/gnapi/!svn/ver/46/src/gengine.h -END -gnapi-plugins.h -K 25 -svn:wc:ra_dav:version-url -V 46 -/svnroot/gnapi/!svn/ver/43/src/gnapi-plugins.h -END -http_post.c -K 25 -svn:wc:ra_dav:version-url -V 42 -/svnroot/gnapi/!svn/ver/41/src/http_post.c -END -scan.c -K 25 -svn:wc:ra_dav:version-url -V 37 -/svnroot/gnapi/!svn/ver/45/src/scan.c -END -info.glade -K 25 -svn:wc:ra_dav:version-url -V 41 -/svnroot/gnapi/!svn/ver/20/src/info.glade -END -license.h -K 25 -svn:wc:ra_dav:version-url -V 39 -/svnroot/gnapi/!svn/ver/9/src/license.h -END -gplugins.c -K 25 -svn:wc:ra_dav:version-url -V 41 -/svnroot/gnapi/!svn/ver/46/src/gplugins.c -END -scan.h -K 25 -svn:wc:ra_dav:version-url -V 37 -/svnroot/gnapi/!svn/ver/20/src/scan.h -END -http_post.h -K 25 -svn:wc:ra_dav:version-url -V 42 -/svnroot/gnapi/!svn/ver/41/src/http_post.h -END -gplugins.h -K 25 -svn:wc:ra_dav:version-url -V 41 -/svnroot/gnapi/!svn/ver/44/src/gplugins.h -END diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/entries gnapi-0.2.2-0ubuntu/src/.svn/entries --- gnapi-0.2.1-0ubuntu/src/.svn/entries 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/entries 1970-01-01 00:00:00.000000000 +0000 @@ -1,575 +0,0 @@ -10 - -dir -48 -https://gnapi.svn.sourceforge.net/svnroot/gnapi/src -https://gnapi.svn.sourceforge.net/svnroot/gnapi - - - -2010-10-07T21:53:34.023677Z -48 -badenov - - - - - - - - - - - - - - -b5f4b304-0d56-4a30-a9d8-522935651cea - -gnapi.c -file - - - - -2010-08-14T20:11:30.426555Z -b87de99484608472894141ff84343633 -2010-07-26T22:19:10.230867Z -44 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -1622 - -plugins -dir - -interface.c -file - - - - -2010-08-14T20:11:30.430541Z -17f84979ac8c4be0eaab0c2bcba2830e -2010-07-26T22:19:10.230867Z -44 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -18398 - -interface.h -file - - - - -2010-08-14T20:11:30.430541Z -7655c63ea61c281f8d5409f74a836288 -2010-04-06T17:39:30.436633Z -28 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -2156 - -defaults.h -file - - - - -2010-11-09T13:23:43.697864Z -7657bd74a2edd22fd72894b87be71cfd -2010-08-14T20:32:46.843869Z -47 -badenov - - - - - - - - - - - - - - - - - - - - - -4130 - -gengine.c -file - - - - -2010-08-14T20:11:30.435431Z -2dd1cd523e9678a39759bb6c1f2b019c -2010-08-11T20:06:38.961457Z -46 -badenov - - - - - - - - - - - - - - - - - - - - - -8916 - -scan.glade -file - - - - -2010-08-14T20:11:30.435431Z -8b2cb4803f0115760bcb48eaae917b91 -2010-03-09T16:40:48.701010Z -16 -badenov - - - - - - - - - - - - - - - - - - - - - -6596 - -gengine.h -file - - - - -2010-08-14T20:11:30.435431Z -475097c31da4090d8d46d1f8749e44be -2010-08-11T20:06:38.961457Z -46 -badenov - - - - - - - - - - - - - - - - - - - - - -1382 - -gnapi-plugins.h -file - - - - -2010-08-14T20:11:30.435431Z -2b3188d2a772716c0f7450c356b45207 -2010-07-26T10:15:44.106106Z -43 -badenov - - - - - - - - - - - - - - - - - - - - - -1984 - -http_post.c -file - - - - -2010-08-14T20:11:30.435431Z -3cfadd33ddadc6df2c973c6ecc2fd519 -2010-06-26T17:21:30.586537Z -41 -badenov - - - - - - - - - - - - - - - - - - - - - -3553 - -scan.c -file - - - - -2010-08-14T20:11:30.435431Z -76981b0a9c979ae6267341b629aec17c -2010-08-06T16:15:20.883721Z -45 -badenov - - - - - - - - - - - - - - - - - - - - - -7525 - -info.glade -file - - - - -2010-08-14T20:11:30.435431Z -2e485b7be0a3edf4cce2ef223216770e -2010-04-04T12:59:10.358122Z -20 -badenov - - - - - - - - - - - - - - - - - - - - - -4577 - -license.h -file - - - - -2010-08-14T20:11:30.435431Z -ab9f9bdb3c6353499da918b69c1b0da7 -2010-03-05T18:25:59.115361Z -9 -badenov - - - - - - - - - - - - - - - - - - - - - -34408 - -gplugins.c -file - - - - -2010-08-14T20:11:30.435431Z -49dfb553f16cf47a9a9c14568be3c5f5 -2010-08-11T20:06:38.961457Z -46 -badenov - - - - - - - - - - - - - - - - - - - - - -6588 - -scan.h -file - - - - -2010-08-14T20:11:30.435431Z -7136b194c3fcf3b4e679f296fbf40d0e -2010-04-04T12:59:10.358122Z -20 -badenov - - - - - - - - - - - - - - - - - - - - - -1143 - -http_post.h -file - - - - -2010-08-14T20:11:30.438518Z -bf311c892c1d835febd5319290fc094a -2010-06-26T17:21:30.586537Z -41 -badenov - - - - - - - - - - - - - - - - - - - - - -1518 - -gplugins.h -file - - - - -2010-08-14T20:11:30.438518Z -19fc865ec1cef3c3bda261bbf81266ec -2010-07-26T22:19:10.230867Z -44 -badenov - - - - - - - - - - - - - - - - - - - - - -1579 - diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/prop-base/gnapi.c.svn-base gnapi-0.2.2-0ubuntu/src/.svn/prop-base/gnapi.c.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/prop-base/gnapi.c.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/prop-base/gnapi.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 14 -svn:executable -V 0 - -END diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/prop-base/interface.c.svn-base gnapi-0.2.2-0ubuntu/src/.svn/prop-base/interface.c.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/prop-base/interface.c.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/prop-base/interface.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 14 -svn:executable -V 0 - -END diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/prop-base/interface.h.svn-base gnapi-0.2.2-0ubuntu/src/.svn/prop-base/interface.h.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/prop-base/interface.h.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/prop-base/interface.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 14 -svn:executable -V 0 - -END diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/defaults.h.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/defaults.h.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/defaults.h.svn-base 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/defaults.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -/* - * defaults.h - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef DEFAULTS_H -#define DEFAULTS_H - -#include /* gettext */ - -#define _(String) gettext(String) - -#define APP_NAME "Gnapi" -#define APP_UNIX_NAME "gnapi" - -#define ENV_HOME "HOME" -#define FOUND_REQUEST _("*** Found request: %s.\n") -#define ABOUT_PLUGIN _("%s %s\n\nAuthor: %s\n%s\nLicense: %s\nComment: %s") - -#define APP_AUTHOR "Wiesław Spyra " -#define APP_SUMMARY _("Subtitles downloader.") -#define APP_COPYRIGHT "Copyright 2008-2010 (c) Wiesław Spyra" -#define APP_VERSION "0.2.1" -#define APP_SITE "http://gnapi.sourceforge.net" -#define APP_LOCALE_SHARE "/usr/share/locale" -#define APP_LOCALE_CODEPAGE "UTF-8" - -#define IF_SEARCHD _("Search directory...") -#define IF_AUTODOWNLOAD _("Autodownload...") -#define IF_DOWNLOADS _("Download subtitles") -#define IF_SENDS _("Send subtitles") -#define IF_REPORTS _("Report bad subtitles") -#define IF_OPTIONS _("Options...") -#define IF_MOVIEINFO _("Show movie info...") -#define IF_SELECTF _("Select file") -#define IF_ABOUT _("About...") -#define IF_QUIT _("Quit") -#define IF_GLADE "/usr/share/gnapi/info.glade" - -#define MI_FILESIZE _("File size: ") -#define MI_RES _("Resolution: ") -#define MI_DURATION _("Duration: ") -#define MI_FPS _("FPS: ") -#define MI_CODEC _("Codec: ") -#define MI_BITRATE _("Bitrate: ") - -#define SC_VIDEO_PREFIX "video/" -#define SC_RM_MIME "application/vnd.rn-real" -#define SC_GLADE "/usr/share/gnapi/scan.glade" -#define SC_DOWNLOAD _("Download") -#define SC_UPLOAD _("Upload") -#define SC_ACTION _("Action") -#define SC_ICON _("Icon") -#define SC_FILENAME _("Filename") - -#define STATUS_ICON "/usr/share/pixmaps/gnapi/gnapi.png" -#define APP_ICON "/usr/share/pixmaps/gnapi/gnapi.png" -#define DL_ICON "/usr/share/pixmaps/gnapi/downloading.png" - -#define V_18 7 -#define V_15 8 -#define V_BO 9 -#define V_ICON_18 "/usr/share/pixmaps/gnapi/v-18.png" -#define V_ICON_15 "/usr/share/pixmaps/gnapi/v-15.png" -#define V_ICON_BO "/usr/share/pixmaps/gnapi/v-bo.png" -#define V_ICON_WARN "/usr/share/pixmaps/gnapi/v-warn.png" - -#define GCONF_ROOT "/apps/gnapi/config" -#define GCONF_ENCODE "/apps/gnapi/config/encode" -#define GCONF_REWRITE "/apps/gnapi/config/rewrite" -#define GCONF_TOENCODING "/apps/gnapi/config/toEncoding" -#define GCONF_FROMENCODING "/apps/gnapi/config/fromEncoding" -#define GCONF_DOWNLOADTO "/apps/gnapi/config/downloadTo" -#define GCONF_CURRENTDIR "/apps/gnapi/config/currentDir" - -#define PLUGINS_DIR "/plugins/" -#define SHARE_DIR "/usr/share/gnapi" -#define LIB_DIR "/usr/lib/gnapi" -#define HOME_SUBDIR "/.gnapi" - -#define CANT_LOADP _("[Error] Can't load plugin.") -#define CANT_FINDF _("[Error] Can't find function.") -#define CANT_LOADL _("[Error] Can't load library %s.\n") -#define REGISTEREDP _("[Info] Registred plugin: %s.\n") -#define UNREGISTEREDP _("[Info] Unregistred plugin: %s.\n") -#define MEM_ERROR _("[Error] Memory allocation error!?\n") -#define CANT_OPEN_PDIR _("[Error] Can't open plugins directory!\n") -#define T_ERROR _("[Error] An unknown error occurred.") -#define T_SERVER_BUSY _("[Error] Server busy.") -#define T_SERVER_BUSY_OR_CANT_UNPACK _("[Error] Server busy or unpack problem.") -#define T_CANT_UNPACK _("[Error] Can't unpack subtitles.") -#define T_NOT_FOUND _("Not found!") -#define T_OK _("Downloaded succesfully!") -#define T_CANCEL _("Canceled.") -#define T_UNKNOWN _("[Error] An unknown error occurred.") -#define T_CODEPAGE _("[Warning] Codepage wasn't changed. %s.\n") - -#endif - diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/gengine.c.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/gengine.c.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/gengine.c.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/gengine.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,297 +0,0 @@ -/* - * gengine.c - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include -#include -#include -#include -#include /* g_mkdir */ - -#include "gengine.h" -#include "interface.h" -#include "defaults.h" -#include "gplugins.h" - -guint plInitialized = 0; -GError* error = NULL; -GConfClient *gcClient; - - -unsigned long get_file_size(const char *fname) -{ - FILE *f = g_fopen(fname, "rb"); - if (f == NULL) return 0; - fseek(f, 0, SEEK_END); - unsigned long fsize = ftell(f); - fclose(f); - return fsize; -} - -int is_file_exists(const char *fname) -{ - if (g_file_test(fname, G_FILE_TEST_EXISTS) && !g_file_test(fname, G_FILE_TEST_IS_DIR)) return TRUE; else return FALSE; -} - -char* get_file_contents(const char *fname, unsigned long fsize) -{ - FILE *f = g_fopen(fname, "rb"); - if (f == NULL) return NULL; - fseek(f, 0, SEEK_END); - unsigned long fsizer = ftell(f); - rewind(f); - if (fsize > 0) fsizer = fsize; - gchar *buffer = (gchar*)g_malloc(sizeof(gchar) * fsizer); - unsigned long fsizer2 = fread(buffer, 1, fsizer, f); - if (fsizer != fsizer2) return NULL; - fclose(f); - return buffer; -} - -/* get movie info from file */ -FilmInfo* get_movie_info(const char *fname) -{ - guint streams; - - AVFormatContext *pFormatCtx = NULL; - AVCodecContext *pCodecCtx = NULL; - gint framePrecision = 1000; - FilmInfo *movie_info = malloc(sizeof(FilmInfo)); - av_register_all(); - movie_info->filename = g_strdup(fname); - movie_info->size = get_file_size(fname); - if (av_open_input_file(&pFormatCtx, fname, NULL, 0, NULL) != 0) - return NULL; - if (av_find_stream_info(pFormatCtx) < 0) - return NULL; - //dump_format(pFormatCtx, 0, fname, FALSE); - gint videoStream = av_find_default_stream_index(pFormatCtx); - if (videoStream == -1) - return NULL; - pCodecCtx = pFormatCtx->streams[videoStream]->codec; - AVCodec *pCodec = avcodec_find_decoder(pCodecCtx->codec_id); - if (pCodec == NULL) - return NULL; - if (avcodec_open(pCodecCtx, pCodec) < 0) return NULL; - pCodecCtx = (pFormatCtx)->streams[videoStream]->codec; - streams = pFormatCtx->nb_streams; -#if LIBAVCODEC_BUILD > 4753 - movie_info->fps = av_q2d((pFormatCtx)->streams[videoStream]->r_frame_rate); -#else - movie_info->fps = (double)pCodecCtx.frame_rate / (double)pCodecCtx.frame_rate_base; -#endif - movie_info->codec_name = g_strdup(pCodec->name); - movie_info->bitrate = pCodecCtx->bit_rate; - movie_info->dur = (float)pFormatCtx->duration / (float)AV_TIME_BASE; - movie_info->dur = (float)((unsigned int)((movie_info->dur) * framePrecision) / (float)framePrecision); - movie_info->res = g_strdup_printf("%ix%i", pCodecCtx->width, pCodecCtx->height); - avcodec_close((pFormatCtx)->streams[videoStream]->codec); - av_close_input_file(pFormatCtx); - pFormatCtx = NULL; - return movie_info; -} - - -/* libnotify notification */ -static void notify(const gchar *title, const gchar *body, const gchar *icon) -{ - if (!notify_is_initted() && !notify_init(APP_NAME)) - return; - NotifyNotification *notification = notify_notification_new_with_status_icon(title, body, icon, interface->gStatusIcon); - notify_notification_set_urgency(notification, NOTIFY_URGENCY_NORMAL); - notify_notification_show(notification, &error); -} - -/* change codepage of downloaded file */ -static gint change_encoding(gchar *fname) -{ - gsize in_size = 0; - gchar *in; - g_file_get_contents(fname, &in, &in_size, &error); - gsize out_size; - gchar *out = g_convert(in, in_size, gnapiConfig.toEncoding, gnapiConfig.fromEncoding, NULL, &out_size, &error); - g_file_set_contents(fname, out, out_size, &error); - g_free(in); - g_free(out); - return N_OK; -} - -/* check for "bad" words */ -static gint check_vulgar(gchar *fname) -{ - FILE *p = g_fopen(fname, "r"); - gint i = 0; - if (p != NULL) - { - while (!feof(p)) - { - gchar l[1024]; - fgets(l, 1024, p); - if (g_strrstr("kurw", l) != NULL - || g_strrstr("chuj", l) != NULL - || g_strrstr("fuck", l) != NULL - || g_strrstr("jeba", l) != NULL) - i++; - } - fclose(p); - if (i >= 5) return V_18; - else if (i >= 1) return V_15; - else return V_BO; - } else - return N_ERROR; -} - -/* check error code from extern functions */ -void check_status(gint *status, gchar *fname, gchar *plug) -{ - gchar *er_msg, *notify_icon = ""; - if (fname == NULL) fname = g_strdup(""); - switch(*status) - { - case N_ERROR: er_msg = T_ERROR; break; - case N_SERVER_BUSY: er_msg = T_SERVER_BUSY; break; - case N_SERVER_BUSY_OR_CANT_UNPACK: er_msg = T_SERVER_BUSY_OR_CANT_UNPACK; break; - case N_CANT_UNPACK: er_msg = T_CANT_UNPACK; break; - case N_NOT_FOUND: er_msg = T_NOT_FOUND; break; - case N_OK: er_msg = T_OK; break; - case N_OK_CUSTOM: er_msg = T_OK; break; - case GR_CANCEL: er_msg = T_CANCEL; break; - default: er_msg = T_UNKNOWN; break; - } - g_print("%s %s\n", er_msg, g_basename(fname)); - if (*status == N_OK || *status == N_OK_CUSTOM) - { - if (*status == N_OK) - switch (check_vulgar(fname)) - { - case V_15: notify_icon = V_ICON_15; break; - case V_18: notify_icon = V_ICON_18; break; - default: notify_icon = V_ICON_BO; break; - } - if (*status == N_OK_CUSTOM) - { - *status = N_OK; - notify_icon = g_strjoin("", fname, NULL); - if (g_strrstr(notify_icon, ".") != NULL) g_strlcpy(g_strrstr(notify_icon, "."), ".jpg", 5); else notify_icon = g_strjoin("", notify_icon, ".jpg", NULL);////// - } - if (gnapiConfig.encode == 1) - if (change_encoding(fname) != N_OK) - g_print(T_CODEPAGE, fname); - } else notify_icon = V_ICON_WARN; - gchar *alert = g_strjoin("", er_msg, "\n", g_basename(fname), NULL); - gchar *title = g_strjoin("", APP_NAME, " (", plug, ")", NULL); - if (*status != GR_CANCEL) notify(title, alert, notify_icon); - g_free(title); - g_free(alert); -} - -void update_config() -{ - gnapiConfig.encode = gconf_client_get_int(gcClient, GCONF_ENCODE, NULL); - gnapiConfig.rewrite = gconf_client_get_int(gcClient, GCONF_REWRITE, NULL); - gnapiConfig.toEncoding = gconf_client_get_string(gcClient, GCONF_TOENCODING, NULL); - gnapiConfig.fromEncoding = gconf_client_get_string(gcClient, GCONF_FROMENCODING, NULL); - gnapiConfig.downloadDir = gconf_client_get_string(gcClient, GCONF_DOWNLOADTO, NULL); -} - -void initialize_config() -{ - gchar *home = g_strdup(getenv(ENV_HOME)); - gcClient = gconf_client_get_default(); - gconf_client_add_dir(gcClient, GCONF_ROOT, GCONF_CLIENT_PRELOAD_NONE, NULL); - update_config(); - gnapiConfig.homeDir = g_strjoin("", home, HOME_SUBDIR, NULL); - gnapiConfig.usrDir = g_strdup(SHARE_DIR); - gnapiConfig.libDir = g_strdup(LIB_DIR); - gnapiConfig.downloadDir = g_strjoin("", gconf_client_get_string(gcClient, GCONF_DOWNLOADTO, NULL), NULL); - if (gconf_client_get_string(gcClient, GCONF_CURRENTDIR, NULL) == NULL) - gnapiConfig.currentDir = home; else - gnapiConfig.currentDir = g_strdup(gconf_client_get_string(gcClient, GCONF_CURRENTDIR, NULL)); - g_mkdir(gnapiConfig.homeDir, 0744); - gchar *mdir = g_strjoin("", gnapiConfig.homeDir, PLUGINS_DIR, NULL); - g_mkdir(mdir, 0744); - g_free(mdir); - g_free(home); -} - -void initialize_plugins() -{ - plugins = (gPlugin*)malloc(sizeof(gPlugin)); - gchar *odir = g_strjoin("", gnapiConfig.libDir, PLUGINS_DIR, NULL); - GDir *dir = g_dir_open(odir, 0, &error); - g_free(odir); - if (dir != NULL) - { - const gchar *fname; - gint i = 1; - while ((fname = g_dir_read_name(dir))) - { - if (register_plugin((gchar*)fname, i) == 1) - g_print(CANT_LOADL, fname); else - g_print(REGISTEREDP, fname); - ++i; - } - g_dir_close(dir); - } else - g_print(CANT_OPEN_PDIR); -} - -void unload_plugins() -{ - int i = 1; - const gchar *fname; - - gchar *odir = g_strjoin("", gnapiConfig.libDir, PLUGINS_DIR, NULL); - GDir *dir = g_dir_open(odir, 0, &error); - g_free(odir); - if (dir != NULL) - { - while ((fname = g_dir_read_name(dir))) - { - ++i; - if (unregister_plugin((gchar*)fname, i) == N_OK) - g_print(UNREGISTEREDP, fname); - } - g_dir_close(dir); - } else - g_print(CANT_OPEN_PDIR); - free(plugins); -} - -int gc_config_set_int(char *key, int val) -{ - return gconf_client_set_int(gcClient, key, val, NULL); -} - -int gc_config_set_str(char *key, char *val) -{ - return gconf_client_set_string(gcClient, key, val, NULL); -} - -char* gc_config_get_str(char *key) -{ - return gconf_client_get_string(gcClient, key, NULL); -} - -int gc_config_get_int(char *key) -{ - return gconf_client_get_int(gcClient, key, NULL); -} - diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/gengine.h.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/gengine.h.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/gengine.h.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/gengine.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * gengine.h - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef GENGINE_H -#define GENGINE_H - -#include "gnapi-plugins.h" - -void initialize_config(); -void initialize_plugins(); -void update_config(); -void unload_plugins(); -/*gint auto_download(gchar *fname); -gint activate_configuration(gchar *plugin_name); -gint activate_plugin_info_dialog(gchar *plugin_name); -gint download_once_plugin(gchar *fname, gchar *plug); -gint download_once(GtkWidget *widget, gpointer data); -gint upload_once(GtkWidget *widget, gpointer data); -gint upload_once_plugin(gchar *fname, gchar *plug); -gint report_bad(GtkWidget *widget, gpointer data);*/ -void check_status(gint *status, gchar *fname, gchar *plug); - -#endif - diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/gnapi.c.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/gnapi.c.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/gnapi.c.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/gnapi.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -/* - * gnapi.c - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include /* setlocale */ - -#include "interface.h" -#include "gengine.h" -#include "scan.h" -#include "defaults.h" -#include "gplugins.h" - -int main(int argc, gchar *argv[]) -{ - gtk_init(&argc, &argv); - g_type_init(); - setlocale(LC_ALL, ""); - bindtextdomain(APP_UNIX_NAME, APP_LOCALE_SHARE); - bind_textdomain_codeset(APP_UNIX_NAME, APP_LOCALE_CODEPAGE); - textdomain(APP_UNIX_NAME); - initialize_config(); - initialize_plugins(); - create_config_window(); - create_basic_interface(); - create_scan_window(); - create_info_window(); - create_interface(); - if (argc > 1) - { - int i; - for (i = 1; i < argc; ++i) - { - if (g_file_test(argv[i], G_FILE_TEST_EXISTS) && !g_file_test(argv[i], G_FILE_TEST_IS_DIR)) - { - g_print(FOUND_REQUEST, argv[i]); - auto_download(argv[i]); - } - } - } else gtk_main(); - unload_plugins(); - destroy_interface(); - return 0; -} - diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/gnapi-plugins.h.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/gnapi-plugins.h.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/gnapi-plugins.h.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/gnapi-plugins.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ -/* - * gnapi-plugins.h - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef GNAPI_PLUGINS_H -#define GNAPI_PLUGINS_H - -enum -{ - N_PHONY, - N_OK, - N_SERVER_BUSY_OR_CANT_UNPACK, - N_CANT_UNPACK, - N_NOT_FOUND, - N_SERVER_BUSY, - N_ERROR, - N_OK_CUSTOM -}; - -#define N_FILE_ERROR 10 -#define R_BAD_USER_OR_PASSWORD 11 -#define GR_OK 12 -#define GR_CANCEL 13 - -typedef struct _gPlugin { - int active; - int canAutoDownload; - int canDownload; - int canUpload; - int canReportBad; - int canDoSth; - char *name; - char *author; - char *version; - char *license; - char *copyright; - char *comment; - char *libName; -} gPlugin; - -typedef struct _gConfig { - int encode; - char *toEncoding; - char *fromEncoding; - int rewrite; - char *homeDir; - char *usrDir; - char *libDir; - char *downloadDir; - char *currentDir; -} gConfig; - -typedef struct _FilmInfo -{ - char *res; - float dur, fps; - char *filename; - long size; - char *codec_name; - int bitrate; -} FilmInfo; - -gConfig gnapiConfig; - -int gc_config_set_int(char *key, int val); -int gc_config_set_str(char *key, char *val); -int gc_config_get_int(char *key); -char* gc_config_get_str(char *key); -FilmInfo* get_movie_info(const char *fname); -unsigned long get_file_size(const char *fname); -int is_file_exists(const char *fname); -char* get_file_contents(const char *fname, unsigned long fsize); - -#endif - diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/gplugins.c.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/gplugins.c.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/gplugins.c.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/gplugins.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,280 +0,0 @@ -/* - * gplugins.c - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include /* dlsym, dlopen, dlclose */ -#include - -#include "defaults.h" -#include "gplugins.h" - -static void* open_library(gchar *lib_name, gchar *func_name) -{ - void *lib_handle; - void *func; - - gchar *lpath = g_strjoin("", gnapiConfig.libDir, PLUGINS_DIR, lib_name, NULL); - lib_handle = dlopen(lpath, RTLD_LAZY); - g_free(lpath); - if (!lib_handle) - { - g_print(CANT_LOADP); - return NULL; - } - func = dlsym(lib_handle, func_name); - if (dlerror() != NULL) - { - g_print(CANT_FINDF); - return NULL; - } - return func; -} - -/* shows info about selected plugin */ -gint activate_plugin_info_dialog(gchar *plugin_name) -{ - gint a; - for (a = 0; a < plInitialized; ++a) - if (g_strcmp0(plugins[a].name, plugin_name) == 0) - { - GtkWidget *m_box = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, - ABOUT_PLUGIN, plugins[a].name, plugins[a].version, plugins[a].author, - plugins[a].copyright, plugins[a].license, plugins[a].comment); - g_signal_connect_swapped(m_box, "response", G_CALLBACK(gtk_widget_destroy), m_box); - gtk_dialog_run(GTK_DIALOG(m_box)); - } - return 0; -} - -/* execute download_once function from plugins/libraries */ -gint activate_configuration(gchar *plugin_name) -{ - int (*fn)(); - gint a; - - for (a = 0; a < plInitialized; ++a) - if (g_strcmp0(plugins[a].name, plugin_name) == 0) - { - fn = open_library(plugins[a].libName, "on_configure_plugin"); - if (fn != NULL) - (*fn)(); - } - return 0; -} - -/* execute auto_download function from plugins/libraries */ -gint auto_download(gchar *fname) -{ - int (*fn)(char *file); - gint a, status = N_ERROR; - - for (a = 0; a < plInitialized; ++a) - { - if (plugins[a].canAutoDownload != 1) break; - fn = open_library(plugins[a].libName, "on_auto_download"); - if (fn != NULL) - { - set_busy(); - if (fname != NULL) - status = (*fn)(fname); - set_normal(); - if (status == N_OK || status == N_OK_CUSTOM || (a == plInitialized - 1)) check_status(&status, fname, "auto"); - if (status == N_OK) return N_OK; - } - } - return 0; -} - -/* execute download_once function from plugins/libraries - second version */ -gint download_once_plugin(gchar *fname, gchar *plug) -{ - int (*fn)(char *file); - gint a, status = N_ERROR; - - for(a = 0; a < plInitialized; ++a) - { - if (g_strcmp0(plugins[a].name, plug) == 0) - { - if (plugins[a].canAutoDownload != 1) return N_ERROR; - fn = open_library(plugins[a].libName, "on_download_once"); - if (fn != NULL) - { - set_busy(); - if (fname != NULL) - status = (*fn)(fname); - set_normal(); - check_status(&status, fname, plug); - if (status == N_OK) - return N_OK; - } - return status; - } - } - return 0; -} - -/* execute download_once function from plugins/libraries */ -gint download_once(GtkWidget *widget, gpointer data) -{ - int (*fn)(char *file); - gchar *label; - gint a, status; - - gchar *fname = run_select_file_dialog(); - label = g_strdup(gtk_menu_item_get_label(GTK_MENU_ITEM(widget))); - for(a = 0; a < plInitialized; ++a) - { - if (g_strcmp0(plugins[a].name, label) == 0) - { - fn = open_library(plugins[a].libName, "on_download_once"); - if (fn != NULL) - { - set_busy(); - if (fname != NULL) - status = (*fn)(fname); else - status = GR_CANCEL; - set_normal(); - check_status(&status, fname, label); - } - } - } - g_free(label); - return 0; -} - -/* execute upload_once function from plugins/libraries - second version */ -gint upload_once_plugin(gchar *fname, gchar *plug) -{ - int (*fn)(char *file); - gint a, status; - - for(a = 0; a < plInitialized; ++a) - { - if (g_strcmp0(plugins[a].name, plug) == 0) - { - if (plugins[a].canUpload != 1) return N_ERROR; - fn = open_library(plugins[a].libName, "on_send_subtitles_once"); - if (fn != NULL) - { - set_busy(); - status = (*fn)(fname); - set_normal(); - return 0; - } - } - } - return 0; -} - -/* execute upload_once function from plugins/libraries */ -gint upload_once(GtkWidget *widget, gpointer data) -{ - int (*fn)(); - gchar *label; - gint a, status; - - label = g_strdup(gtk_menu_item_get_label(GTK_MENU_ITEM(widget))); - for(a = 0; a < plInitialized; ++a) - { - if (g_strcmp0(plugins[a].name, label) == 0) - { - fn = open_library(plugins[a].libName, "on_send_subtitles"); - if (fn != NULL) - { - set_busy(); - status = (*fn)(); - set_normal(); - } - } - } - g_free(label); - return 0; -} - -/* execute report_bad function from plugins/libraries */ -gint report_bad(GtkWidget *widget, gpointer data) -{ - int (*fn)(); - gchar *label; - gint a, status; - - label = g_strdup(gtk_menu_item_get_label(GTK_MENU_ITEM(widget))); - for(a = 0; a, 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef GPLUGINS_H -#define GPLUGINS_H - -#include - -#include "gnapi-plugins.h" -#include "interface.h" -#include "gengine.h" - -enum -{ - INTVOID, - INTCHAR -}; - -typedef void (*RegFunc)(gPlugin *n); -typedef int (*UnregFunc)(); -typedef int (*IntVoid)(); -typedef int (*IntChar)(char *f); - -gPlugin *plugins; - -extern guint plInitialized; - -gint activate_plugin_info_dialog(gchar *plugin_name); -gint activate_configuration(gchar *plugin_name); -gint auto_download(gchar *fname); -gint download_once_plugin(gchar *fname, gchar *plug); -gint download_once(GtkWidget *widget, gpointer data); -gint upload_once_plugin(gchar *fname, gchar *plug); -gint upload_once(GtkWidget *widget, gpointer data); -gint report_bad(GtkWidget *widget, gpointer data); -gint register_plugin(gchar *plug, gint i); -gint unregister_plugin(gchar *plug, gint i); - -#endif diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/http_post.c.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/http_post.c.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/http_post.c.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/http_post.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,104 +0,0 @@ -/* - * http_post.c - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "http_post.h" - -HttpPost* new_http_post(const gchar *www) -{ - HttpPost *http = g_malloc(sizeof(HttpPost)); - http->session = soup_session_async_new(); - http->msg = soup_message_new("POST", www); - http->length = 0; - soup_message_set_http_version(http->msg, SOUP_HTTP_1_0); - soup_message_headers_append(http->msg->request_headers, "Accept", "text/html, */*"); - soup_message_headers_append(http->msg->request_headers, "Connection", "keep-alive"); - soup_message_headers_append(http->msg->request_headers, "User-Agent", "Gnapi (linux)"); - soup_message_headers_append(http->msg->request_headers, "Host", "napiprojekt.pl"); - http->data = ""; - return http; -} - -void hp_add_request_data(HttpPost *http, gchar *name, gchar *content) -{ - http->data = g_strjoin("", http->data, "----------021608204800707\r\nContent-Disposition: form-data; name=\"" , - name,"\"\r\n\r\n", content, "\r\n", NULL); - http->length = strlen(http->data); -} - -void hp_end_request(HttpPost *http) -{ - http->data = g_strjoin("", http->data, "\r\n\r\n----------021608204800707--", NULL); - http->length = strlen(http->data); -} - -void hp_add_request_file(HttpPost *http, gchar *name, gchar *fname, gchar *content, glong fsize) -{ - gint i = 0; - gchar end[32] = "\r\n\r\n----------021608204800707--"; - - http->data = g_strjoin("", http->data, "----------021608204800707\r\nContent-Disposition: form-data; name=\"" , - name,"\"; filename=\"", fname,"\"\r\nContent-Type: subtitles/zip\r\n\r\n", NULL); - http->length = strlen(http->data); - http->data = (gchar*)g_realloc((gchar*)http->data, http->length + fsize + 32); - for (i = 0; i <= fsize; ++i) - http->data[http->length + i] = content[i]; - for (i = 0; i <= 32; ++i) - http->data[http->length + fsize + i] = end[i]; - http->length = http->length + fsize + 32; -} - -void hp_add_request(HttpPost *http) -{ - soup_message_set_request(http->msg, "multipart/form-data; boundary=--------021608204800707", SOUP_MEMORY_TAKE, - http->data, http->length); -} - -int hp_send_request(HttpPost *http) -{ - return soup_session_send_message(http->session, http->msg); -} - -void hp_free(HttpPost *http) -{ - if (http->data != NULL) g_free(http->data); - g_free(http); -} - -HttpGet* new_http_get(const gchar *www) -{ - int i; - HttpGet *http = g_malloc(sizeof(HttpGet)); - http->session = soup_session_async_new_with_options(SOUP_SESSION_USER_AGENT, "Gnapi (linux)", NULL); - http->msg = soup_message_new("GET", www); - http->status = soup_session_send_message(http->session, http->msg); - if (http->status != 200) return NULL; - http->length = http->msg->response_body->length; - http->data = (gchar*)g_malloc(sizeof(gchar*) * http->length); - for (i = 0; i <= http->length; ++i) - http->data[i] = http->msg->response_body->data[i]; - return http; -} - -void hg_free(HttpGet *http) -{ - if (http->data != NULL) g_free(http->data); - g_free(http); -} - diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/http_post.h.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/http_post.h.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/http_post.h.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/http_post.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -/* - * http_post.h - * - * Copyright(c) Wiesław Spyra , 2008-2009. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef HTTP_POST_H -#define HTTP_POST_H - -#include -#include -#include - -typedef struct _HttpPost { - SoupSession *session; - SoupMessage *msg; - gchar *data; - gint length; -} HttpPost; - -typedef struct _HttpGet { - SoupSession *session; - SoupMessage *msg; - gchar *data; - gint length; - gint status; -} HttpGet; - -HttpPost* new_http_post(const gchar *www); -HttpGet* new_http_get(const gchar *www); -void hp_free(HttpPost *http); -void hg_free(HttpGet *http); -void hp_add_request_data(HttpPost *http, gchar *name, gchar *content); -void hp_add_request_file(HttpPost *http, gchar *name, gchar *fname, gchar *content, glong fsize); -void hp_add_request(HttpPost *http); -void hp_end_request(HttpPost *http); -int hp_send_request(HttpPost *http); - -#endif - diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/info.glade.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/info.glade.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/info.glade.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/info.glade.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,108 +0,0 @@ - - - - - - Movie info - center - - - True - vertical - - - True - 0 - Movie information - - - False - False - 0 - - - - - True - queue - - - True - True - automatic - automatic - - - 280 - 300 - True - True - False - word - False - textbuffer1 - - - - - - - 1 - - - - - True - - - False - 5 - 2 - - - - - True - - - Select - 100 - True - True - True - - - False - False - 5 - end - 1 - - - - - Close - 100 - True - True - True - - - False - False - end - 0 - - - - - False - False - 3 - - - - - - - diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/interface.c.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/interface.c.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/interface.c.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/interface.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,406 +0,0 @@ -/* - * interface.c - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include /* gettext */ - -#include "interface.h" -#include "gengine.h" -#include "scan.h" -#include "license.h" -#include "defaults.h" -#include "gplugins.h" - -GError *error; - -/* runs dialog, returns filename or NULL */ -gchar* run_select_file_dialog() -{ - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(interface->gDialog), gnapiConfig.currentDir); - if (gtk_dialog_run(GTK_DIALOG(interface->gDialog)) == GTK_RESPONSE_ACCEPT) - { - gchar *filename, *dir; - gtk_widget_hide(interface->gDialog); - filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(interface->gDialog)); - dir = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(interface->gDialog)); - gnapiConfig.currentDir = dir; - gc_config_set_str(GCONF_CURRENTDIR, dir); - return filename; - } else - { - gtk_widget_hide(interface->gDialog); - return NULL; - } -} - -/* changes status icon to busy */ -void set_busy() -{ - gtk_status_icon_set_from_pixbuf(interface->gStatusIcon, interface->gDlIcon); - gtk_status_icon_set_visible(interface->gStatusIcon, TRUE); -} - -/* changes status icon to normal */ -void set_normal() -{ - gtk_status_icon_set_from_pixbuf(interface->gStatusIcon, interface->gIcon); - gtk_status_icon_set_visible(interface->gStatusIcon, TRUE); -} - -/* displays program popup menu */ -static void pop_up_menu(GtkStatusIcon *gStatusIcon, guint button, guint activate_time, gpointer user_data) -{ - gtk_menu_popup(GTK_MENU(interface->gPopupMenu), NULL, NULL, NULL, user_data, 3, activate_time); -} - -/* displays about window */ -static void open_about(GtkWidget *widget, gpointer data) -{ - const gchar *authors[] = {APP_AUTHOR, NULL}; - const gchar *artists[] = {APP_AUTHOR, NULL}; - const gchar *comments = {APP_SUMMARY}; - const gchar *copyright = {APP_COPYRIGHT}; - const gchar *documenters[] = {APP_AUTHOR, NULL}; - const gchar *name = APP_NAME; - const gchar *version = APP_VERSION; - const gchar *website = APP_SITE; - gtk_show_about_dialog(NULL, "authors", authors, "artists", artists, "comments", comments, "copyright", - copyright, "documenters", documenters, "logo", interface->gLogo, "program-name", name, "version", - version, "website", website, "license", license, NULL); -} - -/* display plugin configuration window */ -static void configure_plugin(GtkWidget *widget, gpointer data) -{ - gchar *ctext = gtk_combo_box_get_active_text(GTK_COMBO_BOX(config_window->cbPlugin)); - activate_configuration(ctext); - g_free(ctext); -} - -/* display plugin info dialog */ -static void about_plugin(GtkWidget *widget, gpointer data) -{ - gchar *ctext = gtk_combo_box_get_active_text(GTK_COMBO_BOX(config_window->cbPlugin)); - activate_plugin_info_dialog(ctext); - g_free(ctext); -} - -/* quits program */ -static void quit(GtkWidget *widget, gpointer data) -{ - gtk_main_quit(); -} - -/* displays movie info window */ -static void show_movie_info(GtkWidget *widget, gpointer data) -{ - gtk_widget_show_all(info_window->infoWindow); -} - -/* displays program configuration window */ -static void open_config(GtkWidget *widget, gpointer data) -{ - gtk_widget_show_all(config_window->configWindow); -} - -/* displays scan window */ -static void menu_scan(GtkWidget *widget, gpointer data) -{ - gtk_widget_show_all(scan_window->scanWindow); -} - -/* begins autodownload with all plugins */ -static void menu_auto_download(GtkWidget *widget, gpointer data) -{ - gchar *f = run_select_file_dialog(); - if (f != NULL) auto_download(f); -} - -/* middle mouse button on icon displays scan window */ -static gboolean status_button_click(GtkStatusIcon *status_icon, GdkEventButton *event, gpointer user_data) -{ - if (event->button == 2) - gtk_widget_show_all(scan_window->scanWindow); - return TRUE; -} - -/* creates icon and some basic menu items */ -void create_basic_interface() -{ - interface = g_malloc(sizeof(MainInterface)); - interface->gIcon = gdk_pixbuf_new_from_file(STATUS_ICON, &error); - interface->gDlIcon = gdk_pixbuf_new_from_file(DL_ICON, &error); - interface->gStatusIcon = gtk_status_icon_new(); - gtk_status_icon_set_from_pixbuf(interface->gStatusIcon, interface->gIcon); - gtk_status_icon_set_visible(interface->gStatusIcon, TRUE); - interface->gPopupMenu = gtk_menu_new(); - g_signal_connect(G_OBJECT(interface->gStatusIcon), "popup-menu", G_CALLBACK(pop_up_menu), NULL); - interface->gLogo = gdk_pixbuf_new_from_file(APP_ICON, &error); - interface->aboutItem = gtk_menu_item_new_with_label(IF_ABOUT); - interface->quitItem = gtk_menu_item_new_with_label(IF_QUIT); - gtk_menu_shell_append(GTK_MENU_SHELL(interface->gPopupMenu), interface->aboutItem); - gtk_menu_shell_append(GTK_MENU_SHELL(interface->gPopupMenu), interface->quitItem); - g_signal_connect(G_OBJECT (interface->quitItem), "activate", G_CALLBACK(quit), NULL); - g_signal_connect(G_OBJECT (interface->aboutItem), "activate", G_CALLBACK(open_about), NULL); - gtk_widget_show_all(interface->gPopupMenu); - gtk_window_set_default_icon_from_file(STATUS_ICON, &error); -} - -/* makes all interface stuff */ -void create_interface() -{ - int a; - GtkWidget *newItem; - GtkTreeIter iter; - GtkTreeStore *store; - GtkCellRenderer *renderer; - - interface->menuAutoSearchItem = gtk_menu_item_new_with_label(IF_SEARCHD); - interface->menuAutoDownloadItem = gtk_menu_item_new_with_label(IF_AUTODOWNLOAD); - interface->downloadItem = gtk_menu_item_new_with_label(IF_DOWNLOADS); - interface->sendItem = gtk_menu_item_new_with_label(IF_SENDS); - interface->reportItem = gtk_menu_item_new_with_label(IF_REPORTS); - interface->configItem = gtk_menu_item_new_with_label(IF_OPTIONS); - interface->menuMovieInfoItem = gtk_menu_item_new_with_label(IF_MOVIEINFO); - interface->menuSeparator = gtk_separator_menu_item_new(); - g_signal_connect(G_OBJECT(interface->configItem), "activate", G_CALLBACK(open_config), NULL); - g_signal_connect(G_OBJECT(interface->menuAutoDownloadItem), "activate", G_CALLBACK(menu_auto_download), NULL); - g_signal_connect(G_OBJECT(interface->menuAutoSearchItem), "activate", G_CALLBACK(menu_scan), NULL); - g_signal_connect(G_OBJECT(interface->menuMovieInfoItem), "activate", G_CALLBACK(show_movie_info), NULL); - g_signal_connect(G_OBJECT(interface->gStatusIcon), "activate", G_CALLBACK(menu_auto_download), NULL); - g_signal_connect(G_OBJECT(interface->gStatusIcon), "button-release-event", G_CALLBACK(status_button_click), NULL); - gtk_menu_shell_prepend(GTK_MENU_SHELL(interface->gPopupMenu), interface->configItem); - gtk_menu_shell_prepend(GTK_MENU_SHELL(interface->gPopupMenu), interface->menuSeparator); - gtk_menu_shell_prepend(GTK_MENU_SHELL(interface->gPopupMenu), interface->reportItem); - gtk_menu_shell_prepend(GTK_MENU_SHELL(interface->gPopupMenu), interface->sendItem); - gtk_menu_shell_prepend(GTK_MENU_SHELL(interface->gPopupMenu), interface->downloadItem); - gtk_menu_shell_prepend(GTK_MENU_SHELL(interface->gPopupMenu), interface->menuMovieInfoItem); - gtk_menu_shell_prepend(GTK_MENU_SHELL(interface->gPopupMenu), interface->menuAutoSearchItem); - gtk_menu_shell_prepend(GTK_MENU_SHELL(interface->gPopupMenu), interface->menuAutoDownloadItem); - interface->dSubMenu = gtk_menu_new(); - interface->sSubMenu = gtk_menu_new(); - interface->rSubMenu = gtk_menu_new(); - gtk_menu_item_set_submenu(GTK_MENU_ITEM(interface->downloadItem), interface->dSubMenu); - gtk_menu_item_set_submenu(GTK_MENU_ITEM(interface->sendItem), interface->sSubMenu); - gtk_menu_item_set_submenu(GTK_MENU_ITEM(interface->reportItem), interface->rSubMenu); - interface->gDialog = gtk_file_chooser_dialog_new(IF_SELECTF, NULL, GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); - - store = gtk_tree_store_new(1, G_TYPE_STRING); - for(a = 0; a < plInitialized; ++a) - { - if (plugins[a].canDownload) - { - newItem = gtk_menu_item_new_with_label(plugins[a].name); - gtk_menu_shell_append(GTK_MENU_SHELL(interface->dSubMenu), newItem); - g_signal_connect(G_OBJECT(newItem), "activate", G_CALLBACK(download_once), NULL); - } - if (plugins[a].canUpload) - { - newItem = gtk_menu_item_new_with_label(plugins[a].name); - gtk_menu_shell_append(GTK_MENU_SHELL(interface->sSubMenu), newItem); - g_signal_connect(G_OBJECT(newItem), "activate", G_CALLBACK(upload_once), NULL); - } - if (plugins[a].canReportBad) - { - newItem = gtk_menu_item_new_with_label(plugins[a].name); - gtk_menu_shell_append(GTK_MENU_SHELL(interface->rSubMenu), newItem); - g_signal_connect(G_OBJECT(newItem), "activate", G_CALLBACK(report_bad), NULL); - } - gtk_combo_box_append_text(GTK_COMBO_BOX(config_window->cbPlugin), plugins[a].name); - gtk_combo_box_set_active(GTK_COMBO_BOX(config_window->cbPlugin), 0); - gtk_tree_store_append(store, &iter, NULL); - gtk_tree_store_set(store, &iter, 0, plugins[a].name, -1); - } - renderer = gtk_cell_renderer_text_new(); - gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(scan_window->cbPlugin), renderer, TRUE); - gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(scan_window->cbPlugin), renderer, "text", 0, NULL); - gtk_combo_box_set_active(GTK_COMBO_BOX(scan_window->cbPlugin), 0); - gtk_combo_box_set_model(GTK_COMBO_BOX(scan_window->cbPlugin), GTK_TREE_MODEL(store)); - gtk_widget_show_all(interface->gPopupMenu); -} - -/* changes widgets sensivity */ -static void chEncodingClick(GtkWidget *widget, gpointer data) -{ - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) ? - gtk_widget_set_sensitive(config_window->cbTo, TRUE) : gtk_widget_set_sensitive(config_window->cbTo, FALSE); - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) ? - gtk_widget_set_sensitive(config_window->cbFrom, TRUE) : gtk_widget_set_sensitive(config_window->cbFrom, FALSE); -} - -/* changes widgets sesitivity */ -static void chDirClick(GtkWidget *widget, gpointer data) -{ - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) ? - gtk_widget_set_sensitive(config_window->txDir, TRUE) : gtk_widget_set_sensitive(config_window->txDir, FALSE); -} - -/* config window delete event - hides window */ -static gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data) -{ - gc_config_set_int(GCONF_REWRITE, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(config_window->chRewrite))); - gc_config_set_int(GCONF_ENCODE, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(config_window->chEncoding))); - gc_config_set_str(GCONF_TOENCODING, (char*)gtk_entry_get_text(GTK_ENTRY(config_window->cbTo))); - gc_config_set_str(GCONF_FROMENCODING, (char*)gtk_entry_get_text(GTK_ENTRY(config_window->cbFrom))); - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(config_window->chDir)) ? - gc_config_set_str(GCONF_DOWNLOADTO, (char*)gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(config_window->txDir))) : - gc_config_set_str(GCONF_DOWNLOADTO, ""); - update_config(); - gtk_widget_hide(config_window->configWindow); - return TRUE; -} - -/* movie info window delete event - hides window */ -static gboolean delete_event_info(GtkWidget *widget, GdkEvent *event, gpointer data) -{ - gtk_widget_hide(info_window->infoWindow); - return TRUE; -} - -/* fills up movie info window */ -static void read_movie_info(GtkWidget *widget, gpointer data) -{ - GtkTextIter iter; - GtkTextBuffer *buffer; - - char *fname = run_select_file_dialog(); - if (fname == NULL) return; - FilmInfo *m_i = get_movie_info(fname); - if (m_i == NULL) return; - float d = m_i->dur; - int h = (int)(d / (60 * 60)); - d -= (float)(h * 60 * 60); - int m = (int)(d / 60); - d -= (float)(m * 60); - int s = (int)(d); - char *dur = g_strdup_printf("%02d:%02d:%02d (%.3fs)", h, m, s, m_i->dur); - char *fps = g_strdup_printf("%.3f", m_i->fps); - char *fsize = g_strdup_printf("%.1fMB (%ldb)", (float)((float)m_i->size / 1024 / 1024), m_i->size); - char *bitrate = g_strdup_printf("%d", m_i->bitrate); - buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(info_window->txInfo)); - gtk_text_buffer_set_text(buffer, "", 0); - gtk_text_buffer_get_iter_at_offset(buffer, &iter, 0); - gchar *bname = g_path_get_basename(fname); - gchar *info = g_strjoin("", bname, "\n\n", MI_FILESIZE, fsize, "\n", MI_RES, m_i->res, "\n", MI_DURATION, dur, "\n", - MI_FPS, fps, "\n", MI_CODEC, m_i->codec_name, "\n", MI_BITRATE, bitrate, "\n", NULL); - gtk_text_buffer_insert(buffer, &iter, info, -1); - g_free(info); - g_free(bname); - g_free(m_i); - g_free(fname); - g_free(dur); - g_free(fps); - g_free(bitrate); - g_free(fsize); -} - -/* creates config window - TODO - * make xml file instead this */ -void create_config_window() -{ - config_window = g_malloc(sizeof(ConfigWindow)); - config_window->configWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_window_set_title(GTK_WINDOW(config_window->configWindow), gettext("Configure Gnapi")); - gtk_window_set_resizable(GTK_WINDOW(config_window->configWindow), FALSE); - gtk_window_set_position(GTK_WINDOW(config_window->configWindow), GTK_WIN_POS_CENTER); - g_signal_connect(G_OBJECT(config_window->configWindow), "delete_event", G_CALLBACK(delete_event), NULL); - gtk_container_set_border_width(GTK_CONTAINER(config_window->configWindow), 15); - config_window->tbTable = gtk_table_new (6, 3, TRUE); - gtk_container_add(GTK_CONTAINER (config_window->configWindow), config_window->tbTable); - config_window->btQuit = gtk_button_new_with_label(gettext("Quit")); - g_signal_connect(G_OBJECT(config_window->btQuit), "clicked", G_CALLBACK(delete_event), NULL); - config_window->spRator = gtk_hseparator_new(); - config_window->chEncoding = gtk_check_button_new_with_label(gettext("Change codepage of downloaded file")); - config_window->chRewrite = gtk_check_button_new_with_label(gettext("Rewrite existing files")); - g_signal_connect(G_OBJECT(config_window->chEncoding), "toggled", G_CALLBACK(chEncodingClick), NULL); - config_window->cbTo = gtk_entry_new(); - config_window->cbFrom = gtk_entry_new(); - config_window->txDir = gtk_file_chooser_button_new(gettext("Select directory"), - GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); - config_window->chDir = gtk_check_button_new_with_label(gettext("Download all files to:")); - config_window->lbEncoding = gtk_label_new(gettext("Change codepage from/to")); - config_window->cbPlugin = gtk_combo_box_new_text(); - config_window->btPlugin = gtk_button_new_with_label(gettext("Configure...")); - config_window->btPluginInfo = gtk_button_new_with_label(gettext("Info...")); - g_signal_connect(G_OBJECT(config_window->btPlugin), "clicked", G_CALLBACK(configure_plugin), NULL); - g_signal_connect(G_OBJECT(config_window->btPluginInfo), "clicked", G_CALLBACK(about_plugin), NULL); - g_signal_connect(G_OBJECT(config_window->chDir), "toggled", G_CALLBACK(chDirClick), NULL); - gtk_widget_set_sensitive(config_window->cbTo, FALSE); - gtk_widget_set_sensitive(config_window->cbFrom, FALSE); - gtk_table_attach_defaults(GTK_TABLE(config_window->tbTable), config_window->chEncoding, 0, 3, 0, 1); - gtk_table_attach_defaults(GTK_TABLE(config_window->tbTable), config_window->lbEncoding, 0, 1, 1, 2); - gtk_table_attach_defaults(GTK_TABLE(config_window->tbTable), config_window->cbFrom, 1, 2, 1, 2); - gtk_table_attach_defaults(GTK_TABLE(config_window->tbTable), config_window->cbTo, 2, 3, 1, 2); - gtk_table_attach_defaults(GTK_TABLE(config_window->tbTable), config_window->cbPlugin, 0, 1, 4, 5); - gtk_table_attach_defaults(GTK_TABLE(config_window->tbTable), config_window->btPlugin, 1, 2, 4, 5); - gtk_table_attach_defaults(GTK_TABLE(config_window->tbTable), config_window->btPluginInfo, 2, 3, 4, 5); - gtk_table_attach_defaults(GTK_TABLE(config_window->tbTable), config_window->spRator, 0, 3, 5, 6); - gtk_table_attach_defaults(GTK_TABLE(config_window->tbTable), config_window->chRewrite, 0, 3, 2, 3); - gtk_table_attach_defaults(GTK_TABLE(config_window->tbTable), config_window->btQuit, 2, 3, 6, 7); - gtk_table_attach_defaults(GTK_TABLE(config_window->tbTable), config_window->chDir, 0, 1, 3, 4); - gtk_table_attach_defaults(GTK_TABLE(config_window->tbTable), config_window->txDir, 1, 3, 3, 4); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(config_window->chRewrite), gnapiConfig.rewrite); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(config_window->chEncoding), gnapiConfig.encode); - gtk_entry_set_text(GTK_ENTRY(config_window->cbTo), gnapiConfig.toEncoding); - gtk_entry_set_text(GTK_ENTRY(config_window->cbFrom), gnapiConfig.fromEncoding); - if (g_strcmp0(gnapiConfig.downloadDir, "") != 0) - { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(config_window->chDir), TRUE); - gtk_widget_set_sensitive(config_window->txDir, TRUE); - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(config_window->txDir), gnapiConfig.downloadDir); - } else - { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(config_window->chDir), FALSE); - gtk_widget_set_sensitive(config_window->txDir, FALSE); - } -} - -/* creates movie info window from xml file */ -void create_info_window() -{ - info_window = g_malloc(sizeof(InfoWindow)); - GtkBuilder *builder = gtk_builder_new(); - gtk_builder_add_from_file(builder, IF_GLADE, NULL); - info_window->infoWindow = GTK_WIDGET(gtk_builder_get_object(builder, "wInfo")); - gtk_container_set_border_width(GTK_CONTAINER(info_window->infoWindow), 15); - info_window->btClose = GTK_WIDGET(gtk_builder_get_object(builder, "cButton")); - info_window->btSelect = GTK_WIDGET(gtk_builder_get_object(builder, "sButton")); - info_window->txInfo = GTK_WIDGET(gtk_builder_get_object(builder, "tInfo")); - g_signal_connect(G_OBJECT(info_window->infoWindow), "delete_event", G_CALLBACK(delete_event_info), NULL); - g_signal_connect(G_OBJECT(info_window->btClose), "clicked", G_CALLBACK(delete_event_info), NULL); - g_signal_connect(G_OBJECT(info_window->btSelect), "clicked", G_CALLBACK(read_movie_info), NULL); - gtk_builder_connect_signals (builder, NULL); - g_object_unref(G_OBJECT(builder)); -} - -/* frees all interface */ -void destroy_interface() -{ - gdk_pixbuf_unref(interface->gIcon); - gdk_pixbuf_unref(interface->gDlIcon); - gdk_pixbuf_unref(interface->gLogo); - g_free(info_window); - g_free(config_window); - g_free(scan_window); - g_free(interface); -} - diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/interface.h.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/interface.h.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/interface.h.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/interface.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -/* - * interface.h - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef INTERFACE_H -#define INTERFACE_H - -struct _Main_Interface { - GtkWidget *gDialog; - GtkWidget *gPopupMenu; - GtkWidget *downloadItem; - GtkWidget *aboutItem; - GtkWidget *quitItem; - GtkWidget *configItem; - GtkWidget *reportItem; - GtkWidget *sendItem; - GtkWidget *menuMovieInfoItem; - GtkWidget *dSubMenu; - GtkWidget *sSubMenu; - GtkWidget *rSubMenu; - GtkWidget *menuAutoDownloadItem; - GtkWidget *menuAutoSearchItem; - GtkWidget *menuSeparator; - GtkStatusIcon *gStatusIcon; - GdkPixbuf *gLogo; - GdkPixbuf *gDlIcon; - GdkPixbuf *gIcon; -}; - -struct _Config_Window { - GtkWidget *configWindow; - GtkWidget *chEncoding; - GtkWidget *chRewrite; - GtkWidget *tbTable; - GtkWidget *btQuit; - GtkWidget *spRator; - GtkWidget *cbTo; - GtkWidget *cbFrom; - GtkWidget *lbEncoding; - GtkWidget *chDir; - GtkWidget *txDir; - GtkWidget *cbPlugin; - GtkWidget *btPlugin; - GtkWidget *btPluginInfo; -}; - -struct _Info_Window { - GtkWidget *infoWindow; - GtkWidget *btClose; - GtkWidget *btSelect; - GtkWidget *txInfo; -}; - -typedef struct _Main_Interface MainInterface; -typedef struct _Config_Window ConfigWindow; -typedef struct _Info_Window InfoWindow; - -MainInterface *interface; -ConfigWindow *config_window; -InfoWindow *info_window; - -gchar* run_select_file_dialog(); -void set_busy(); -void set_normal(); -void create_basic_interface(); -void create_interface(); -void create_config_window(); -void create_info_window(); -void destroy_interface(); - -#endif diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/license.h.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/license.h.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/license.h.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/license.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,570 +0,0 @@ -/* - * license.h - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef LICENSE_H -#define LICENSE_H - -const gchar *license = "GNU GENERAL PUBLIC LICENSE\n\ -\n\ -Version 3, 29 June 2007\n\ -\n\ -Copyright © 2007 Free Software Foundation, Inc. \n\ -\n\ -Everyone is permitted to copy and distribute verbatim copies of this license\n\ -document, but changing it is not allowed.\n\ -Preamble\n\ -\n\ -The GNU General Public License is a free, copyleft license for software and\n\ -other kinds of works.\n\ -\n\ -The licenses for most software and other practical works are designed to take\n\ -away your freedom to share and change the works. By contrast, the GNU General\n\ -Public License is intended to guarantee your freedom to share and change all\n\ -versions of a program--to make sure it remains free software for all its users.\n\ -We, the Free Software Foundation, use the GNU General Public License for most of\n\ -our software; it applies also to any other work released this way by its\n\ -authors. You can apply it to your programs, too.\n\ -\n\ -When we speak of free software, we are referring to freedom, not price. Our\n\ -General Public Licenses are designed to make sure that you have the freedom to\n\ -distribute copies of free software (and charge for them if you wish), that you\n\ -receive source code or can get it if you want it, that you can change the\n\ -software or use pieces of it in new free programs, and that you know you can do\n\ -these things.\n\ -\n\ -To protect your rights, we need to prevent others from denying you these rights\n\ -or asking you to surrender the rights. Therefore, you have certain\n\ -responsibilities if you distribute copies of the software, or if you modify it:\n\ -responsibilities to respect the freedom of others.\n\ -\n\ -For example, if you distribute copies of such a program, whether gratis or for a\n\ -fee, you must pass on to the recipients the same freedoms that you received. You\n\ -must make sure that they, too, receive or can get the source code. And you must\n\ -show them these terms so they know their rights.\n\ -\n\ -Developers that use the GNU GPL protect your rights with two steps: (1) assert\n\ -copyright on the software, and (2) offer you this License giving you legal\n\ -permission to copy, distribute and/or modify it.\n\ -\n\ -For the developers' and authors' protection, the GPL clearly explains that there\n\ -is no warranty for this free software. For both users' and authors' sake, the\n\ -GPL requires that modified versions be marked as changed, so that their problems\n\ -will not be attributed erroneously to authors of previous versions.\n\ -\n\ -Some devices are designed to deny users access to install or run modified\n\ -versions of the software inside them, although the manufacturer can do so. This\n\ -is fundamentally incompatible with the aim of protecting users' freedom to\n\ -change the software. The systematic pattern of such abuse occurs in the area of\n\ -products for individuals to use, which is precisely where it is most\n\ -unacceptable. Therefore, we have designed this version of the GPL to prohibit\n\ -the practice for those products. If such problems arise substantially in other\n\ -domains, we stand ready to extend this provision to those domains in future\n\ -versions of the GPL, as needed to protect the freedom of users.\n\ -\n\ -Finally, every program is threatened constantly by software patents. States\n\ -should not allow patents to restrict development and use of software on\n\ -general-purpose computers, but in those that do, we wish to avoid the special\n\ -danger that patents applied to a free program could make it effectively\n\ -proprietary. To prevent this, the GPL assures that patents cannot be used to\n\ -render the program non-free.\n\ -\n\ -The precise terms and conditions for copying, distribution and modification\n\ -follow.\n\ -\n\ -TERMS AND CONDITIONS\n\ -\n\ -0. Definitions.\n\ -\n\ -\"This License\" refers to version 3 of the GNU General Public License.\n\ -\n\ -\"Copyright\" also means copyright-like laws that apply to other kinds of works,\n\ -such as semiconductor masks.\n\ -\n\ -\"The Program\" refers to any copyrightable work licensed under this License.\n\ -Each licensee is addressed as \"you\". \"Licensees\" and \"recipients\" may be\n\ -individuals or organizations.\n\ -\n\ -To \"modify\" a work means to copy from or adapt all or part of the work in a\n\ -fashion requiring copyright permission, other than the making of an exact copy.\n\ -The resulting work is called a \"modified version\" of the earlier work or a\n\ -work \"based on\" the earlier work.\n\ -\n\ -A \"covered work\" means either the unmodified Program or a work based on the\n\ -Program.\n\ -\n\ -To \"propagate\" a work means to do anything with it that, without permission,\n\ -would make you directly or secondarily liable for infringement under applicable\n\ -copyright law, except executing it on a computer or modifying a private copy.\n\ -Propagation includes copying, distribution (with or without modification),\n\ -making available to the public, and in some countries other activities as well.\n\ -\n\ -To \"convey\" a work means any kind of propagation that enables other parties to\n\ -make or receive copies. Mere interaction with a user through a computer network,\n\ -with no transfer of a copy, is not conveying.\n\ -\n\ -An interactive user interface displays \"Appropriate Legal Notices\" to the\n\ -extent that it includes a convenient and prominently visible feature that (1)\n\ -displays an appropriate copyright notice, and (2) tells the user that there is\n\ -no warranty for the work (except to the extent that warranties are provided),\n\ -that licensees may convey the work under this License, and how to view a copy of\n\ -this License. If the interface presents a list of user commands or options, such\n\ -as a menu, a prominent item in the list meets this criterion.\n\ -1. Source Code.\n\ -\n\ -The \"source code\" for a work means the preferred form of the work for making\n\ -modifications to it. \"Object code\" means any non-source form of a work.\n\ -\n\ -A \"Standard Interface\" means an interface that either is an official standard\n\ -defined by a recognized standards body, or, in the case of interfaces specified\n\ -for a particular programming language, one that is widely used among developers\n\ -working in that language.\n\ -\n\ -The \"System Libraries\" of an executable work include anything, other than the\n\ -work as a whole, that (a) is included in the normal form of packaging a Major\n\ -Component, but which is not part of that Major Component, and (b) serves only to\n\ -enable use of the work with that Major Component, or to implement a Standard\n\ -Interface for which an implementation is available to the public in source code\n\ -form. A \"Major Component\", in this context, means a major essential component\n\ -(kernel, window system, and so on) of the specific operating system (if any) on\n\ -which the executable work runs, or a compiler used to produce the work, or an\n\ -object code interpreter used to run it.\n\ -\n\ -The \"Corresponding Source\" for a work in object code form means all the source\n\ -code needed to generate, install, and (for an executable work) run the object\n\ -code and to modify the work, including scripts to control those activities.\n\ -However, it does not include the work's System Libraries, or general-purpose\n\ -tools or generally available free programs which are used unmodified in\n\ -performing those activities but which are not part of the work. For example,\n\ -Corresponding Source includes interface definition files associated with source\n\ -files for the work, and the source code for shared libraries and dynamically\n\ -linked subprograms that the work is specifically designed to require, such as by\n\ -intimate data communication or control flow between those subprograms and other\n\ -parts of the work.\n\ -\n\ -The Corresponding Source need not include anything that users can regenerate\n\ -automatically from other parts of the Corresponding Source.\n\ -\n\ -The Corresponding Source for a work in source code form is that same work.\n\ -2. Basic Permissions.\n\ -\n\ -All rights granted under this License are granted for the term of copyright on\n\ -the Program, and are irrevocable provided the stated conditions are met. This\n\ -License explicitly affirms your unlimited permission to run the unmodified\n\ -Program. The output from running a covered work is covered by this License only\n\ -if the output, given its content, constitutes a covered work. This License\n\ -acknowledges your rights of fair use or other equivalent, as provided by\n\ -copyright law.\n\ -\n\ -You may make, run and propagate covered works that you do not convey, without\n\ -conditions so long as your license otherwise remains in force. You may convey\n\ -covered works to others for the sole purpose of having them make modifications\n\ -exclusively for you, or provide you with facilities for running those works,\n\ -provided that you comply with the terms of this License in conveying all\n\ -material for which you do not control copyright. Those thus making or running\n\ -the covered works for you must do so exclusively on your behalf, under your\n\ -direction and control, on terms that prohibit them from making any copies of\n\ -your copyrighted material outside their relationship with you.\n\ -\n\ -Conveying under any other circumstances is permitted solely under the conditions\n\ -stated below. Sublicensing is not allowed; section 10 makes it unnecessary.\n\ -3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\ -\n\ -No covered work shall be deemed part of an effective technological measure under\n\ -any applicable law fulfilling obligations under article 11 of the WIPO copyright\n\ -treaty adopted on 20 December 1996, or similar laws prohibiting or restricting\n\ -circumvention of such measures.\n\ -\n\ -When you convey a covered work, you waive any legal power to forbid\n\ -circumvention of technological measures to the extent such circumvention is\n\ -effected by exercising rights under this License with respect to the covered\n\ -work, and you disclaim any intention to limit operation or modification of the\n\ -work as a means of enforcing, against the work's users, your or third parties'\n\ -legal rights to forbid circumvention of technological measures.\n\ -4. Conveying Verbatim Copies.\n\ -\n\ -You may convey verbatim copies of the Program's source code as you receive it,\n\ -in any medium, provided that you conspicuously and appropriately publish on each\n\ -copy an appropriate copyright notice; keep intact all notices stating that this\n\ -License and any non-permissive terms added in accord with section 7 apply to the\n\ -code; keep intact all notices of the absence of any warranty; and give all\n\ -recipients a copy of this License along with the Program.\n\ -\n\ -You may charge any price or no price for each copy that you convey, and you may\n\ -offer support or warranty protection for a fee.\n\ -5. Conveying Modified Source Versions.\n\ -\n\ -You may convey a work based on the Program, or the modifications to produce it\n\ -from the Program, in the form of source code under the terms of section 4,\n\ -provided that you also meet all of these conditions:\n\ -\n\ - * a) The work must carry prominent notices stating that you modified it, and\n\ -giving a relevant date.\n\ - * b) The work must carry prominent notices stating that it is released under\n\ -this License and any conditions added under section 7. This requirement modifies\n\ -the requirement in section 4 to \"keep intact all notices\".\n\ - * c) You must license the entire work, as a whole, under this License to\n\ -anyone who comes into possession of a copy. This License will therefore apply,\n\ -along with any applicable section 7 additional terms, to the whole of the work,\n\ -and all its parts, regardless of how they are packaged. This License gives no\n\ -permission to license the work in any other way, but it does not invalidate such\n\ -permission if you have separately received it.\n\ - * d) If the work has interactive user interfaces, each must display\n\ -Appropriate Legal Notices; however, if the Program has interactive interfaces\n\ -that do not display Appropriate Legal Notices, your work need not make them do\n\ -so.\n\ -\n\ -A compilation of a covered work with other separate and independent works, which\n\ -are not by their nature extensions of the covered work, and which are not\n\ -combined with it such as to form a larger program, in or on a volume of a\n\ -storage or distribution medium, is called an \"aggregate\" if the compilation\n\ -and its resulting copyright are not used to limit the access or legal rights of\n\ -the compilation's users beyond what the individual works permit. Inclusion of a\n\ -covered work in an aggregate does not cause this License to apply to the other\n\ -parts of the aggregate.\n\ -6. Conveying Non-Source Forms.\n\ -\n\ -You may convey a covered work in object code form under the terms of sections 4\n\ -and 5, provided that you also convey the machine-readable Corresponding Source\n\ -under the terms of this License, in one of these ways:\n\ -\n\ - * a) Convey the object code in, or embodied in, a physical product\n\ -(including a physical distribution medium), accompanied by the Corresponding\n\ -Source fixed on a durable physical medium customarily used for software\n\ -interchange.\n\ - * b) Convey the object code in, or embodied in, a physical product\n\ -(including a physical distribution medium), accompanied by a written offer,\n\ -valid for at least three years and valid for as long as you offer spare parts or\n\ -customer support for that product model, to give anyone who possesses the object\n\ -code either (1) a copy of the Corresponding Source for all the software in the\n\ -product that is covered by this License, on a durable physical medium\n\ -customarily used for software interchange, for a price no more than your\n\ -reasonable cost of physically performing this conveying of source, or (2) access\n\ -to copy the Corresponding Source from a network server at no charge.\n\ - * c) Convey individual copies of the object code with a copy of the written\n\ -offer to provide the Corresponding Source. This alternative is allowed only\n\ -occasionally and noncommercially, and only if you received the object code with\n\ -such an offer, in accord with subsection 6b.\n\ - * d) Convey the object code by offering access from a designated place\n\ -(gratis or for a charge), and offer equivalent access to the Corresponding\n\ -Source in the same way through the same place at no further charge. You need not\n\ -require recipients to copy the Corresponding Source along with the object code.\n\ -If the place to copy the object code is a network server, the Corresponding\n\ -Source may be on a different server (operated by you or a third party) that\n\ -supports equivalent copying facilities, provided you maintain clear directions\n\ -next to the object code saying where to find the Corresponding Source.\n\ -Regardless of what server hosts the Corresponding Source, you remain obligated\n\ -to ensure that it is available for as long as needed to satisfy these\n\ -requirements.\n\ - * e) Convey the object code using peer-to-peer transmission, provided you\n\ -inform other peers where the object code and Corresponding Source of the work\n\ -are being offered to the general public at no charge under subsection 6d.\n\ -\n\ -A separable portion of the object code, whose source code is excluded from the\n\ -Corresponding Source as a System Library, need not be included in conveying the\n\ -object code work.\n\ -\n\ -A \"User Product\" is either (1) a \"consumer product\", which means any\n\ -tangible personal property which is normally used for personal, family, or\n\ -household purposes, or (2) anything designed or sold for incorporation into a\n\ -dwelling. In determining whether a product is a consumer product, doubtful cases\n\ -shall be resolved in favor of coverage. For a particular product received by a\n\ -particular user, \"normally used\" refers to a typical or common use of that\n\ -class of product, regardless of the status of the particular user or of the way\n\ -in which the particular user actually uses, or expects or is expected to use,\n\ -the product. A product is a consumer product regardless of whether the product\n\ -has substantial commercial, industrial or non-consumer uses, unless such uses\n\ -represent the only significant mode of use of the product.\n\ -\n\ -\"Installation Information\" for a User Product means any methods, procedures,\n\ -authorization keys, or other information required to install and execute\n\ -modified versions of a covered work in that User Product from a modified version\n\ -of its Corresponding Source. The information must suffice to ensure that the\n\ -continued functioning of the modified object code is in no case prevented or\n\ -interfered with solely because modification has been made.\n\ -\n\ -If you convey an object code work under this section in, or with, or\n\ -specifically for use in, a User Product, and the conveying occurs as part of a\n\ -transaction in which the right of possession and use of the User Product is\n\ -transferred to the recipient in perpetuity or for a fixed term (regardless of\n\ -how the transaction is characterized), the Corresponding Source conveyed under\n\ -this section must be accompanied by the Installation Information. But this\n\ -requirement does not apply if neither you nor any third party retains the\n\ -ability to install modified object code on the User Product (for example, the\n\ -work has been installed in ROM).\n\ -\n\ -The requirement to provide Installation Information does not include a\n\ -requirement to continue to provide support service, warranty, or updates for a\n\ -work that has been modified or installed by the recipient, or for the User\n\ -Product in which it has been modified or installed. Access to a network may be\n\ -denied when the modification itself materially and adversely affects the\n\ -operation of the network or violates the rules and protocols for communication\n\ -across the network.\n\ -\n\ -Corresponding Source conveyed, and Installation Information provided, in accord\n\ -with this section must be in a format that is publicly documented (and with an\n\ -implementation available to the public in source code form), and must require no\n\ -special password or key for unpacking, reading or copying.\n\ -7. Additional Terms.\n\ -\n\ -\"Additional permissions\" are terms that supplement the terms of this License\n\ -by making exceptions from one or more of its conditions. Additional permissions\n\ -that are applicable to the entire Program shall be treated as though they were\n\ -included in this License, to the extent that they are valid under applicable\n\ -aw. If additional permissions apply only to part of the Program, that part may\n\ -be used separately under those permissions, but the entire Program remains\n\ -governed by this License without regard to the additional permissions.\n\ -\n\ -When you convey a copy of a covered work, you may at your option remove any\n\ -additional permissions from that copy, or from any part of it. (Additional\n\ -permissions may be written to require their own removal in certain cases when\n\ -you modify the work.) You may place additional permissions on material, added by\n\ -you to a covered work, for which you have or can give appropriate copyright\n\ -permission.\n\ -\n\ -Notwithstanding any other provision of this License, for material you add to a\n\ -covered work, you may (if authorized by the copyright holders of that material)\n\ -supplement the terms of this License with terms:\n\ -\n\ - * a) Disclaiming warranty or limiting liability differently from the terms\n\ -of sections 15 and 16 of this License; or\n\ - * b) Requiring preservation of specified reasonable legal notices or author\n\ -attributions in that material or in the Appropriate Legal Notices displayed by\n\ -works containing it; or\n\ - * c) Prohibiting misrepresentation of the origin of that material, or\n\ -requiring that modified versions of such material be marked in reasonable ways\n\ -as different from the original version; or\n\ - * d) Limiting the use for publicity purposes of names of licensors or\n\ -authors of the material; or\n\ - * e) Declining to grant rights under trademark law for use of some trade\n\ -names, trademarks, or service marks; or\n\ - * f) Requiring indemnification of licensors and authors of that material by\n\ -anyone who conveys the material (or modified versions of it) with contractual\n\ -assumptions of liability to the recipient, for any liability that these\n\ -contractual assumptions directly impose on those licensors and authors.\n\ -\n\ -All other non-permissive additional terms are considered \"further restrictions\"\n\ -within the meaning of section 10. If the Program as you received it, or any part\n\ -of it, contains a notice stating that it is governed by this License along with\n\ -a term that is a further restriction, you may remove that term. If a license\n\ -document contains a further restriction but permits relicensing or conveying\n\ -under this License, you may add to a covered work material governed by the terms\n\ -of that license document, provided that the further restriction does not survive\n\ -such relicensing or conveying.\n\ -\n\ -If you add terms to a covered work in accord with this section, you must place,\n\ -in the relevant source files, a statement of the additional terms that apply to\n\ -those files, or a notice indicating where to find the applicable terms.\n\ -\n\ -Additional terms, permissive or non-permissive, may be stated in the form of a\n\ - separately written license, or stated as exceptions; the above requirements\n\ -apply either way.\n\ -8. Termination.\n\ -\n\ -You may not propagate or modify a covered work except as expressly provided\n\ -under this License. Any attempt otherwise to propagate or modify it is void, and\n\ -will automatically terminate your rights under this License (including any\n\ -patent licenses granted under the third paragraph of section 11).\n\ -\n\ -However, if you cease all violation of this License, then your license from a\n\ -particular copyright holder is reinstated (a) provisionally, unless and until\n\ -the copyright holder explicitly and finally terminates your license, and (b)\n\ -permanently, if the copyright holder fails to notify you of the violation by\n\ -some reasonable means prior to 60 days after the cessation.\n\ -\n\ -Moreover, your license from a particular copyright holder is reinstated\n\ -permanently if the copyright holder notifies you of the violation by some\n\ -reasonable means, this is the first time you have received notice of violation\n\ -of this License (for any work) from that copyright holder, and you cure the\n\ -violation prior to 30 days after your receipt of the notice.\n\ -\n\ -Termination of your rights under this section does not terminate the licenses of\n\ -parties who have received copies or rights from you under this License. If your\n\ -rights have been terminated and not permanently reinstated, you do not qualify\n\ -to receive new licenses for the same material under section 10.\n\ -9. Acceptance Not Required for Having Copies.\n\ -\n\ -You are not required to accept this License in order to receive or run a copy of\n\ -the Program. Ancillary propagation of a covered work occurring solely as a\n\ -consequence of using peer-to-peer transmission to receive a copy likewise does\n\ -not require acceptance. However, nothing other than this License grants you\n\ -permission to propagate or modify any covered work. These actions infringe\n\ -copyright if you do not accept this License. Therefore, by modifying or\n\ -propagating a covered work, you indicate your acceptance of this License to do\n\ -so.\n\ -10. Automatic Licensing of Downstream Recipients.\n\ -\n\ -Each time you convey a covered work, the recipient automatically receives a\n\ -license from the original licensors, to run, modify and propagate that work,\n\ -subject to this License. You are not responsible for enforcing compliance by\n\ -third parties with this License.\n\ -\n\ -An \"entity transaction\" is a transaction transferring control of an\n\ -organization, or substantially all assets of one, or subdividing an\n\ -organization, or merging organizations. If propagation of a covered work results\n\ -from an entity transaction, each party to that transaction who receives a copy\n\ -of the work also receives whatever licenses to the work the party's predecessor\n\ -in interest had or could give under the previous paragraph, plus a right to\n\ -possession of the Corresponding Source of the work from the predecessor in\n\ -interest, if the predecessor has it or can get it with reasonable efforts.\n\ -\n\ -You may not impose any further restrictions on the exercise of the rights\n\ -granted or affirmed under this License. For example, you may not impose a\n\ -license fee, royalty, or other charge for exercise of rights granted under this\n\ -License, and you may not initiate litigation (including a cross-claim or\n\ -counterclaim in a lawsuit) alleging that any patent claim is infringed by\n\ -making, using, selling, offering for sale, or importing the Program or any\n\ -portion of it.\n\ -11. Patents.\n\ -\n\ -A \"contributor\" is a copyright holder who authorizes use under this License of\n\ -the Program or a work on which the Program is based. The work thus licensed is\n\ -called the contributor's \"contributor version\".\n\ -\n\ -A contributor's \"essential patent claims\" are all patent claims owned or\n\ -controlled by the contributor, whether already acquired or hereafter acquired,\n\ -that would be infringed by some manner, permitted by this License, of making,\n\ -using, or selling its contributor version, but do not include claims that would\n\ -be infringed only as a consequence of further modification of the contributor\n\ -version. For purposes of this definition, \"control\" includes the right to\n\ -grant patent sublicenses in a manner consistent with the requirements of this\n\ -License.\n\ -\n\ -Each contributor grants you a non-exclusive, worldwide, royalty-free patent\n\ -license under the contributor's essential patent claims, to make, use, sell,\n\ -offer for sale, import and otherwise run, modify and propagate the contents of\n\ -its contributor version.\n\ -\n\ -In the following three paragraphs, a \"patent license\" is any express agreement\n\ -or commitment, however denominated, not to enforce a patent (such as an express\n\ -permission to practice a patent or covenant not to sue for patent infringement).\n\ -To \"grant\" such a patent license to a party means to make such an agreement or\n\ -commitment not to enforce a patent against the party.\n\ -\n\ -If you convey a covered work, knowingly relying on a patent license, and the\n\ -Corresponding Source of the work is not available for anyone to copy, free of\n\ -charge and under the terms of this License, through a publicly available network\n\ -server or other readily accessible means, then you must either (1) cause the\n\ -Corresponding Source to be so available, or (2) arrange to deprive yourself of\n\ -the benefit of the patent license for this particular work, or (3) arrange, in a\n\ -manner consistent with the requirements of this License, to extend the patent\n\ -license to downstream recipients. \"Knowingly relying\" means you have actual\n\ -knowledge that, but for the patent license, your conveying the covered work in a\n\ -country, or your recipient's use of the covered work in a country, would\n\ -infringe one or more identifiable patents in that country that you have reason\n\ -to believe are valid.\n\ -\n\ -If, pursuant to or in connection with a single transaction or arrangement, you\n\ -convey, or propagate by procuring conveyance of, a covered work, and grant a\n\ -patent license to some of the parties receiving the covered work authorizing\n\ -them to use, propagate, modify or convey a specific copy of the covered work,\n\ -then the patent license you grant is automatically extended to all recipients\n\ -of the covered work and works based on it.\n\ -\n\ -A patent license is \"discriminatory\" if it does not include within the scope\n\ -of its coverage, prohibits the exercise of, or is conditioned on the\n\ -non-exercise of one or more of the rights that are specifically granted under\n\ -this License. You may not convey a covered work if you are a party to an\n\ -arrangement with a third party that is in the business of distributing software,\n\ -under which you make payment to the third party based on the extent of your\n\ -activity of conveying the work, and under which the third party grants, to any\n\ -of the parties who would receive the covered work from you, a discriminatory\n\ -patent license (a) in connection with copies of the covered work conveyed by you\n\ -(or copies made from those copies), or (b) primarily for and in connection with\n\ -specific products or compilations that contain the covered work, unless you\n\ -entered into that arrangement, or that patent license was granted, prior to 28\n\ -March 2007.\n\ -\n\ -Nothing in this License shall be construed as excluding or limiting any implied\n\ -license or other defenses to infringement that may otherwise be available to you\n\ -under applicable patent law.\n\ -12. No Surrender of Others' Freedom.\n\ -\n\ -If conditions are imposed on you (whether by court order, agreement or\n\ -otherwise) that contradict the conditions of this License, they do not excuse\n\ -you from the conditions of this License. If you cannot convey a covered work so\n\ -as to satisfy simultaneously your obligations under this License and any other\n\ -pertinent obligations, then as a consequence you may not convey it at all. For\n\ -example, if you agree to terms that obligate you to collect a royalty for\n\ -further conveying from those to whom you convey the Program, the only way you\n\ -could satisfy both those terms and this License would be to refrain entirely\n\ -from conveying the Program.\n\ -13. Use with the GNU Affero General Public License.\n\ -\n\ -Notwithstanding any other provision of this License, you have permission to link\n\ -or combine any covered work with a work licensed under version 3 of the GNU\n\ -Affero General Public License into a single combined work, and to convey the\n\ -resulting work. The terms of this License will continue to apply to the part\n\ -which is the covered work, but the special requirements of the GNU Affero\n\ -General Public License, section 13, concerning interaction through a network\n\ -will apply to the combination as such.\n\ -14. Revised Versions of this License.\n\ -\n\ -The Free Software Foundation may publish revised and/or new versions of the GNU\n\ -General Public License from time to time. Such new versions will be similar in\n\ -spirit to the present version, but may differ in detail to address new problems\n\ -or concerns.\n\ -\n\ -Each version is given a distinguishing version number. If the Program specifies\n\ -that a certain numbered version of the GNU General Public License \"or any later\n\ -version\" applies to it, you have the option of following the terms and\n\ -conditions either of that numbered version or of any later version published by\n\ -the Free Software Foundation. If the Program does not specify a version number\n\ -of the GNU General Public License, you may choose any version ever published by\n\ -the Free Software Foundation.\n\ -\n\ -If the Program specifies that a proxy can decide which future versions of the\n\ -GNU General Public License can be used, that proxy's public statement of\n\ -acceptance of a version permanently authorizes you to choose that version for\n\ -the Program.\n\ -\n\ -Later license versions may give you additional or different permissions.\n\ -However, no additional obligations are imposed on any author or copyright holder\n\ -as a result of your choosing to follow a later version.\n\ -15. Disclaimer of Warranty.\n\ -\n\ -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\n\ -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER\n\ -PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER\n\ -EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n\ -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE\n\ -QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE\n\ -DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\ -16. Limitation of Liability.\n\ -\n\ -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY\n\ -COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS\n\ -PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,\n\ -INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE\n\ -THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED\n\ -INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE\n\ -PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY\n\ -HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\ -17. Interpretation of Sections 15 and 16.\n\ -\n\ -If the disclaimer of warranty and limitation of liability provided above cannot\n\ -be given local legal effect according to their terms, reviewing courts shall\n\ -apply local law that most closely approximates an absolute waiver of all civil\n\ -liability in connection with the Program, unless a warranty or assumption of\n\ -liability accompanies a copy of the Program in return for a fee.\n\ -\n\ -END OF TERMS AND CONDITIONS"; - -#endif - diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/scan.c.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/scan.c.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/scan.c.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/scan.c.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,185 +0,0 @@ -/* - * scan.c - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include /* gnome_vfs_get_mime_type_for_name */ - -#include "scan.h" -#include "gengine.h" -#include "gplugins.h" -#include "defaults.h" - -GtkListStore *store; - -static gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data) -{ - gtk_widget_hide(scan_window->scanWindow); - return TRUE; -} - -static void do_action(GtkWidget *widget, gpointer data) -{ - GtkTreeIter ite, iter; - gchar *selected_plugin = g_strdup(""); - gchar *str_data = g_strdup(""); - gchar *dir = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(scan_window->btDir)); - gint row_count = 0; - gtk_widget_hide(scan_window->scanWindow); - GtkTreeModel *cbstore = GTK_TREE_MODEL(gtk_combo_box_get_model(GTK_COMBO_BOX(scan_window->cbPlugin))); - gboolean valid = gtk_combo_box_get_active_iter(GTK_COMBO_BOX(scan_window->cbPlugin), &ite); - gtk_tree_model_get(cbstore, &ite, 0, &selected_plugin, -1); - GtkTreeModel *store = GTK_TREE_MODEL(gtk_tree_view_get_model(GTK_TREE_VIEW(scan_window->lsFiles))); - valid = gtk_tree_model_get_iter_first(store, &iter); - while (valid) - { - gboolean doa; - gtk_tree_model_get(store, &iter, COLUMN_FIXED, &doa, -1); - if (doa) - { - gtk_tree_model_get(store, &iter, COLUMN_FILE, &str_data, -1); - gchar *lpath = g_build_filename(dir, str_data, NULL); - if (gtk_combo_box_get_active(GTK_COMBO_BOX(scan_window->cbAction)) == 0) - { - download_once_plugin(lpath, selected_plugin); - } else { - upload_once_plugin(lpath, selected_plugin); - } - g_free(lpath); - } - row_count++; - valid = gtk_tree_model_iter_next(store, &iter); - } - g_free(dir); - g_free(str_data); - g_free(selected_plugin); -} - -static void fixed_toggled(GtkCellRendererToggle *cell, gchar *path_str, gpointer data) -{ - GtkTreeModel *model = GTK_TREE_MODEL(gtk_tree_view_get_model(GTK_TREE_VIEW(scan_window->lsFiles))); - GtkTreeIter iter; - GtkTreePath *path = gtk_tree_path_new_from_string(path_str); - gboolean fixed; - - gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path); - gtk_tree_model_get(model, &iter, COLUMN_FIXED, &fixed, -1); - fixed ^= 1; - gtk_list_store_set(GTK_LIST_STORE(model), &iter, COLUMN_FIXED, fixed, -1); - gtk_tree_path_free(path); -} - -static void add_columns(GtkTreeView *treeview) -{ - GtkCellRenderer *renderer; - GtkTreeViewColumn *column; - - renderer = gtk_cell_renderer_toggle_new(); - g_signal_connect(renderer, "toggled", G_CALLBACK(fixed_toggled), store); - column = gtk_tree_view_column_new_with_attributes(SC_ACTION, renderer, "active", COLUMN_FIXED, NULL); - gtk_tree_view_column_set_sizing(GTK_TREE_VIEW_COLUMN(column), GTK_TREE_VIEW_COLUMN_FIXED); - gtk_tree_view_column_set_fixed_width(GTK_TREE_VIEW_COLUMN(column), 50); - gtk_tree_view_append_column(GTK_TREE_VIEW(scan_window->lsFiles), column); - renderer = gtk_cell_renderer_pixbuf_new(); - column = gtk_tree_view_column_new_with_attributes(SC_ICON, renderer, "pixbuf", COLUMN_ICON, NULL); - gtk_tree_view_column_set_sizing(GTK_TREE_VIEW_COLUMN(column), GTK_TREE_VIEW_COLUMN_FIXED); - gtk_tree_view_column_set_fixed_width(GTK_TREE_VIEW_COLUMN(column), 45); - gtk_tree_view_append_column(GTK_TREE_VIEW(scan_window->lsFiles), column); - renderer = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes(SC_FILENAME, renderer, "text", COLUMN_FILE, NULL); - gtk_tree_view_column_set_sort_column_id(column, COLUMN_FILE); - gtk_tree_view_append_column(GTK_TREE_VIEW(scan_window->lsFiles), column); -} - -static void append_files(GList *files) -{ - GList *l; - GtkTreeIter iter; - - store = gtk_list_store_new(NUM_COLUMNS, G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF, G_TYPE_STRING); - for (l = files; l != NULL; l = l->next) - { - if (g_str_has_prefix(gnome_vfs_get_mime_type_for_name(l->data), SC_VIDEO_PREFIX) || g_str_has_prefix(gnome_vfs_get_mime_type_for_name(l->data), SC_RM_MIME)) - { - gtk_list_store_append(store, &iter); - GdkPixbuf *icon = gdk_pixbuf_new_from_file_at_scale(APP_ICON, 24, 24, TRUE, NULL); - gtk_list_store_set(store, &iter, COLUMN_FIXED, TRUE, COLUMN_ICON, icon, COLUMN_FILE, l->data, -1); - } - } - gtk_tree_view_set_model(GTK_TREE_VIEW(scan_window->lsFiles), GTK_TREE_MODEL(store)); -} - -static void update_view(GtkFileChooserButton *filechooserbutton, gpointer user_data) -{ - const gchar *fname; - GList *files = NULL; - - GDir *dir = g_dir_open(gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(scan_window->btDir)), 0, NULL); - while ((fname = g_dir_read_name(dir))) - { - files = g_list_append(files, (gchar*)fname); - } - append_files(files); - g_dir_close(dir); - g_list_free(files); -} - -void create_scan_window() -{ - GtkBuilder *builder; - GtkTreeIter iter; - GtkTreeStore *store; - GtkCellRenderer *renderer; - - scan_window = g_malloc(sizeof(ScanWindow)); - builder = gtk_builder_new(); - gtk_builder_add_from_file(builder, SC_GLADE, NULL); - scan_window->scanWindow = GTK_WIDGET(gtk_builder_get_object(builder, "wScan")); - gtk_container_set_border_width(GTK_CONTAINER(scan_window->scanWindow), 15); - scan_window->cbPlugin = GTK_WIDGET(gtk_builder_get_object(builder, "pList")); - scan_window->cbAction = GTK_WIDGET(gtk_builder_get_object(builder, "cList")); - scan_window->lsFiles = GTK_WIDGET(gtk_builder_get_object(builder, "fList")); - scan_window->btClose = GTK_WIDGET(gtk_builder_get_object(builder, "cButton")); - scan_window->btAction = GTK_WIDGET(gtk_builder_get_object(builder, "aButton")); - scan_window->btDir = GTK_WIDGET(gtk_builder_get_object(builder, "fcbDir")); - - store = gtk_tree_store_new(1, G_TYPE_STRING); - gtk_tree_store_append(store, &iter, NULL); - gtk_tree_store_set(store, &iter, 0, SC_DOWNLOAD, -1); - gtk_tree_store_append(store, &iter, NULL); - gtk_tree_store_set(store, &iter, 0, SC_UPLOAD, -1); - - renderer = gtk_cell_renderer_text_new(); - gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(scan_window->cbAction), renderer, TRUE); - gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(scan_window->cbAction), renderer, "text", 0, NULL); - gtk_combo_box_set_active(GTK_COMBO_BOX(scan_window->cbAction), 0); - gtk_combo_box_set_model(GTK_COMBO_BOX(scan_window->cbAction), GTK_TREE_MODEL(store)); - - gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(scan_window->lsFiles), TRUE); - gtk_tree_view_set_search_column(GTK_TREE_VIEW(scan_window->lsFiles), COLUMN_FILE); - add_columns(GTK_TREE_VIEW(scan_window->lsFiles)); - - g_signal_connect(G_OBJECT(scan_window->btDir), "current-folder-changed", G_CALLBACK(update_view), NULL); - g_signal_connect(G_OBJECT(scan_window->btClose), "clicked", G_CALLBACK(delete_event), NULL); - g_signal_connect(G_OBJECT(scan_window->btAction), "clicked", G_CALLBACK(do_action), NULL); - g_signal_connect(G_OBJECT(scan_window->scanWindow), "delete_event", G_CALLBACK(delete_event), NULL); - g_signal_connect(G_OBJECT(scan_window->scanWindow), "show", G_CALLBACK(update_view), NULL); - gtk_builder_connect_signals(builder, NULL); - g_object_unref(G_OBJECT(builder)); -} - diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/scan.glade.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/scan.glade.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/scan.glade.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/scan.glade.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,164 +0,0 @@ - - - - - - Scan directory - center - edit-find - - - True - vertical - - - True - - - True - Select directory - - - False - 10 - 0 - - - - - True - select-folder - - - - 1 - - - - - False - 5 - 0 - - - - - True - True - automatic - automatic - in - - - 500 - 240 - True - True - 2 - - - - - 1 - - - - - True - - - True - Action - - - False - 10 - 0 - - - - - True - - - 1 - - - - - True - Plugin - - - False - 10 - 2 - - - - - True - - - 3 - - - - - False - 5 - 2 - - - - - True - - - False - 5 - 3 - - - - - True - - - Action - 80 - True - True - True - - - False - 10 - end - 1 - - - - - Close - 80 - True - True - True - - - False - end - 0 - - - - - False - 4 - - - - - - diff -Nru gnapi-0.2.1-0ubuntu/src/.svn/text-base/scan.h.svn-base gnapi-0.2.2-0ubuntu/src/.svn/text-base/scan.h.svn-base --- gnapi-0.2.1-0ubuntu/src/.svn/text-base/scan.h.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/src/.svn/text-base/scan.h.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -/* - * scan.h - * - * Copyright(c) Wiesław Spyra , 2008-2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef SCAN_H -#define SCAN_H - -#include - -enum -{ - COLUMN_FIXED, - COLUMN_ICON, - COLUMN_FILE, - NUM_COLUMNS -}; - -struct _Scan_Window { - GtkWidget *scanWindow; - GtkWidget *cbPlugin; - GtkWidget *cbAction; - GtkWidget *btClose; - GtkWidget *btAction; - GtkWidget *btDir; - GtkWidget *lsFiles; -}; - -typedef struct _Scan_Window ScanWindow; - -ScanWindow *scan_window; - -void create_scan_window(); - -#endif - diff -Nru gnapi-0.2.1-0ubuntu/.svn/all-wcprops gnapi-0.2.2-0ubuntu/.svn/all-wcprops --- gnapi-0.2.1-0ubuntu/.svn/all-wcprops 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/.svn/all-wcprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 26 -/svnroot/gnapi/!svn/ver/48 -END -AUTHORS -K 25 -svn:wc:ra_dav:version-url -V 34 -/svnroot/gnapi/!svn/ver/46/AUTHORS -END -TODO -K 25 -svn:wc:ra_dav:version-url -V 31 -/svnroot/gnapi/!svn/ver/47/TODO -END -INSTALL -K 25 -svn:wc:ra_dav:version-url -V 34 -/svnroot/gnapi/!svn/ver/47/INSTALL -END -ChangeLog -K 25 -svn:wc:ra_dav:version-url -V 36 -/svnroot/gnapi/!svn/ver/40/ChangeLog -END -COPYING -K 25 -svn:wc:ra_dav:version-url -V 34 -/svnroot/gnapi/!svn/ver/23/COPYING -END -Makefile -K 25 -svn:wc:ra_dav:version-url -V 35 -/svnroot/gnapi/!svn/ver/44/Makefile -END -README -K 25 -svn:wc:ra_dav:version-url -V 33 -/svnroot/gnapi/!svn/ver/46/README -END diff -Nru gnapi-0.2.1-0ubuntu/.svn/entries gnapi-0.2.2-0ubuntu/.svn/entries --- gnapi-0.2.1-0ubuntu/.svn/entries 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/.svn/entries 1970-01-01 00:00:00.000000000 +0000 @@ -1,281 +0,0 @@ -10 - -dir -48 -https://gnapi.svn.sourceforge.net/svnroot/gnapi -https://gnapi.svn.sourceforge.net/svnroot/gnapi - - - -2010-10-07T21:53:34.023677Z -48 -badenov - - - - - - - - - - - - - - -b5f4b304-0d56-4a30-a9d8-522935651cea - -pixmaps -dir - -AUTHORS -file - - - - -2010-08-14T20:11:30.678598Z -bcf3ac00969736796f74b0656d2f992d -2010-08-11T20:06:38.961457Z -46 -badenov - - - - - - - - - - - - - - - - - - - - - -344 - -TODO -file - - - - -2010-11-09T13:23:43.701965Z -5c19d510d0b7639971306b6ba73a57e3 -2010-08-14T20:32:46.843869Z -47 -badenov - - - - - - - - - - - - - - - - - - - - - -367 - -INSTALL -file - - - - -2010-11-09T13:23:43.701965Z -f03e36b67d0159ed02123e466375d4b6 -2010-08-14T20:32:46.843869Z -47 -badenov - - - - - - - - - - - - - - - - - - - - - -1113 - -src -dir - -ChangeLog -file - - - - -2010-08-14T20:11:30.678598Z -aa9b1574db53b0e5b0effea615380647 -2010-06-25T18:15:16.686268Z -40 -badenov - - - - - - - - - - - - - - - - - - - - - -423 - -docs -dir - -COPYING -file - - - - -2010-08-14T20:11:30.678598Z -a8b605d8c12bf1492f8e5dfea0521471 -2010-04-04T18:42:15.290422Z -23 -badenov - - - - - - - - - - - - - - - - - - - - - -31886 - -desktop -dir - -Makefile -file - - - - -2010-08-14T20:11:30.678598Z -259b111778b1b2954c5dba6f8b065542 -2010-07-26T22:19:10.230867Z -44 -badenov -has-props - - - - - - - - - - - - - - - - - - - - -8567 - -README -file - - - - -2010-08-14T20:11:30.678598Z -1d59e91e3dbfe844cce5d80f2c9db83a -2010-08-11T20:06:38.961457Z -46 -badenov - - - - - - - - - - - - - - - - - - - - - -483 - -po -dir - diff -Nru gnapi-0.2.1-0ubuntu/.svn/prop-base/Makefile.svn-base gnapi-0.2.2-0ubuntu/.svn/prop-base/Makefile.svn-base --- gnapi-0.2.1-0ubuntu/.svn/prop-base/Makefile.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/.svn/prop-base/Makefile.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -K 14 -svn:executable -V 0 - -END diff -Nru gnapi-0.2.1-0ubuntu/.svn/text-base/AUTHORS.svn-base gnapi-0.2.2-0ubuntu/.svn/text-base/AUTHORS.svn-base --- gnapi-0.2.1-0ubuntu/.svn/text-base/AUTHORS.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/.svn/text-base/AUTHORS.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ - -Gnapi 0.2.1 - - - -AUTHORS - - - - *** Gnapi engine - - Wiesław Spyra - - - - *** Documentation - - Wiesław Spyra - - - - *** Artwork - - Wiesław Spyra - - - - *** Napiprojekt plugin - - Wiesław Spyra - - - - *** OpenSubtitles plugin - - Wiesław Spyra - - - - *** Nautilus plugin - - Wiesław Spyra - diff -Nru gnapi-0.2.1-0ubuntu/.svn/text-base/ChangeLog.svn-base gnapi-0.2.2-0ubuntu/.svn/text-base/ChangeLog.svn-base --- gnapi-0.2.1-0ubuntu/.svn/text-base/ChangeLog.svn-base 2010-08-14 20:11:29.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/.svn/text-base/ChangeLog.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -> 2010/06/25 - 0.2rc2 release (badenov) - - Fixes: - * OS plugin permission fix - -> 2010/05/xx - 0.2alpha4 release (badenov) - - Fixes: - * Nautilus integration plugin fix - * Nautilus/plugin locale fix - * OpenSubtitles don't need libxmlrpc-c anymore - -> 2010/04/04 - 0.2alpha3 release (badenov) - - New features: - * OpenSubtitles support - * Nautilus integration plugin - * Directory scanning - diff -Nru gnapi-0.2.1-0ubuntu/.svn/text-base/COPYING.svn-base gnapi-0.2.2-0ubuntu/.svn/text-base/COPYING.svn-base --- gnapi-0.2.1-0ubuntu/.svn/text-base/COPYING.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/.svn/text-base/COPYING.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,545 +0,0 @@ -GNU GENERAL PUBLIC LICENSE - -Version 3, 29 June 2007 - -Copyright © 2007 Free Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. -Preamble - -The GNU General Public License is a free, copyleft license for software and -other kinds of works. - -The licenses for most software and other practical works are designed to take -away your freedom to share and change the works. By contrast, the GNU General -Public License is intended to guarantee your freedom to share and change all -versions of a program--to make sure it remains free software for all its users. -We, the Free Software Foundation, use the GNU General Public License for most of -our software; it applies also to any other work released this way by its -authors. You can apply it to your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom to -distribute copies of free software (and charge for them if you wish), that you -receive source code or can get it if you want it, that you can change the -software or use pieces of it in new free programs, and that you know you can do -these things. - -To protect your rights, we need to prevent others from denying you these rights -or asking you to surrender the rights. Therefore, you have certain -responsibilities if you distribute copies of the software, or if you modify it: -responsibilities to respect the freedom of others. - -For example, if you distribute copies of such a program, whether gratis or for a -fee, you must pass on to the recipients the same freedoms that you received. You -must make sure that they, too, receive or can get the source code. And you must -show them these terms so they know their rights. - -Developers that use the GNU GPL protect your rights with two steps: (1) assert -copyright on the software, and (2) offer you this License giving you legal -permission to copy, distribute and/or modify it. - -For the developers' and authors' protection, the GPL clearly explains that there -is no warranty for this free software. For both users' and authors' sake, the -GPL requires that modified versions be marked as changed, so that their problems -will not be attributed erroneously to authors of previous versions. - -Some devices are designed to deny users access to install or run modified -versions of the software inside them, although the manufacturer can do so. This -is fundamentally incompatible with the aim of protecting users' freedom to -change the software. The systematic pattern of such abuse occurs in the area of -products for individuals to use, which is precisely where it is most -unacceptable. Therefore, we have designed this version of the GPL to prohibit -the practice for those products. If such problems arise substantially in other -domains, we stand ready to extend this provision to those domains in future -versions of the GPL, as needed to protect the freedom of users. - -Finally, every program is threatened constantly by software patents. States -should not allow patents to restrict development and use of software on -general-purpose computers, but in those that do, we wish to avoid the special -danger that patents applied to a free program could make it effectively -proprietary. To prevent this, the GPL assures that patents cannot be used to -render the program non-free. - -The precise terms and conditions for copying, distribution and modification -follow. - -TERMS AND CONDITIONS - -0. Definitions. - -"This License" refers to version 3 of the GNU General Public License. - -"Copyright" also means copyright-like laws that apply to other kinds of works, -such as semiconductor masks. - -"The Program" refers to any copyrightable work licensed under this License. -Each licensee is addressed as "you". "Licensees" and "recipients" may be -individuals or organizations. - -To "modify" a work means to copy from or adapt all or part of the work in a -fashion requiring copyright permission, other than the making of an exact copy. -The resulting work is called a "modified version" of the earlier work or a -work "based on" the earlier work. - -A "covered work" means either the unmodified Program or a work based on the -Program. - -To "propagate" a work means to do anything with it that, without permission, -would make you directly or secondarily liable for infringement under applicable -copyright law, except executing it on a computer or modifying a private copy. -Propagation includes copying, distribution (with or without modification), -making available to the public, and in some countries other activities as well. - -To "convey" a work means any kind of propagation that enables other parties to -make or receive copies. Mere interaction with a user through a computer network, -with no transfer of a copy, is not conveying. - -An interactive user interface displays "Appropriate Legal Notices" to the -extent that it includes a convenient and prominently visible feature that (1) -displays an appropriate copyright notice, and (2) tells the user that there is -no warranty for the work (except to the extent that warranties are provided), -that licensees may convey the work under this License, and how to view a copy of -this License. If the interface presents a list of user commands or options, such -as a menu, a prominent item in the list meets this criterion. -1. Source Code. - -The "source code" for a work means the preferred form of the work for making -modifications to it. "Object code" means any non-source form of a work. - -A "Standard Interface" means an interface that either is an official standard -defined by a recognized standards body, or, in the case of interfaces specified -for a particular programming language, one that is widely used among developers -working in that language. - -The "System Libraries" of an executable work include anything, other than the -work as a whole, that (a) is included in the normal form of packaging a Major -Component, but which is not part of that Major Component, and (b) serves only to -enable use of the work with that Major Component, or to implement a Standard -Interface for which an implementation is available to the public in source code -form. A "Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system (if any) on -which the executable work runs, or a compiler used to produce the work, or an -object code interpreter used to run it. - -The "Corresponding Source" for a work in object code form means all the source -code needed to generate, install, and (for an executable work) run the object -code and to modify the work, including scripts to control those activities. -However, it does not include the work's System Libraries, or general-purpose -tools or generally available free programs which are used unmodified in -performing those activities but which are not part of the work. For example, -Corresponding Source includes interface definition files associated with source -files for the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, such as by -intimate data communication or control flow between those subprograms and other -parts of the work. - -The Corresponding Source need not include anything that users can regenerate -automatically from other parts of the Corresponding Source. - -The Corresponding Source for a work in source code form is that same work. -2. Basic Permissions. - -All rights granted under this License are granted for the term of copyright on -the Program, and are irrevocable provided the stated conditions are met. This -License explicitly affirms your unlimited permission to run the unmodified -Program. The output from running a covered work is covered by this License only -if the output, given its content, constitutes a covered work. This License -acknowledges your rights of fair use or other equivalent, as provided by -copyright law. - -You may make, run and propagate covered works that you do not convey, without -conditions so long as your license otherwise remains in force. You may convey -covered works to others for the sole purpose of having them make modifications -exclusively for you, or provide you with facilities for running those works, -provided that you comply with the terms of this License in conveying all -material for which you do not control copyright. Those thus making or running -the covered works for you must do so exclusively on your behalf, under your -direction and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the conditions -stated below. Sublicensing is not allowed; section 10 makes it unnecessary. -3. Protecting Users' Legal Rights From Anti-Circumvention Law. - -No covered work shall be deemed part of an effective technological measure under -any applicable law fulfilling obligations under article 11 of the WIPO copyright -treaty adopted on 20 December 1996, or similar laws prohibiting or restricting -circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention is -effected by exercising rights under this License with respect to the covered -work, and you disclaim any intention to limit operation or modification of the -work as a means of enforcing, against the work's users, your or third parties' -legal rights to forbid circumvention of technological measures. -4. Conveying Verbatim Copies. - -You may convey verbatim copies of the Program's source code as you receive it, -in any medium, provided that you conspicuously and appropriately publish on each -copy an appropriate copyright notice; keep intact all notices stating that this -License and any non-permissive terms added in accord with section 7 apply to the -code; keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you may -offer support or warranty protection for a fee. -5. Conveying Modified Source Versions. - -You may convey a work based on the Program, or the modifications to produce it -from the Program, in the form of source code under the terms of section 4, -provided that you also meet all of these conditions: - - * a) The work must carry prominent notices stating that you modified it, and -giving a relevant date. - * b) The work must carry prominent notices stating that it is released under -this License and any conditions added under section 7. This requirement modifies -the requirement in section 4 to "keep intact all notices". - * c) You must license the entire work, as a whole, under this License to -anyone who comes into possession of a copy. This License will therefore apply, -along with any applicable section 7 additional terms, to the whole of the work, -and all its parts, regardless of how they are packaged. This License gives no -permission to license the work in any other way, but it does not invalidate such -permission if you have separately received it. - * d) If the work has interactive user interfaces, each must display -Appropriate Legal Notices; however, if the Program has interactive interfaces -that do not display Appropriate Legal Notices, your work need not make them do -so. - -A compilation of a covered work with other separate and independent works, which -are not by their nature extensions of the covered work, and which are not -combined with it such as to form a larger program, in or on a volume of a -storage or distribution medium, is called an "aggregate" if the compilation -and its resulting copyright are not used to limit the access or legal rights of -the compilation's users beyond what the individual works permit. Inclusion of a -covered work in an aggregate does not cause this License to apply to the other -parts of the aggregate. -6. Conveying Non-Source Forms. - -You may convey a covered work in object code form under the terms of sections 4 -and 5, provided that you also convey the machine-readable Corresponding Source -under the terms of this License, in one of these ways: - - * a) Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by the Corresponding -Source fixed on a durable physical medium customarily used for software -interchange. - * b) Convey the object code in, or embodied in, a physical product -(including a physical distribution medium), accompanied by a written offer, -valid for at least three years and valid for as long as you offer spare parts or -customer support for that product model, to give anyone who possesses the object -code either (1) a copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical medium -customarily used for software interchange, for a price no more than your -reasonable cost of physically performing this conveying of source, or (2) access -to copy the Corresponding Source from a network server at no charge. - * c) Convey individual copies of the object code with a copy of the written -offer to provide the Corresponding Source. This alternative is allowed only -occasionally and noncommercially, and only if you received the object code with -such an offer, in accord with subsection 6b. - * d) Convey the object code by offering access from a designated place -(gratis or for a charge), and offer equivalent access to the Corresponding -Source in the same way through the same place at no further charge. You need not -require recipients to copy the Corresponding Source along with the object code. -If the place to copy the object code is a network server, the Corresponding -Source may be on a different server (operated by you or a third party) that -supports equivalent copying facilities, provided you maintain clear directions -next to the object code saying where to find the Corresponding Source. -Regardless of what server hosts the Corresponding Source, you remain obligated -to ensure that it is available for as long as needed to satisfy these -requirements. - * e) Convey the object code using peer-to-peer transmission, provided you -inform other peers where the object code and Corresponding Source of the work -are being offered to the general public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded from the -Corresponding Source as a System Library, need not be included in conveying the -object code work. - -A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, or -household purposes, or (2) anything designed or sold for incorporation into a -dwelling. In determining whether a product is a consumer product, doubtful cases -shall be resolved in favor of coverage. For a particular product received by a -particular user, "normally used" refers to a typical or common use of that -class of product, regardless of the status of the particular user or of the way -in which the particular user actually uses, or expects or is expected to use, -the product. A product is a consumer product regardless of whether the product -has substantial commercial, industrial or non-consumer uses, unless such uses -represent the only significant mode of use of the product. - -"Installation Information" for a User Product means any methods, procedures, -authorization keys, or other information required to install and execute -modified versions of a covered work in that User Product from a modified version -of its Corresponding Source. The information must suffice to ensure that the -continued functioning of the modified object code is in no case prevented or -interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as part of a -transaction in which the right of possession and use of the User Product is -transferred to the recipient in perpetuity or for a fixed term (regardless of -how the transaction is characterized), the Corresponding Source conveyed under -this section must be accompanied by the Installation Information. But this -requirement does not apply if neither you nor any third party retains the -ability to install modified object code on the User Product (for example, the -work has been installed in ROM). - -The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates for a -work that has been modified or installed by the recipient, or for the User -Product in which it has been modified or installed. Access to a network may be -denied when the modification itself materially and adversely affects the -operation of the network or violates the rules and protocols for communication -across the network. - -Corresponding Source conveyed, and Installation Information provided, in accord -with this section must be in a format that is publicly documented (and with an -implementation available to the public in source code form), and must require no -special password or key for unpacking, reading or copying. -7. Additional Terms. - -"Additional permissions" are terms that supplement the terms of this License -by making exceptions from one or more of its conditions. Additional permissions -that are applicable to the entire Program shall be treated as though they were -included in this License, to the extent that they are valid under applicable -aw. If additional permissions apply only to part of the Program, that part may -be used separately under those permissions, but the entire Program remains -governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any -additional permissions from that copy, or from any part of it. (Additional -permissions may be written to require their own removal in certain cases when -you modify the work.) You may place additional permissions on material, added by -you to a covered work, for which you have or can give appropriate copyright -permission. - -Notwithstanding any other provision of this License, for material you add to a -covered work, you may (if authorized by the copyright holders of that material) -supplement the terms of this License with terms: - - * a) Disclaiming warranty or limiting liability differently from the terms -of sections 15 and 16 of this License; or - * b) Requiring preservation of specified reasonable legal notices or author -attributions in that material or in the Appropriate Legal Notices displayed by -works containing it; or - * c) Prohibiting misrepresentation of the origin of that material, or -requiring that modified versions of such material be marked in reasonable ways -as different from the original version; or - * d) Limiting the use for publicity purposes of names of licensors or -authors of the material; or - * e) Declining to grant rights under trademark law for use of some trade -names, trademarks, or service marks; or - * f) Requiring indemnification of licensors and authors of that material by -anyone who conveys the material (or modified versions of it) with contractual -assumptions of liability to the recipient, for any liability that these -contractual assumptions directly impose on those licensors and authors. - -All other non-permissive additional terms are considered "further restrictions" -within the meaning of section 10. If the Program as you received it, or any part -of it, contains a notice stating that it is governed by this License along with -a term that is a further restriction, you may remove that term. If a license -document contains a further restriction but permits relicensing or conveying -under this License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does not survive -such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, -in the relevant source files, a statement of the additional terms that apply to -those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form of a - separately written license, or stated as exceptions; the above requirements -apply either way. -8. Termination. - -You may not propagate or modify a covered work except as expressly provided -under this License. Any attempt otherwise to propagate or modify it is void, and -will automatically terminate your rights under this License (including any -patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from a -particular copyright holder is reinstated (a) provisionally, unless and until -the copyright holder explicitly and finally terminates your license, and (b) -permanently, if the copyright holder fails to notify you of the violation by -some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated -permanently if the copyright holder notifies you of the violation by some -reasonable means, this is the first time you have received notice of violation -of this License (for any work) from that copyright holder, and you cure the -violation prior to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses of -parties who have received copies or rights from you under this License. If your -rights have been terminated and not permanently reinstated, you do not qualify -to receive new licenses for the same material under section 10. -9. Acceptance Not Required for Having Copies. - -You are not required to accept this License in order to receive or run a copy of -the Program. Ancillary propagation of a covered work occurring solely as a -consequence of using peer-to-peer transmission to receive a copy likewise does -not require acceptance. However, nothing other than this License grants you -permission to propagate or modify any covered work. These actions infringe -copyright if you do not accept this License. Therefore, by modifying or -propagating a covered work, you indicate your acceptance of this License to do -so. -10. Automatic Licensing of Downstream Recipients. - -Each time you convey a covered work, the recipient automatically receives a -license from the original licensors, to run, modify and propagate that work, -subject to this License. You are not responsible for enforcing compliance by -third parties with this License. - -An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered work results -from an entity transaction, each party to that transaction who receives a copy -of the work also receives whatever licenses to the work the party's predecessor -in interest had or could give under the previous paragraph, plus a right to -possession of the Corresponding Source of the work from the predecessor in -interest, if the predecessor has it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights -granted or affirmed under this License. For example, you may not impose a -license fee, royalty, or other charge for exercise of rights granted under this -License, and you may not initiate litigation (including a cross-claim or -counterclaim in a lawsuit) alleging that any patent claim is infringed by -making, using, selling, offering for sale, or importing the Program or any -portion of it. -11. Patents. - -A "contributor" is a copyright holder who authorizes use under this License of -the Program or a work on which the Program is based. The work thus licensed is -called the contributor's "contributor version". - -A contributor's "essential patent claims" are all patent claims owned or -controlled by the contributor, whether already acquired or hereafter acquired, -that would be infringed by some manner, permitted by this License, of making, -using, or selling its contributor version, but do not include claims that would -be infringed only as a consequence of further modification of the contributor -version. For purposes of this definition, "control" includes the right to -grant patent sublicenses in a manner consistent with the requirements of this -License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent -license under the contributor's essential patent claims, to make, use, sell, -offer for sale, import and otherwise run, modify and propagate the contents of -its contributor version. - -In the following three paragraphs, a "patent license" is any express agreement -or commitment, however denominated, not to enforce a patent (such as an express -permission to practice a patent or covenant not to sue for patent infringement). -To "grant" such a patent license to a party means to make such an agreement or -commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the -Corresponding Source of the work is not available for anyone to copy, free of -charge and under the terms of this License, through a publicly available network -server or other readily accessible means, then you must either (1) cause the -Corresponding Source to be so available, or (2) arrange to deprive yourself of -the benefit of the patent license for this particular work, or (3) arrange, in a -manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have actual -knowledge that, but for the patent license, your conveying the covered work in a -country, or your recipient's use of the covered work in a country, would -infringe one or more identifiable patents in that country that you have reason -to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, you -convey, or propagate by procuring conveyance of, a covered work, and grant a -patent license to some of the parties receiving the covered work authorizing -them to use, propagate, modify or convey a specific copy of the covered work, -then the patent license you grant is automatically extended to all recipients -of the covered work and works based on it. - -A patent license is "discriminatory" if it does not include within the scope -of its coverage, prohibits the exercise of, or is conditioned on the -non-exercise of one or more of the rights that are specifically granted under -this License. You may not convey a covered work if you are a party to an -arrangement with a third party that is in the business of distributing software, -under which you make payment to the third party based on the extent of your -activity of conveying the work, and under which the third party grants, to any -of the parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work conveyed by you -(or copies made from those copies), or (b) primarily for and in connection with -specific products or compilations that contain the covered work, unless you -entered into that arrangement, or that patent license was granted, prior to 28 -March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied -license or other defenses to infringement that may otherwise be available to you -under applicable patent law. -12. No Surrender of Others' Freedom. - -If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not excuse -you from the conditions of this License. If you cannot convey a covered work so -as to satisfy simultaneously your obligations under this License and any other -pertinent obligations, then as a consequence you may not convey it at all. For -example, if you agree to terms that obligate you to collect a royalty for -further conveying from those to whom you convey the Program, the only way you -could satisfy both those terms and this License would be to refrain entirely -from conveying the Program. -13. Use with the GNU Affero General Public License. - -Notwithstanding any other provision of this License, you have permission to link -or combine any covered work with a work licensed under version 3 of the GNU -Affero General Public License into a single combined work, and to convey the -resulting work. The terms of this License will continue to apply to the part -which is the covered work, but the special requirements of the GNU Affero -General Public License, section 13, concerning interaction through a network -will apply to the combination as such. -14. Revised Versions of this License. - -The Free Software Foundation may publish revised and/or new versions of the GNU -General Public License from time to time. Such new versions will be similar in -spirit to the present version, but may differ in detail to address new problems -or concerns. - -Each version is given a distinguishing version number. If the Program specifies -that a certain numbered version of the GNU General Public License "or any later -version" applies to it, you have the option of following the terms and -conditions either of that numbered version or of any later version published by -the Free Software Foundation. If the Program does not specify a version number -of the GNU General Public License, you may choose any version ever published by -the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions of the -GNU General Public License can be used, that proxy's public statement of -acceptance of a version permanently authorizes you to choose that version for -the Program. - -Later license versions may give you additional or different permissions. -However, no additional obligations are imposed on any author or copyright holder -as a result of your choosing to follow a later version. -15. Disclaimer of Warranty. - -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER -PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE -QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE -DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -16. Limitation of Liability. - -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY -COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS -PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, -INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE -THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED -INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE -PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY -HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -17. Interpretation of Sections 15 and 16. - -If the disclaimer of warranty and limitation of liability provided above cannot -be given local legal effect according to their terms, reviewing courts shall -apply local law that most closely approximates an absolute waiver of all civil -liability in connection with the Program, unless a warranty or assumption of -liability accompanies a copy of the Program in return for a fee. - -END OF TERMS AND CONDITIONS - diff -Nru gnapi-0.2.1-0ubuntu/.svn/text-base/INSTALL.svn-base gnapi-0.2.2-0ubuntu/.svn/text-base/INSTALL.svn-base --- gnapi-0.2.1-0ubuntu/.svn/text-base/INSTALL.svn-base 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/.svn/text-base/INSTALL.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ - -Gnapi 0.2.1 - - - -INSTALL - - - - *** Dependencies - - Gnapi needs following *development* packages: - - gtk2.0, - - libnotify, - - libsoup2.4, - - libxml2, - - glib2.0, - - gconf2.0, - - gmodule2.0, - - libnautilus-extension, - - gnome-vfs, - - libavcodec, libavutil, libavformat (or ffmpeg). - - You need also: - - C compiler (gcc or clang), - - ld, - - strip, - - make, - - install, - - pkg-config. - These programs should be part of binutils and/or build-essentials packages. - - - - *** Compilation/Installation under Linux - - Make sure you've installed all packages mentioned above! - - After that type: - - make - sudo make install - - Compile with Clang (or other compiler): - - make CC=clang - - Install to other dir: - - sudo make install DESTDIR=/home/me/programs/gnapi - - - - *** FFMPEG (avformat, avutil, avcodec) missing files, eg. Fedora - - Modify lines: - - #include - #include - - to: - - #include - #include - - in gnapi/src/gengine.c. - - - - *** How to uninstall - - Type: - - sudo make uninstall - diff -Nru gnapi-0.2.1-0ubuntu/.svn/text-base/Makefile.svn-base gnapi-0.2.2-0ubuntu/.svn/text-base/Makefile.svn-base --- gnapi-0.2.1-0ubuntu/.svn/text-base/Makefile.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/.svn/text-base/Makefile.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,135 +0,0 @@ -# -# Makefile -# -# Copyright(c) Wiesław Spyra , 2008-2010. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of version 3 or later of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program 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 this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -CC? = gcc -prefix? = -DESTDIR? = -CFLAGS += -g -Wall -O2 -Wformat-security `pkg-config --cflags gtk+-2.0 gconf-2.0 gnome-vfs-2.0 libsoup-2.4 gmodule-2.0 libnautilus-extension` -STRIP = strip --strip-unneeded -GFLAGS = `pkg-config --libs gtk+-2.0 gconf-2.0 gnome-vfs-2.0 libsoup-2.4 gmodule-2.0` -lnotify -lavformat -NFLAGS = `pkg-config --libs gtk+-2.0 gconf-2.0 libsoup-2.4` -OSFLAGS = `pkg-config --libs gtk+-2.0 libsoup-2.4` -fPIC -NAUTFLAGS = `pkg-config --libs libnautilus-extension gtk+-2.0` -fPIC - -all: gnapi libnapi libopensub libnautilus-gnapi - -gnapi: ./src/gnapi.c ./src/gengine.c ./src/interface.c ./src/http_post.c - $(CC) -c ./src/gengine.c -o ./src/gengine.o $(CFLAGS) - $(CC) -c ./src/gplugins.c -o ./src/gplugins.o $(CFLAGS) - $(CC) -c ./src/interface.c -o ./src/interface.o $(CFLAGS) - $(CC) -c ./src/scan.c -o ./src/scan.o $(CFLAGS) - $(CC) -c ./src/gnapi.c -o ./src/gnapi.o $(CFLAGS) - $(CC) -c ./src/http_post.c -o ./src/http_post.o $(CFLAGS) - $(CC) ./src/gnapi.o ./src/gengine.o ./src/gplugins.o ./src/interface.o ./src/scan.o ./src/http_post.o -o gnapi $(CFLAGS) $(GFLAGS) -Wl,-export-dynamic -# $(STRIP) ./gnapi - -libnapi: ./src/plugins/napiprojekt/napi.c ./src/plugins/napiprojekt/repbad.c ./src/plugins/napiprojekt/sendsubs.c ./src/plugins/napiprojekt/napi_config.c ./src/plugins/napiprojekt/napi_common.c - $(CC) -c ./src/plugins/napiprojekt/napi.c -o ./src/plugins/napiprojekt/napi.o $(CFLAGS) -fPIC - $(CC) -c ./src/plugins/napiprojekt/repbad.c -o ./src/plugins/napiprojekt/repbad.o $(CFLAGS) -fPIC - $(CC) -c ./src/plugins/napiprojekt/sendsubs.c -o ./src/plugins/napiprojekt/sendsubs.o $(CFLAGS) -fPIC - $(CC) -c ./src/plugins/napiprojekt/napi_config.c -o ./src/plugins/napiprojekt/napi_config.o $(CFLAGS) -fPIC - $(CC) -c ./src/plugins/napiprojekt/napi_common.c -o ./src/plugins/napiprojekt/napi_common.o $(CFLAGS) -fPIC - $(CC) ./src/plugins/napiprojekt/napi.o ./src/plugins/napiprojekt/repbad.o ./src/plugins/napiprojekt/sendsubs.o ./src/plugins/napiprojekt/napi_config.o \ - ./src/plugins/napiprojekt/napi_common.o -shared -Wl,-soname,libnapi.so.1 -o libnapi.so $(CFLAGS) -fPIC $(NFLAGS) -# $(STRIP) ./libnapi.so - -libopensub: ./src/plugins/opensubtitles/os.c ./src/plugins/opensubtitles/os_config.c - $(CC) -c ./src/plugins/opensubtitles/os.c -o ./src/plugins/opensubtitles/os.o $(CFLAGS) -fPIC - $(CC) -c ./src/plugins/opensubtitles/os_config.c -o ./src/plugins/opensubtitles/os_config.o $(CFLAGS) -fPIC - $(CC) ./src/plugins/opensubtitles/os.o ./src/plugins/opensubtitles/os_config.o -shared -Wl,-soname,libopensub.so.1 -o libopensub.so $(CFLAGS) -fPIC $(OSFLAGS) -# $(STRIP) ./libopensub.so - -libnautilus-gnapi: - $(CC) -c ./src/plugins/nautilus/gnapi_nautilus.c -o ./src/plugins/nautilus/gnapi_nautilus.o $(CFLAGS) -fPIC - $(CC) ./src/plugins/nautilus/gnapi_nautilus.o -shared -Wl,-export-dynamic,-soname,libnautilus-gnapi.so.1 -o libnautilus-gnapi.so $(CFLAGS) -fPIC $(NAUTFLAGS) -# $(STRIP) ./libnautilus-gnapi.so - -clean: - rm -f ./gnapi - rm -f ./*.so - rm -f ./src/*.o - rm -f ./src/plugins/napiprojekt/*.o - rm -f ./src/plugins/opensubtitles/*.o - rm -f ./src/plugins/nautilus/*.o - -install: - install -o root -g root -d ${DESTDIR}$(prefix)/usr/bin/ - install -o root -g root gnapi ${DESTDIR}$(prefix)/usr/bin/ - install -o root -g root -d ${DESTDIR}$(prefix)/usr/share/gnapi/ - install -o root -g root -d ${DESTDIR}$(prefix)/usr/lib/gnapi/plugins/ - install -o root -g root -d ${DESTDIR}$(prefix)/usr/lib/nautilus/extensions-2.0/ - install -o root -g root libnautilus-gnapi.so ${DESTDIR}$(prefix)/usr/lib/nautilus/extensions-2.0/ - install -o root -g root libnapi.so ${DESTDIR}$(prefix)/usr/lib/gnapi/plugins/ - install -o root -g root ./src/scan.glade ${DESTDIR}$(prefix)/usr/share/gnapi/ - install -o root -g root ./src/info.glade ${DESTDIR}$(prefix)/usr/share/gnapi/ - install -o root -g root ./src/plugins/napiprojekt/napi_config.glade ${DESTDIR}$(prefix)/usr/share/gnapi/ - install -o root -g root ./src/plugins/opensubtitles/os_config.glade ${DESTDIR}$(prefix)/usr/share/gnapi/ - install -o root -g root libopensub.so ${DESTDIR}$(prefix)/usr/lib/gnapi/plugins/ - install -o root -g root -d ${DESTDIR}$(prefix)/usr/share/man/man1/ - install -o root -g root -m 644 ./docs/gnapi.1.gz ${DESTDIR}$(prefix)/usr/share/man/man1/ - install -o root -g root -d ${DESTDIR}$(prefix)/usr/share/applications/ - install -o root -g root -m 644 ./desktop/gnapi.desktop ${DESTDIR}$(prefix)/usr/share/applications/ - install -o root -g root -d ${DESTDIR}$(prefix)/usr/share/apps/konqueror/servicemenus/ - install -o root -g root -m 644 ./desktop/gnapi-kde.desktop ${DESTDIR}$(prefix)/usr/share/apps/konqueror/servicemenus/ - install -o root -g root -d ${DESTDIR}$(prefix)/usr/share/apps/dolphin/servicemenus/ - install -o root -g root -m 644 ./desktop/gnapi-kde.desktop ${DESTDIR}$(prefix)/usr/share/apps/dolphin/servicemenus/ - install -o root -g root -d ${DESTDIR}$(prefix)/usr/share/kde4/services/ServiceMenus/ - install -o root -g root -m 644 ./desktop/gnapi-kde4.desktop ${DESTDIR}$(prefix)/usr/share/kde4/services/ServiceMenus/ - install -o root -g root -d ${DESTDIR}$(prefix)/usr/share/Thunar/sendto/ - install -o root -g root -m 644 ./desktop/gnapi-kde.desktop ${DESTDIR}$(prefix)/usr/share/Thunar/sendto/ - install -o root -g root -d ${DESTDIR}$(prefix)/usr/share/docs/gnapi/ - install -o root -g root -m 644 ./docs/copyright ${DESTDIR}$(prefix)/usr/share/docs/gnapi/ - install -o root -g root -d ${DESTDIR}$(prefix)/usr/share/pixmaps/gnapi/ - install -o root -g root -m 644 ./pixmaps/v-bo.png ${DESTDIR}$(prefix)/usr/share/pixmaps/gnapi/ - install -o root -g root -m 644 ./pixmaps/v-warn.png ${DESTDIR}$(prefix)/usr/share/pixmaps/gnapi/ - install -o root -g root -m 644 ./pixmaps/v-15.png ${DESTDIR}$(prefix)/usr/share/pixmaps/gnapi/ - install -o root -g root -m 644 ./pixmaps/v-18.png ${DESTDIR}$(prefix)/usr/share/pixmaps/gnapi/ - install -o root -g root -m 644 ./pixmaps/downloading.png ${DESTDIR}${prefix}/usr/share/pixmaps/gnapi/ - install -o root -g root -m 644 ./pixmaps/gnapi.png ${DESTDIR}$(prefix)/usr/share/pixmaps/gnapi/ - install -o root -g root -d ${DESTDIR}$(prefix)/usr/share/locale/pl/LC_MESSAGES/ - install -o root -g root -m 644 ./po/pl/gnapi.mo ${DESTDIR}$(prefix)/usr/share/locale/pl/LC_MESSAGES/ - -uninstall: - rm -f ${DESTDIR}$(prefix)/usr/bin/gnapi - rm -f ${DESTDIR}$(prefix)/usr/lib/nautilus/extensions-2.0/libnautilus-gnapi.so - rm -f ${DESTDIR}$(prefix)/usr/lib/gnapi/plugins/libnapi.so - rm -f ${DESTDIR}$(prefix)/usr/lib/gnapi/plugins/libopensub.so - rm -f ${DESTDIR}$(prefix)/usr/share/gnapi/info.glade - rm -f ${DESTDIR}$(prefix)/usr/share/gnapi/napi_config.glade - rm -f ${DESTDIR}$(prefix)/usr/share/gnapi/os_config.glade - rm -f ${DESTDIR}$(prefix)/usr/share/gnapi/scan.glade - rm -f ${DESTDIR}$(prefix)/usr/share/man/man1/gnapi.1.gz - rm -f ${DESTDIR}$(prefix)/usr/share/applications/gnapi.desktop - rm -f ${DESTDIR}$(prefix)/usr/share/apps/konqueror/servicemenus/gnapi-kde.desktop - rm -f ${DESTDIR}$(prefix)/usr/share/apps/dolphin/servicemenus/gnapi-kde.desktop - rm -f ${DESTDIR}$(prefix)/usr/share/kde4/services/ServiceMenus/gnapi-kde4.desktop - rm -f ${DESTDIR}$(prefix)/usr/share/Thunar/sendto/gnapi-kde.desktop - rm -f ${DESTDIR}$(prefix)/usr/share/docs/gnapi/copyright - rm -f ${DESTDIR}$(prefix)/usr/share/pixmaps/gnapi/v-bo.png - rm -f ${DESTDIR}$(prefix)/usr/share/pixmaps/gnapi/v-warn.png - rm -f ${DESTDIR}$(prefix)/usr/share/pixmaps/gnapi/v-15.png - rm -f ${DESTDIR}$(prefix)/usr/share/pixmaps/gnapi/v-18.png - rm -f ${DESTDIR}$(prefix)/usr/share/pixmaps/gnapi/downloading.png - rm -f ${DESTDIR}$(prefix)/usr/share/pixmaps/gnapi/gnapi.png - rm -f ${DESTDIR}$(prefix)/usr/share/locale/pl/LC_MESSAGES/gnapi.mo - rmdir ${DESTDIR}$(prefix)/usr/lib/gnapi/plugins - rmdir ${DESTDIR}$(prefix)/usr/lib/gnapi - rmdir ${DESTDIR}$(prefix)/usr/share/gnapi - rmdir ${DESTDIR}$(prefix)/usr/share/docs/gnapi - rmdir ${DESTDIR}$(prefix)/usr/share/pixmaps/gnapi - diff -Nru gnapi-0.2.1-0ubuntu/.svn/text-base/README.svn-base gnapi-0.2.2-0ubuntu/.svn/text-base/README.svn-base --- gnapi-0.2.1-0ubuntu/.svn/text-base/README.svn-base 2010-08-14 20:11:30.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/.svn/text-base/README.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - -Gnapi 0.2.1 - - - -README - - - - *** What is Gnapi ? - - Gnapi is subtitles downloader for *nix systems. It was designed to download subtitles from closed - Napiprojekt.pl database. - This version can be extended by plugins. Plugins supplied with Gnapi: - - libnapi - orginal Napiprojekt plugin, - - linopensub - OpenSubtitles database plugin, - - libnautilus-gnapi - Nautilus integration plugin. - - - - *** How to install ? - - See INSTALL. - - - - *** Misc links - - - http://gnapi.sourceforge.net - diff -Nru gnapi-0.2.1-0ubuntu/.svn/text-base/TODO.svn-base gnapi-0.2.2-0ubuntu/.svn/text-base/TODO.svn-base --- gnapi-0.2.1-0ubuntu/.svn/text-base/TODO.svn-base 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/.svn/text-base/TODO.svn-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ - -Gnapi 0.2.1 - - - -TODO - - - - *** Gnapi engine - - - new/rewrited engine (0.3) - - use gmodule (0.2.2) - - plugins priority (0.2.2) - - other plugin types (0.4) - - autotools/automake/libtool (0.3) - - - - *** Napiprojekt plugin - - - upload film info (0.3) - - - - *** OpenSubtitles plugin - - - upload subtitles (0.3) - - handle multiple files archives (0.2.3) - - - - *** Nautilus plugin - - - diff -Nru gnapi-0.2.1-0ubuntu/TODO gnapi-0.2.2-0ubuntu/TODO --- gnapi-0.2.1-0ubuntu/TODO 2010-11-09 13:23:43.000000000 +0000 +++ gnapi-0.2.2-0ubuntu/TODO 2011-03-22 16:57:41.000000000 +0000 @@ -1,5 +1,5 @@ -Gnapi 0.2.1 +Gnapi 0.2.2