[tasque/viewmodel: 26/78] Drop GnomeApplication.cs



commit 7035fff677b75781b99a64ebf2294df3bf37fd84
Author: Antonius Riha <antoniusriha gmail com>
Date:   Sat Jul 28 23:43:06 2012 +0200

    Drop GnomeApplication.cs

 src/Tasque.Gtk/GnomeApplication.cs |   59 ------------------------------------
 src/Tasque.Gtk/GtkApplication.cs   |   27 ++++++----------
 src/Tasque.Gtk/Tasque.Gtk.csproj   |    9 +----
 3 files changed, 12 insertions(+), 83 deletions(-)
---
diff --git a/src/Tasque.Gtk/GtkApplication.cs b/src/Tasque.Gtk/GtkApplication.cs
index a094d35..9c5ad18 100644
--- a/src/Tasque.Gtk/GtkApplication.cs
+++ b/src/Tasque.Gtk/GtkApplication.cs
@@ -24,31 +24,30 @@
 //      Sandy Armstrong <sanfordarmstrong gmail com>
 //      Antonius Riha <antoniusriha gmail com>
 // 
-
 using System;
 using System.IO;
-using Gtk;
+using System.Diagnostics;
 using Mono.Unix;
+using Gtk;
 using Tasque.UIModel.Legacy;
 
 namespace Tasque
 {
 	public class GtkApplication : NativeApplication
 	{
-		private string confDir;
-
 		public GtkApplication ()
 		{
 			confDir = Path.Combine (
-				Environment.GetFolderPath (
-				Environment.SpecialFolder.ApplicationData),
-				"tasque");
+				Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "tasque");
 			if (!Directory.Exists (confDir))
 				Directory.CreateDirectory (confDir);
 		}
+		
+		public override string ConfDir { get { return confDir; } }
 
 		public override void Initialize (string[] args)
 		{
+			Catalog.Init ("tasque", GlobalDefines.LocaleDir);
 			Gtk.Application.Init ();
 		}
 		
@@ -61,19 +60,11 @@ namespace Tasque
 		{
 			Gtk.Application.Quit ();
 		}
-
-		public override string ConfDir
-		{
-			get
-			{
-				return confDir;
-			}
-		}
-
+		
 		public override void OpenUrlInBrowser (string url)
 		{
 			try {
-				System.Diagnostics.Process.Start (url);
+				Process.Start (url);
 			} catch (Exception e) {
 				Trace.TraceError ("Error opening url [{0}]:\n{1}", url, e.ToString ());
 			}
@@ -137,5 +128,7 @@ namespace Tasque
 	</popup>
 </ui>
 ";
+		
+		string confDir;
 	}
 }
diff --git a/src/Tasque.Gtk/Tasque.Gtk.csproj b/src/Tasque.Gtk/Tasque.Gtk.csproj
index 94fe791..b95c064 100644
--- a/src/Tasque.Gtk/Tasque.Gtk.csproj
+++ b/src/Tasque.Gtk/Tasque.Gtk.csproj
@@ -113,6 +113,7 @@
     <Compile Include="CellRendererDate.cs" />
     <Compile Include="CompletedTaskGroup.cs" />
     <Compile Include="DateButton.cs" />
+    <Compile Include="GtkApplication.cs" />
     <Compile Include="NoteDialog.cs" />
     <Compile Include="NoteWidget.cs" />
     <Compile Include="Preferences.cs" />
@@ -123,16 +124,10 @@
     <Compile Include="TaskWindow.cs" />
     <Compile Include="Utilities.cs" />
   </ItemGroup>
-  <ItemGroup Condition=" '$(Configuration)' == 'GnomeDebug' or '$(Configuration)' == 'GnomeRelease' ">
-    <Compile Include="GnomeApplication.cs" />
-  </ItemGroup>
-  <ItemGroup Condition=" '$(Configuration)' == 'GnomeDebug' or '$(Configuration)' == 'GnomeRelease' or '$(Configuration)' == 'GtkLinuxDebug' or '$(Configuration)' == 'GtkLinuxRelease' ">
+  <ItemGroup Condition=" '$(Configuration)' == 'GtkLinuxDebug' or '$(Configuration)' == 'GtkLinuxRelease' ">
     <Compile Include="RemoteControl.cs" />
     <Compile Include="RemoteControlProxy.cs" />
   </ItemGroup>
-  <ItemGroup Condition=" '$(Configuration)' == 'GtkLinuxDebug' or '$(Configuration)' == 'GtkLinuxRelease' or '$(Configuration)' == 'GtkWinDebug' or '$(Configuration)' == 'GtkWinRelease' or '$(Configuration)' == 'GtkMacDebug' or '$(Configuration)' == 'GtkMacRelease' ">
-    <Compile Include="GtkApplication.cs" />
-  </ItemGroup>
   <ItemGroup>
     <Folder Include="Properties\" />
     <Folder Include="data\" />



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]