From 84b069419f964010b321f098879dc63fc418f806 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sat, 11 Sep 2010 17:03:28 +0100 Subject: [PATCH] tmpcommit --- SparkleLib/SparkleListener.cs | 31 +++++++++++++++++++++++++++++++ SparkleLib/SparkleRepo.cs | 4 ++-- SparkleShare/SparkleUI.cs | 23 ++++++++++++++++++----- 3 files changed, 51 insertions(+), 7 deletions(-) create mode 100644 SparkleLib/SparkleListener.cs diff --git a/SparkleLib/SparkleListener.cs b/SparkleLib/SparkleListener.cs new file mode 100644 index 00000000..070ec697 --- /dev/null +++ b/SparkleLib/SparkleListener.cs @@ -0,0 +1,31 @@ +// SparkleShare, an instant update workflow to Git. +// Copyright (C) 2010 Hylke Bons +// +// 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 3 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. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using Meebey.SmartIrc4net; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SparkleLib { + + public class SparkleListener + { + + + + } + +} diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index 333e2d65..bb65d7a7 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -74,8 +74,8 @@ namespace SparkleLib { public SparkleRepo (string path) { - if (!Directory.Exists (path)) - Directory.CreateDirectory (path); + SparkleListener listener = new SparkleListener (); + LocalPath = path; Name = Path.GetFileName (LocalPath); diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs index 91ef2a93..e74f0fb9 100644 --- a/SparkleShare/SparkleUI.cs +++ b/SparkleShare/SparkleUI.cs @@ -416,8 +416,14 @@ namespace SparkleShare { Repositories.Add (repo); - if (StatusIcon != null) - Application.Invoke (delegate { StatusIcon.CreateMenu (); }); + if (StatusIcon != null) { + + Application.Invoke (delegate { + StatusIcon.CreateMenu (); + StatusIcon.ShowState (); + }); + + } } @@ -441,8 +447,14 @@ namespace SparkleShare { } - if (StatusIcon != null) - Application.Invoke (delegate { StatusIcon.CreateMenu (); }); + if (StatusIcon != null) { + + Application.Invoke (delegate { + StatusIcon.CreateMenu (); + StatusIcon.ShowState (); + }); + + } } @@ -457,7 +469,8 @@ namespace SparkleShare { foreach (string folder_path in Directory.GetDirectories (SparklePaths.SparklePath)) AddRepository (folder_path); - StatusIcon.ShowState (); + if (StatusIcon != null) + StatusIcon.ShowState (); }