Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Nautilus integration conflicts with ownCloud #6418

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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