Esempio n. 1
0
        public override void Initialize()
        {
            base.Initialize();

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

            this.watcher.Changed += OnFilesChanged;
        }
Esempio n. 2
0
        public override void Initialize ()
        {
            base.Initialize ();

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

            this.watcher.Changed += OnFilesChanged;
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
        }
        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++;
                }
            };

        }
Esempio n. 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++;
                }
            };
        }
Esempio n. 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;
        }
Esempio n. 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;
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 11
0
        public override void Initialize()
        {
            base.Initialize ();

            BaseRepository.UseCustomWatcher = true;

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