Author: mhutch
Date: 2007-12-06 20:26:52 -0500 (Thu, 06 Dec 2007)
New Revision: 90881

Modified:
   trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/Base.glade
   trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/ChangeLog
   trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/Makefile.am
   
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.Utils/DesktopApplication.cs
   
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.Utils/FileIconLoader.cs
   
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui/RecentOpen.cs
   
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui/StockIcons.cs
Log:
2007-12-06  Geoff Norton  <[EMAIL PROTECTED]>

        * Base.glade: We no longer require libgnome, remove it.
        * MonoDevelop.Core.Gui/StockIcons.cs: Gnome.Stock.About isn't needed
          anymore and removing it no longer hard-requires Gnome.
        * MonoDevelop.Core.Gui/DesktopApplication.cs: Move to MonoDevelop.Core
          and refactor it to utilize the new PlatformService.
        * MonoDevelop.Core.Gui/RecentOpen.cs: 
        * MonoDevelop.Core.Gui/FileIconLoader.cs: Get Icon/Vfs information from
          the PlatformService
        * Makefile.am: Remove DesktopApplication.cs from the build.



Modified: trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/Base.glade
===================================================================
--- trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/Base.glade     
2007-12-07 01:25:49 UTC (rev 90880)
+++ trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/Base.glade     
2007-12-07 01:26:52 UTC (rev 90881)
@@ -2,7 +2,6 @@
 <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
 
 <glade-interface>
-<requires lib="gnome"/>
 
 <widget class="GtkDialog" id="TreeViewOptionDialog">
   <property name="border_width">6</property>

Modified: trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/ChangeLog      
2007-12-07 01:25:49 UTC (rev 90880)
+++ trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/ChangeLog      
2007-12-07 01:26:52 UTC (rev 90881)
@@ -1,3 +1,15 @@
+2007-12-06  Geoff Norton  <[EMAIL PROTECTED]>
+
+       * Base.glade: We no longer require libgnome, remove it.
+       * MonoDevelop.Core.Gui/StockIcons.cs: Gnome.Stock.About isn't needed
+         anymore and removing it no longer hard-requires Gnome.
+       * MonoDevelop.Core.Gui/DesktopApplication.cs: Move to MonoDevelop.Core
+         and refactor it to utilize the new PlatformService.
+       * MonoDevelop.Core.Gui/RecentOpen.cs: 
+       * MonoDevelop.Core.Gui/FileIconLoader.cs: Get Icon/Vfs information from
+         the PlatformService
+       * Makefile.am: Remove DesktopApplication.cs from the build.
+
 2007-12-04  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * MonoDevelop.Core.Gui.mdp, Makefile.am: Directory reorganization.

Modified: trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/Makefile.am
===================================================================
--- trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/Makefile.am    
2007-12-07 01:25:49 UTC (rev 90880)
+++ trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/Makefile.am    
2007-12-07 01:26:52 UTC (rev 90881)
@@ -38,7 +38,6 @@
        MonoDevelop.Core.Gui.ProgressMonitoring/BaseProgressMonitor.cs \
        MonoDevelop.Core.Gui.ProgressMonitoring/MessageDialogProgressMonitor.cs 
\
        
MonoDevelop.Core.Gui.ProgressMonitoring/MultiTaskDialogProgressMonitor.cs \
-       MonoDevelop.Core.Gui.Utils/DesktopApplication.cs \
        MonoDevelop.Core.Gui.Utils/FileIconLoader.cs \
        MonoDevelop.Core.Gui.WebBrowser/IWebBrowser.cs \
        MonoDevelop.Core.Gui.WebBrowser/IWebBrowserLoader.cs \

Modified: 
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui/RecentOpen.cs
===================================================================
--- 
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui/RecentOpen.cs
     2007-12-07 01:25:49 UTC (rev 90880)
+++ 
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui/RecentOpen.cs
     2007-12-07 01:26:52 UTC (rev 90881)
@@ -23,8 +23,6 @@
 using System.Diagnostics;
 using System.Collections;
 using System.IO;
-using Vfs = Gnome.Vfs.Vfs;
-using MimeType = Gnome.Vfs.MimeType;
 
 using MonoDevelop.Core;
 using MonoDevelop.Core.Gui.Utils;
@@ -89,7 +87,7 @@
                
                public void AddLastFile (string name, string project)
                {
-                       RecentItem ri = new RecentItem (ToUri (name), 
MimeType.GetMimeTypeForUri (name), "MonoDevelop Files");
+                       RecentItem ri = new RecentItem (ToUri (name), 
Runtime.PlatformService.GetMimeTypeForUri (name), "MonoDevelop Files");
                        if (project == null)
                                ri.Private = Path.GetFileName (name);
                        else
@@ -113,7 +111,7 @@
                
                public void AddLastProject (string name, string projectName)
                {
-                       RecentItem ri = new RecentItem (ToUri (name), 
MimeType.GetMimeTypeForUri (name), "MonoDevelop Projects");
+                       RecentItem ri = new RecentItem (ToUri (name), 
Runtime.PlatformService.GetMimeTypeForUri (name), "MonoDevelop Projects");
                        ri.Private = projectName;
                        recentFiles.AddWithLimit (ri, "MonoDevelop Projects", 
MAX_LENGTH);
                        OnRecentProjectChange();

Modified: 
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui/StockIcons.cs
===================================================================
--- 
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui/StockIcons.cs
     2007-12-07 01:25:49 UTC (rev 90880)
+++ 
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui/StockIcons.cs
     2007-12-07 01:26:52 UTC (rev 90881)
@@ -32,7 +32,6 @@
 {
        public class Stock
        {
-               public static readonly string About = Gnome.Stock.About;
                public static readonly string BreakPoint = "md-break-point";
                public static readonly string BuildCombine = "md-build-combine";
                public static readonly string BuildCurrentSelectedProject = 
"md-build-current-selected-project";

Modified: 
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.Utils/DesktopApplication.cs
===================================================================
--- 
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.Utils/DesktopApplication.cs
       2007-12-07 01:25:49 UTC (rev 90880)
+++ 
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.Utils/DesktopApplication.cs
       2007-12-07 01:26:52 UTC (rev 90881)
@@ -1,97 +0,0 @@
-//
-// DesktopApplication.cs
-//
-// Author:
-//   Lluis Sanchez Gual
-//
-// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.IO;
-using System.Collections;
-using System.Runtime.InteropServices;
-using System.Diagnostics;
-using MonoDevelop.Core;
-using Gnome.Vfs;
-
-namespace MonoDevelop.Core.Gui.Utils
-{
-       public struct DesktopApplication
-       {
-               internal string id;
-               string displayName;
-               string command;
-               
-               public string DisplayName {
-                       get { return displayName; }
-               }
-               
-               public string Command {
-                       get { return command; }
-               }
-               
-               public void Launch (params string[] files)
-               {
-                       // TODO: implement all other cases
-                       if (command.IndexOf ("%f") != -1) {
-                               foreach (string s in files) {
-                                       string cmd = command.Replace ("%f", s);
-                                       Process.Start (cmd);
-                               }
-                       }
-                       else if (command.IndexOf ("%F") != -1) {
-                               string[] fs = new string [files.Length];
-                               for (int n=0; n<files.Length; n++) {
-                                       fs [n] = files [n].Replace (" ", "\\ ");
-                               }
-                               string cmd = command.Replace ("%F", string.Join 
(" ", fs));
-                               Process.Start (cmd);
-                       } else {
-                               foreach (string s in files) {
-                                       Process.Start (command + " " + s);
-                               }
-                       }
-               }
-               
-               public static DesktopApplication GetDefaultApplication (string 
mimeType)
-               {
-                       MimeApplication app = Mime.GetDefaultApplication 
(mimeType);
-                       if (app != null)
-                               return (DesktopApplication) 
Marshal.PtrToStructure (app.Handle, typeof(DesktopApplication));
-                       else
-                               return new DesktopApplication ();
-               }
-               
-               public static DesktopApplication[] GetApplications (string 
mimeType)
-               {
-                       MimeApplication[] apps = Mime.GetAllApplications 
(mimeType);
-                       ArrayList list = new ArrayList ();
-                       foreach (MimeApplication app in apps) {
-                               DesktopApplication dap = (DesktopApplication) 
Marshal.PtrToStructure (app.Handle, typeof(DesktopApplication));
-                               list.Add (dap);
-                       }
-                       return (DesktopApplication[]) list.ToArray 
(typeof(DesktopApplication));
-               }
-       }
-}

Modified: 
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.Utils/FileIconLoader.cs
===================================================================
--- 
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.Utils/FileIconLoader.cs
   2007-12-07 01:25:49 UTC (rev 90880)
+++ 
trunk/monodevelop/main/src/core/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.Utils/FileIconLoader.cs
   2007-12-07 01:26:52 UTC (rev 90881)
@@ -36,12 +36,10 @@
        public sealed class FileIconLoader
        {
                static Gdk.Pixbuf defaultIcon;
-               static Gnome.ThumbnailFactory thumbnailFactory;
                static Hashtable iconHash;
 
                static FileIconLoader ()
                {
-                       thumbnailFactory = new Gnome.ThumbnailFactory 
(Gnome.ThumbnailSize.Normal);
                        iconHash = new Hashtable ();
                }
 
@@ -76,8 +74,7 @@
                                filename = filename.Replace ("?", "%3F");
                                string icon = null;
                                try {
-                                       Gnome.IconLookupResultFlags result;
-                                       icon = Gnome.Icon.LookupSync 
(IconTheme.Default, thumbnailFactory, filename, null, 
Gnome.IconLookupFlags.None, out result);
+                                       icon = 
Runtime.PlatformService.IconForFile (filename);
                                } catch {}
                                if (icon == null || icon.Length == 0)
                                        return GetPixbufForType 
("gnome-fs-regular", size);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to