[Pkg-owncloud-commits] [owncloud-client] 141/219: Nautilus: Renamed nautilus plugin script to make it branding friendly
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 11 14:43:19 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 09be4d22eee1373876019fc13b66bf467629b181
Author: Klaas Freitag <freitag at owncloud.com>
Date: Mon Sep 22 12:24:06 2014 +0200
Nautilus: Renamed nautilus plugin script to make it branding friendly
---
shell_integration/nautilus/CMakeLists.txt | 3 +--
shell_integration/nautilus/fixbranding.sh.in | 4 ----
.../nautilus/{ownCloud.py => syncstate.py} | 24 ++++++++++++++++------
3 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/shell_integration/nautilus/CMakeLists.txt b/shell_integration/nautilus/CMakeLists.txt
index 93824b1..45e73cf 100644
--- a/shell_integration/nautilus/CMakeLists.txt
+++ b/shell_integration/nautilus/CMakeLists.txt
@@ -1,3 +1,2 @@
-configure_file(fixbranding.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fixbranding.sh)
-install(FILES ${APPLICATION_EXECUTABLE}.py DESTINATION ${DATADIR}/nautilus-python/extensions)
+install(FILES syncstate.py DESTINATION ${DATADIR}/nautilus-python/extensions)
diff --git a/shell_integration/nautilus/fixbranding.sh.in b/shell_integration/nautilus/fixbranding.sh.in
deleted file mode 100644
index 360951e..0000000
--- a/shell_integration/nautilus/fixbranding.sh.in
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-sed 's/oC_/@APPLICATION_EXECUTABLE at _/' ownCloud.py
-mv ownCloud.py @APPLICATION_EXECUTABLE at .py
diff --git a/shell_integration/nautilus/ownCloud.py b/shell_integration/nautilus/syncstate.py
similarity index 85%
rename from shell_integration/nautilus/ownCloud.py
rename to shell_integration/nautilus/syncstate.py
index 2a4c8d6..ca98fa4 100755
--- a/shell_integration/nautilus/ownCloud.py
+++ b/shell_integration/nautilus/syncstate.py
@@ -1,4 +1,16 @@
#!/usr/bin/python3
+#
+# Copyright (C) by Klaas Freitag <freitag at owncloud.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
import os
import urllib
@@ -6,7 +18,7 @@ import socket
from gi.repository import GObject, Nautilus
-class ownCloudExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.InfoProvider):
+class syncStateExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.InfoProvider):
nautilusVFSFile_table = {}
registered_paths = {}
@@ -15,15 +27,15 @@ class ownCloudExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.InfoP
watch_id = 0
def __init__(self):
- self.connectToOwnCloud
+ self.connectToSocketServer
if not self.connected:
# try again in 5 seconds - attention, logic inverted!
- GObject.timeout_add(5000, self.connectToOwnCloud)
+ GObject.timeout_add(5000, self.connectToSocketServer)
def port(self):
return 34001 # Fixme, read from config file.
- def connectToOwnCloud(self):
+ def connectToSocketServer(self):
try:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.sock.connect(("localhost", self.port()))
@@ -43,7 +55,7 @@ class ownCloudExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.InfoP
print("Sending failed.")
GObject.source_remove(self.watch_id)
self.connected = False
- GObject.timeout_add(5000, self.connectToOwnCloud)
+ GObject.timeout_add(5000, self.connectToSocketServer)
def find_item_for_file(self, path):
if path in self.nautilusVFSFile_table:
@@ -116,7 +128,7 @@ class ownCloudExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.InfoP
self.sock.close()
self.connected = False
GObject.source_remove(self.watch_id)
- GObject.timeout_add(5000, self.connectToOwnCloud)
+ GObject.timeout_add(5000, self.connectToSocketServer)
else:
# print "We got unknown action " + action
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list