Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2018-06-04 14:48:31 +0300
committerOlivier Goffart <olivier@woboq.com>2018-06-19 20:38:31 +0300
commit841606d13825084fb3b9e056e4566e964373f4fa (patch)
tree099fcd342bd8f75d9c514578b24e45471c857432 /shell_integration
parent850dc67a256bc526d07b567dd8034aeeb3805985 (diff)
nautilus shell integration: Fix when there are several branded client installed
It appears that several extension can be loaded at the same time, but their classname for the extension need to be different, otherwise only the last loaded one would be active. Issue #6524
Diffstat (limited to 'shell_integration')
-rwxr-xr-xshell_integration/nautilus/setappname.sh4
-rw-r--r--shell_integration/nautilus/syncstate.py10
2 files changed, 7 insertions, 7 deletions
diff --git a/shell_integration/nautilus/setappname.sh b/shell_integration/nautilus/setappname.sh
index 1ca085941..ed01328bd 100755
--- a/shell_integration/nautilus/setappname.sh
+++ b/shell_integration/nautilus/setappname.sh
@@ -3,4 +3,6 @@
# this script replaces the line
# appname = 'ownCloud'
# with the correct branding name in the syncstate.py script
-sed -i.org -e 's/appname\s*=\s*'"'"'ownCloud'"'/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/ownCloud/$1/g" syncstate.py
diff --git a/shell_integration/nautilus/syncstate.py b/shell_integration/nautilus/syncstate.py
index b47987afd..bef94e56c 100644
--- a/shell_integration/nautilus/syncstate.py
+++ b/shell_integration/nautilus/syncstate.py
@@ -28,10 +28,8 @@ import time
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 = 'ownCloud'
print("Initializing "+appname+"-client-nautilus extension")
@@ -178,7 +176,7 @@ class SocketConnect(GObject.GObject):
socketConnect = SocketConnect()
-class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
+class MenuExtension_ownCloud(GObject.GObject, Nautilus.MenuProvider):
def __init__(self):
GObject.GObject.__init__(self)
@@ -346,7 +344,7 @@ class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
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)