[Monodevelop-patches-list] r1736 - in trunk/MonoDevelop/src/AddIns/Misc: . AddInManager AddInManager/Commands AddInManager/Gui
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Fri Jun 11 00:43:45 EDT 2004
Author: jluke
Date: 2004-06-11 00:43:45 -0400 (Fri, 11 Jun 2004)
New Revision: 1736
Added:
trunk/MonoDevelop/src/AddIns/Misc/AddInManager/
trunk/MonoDevelop/src/AddIns/Misc/AddInManager/AddInManager.addin.xml
trunk/MonoDevelop/src/AddIns/Misc/AddInManager/AssemblyInfo.cs
trunk/MonoDevelop/src/AddIns/Misc/AddInManager/Commands/
trunk/MonoDevelop/src/AddIns/Misc/AddInManager/Commands/ShowDialog.cs
trunk/MonoDevelop/src/AddIns/Misc/AddInManager/Gui/
trunk/MonoDevelop/src/AddIns/Misc/AddInManager/Gui/AddInManagerDialog.cs
trunk/MonoDevelop/src/AddIns/Misc/AddInManager/Makefile.am
Log:
beginning of a simple addin manager
Added: trunk/MonoDevelop/src/AddIns/Misc/AddInManager/AddInManager.addin.xml
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/AddInManager/AddInManager.addin.xml 2004-06-11 02:19:09 UTC (rev 1735)
+++ trunk/MonoDevelop/src/AddIns/Misc/AddInManager/AddInManager.addin.xml 2004-06-11 04:43:45 UTC (rev 1736)
@@ -0,0 +1,19 @@
+<AddIn name = "AddInManager"
+ author = "John Luke"
+ copyright = "GPL"
+ url = "http://monodevelop.com"
+ description = "Displays and Manages AddIns"
+ version = "0.0">
+
+ <Runtime>
+ <Import assembly="AddInManager.dll"/>
+ </Runtime>
+
+ <Extension path="/SharpDevelop/Workbench/MainMenu/Tools">
+ <MenuItem id = "ShowAddInManagerDialog"
+ _label = "AddInManager"
+ shortcut = ""
+ class = "MonoDevelop.Commands.ShowAddInManager" />
+ </Extension>
+
+</AddIn>
Added: trunk/MonoDevelop/src/AddIns/Misc/AddInManager/AssemblyInfo.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/AddInManager/AssemblyInfo.cs 2004-06-11 02:19:09 UTC (rev 1735)
+++ trunk/MonoDevelop/src/AddIns/Misc/AddInManager/AssemblyInfo.cs 2004-06-11 04:43:45 UTC (rev 1736)
@@ -0,0 +1,10 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyVersion("0.1.0.0")]
+[assembly: AssemblyTitle ("MonoDevelop AddInManager")]
+[assembly: AssemblyDescription ("Manages addins")]
+[assembly: AssemblyCopyright ("(c) 2004 John Luke")]
+[assembly: AssemblyDelaySign (false)]
+[assembly: AssemblyKeyFile ("")]
+
Added: trunk/MonoDevelop/src/AddIns/Misc/AddInManager/Commands/ShowDialog.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/AddInManager/Commands/ShowDialog.cs 2004-06-11 02:19:09 UTC (rev 1735)
+++ trunk/MonoDevelop/src/AddIns/Misc/AddInManager/Commands/ShowDialog.cs 2004-06-11 04:43:45 UTC (rev 1736)
@@ -0,0 +1,18 @@
+using System;
+using MonoDevelop.Core.AddIns.Codons;
+using AddInManager;
+
+namespace MonoDevelop.Commands
+{
+ public class ShowAddInManager : AbstractMenuCommand
+ {
+ public override void Run ()
+ {
+ Console.WriteLine ("asdfsdfgfh");
+ using (AddInManagerDialog d = new AddInManagerDialog ()) {
+ d.Run ();
+ d.Hide ();
+ }
+ }
+ }
+}
Added: trunk/MonoDevelop/src/AddIns/Misc/AddInManager/Gui/AddInManagerDialog.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/AddInManager/Gui/AddInManagerDialog.cs 2004-06-11 02:19:09 UTC (rev 1735)
+++ trunk/MonoDevelop/src/AddIns/Misc/AddInManager/Gui/AddInManagerDialog.cs 2004-06-11 04:43:45 UTC (rev 1736)
@@ -0,0 +1,47 @@
+using System;
+using Gtk;
+
+using MonoDevelop.Core.AddIns;
+using MonoDevelop.Gui;
+using MonoDevelop.Services;
+
+namespace AddInManager
+{
+ public class AddInManagerDialog : Dialog
+ {
+ public AddInManagerDialog ()
+ {
+ this.BorderWidth = 12;
+ this.Title = GettextCatalog.GetString ("AddInManager");
+ this.TransientFor = (Window) WorkbenchSingleton.Workbench;
+ this.SetDefaultSize (300, 250);
+
+ ScrolledWindow sw = new ScrolledWindow ();
+ TreeView tv = new TreeView ();
+ tv.AppendColumn (GettextCatalog.GetString ("Enabled"), new CellRendererToggle (), "active", 0);
+ tv.AppendColumn (GettextCatalog.GetString ("Title"), new CellRendererText (), "text", 1);
+ tv.AppendColumn (GettextCatalog.GetString ("Version"), new CellRendererText (), "text", 2);
+ sw.Add (tv);
+
+ this.AddButton (Gtk.Stock.Close, ResponseType.Close);
+
+ tv.Model = LoadAddIns ();
+ this.VBox.Add (sw);
+ this.ShowAll ();
+ }
+
+ TreeStore LoadAddIns ()
+ {
+ TreeStore store = new TreeStore (typeof (bool), typeof (string), typeof (string));
+ AddInCollection addins = AddInTreeSingleton.AddInTree.AddIns;
+
+ foreach (AddIn a in addins)
+ {
+ store.AppendValues (true, a.Name, a.Version);
+ }
+
+ return store;
+ }
+ }
+}
+
Added: trunk/MonoDevelop/src/AddIns/Misc/AddInManager/Makefile.am
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/AddInManager/Makefile.am 2004-06-11 02:19:09 UTC (rev 1735)
+++ trunk/MonoDevelop/src/AddIns/Misc/AddInManager/Makefile.am 2004-06-11 04:43:45 UTC (rev 1736)
@@ -0,0 +1,27 @@
+
+CSC = mcs /debug
+ASSEMBLY = AddInManager.dll
+ADDIN = AddInManager.addin.xml
+
+REFS = \
+ -pkg:gtk-sharp \
+ /r:../../../../build/bin/MonoDevelop.Core.dll \
+ /r:../../../../build/bin/MonoDevelop.Base.dll
+
+FILES = \
+./AssemblyInfo.cs \
+./Commands/ShowDialog.cs \
+./Gui/AddInManagerDialog.cs
+
+addindir = $(libdir)/monodevelop/AddIns
+addin_DATA = $(ADDIN) $(ASSEMBLY)
+
+all: $(ASSEMBLY)
+
+$(ASSEMBLY): $(FILES)
+ $(CSC) /out:$(ASSEMBLY) /target:library $(FILES) $(REFS) \
+ && cp $(ASSEMBLY) ../../../../build/AddIns/. \
+ && cp $(ADDIN) ../../../../build/AddIns/.
+
+CLEANFILES = $(ASSEMBLY)
+EXTRA_DIST = $(FILES) $(ADDIN)
More information about the Monodevelop-patches-list
mailing list