# this script replaces the line
# appname = 'Nextcloud'
# with the correct branding name in the syncstate.py script
-sed -i.org -e 's/appname\s*=\s*'"'"'Nextcloud'"'/appname = '$1'/" syncstate.py
+# It also replaces the occurences in the class name so several
+# branding can be loaded (see #6524)
+sed -i.org -e "s/Nextcloud/$1/g" syncstate.py
from gi.repository import GObject, Nautilus
-# Please do not touch the following line.
-# The reason is that we use a script to adopt this file for branding
-# by replacing this line with the branding app name. If the following
-# line is changed, the script can not match the pattern and fails.
+# Note: setappname.sh will search and replace 'ownCloud' on this file to update this line and other
+# occurrences of the name
appname = 'Nextcloud'
print("Initializing "+appname+"-client-nautilus extension")
socketConnect = SocketConnect()
-class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
+class MenuExtension_ownCloud(GObject.GObject, Nautilus.MenuProvider):
def __init__(self):
GObject.GObject.__init__(self)
socketConnect.sendCommand(action + ":" + filename + "\n")
-class SyncStateExtension(GObject.GObject, Nautilus.InfoProvider):
+class SyncStateExtension_ownCloud(GObject.GObject, Nautilus.InfoProvider):
def __init__(self):
GObject.GObject.__init__(self)