Closed SunyataZero closed 8 years ago
Warning:
sys:1: PyGIWarning: Nautilus was imported without specifying a version first. Use gi.require_version('Nautilus', '3.0') before import to ensure that the right version gets loaded.
https://github.com/brunonova/nautilus-admin https://github.com/dropbox/nautilus-dropbox https://launchpad.net/ubuntu/+source/gnome-mplayer/+index Under "Community": https://wiki.gnome.org/Projects/NautilusPython
http://askubuntu.com/questions/186509/how-do-i-make-a-custom-right-click-command-for-nautilus
https://github.com/dave-theunsub/clamtk/issues/36
What about giving the user a warning and confirm button before removing all? Something like this:
You are about to remove more than one virus at the same time. Please consider carefully before proceeding since ___
nautilus-python extensions can be stored here ~/.local/share/nautilus-python/extensions
or here /usr/share/nautilus-python/extensions/clamtk.py
This command line text output (shown when running nautilus
from the command line) can be ignored because it is seen even when our code is not running:
sunyata@sunyata-Aspire-ES1-131:/usr/share/nautilus-python/extensions$ nautilus
(nautilus:4382): Gtk-WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
sys:1: PyGIWarning: Nautilus was imported without specifying a version first. Use gi.require_version('Nautilus', '3.0') before import to ensure that the right version gets loaded.
Initializing nautilus-dropbox 2015.10.28
** (nautilus:4382): CRITICAL **: nautilus_menu_provider_get_background_items: assertion 'NAUTILUS_IS_MENU_PROVIDER (provider)' failed
I managed to run clamtk-gnome without having installed the python-gobject .deb package on my Lubuntu distro with LXDE
http://inventwithpython.com/blog/2014/12/20/translate-your-python-3-program-with-the-gettext-module/
gettext ref: https://docs.python.org/2/library/gettext.html
To make sure that when a string is translated whith the good characters, I format my string like this: print(_(u"My_string")) To encode it in utf-8 (to have accent in some languages like french or spanish).
Other alternatives: http://stackoverflow.com/questions/14682933/chinese-and-japanese-character-support-in-python
/usr/bin/pygettext -d clamtk clamtk.py
...so we don't need to download the source from the website that is linked to in the tutorial
https://help.launchpad.net/Translations/YourProject
https://wiki.ubuntu.com/UbuntuDevelopment/Internationalisation/InternationalizationPrimer/Gettext
Debian packages: https://www.debian.org/doc/manuals/maint-guide/dreq.en.html
sunyata@sunyata-Aspire-ES1-131:~$ locate clamtk.py /home/sunyata/PycharmProjects/clamtk-gnome/clamtk.py /home/sunyata/PycharmProjects/clamtk-gnome/clamtk.py.bak /usr/share/nautilus-python/extensions/clamtk.py sunyata@sunyata-Aspire-ES1-131:~$
sunyata@sunyata-Aspire-ES1-131:/usr/share/locale/sv/LC_MESSAGES$ ll clamtk* -rw-r--r-- 1 root root 12942 okt 24 2015 clamtk.mo sunyata@sunyata-Aspire-ES1-131:/usr/share/locale/sv/LC_MESSAGES$
About desktop files: https://specifications.freedesktop.org/desktop-entry-spec/latest/
killall nautilus
clamtk bug: command line clamtk only accepts a full path for the directories, ex:
sunyata@sunyata-Aspire-ES1-131:~/PycharmProjects/clamtk-gnome$ clamtk /home/sunyata/Pictures/