Skip to content

Commit

Permalink
Merge pull request #6418 from mammo0/fix_3803
Browse files Browse the repository at this point in the history
fix: Nautilus integration conflicts with ownCloud
  • Loading branch information
mgallien authored Feb 10, 2025
2 parents 8f6ed83 + 5fad9da commit 2fcd4f6
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions shell_integration/nautilus/syncstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

from gi.repository import GObject, Nautilus

# Note: setappname.sh will search and replace 'ownCloud' on this file to update this line and other
# Note: setappname.sh will search and replace 'Nextcloud' on this file to update this line and other
# occurrences of the name
appname = 'Nextcloud'

Expand Down Expand Up @@ -175,7 +175,7 @@ def _get_version(self, action, args):
socketConnect = SocketConnect()


class MenuExtension_ownCloud(GObject.GObject, Nautilus.MenuProvider):
class MenuExtension_Nextcloud(GObject.GObject, Nautilus.MenuProvider):
def __init__(self):
GObject.GObject.__init__(self)

Expand Down Expand Up @@ -270,18 +270,18 @@ def ask_for_menu_items(self, files):
if len(menu_items) == 0:
return []

# Set up the 'ownCloud...' submenu
item_owncloud = Nautilus.MenuItem(
# Set up the 'Nextcloud...' submenu
item_nextcloud = Nautilus.MenuItem(
name='IntegrationMenu', label=self.strings.get('CONTEXT_MENU_TITLE', appname))
menu = Nautilus.Menu()
item_owncloud.set_submenu(menu)
item_nextcloud.set_submenu(menu)

for action, enabled, label in menu_items:
item = Nautilus.MenuItem(name=action, label=label, sensitive=enabled)
item.connect("activate", self.context_menu_action, action, filesstring)
menu.append_item(item)

return [item_owncloud]
return [item_nextcloud]


def legacy_menu_items(self, files):
Expand Down Expand Up @@ -315,11 +315,11 @@ def legacy_menu_items(self, files):
if not shareable:
return []

# Set up the 'ownCloud...' submenu
item_owncloud = Nautilus.MenuItem(
# Set up the 'Nextcloud...' submenu
item_nextcloud = Nautilus.MenuItem(
name='IntegrationMenu', label=self.strings.get('CONTEXT_MENU_TITLE', appname))
menu = Nautilus.Menu()
item_owncloud.set_submenu(menu)
item_nextcloud.set_submenu(menu)

# Add share menu option
item = Nautilus.MenuItem(
Expand All @@ -342,15 +342,15 @@ def legacy_menu_items(self, files):
item_emailprivatelink.connect("activate", self.context_menu_action, 'EMAIL_PRIVATE_LINK', filename)
menu.append_item(item_emailprivatelink)

return [item_owncloud]
return [item_nextcloud]


def context_menu_action(self, menu, action, filename):
# print("Context menu: " + action + ' ' + filename)
socketConnect.sendCommand(action + ":" + filename + "\n")


class SyncStateExtension_ownCloud(GObject.GObject, Nautilus.InfoProvider):
class SyncStateExtension_Nextcloud(GObject.GObject, Nautilus.InfoProvider):
def __init__(self):
GObject.GObject.__init__(self)

Expand Down

0 comments on commit 2fcd4f6

Please sign in to comment.