Permalink
Browse files

Normalized command names and their prefixing

  • Loading branch information...
1 parent c882393 commit b221fd059ec923a8e59247270428dc13b4d6915e @NoxArt committed Jun 26, 2012
Showing with 20 additions and 9 deletions.
  1. +8 −4 Context.sublime-menu
  2. +1 −1 Default.sublime-commands
  3. +9 −2 FTPSync.py
  4. +1 −1 Main.sublime-menu
  5. +1 −1 Side Bar.sublime-menu
View
@@ -1,12 +1,16 @@
[
- { "caption": "-" },
- {
+ { "caption": "-" },
+ {
+ "caption": "Check this file",
+ "command": "ftp_sync_check_current"
+ },
+ {
"caption": "Upload this file",
- "command": "sync_current"
+ "command": "ftp_sync_current"
},
{
"caption": "Download this file",
- "command": "sync_down_current"
+ "command": "ftp_sync_down_current"
},
{ "caption": "-" }
]
@@ -1,7 +1,7 @@
[
{
"caption": "FTPSync: Setup FTPSync in this folder",
- "command": "new_ftp_sync",
+ "command": "ftp_sync_new_settings",
"args": {"dirs": []}
},
{
View
@@ -914,6 +914,8 @@ def sync(index):
+# ==== Watching ===========================================================================
+
# File watching
class RemoteSync(sublime_plugin.EventListener):
def on_post_save(self, view):
@@ -933,6 +935,8 @@ def on_load(self, view):
+# ==== Threading ===========================================================================
+
# Remote handling
class RemoteSyncCall(threading.Thread):
def __init__(self, file_path, config, onSave, disregardIgnore=False, whitelistConnections=[]):
@@ -1000,8 +1004,11 @@ def run(self):
performSyncRename(self.file_path, self.config, self.new_name)
+
+# ==== Commands ===========================================================================
+
# Sets up a config file in a directory
-class NewFtpSyncCommand(sublime_plugin.TextCommand):
+class FtpSyncNewSettings(sublime_plugin.TextCommand):
def run(self, edit, dirs):
if len(dirs) == 0:
dirs = [os.path.dirname(self.view.file_name())]
@@ -1086,6 +1093,6 @@ def rename(self, new_name):
# Removes given file(s) or folders
-class SyncDelete(sublime_plugin.TextCommand):
+class FtpSyncDelete(sublime_plugin.TextCommand):
def run(self, edit, paths):
pass
View
@@ -26,7 +26,7 @@
"caption": "Settings – User"
},
{
- "command": "new_ftp_sync",
+ "command": "ftp_sync_new_settings",
"caption": "Setup FTPSync in this folder",
"args": {"dirs": []}
},
@@ -8,7 +8,7 @@
{ "caption": "Download", "command": "ftp_sync_down_target", "args": {"paths": []} },
{ "caption": "Download Forced", "command": "ftp_sync_down_target", "args": {"paths": [], "forced": true} },
{ "caption": "-" },
- { "caption": "Setup FTPSync in this folder", "command": "new_ftp_sync", "args": {"dirs": []} }
+ { "caption": "Setup FTPSync in this folder", "command": "ftp_sync_new_settings", "args": {"dirs": []} }
]
}
]

0 comments on commit b221fd0

Please sign in to comment.