Commit 75638798 authored by Adam Plumb's avatar Adam Plumb
Browse files

Update docs with new 0.5.0 updates

parent 12ad4124
......@@ -7,6 +7,7 @@ Makefile
Makefile.in
depcomp
stamp-h1
*.stamp
missing
*.tar.gz
*.tar.bz2
......@@ -21,4 +22,8 @@ configure
configure.ac
*.m4
*.make
docs/*.html
docs/*.png
docs/*.css
builddate.xml
*.devhelp2
......@@ -71,7 +71,7 @@ class ThunarxMenuProviderPlugin(GObject.GObject, Thunarx.MenuProvider):
return [Thunarx.MenuItem(name="TMP:TestFolderAction", label="Python Folder Action", tooltip='', icon=Gtk.STOCK_OPEN)]
def __do_something(self, item, window):
print "Doing something"
print("Doing something")
</programlisting>
</example>
......@@ -112,10 +112,10 @@ class ThunarxSubMenuProviderPlugin(GObject.GObject, Thunarx.MenuProvider):
return item,item2
def __subitem1_callback(self, item, window):
print "Subitem1 call"
print("Subitem1 call")
def __subitem2_callback(self, item, window):
print "Subitem2 call"
print("Subitem2 call")
</programlisting>
</example>
......
......@@ -27,7 +27,7 @@ class ThunarxMenuProviderPlugin(GObject.GObject, Thunarx.MenuProvider):
return [Thunarx.MenuItem(name="TMP:TestFolderAction", label="Python Folder Action", tooltip='', icon=Gtk.STOCK_OPEN)]
def __do_something(self, item, window):
print "Doing something"
print("Doing something")
</programlisting>
</example>
......
......@@ -27,12 +27,26 @@
<para>As of thunarx-python 0.3.0, python extensions are installed in $XDG_DATA_DIR/thunarx-python/extensions where $XDG_DATA_DIR
could be /usr/share for a global install or ~/.local/share for a local install.</para>
</note>
<note>
<para>As of thunarx-python 0.5.0, python extensions are loaded in the following order:
1. $XDG_DATA_HOME/thunarx-python/extensions
2. thunar_prefix/share/thunarx-python/extensions
3. $XDG_DATA_DIRS/thunarx-python/extensions
4. THUNARX_EXTENSION_DIR/python (i.e. /usr/lib64/thunarx-3/python)</para>
</note>
<note>
<title>thunarx-3</title>
<para>As of thunar v1.7.0, thunarx requires Gtk+3 and no longer accepts gtk.Actions. Instead, it expects Thunarx.MenuItems.</para>
</note>
<note>
<title>python3</title>
<para>As of thunarx-python v0.5.0, thunarx-python can be built to embed python3 instead of python2. It uses the $PYTHON environment variable to determine which library to use.</para>
</note>
<xi:include href="thunarx-python-overview-example.xml"/>
</chapter>
......
......@@ -51,6 +51,7 @@ class DialogExample(Gtk.Dialog):
Gtk.STOCK_OK, Gtk.ResponseType.OK))
self.set_default_size(150, 100)
self.set_transient_for(parent)
label = Gtk.Label("This is a dialog to display additional information")
......
......@@ -41,7 +41,12 @@
<title>A Thunarx.PropertyPageProvider plugin</title>
<programlisting>
import hashlib
import urllib
# A way to get unquote working with python 2 and 3
try:
from urllib import unquote
except ImportError:
from urllib.parse import unquote
from gi.repository import GObject, Gtk, Thunarx
......@@ -59,8 +64,8 @@ class ThunarxPropertyPagePlugin(GObject.GObject, Thunarx.PropertyPageProvider):
if file.is_directory():
return
filename = urllib.unquote(file.get_uri()[7:])
filename = unquote(file.get_uri()[7:])
hbox = Gtk.HBox(0, False)
hbox.show()
......@@ -72,7 +77,7 @@ class ThunarxPropertyPagePlugin(GObject.GObject, Thunarx.PropertyPageProvider):
value_label = Gtk.Label()
hbox.pack_start(value_label, True, True, 0)
md5sum = hashlib.md5(filename).hexdigest()
md5sum = hashlib.md5(filename.encode("utf-8")).hexdigest()
value_label.set_text(md5sum)
value_label.show()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment