예제 #1
0
        public override void Initialize()
        {
            base.Initialize();

            SparkleRepoBase.UseCustomWatcher = true;
            this.watcher = new SparkleMacWatcher(Program.Controller.FoldersPath);

            this.watcher.Changed += OnFilesChanged;
        }
예제 #2
0
        public override void Initialize ()
        {
            base.Initialize ();

            SparkleRepoBase.UseCustomWatcher = true;
            this.watcher = new SparkleMacWatcher (Program.Controller.FoldersPath);

            this.watcher.Changed += OnFilesChanged;
        }
예제 #3
0
        // Creates the SparkleShare folder in the user's home folder
        public override bool CreateSparkleShareFolder()
        {
            this.watcher = new SparkleMacWatcher(SparkleConfig.DefaultConfig.FoldersPath);

            if (!Directory.Exists(SparkleConfig.DefaultConfig.FoldersPath))
            {
                Directory.CreateDirectory(SparkleConfig.DefaultConfig.FoldersPath);
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #4
0
        public override bool CreateSparkleShareFolder()
        {
            this.watcher = new SparkleMacWatcher(Program.Controller.FoldersPath);

            if (!Directory.Exists(Program.Controller.FoldersPath))
            {
                Directory.CreateDirectory(Program.Controller.FoldersPath);
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #5
0
        public override bool CreateSparkleShareFolder()
        {
            this.watcher = new SparkleMacWatcher(Program.Controller.FoldersPath);

            if (!Directory.Exists(Program.Controller.FoldersPath))
            {
                Directory.CreateDirectory(Program.Controller.FoldersPath);

                NSWorkspace.SharedWorkspace.SetIconforFile(NSImage.ImageNamed("sparkleshare-folder.icns"),
                                                           Program.Controller.FoldersPath, 0);

                return(true);
            }

            return(false);
        }
예제 #6
0
        public override void Initialize ()
        {
            base.Initialize ();

            SparkleRepoBase.UseCustomWatcher = true;
            this.watcher = new SparkleMacWatcher (Program.Controller.FoldersPath);

            this.watcher.Changed += delegate (string path) {
                FileSystemEventArgs fse_args = new FileSystemEventArgs (WatcherChangeTypes.Changed, path, "Unknown_File");
                FileActivityTask [] tasks = new FileActivityTask [Repositories.Length];

                // FIXME: There are cases where the wrong repo is triggered, so
                // we trigger all of them for now. Causes only slightly more overhead
                int i = 0;
                foreach (SparkleRepoBase repo in Repositories) {
                    tasks [i] = MacActivityTask (repo, fse_args);
                    tasks [i] ();
                    i++;
                }
            };

        }
예제 #7
0
        public override void Initialize()
        {
            base.Initialize();

            SparkleRepoBase.UseCustomWatcher = true;
            this.watcher = new SparkleMacWatcher(Program.Controller.FoldersPath);

            this.watcher.Changed += delegate(string path) {
                FileSystemEventArgs fse_args = new FileSystemEventArgs(WatcherChangeTypes.Changed, path, "Unknown_File");
                FileActivityTask [] tasks    = new FileActivityTask [Repositories.Length];

                // FIXME: There are cases where the wrong repo is triggered, so
                // we trigger all of them for now. Causes only slightly more overhead
                int i = 0;
                foreach (SparkleRepoBase repo in Repositories)
                {
                    tasks [i] = MacActivityTask(repo, fse_args);
                    tasks [i] ();
                    i++;
                }
            };
        }
예제 #8
0
        public override bool CreateSparkleShareFolder()
        {
            this.watcher = new SparkleMacWatcher (Program.Controller.FoldersPath);

            if (!Directory.Exists (Program.Controller.FoldersPath)) {
                Directory.CreateDirectory (Program.Controller.FoldersPath);

                NSWorkspace.SharedWorkspace.SetIconforFile (NSImage.ImageNamed ("sparkleshare-folder.icns"),
                    Program.Controller.FoldersPath, 0);

                return true;
            }

            return false;
        }
예제 #9
0
        // Creates the SparkleShare folder in the user's home folder
        public override bool CreateSparkleShareFolder()
        {
            this.watcher = new SparkleMacWatcher (SparkleConfig.DefaultConfig.FoldersPath);

            if (!Directory.Exists (SparkleConfig.DefaultConfig.FoldersPath)) {
                Directory.CreateDirectory (SparkleConfig.DefaultConfig.FoldersPath);
                return true;

            } else {
                return false;
            }
        }
예제 #10
0
        public override bool CreateSparkleShareFolder()
        {
            this.watcher = new SparkleMacWatcher (Program.Controller.FoldersPath);

            if (!Directory.Exists (Program.Controller.FoldersPath)) {
                Directory.CreateDirectory (Program.Controller.FoldersPath);
                return true;

            } else {
                return false;
            }
        }
예제 #11
0
        public override void Initialize()
        {
            base.Initialize ();

            BaseRepository.UseCustomWatcher = true;

            this.watcher = new SparkleMacWatcher (SparkleShare.Controller.FoldersPath);
            this.watcher.Changed += OnFilesChanged;
        }