[f-spot] Renamed ImportSource to IImportSource
- From: Stephen Shaw <sshaw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot] Renamed ImportSource to IImportSource
- Date: Mon, 5 Dec 2011 01:04:27 +0000 (UTC)
commit d25bef67a872327c31e48de96bc1415ebec199f2
Author: Stephen Shaw <sshaw decriptor com>
Date: Sun Dec 4 17:43:23 2011 -0700
Renamed ImportSource to IImportSource
Since its an interface I figured we'd follow
the interface file naming convention
.../MainApp/FSpot.Import/FileImportSource.cs | 2 +-
.../{ImportSource.cs => IImportSource.cs} | 0
.../MainApp/FSpot.Import/ImportController.cs | 14 +++++++-------
.../MainApp/FSpot.UI.Dialog/ImportDialog.cs | 10 +++++-----
src/Clients/MainApp/MainApp.csproj | 2 +-
src/Clients/MainApp/Makefile.am | 2 +-
6 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/src/Clients/MainApp/FSpot.Import/FileImportSource.cs b/src/Clients/MainApp/FSpot.Import/FileImportSource.cs
index 4cea7a5..337abfe 100644
--- a/src/Clients/MainApp/FSpot.Import/FileImportSource.cs
+++ b/src/Clients/MainApp/FSpot.Import/FileImportSource.cs
@@ -38,7 +38,7 @@ using Mono.Unix.Native;
namespace FSpot.Import
{
- internal class FileImportSource : ImportSource
+ internal class FileImportSource : IImportSource
{
public string Name { get; set; }
diff --git a/src/Clients/MainApp/FSpot.Import/ImportSource.cs b/src/Clients/MainApp/FSpot.Import/IImportSource.cs
similarity index 100%
rename from src/Clients/MainApp/FSpot.Import/ImportSource.cs
rename to src/Clients/MainApp/FSpot.Import/IImportSource.cs
diff --git a/src/Clients/MainApp/FSpot.Import/ImportController.cs b/src/Clients/MainApp/FSpot.Import/ImportController.cs
index 6320b55..292878f 100644
--- a/src/Clients/MainApp/FSpot.Import/ImportController.cs
+++ b/src/Clients/MainApp/FSpot.Import/ImportController.cs
@@ -127,8 +127,8 @@ namespace FSpot.Import
#region Source Scanning
- private List<ImportSource> sources;
- public List<ImportSource> Sources {
+ private List<IImportSource> sources;
+ public List<IImportSource> Sources {
get {
if (sources == null)
sources = ScanSources ();
@@ -136,10 +136,10 @@ namespace FSpot.Import
}
}
- List<ImportSource> ScanSources ()
+ List<IImportSource> ScanSources ()
{
var monitor = GLib.VolumeMonitor.Default;
- var sources = new List<ImportSource> ();
+ var sources = new List<IImportSource> ();
foreach (var mount in monitor.Mounts) {
var root = new SafeUri (mount.Root.Uri, true);
@@ -187,8 +187,8 @@ namespace FSpot.Import
#region Source Switching
- private ImportSource active_source;
- public ImportSource ActiveSource {
+ private IImportSource active_source;
+ public IImportSource ActiveSource {
set {
if (value == active_source)
return;
@@ -203,7 +203,7 @@ namespace FSpot.Import
}
}
- void DeactivateSource (ImportSource source)
+ void DeactivateSource (IImportSource source)
{
if (source == null)
return;
diff --git a/src/Clients/MainApp/FSpot.UI.Dialog/ImportDialog.cs b/src/Clients/MainApp/FSpot.UI.Dialog/ImportDialog.cs
index 0ec91e7..e5f2104 100644
--- a/src/Clients/MainApp/FSpot.UI.Dialog/ImportDialog.cs
+++ b/src/Clients/MainApp/FSpot.UI.Dialog/ImportDialog.cs
@@ -46,7 +46,7 @@ namespace FSpot.UI.Dialog
private ImportController Controller { get; set; }
private TreeStore Sources { get; set; }
- private static Dictionary<string, ImportSource> history_sources = new Dictionary<string, ImportSource> ();
+ private static Dictionary<string, IImportSource> history_sources = new Dictionary<string, IImportSource> ();
[GtkBeans.Builder.Object] Button cancel_button;
[GtkBeans.Builder.Object] Button import_button;
@@ -133,7 +133,7 @@ namespace FSpot.UI.Dialog
void ScanSources ()
{
// Populates the source combo box
- Sources = new TreeStore (typeof(ImportSource), typeof(string), typeof(string), typeof(bool));
+ Sources = new TreeStore (typeof(IImportSource), typeof(string), typeof(string), typeof(bool));
sources_combo.Model = Sources;
sources_combo.RowSeparatorFunc = (m, i) => (m.GetValue (i, 1) as string) == String.Empty;
var render = new CellRendererPixbuf ();
@@ -156,7 +156,7 @@ namespace FSpot.UI.Dialog
});
}
- void PopulateSourceCombo (ImportSource source_to_activate)
+ void PopulateSourceCombo (IImportSource source_to_activate)
{
int activate_index = 0;
sources_combo.Changed -= OnSourceComboChanged;
@@ -245,7 +245,7 @@ namespace FSpot.UI.Dialog
public void SwitchToFolderSource (SafeUri uri)
{
- ImportSource source = null;
+ IImportSource source = null;
if (!history_sources.TryGetValue (uri, out source)) {
var name = uri.GetFilename ();
source = new FileImportSource (uri, name, "folder");
@@ -269,7 +269,7 @@ namespace FSpot.UI.Dialog
TreeIter iter;
sources_combo.GetActiveIter (out iter);
- var source = Sources.GetValue (iter, 0) as ImportSource;
+ var source = Sources.GetValue (iter, 0) as IImportSource;
if (source == null) {
var label = (string) Sources.GetValue (iter, 1);
if (label == select_folder_label) {
diff --git a/src/Clients/MainApp/MainApp.csproj b/src/Clients/MainApp/MainApp.csproj
index fe296fd..d38daa3 100644
--- a/src/Clients/MainApp/MainApp.csproj
+++ b/src/Clients/MainApp/MainApp.csproj
@@ -97,7 +97,6 @@
<Compile Include="FSpot.Imaging\Tiff.cs" />
<Compile Include="FSpot.Import\FileImportSource.cs" />
<Compile Include="FSpot.Import\ImportController.cs" />
- <Compile Include="FSpot.Import\ImportSource.cs" />
<Compile Include="FSpot.Import\MetadataImporter.cs" />
<Compile Include="FSpot\InfoOverlay.cs" />
<Compile Include="FSpot\ItemAction.cs" />
@@ -209,6 +208,7 @@
<Compile Include="Pinta\GaussianBlurEffect.cs" />
<Compile Include="FSpot\Literal.cs" />
<Compile Include="FSpot.Imaging\IImageFile.cs" />
+ <Compile Include="FSpot.Import\IImportSource.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\..\..\COPYING">
diff --git a/src/Clients/MainApp/Makefile.am b/src/Clients/MainApp/Makefile.am
index 50bed0a..6838570 100644
--- a/src/Clients/MainApp/Makefile.am
+++ b/src/Clients/MainApp/Makefile.am
@@ -59,8 +59,8 @@ SOURCES = \
FSpot.Imaging/Tests/ImageFileTests.cs \
FSpot.Imaging/Tiff.cs \
FSpot.Import/FileImportSource.cs \
+ FSpot.Import/IImportSource.cs \
FSpot.Import/ImportController.cs \
- FSpot.Import/ImportSource.cs \
FSpot.Import/MetadataImporter.cs \
FSpot.Jobs/CalculateHashJob.cs \
FSpot.Jobs/SyncMetadataJob.cs \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]