[Monodevelop-patches-list] r417 - in trunk/MonoDevelop: samples/HtmlControl src/AddIns/DisplayBindings/TextEditor src/AddIns/DisplayBindings/TextEditor/Commands src/Libraries/MonoDevelop.Gui src/Libraries/MonoDevelop.Gui/HtmlControl src/Main/Base src/Main/Base/Commands src/Main/Base/Gui src/Main/Base/Gui/BrowserDisplayBinding src/Main/Base/Gui/Dialogs
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Fri Jan 9 19:26:41 EST 2004
Author: jluke
Date: 2004-01-09 19:26:41 -0500 (Fri, 09 Jan 2004)
New Revision: 417
Added:
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/ControlType.cs
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/HtmlControl.cs
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/MozillaControl.cs
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/README
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/TODO
Removed:
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/HtmlControl.cs
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IEControl.cs
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/MozillaControl.cs
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/TODO
trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/
Modified:
trunk/MonoDevelop/samples/HtmlControl/Makefile
trunk/MonoDevelop/samples/HtmlControl/Test.cs
trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Commands/FoldingCommands.cs
trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Commands/ToolCommands.cs
trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Makefile
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/BrowserNavigateEventArgs.cs
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IHTMLDocument2.cs
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IHTMLElement.cs
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IWebBrowser.cs
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IWebBrowserEvents.cs
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Makefile
trunk/MonoDevelop/src/Main/Base/Commands/ToolsCommands.cs
trunk/MonoDevelop/src/Main/Base/Gui/BrowserDisplayBinding/HtmlViewPane.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs
trunk/MonoDevelop/src/Main/Base/Makefile
Log:
Move HtmlControl and friends to MonoDevelop.Gui
adjust Makefiles as necessary
update HtmlControl test
Modified: trunk/MonoDevelop/samples/HtmlControl/Makefile
===================================================================
--- trunk/MonoDevelop/samples/HtmlControl/Makefile 2004-01-10 00:25:20 UTC (rev 416)
+++ trunk/MonoDevelop/samples/HtmlControl/Makefile 2004-01-10 00:26:41 UTC (rev 417)
@@ -1,5 +1,5 @@
all:
- mcs -g Test.cs -r gtk-sharp -r ../../build/bin/SharpDevelop.Base.dll -o ../../build/bin/HtmlTest.exe
+ mcs -g Test.cs -r gtk-sharp -r ../../build/bin/MonoDevelop.Gui.dll -o ../../build/bin/HtmlTest.exe
run:
mono --debug ../../build/bin/HtmlTest.exe
Modified: trunk/MonoDevelop/samples/HtmlControl/Test.cs
===================================================================
--- trunk/MonoDevelop/samples/HtmlControl/Test.cs 2004-01-10 00:25:20 UTC (rev 416)
+++ trunk/MonoDevelop/samples/HtmlControl/Test.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -1,7 +1,7 @@
using System;
using Gtk;
using GtkSharp;
-using ICSharpCode.SharpDevelop.Gui.HtmlControl;
+using MonoDevelop.Gui;
class HtmlTest
{
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Commands/FoldingCommands.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Commands/FoldingCommands.cs 2004-01-10 00:25:20 UTC (rev 416)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Commands/FoldingCommands.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -28,7 +28,7 @@
using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Actions;
using ICSharpCode.SharpDevelop.Gui;
-using ICSharpCode.SharpDevelop.Gui.HtmlControl;
+using MonoDevelop.Gui;
using ICSharpCode.Core.Services;
namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Commands/ToolCommands.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Commands/ToolCommands.cs 2004-01-10 00:25:20 UTC (rev 416)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Commands/ToolCommands.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -27,7 +27,7 @@
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
using ICSharpCode.TextEditor;
using ICSharpCode.SharpDevelop.Gui;
-using ICSharpCode.SharpDevelop.Gui.HtmlControl;
+using MonoDevelop.Gui;
using ICSharpCode.Core.Services;
namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Makefile
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Makefile 2004-01-10 00:25:20 UTC (rev 416)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Makefile 2004-01-10 00:26:41 UTC (rev 417)
@@ -72,4 +72,5 @@
/r:../../../../build/bin/SharpDevelop.Base.dll \
/r:System.DirectoryServices.dll /r:pango-sharp.dll \
/define:GTK /r:gtk-sharp.dll /r:gdk-sharp.dll \
+ /r:../../../../build/bin/MonoDevelop.Gui.dll \
$(SOURCES)
Copied: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl (from rev 413, trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl)
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/BrowserNavigateEventArgs.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/BrowserNavigateEventArgs.cs 2004-01-09 07:11:53 UTC (rev 413)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/BrowserNavigateEventArgs.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -1,7 +1,7 @@
using System;
using System.ComponentModel;
-namespace ICSharpCode.SharpDevelop.Gui.HtmlControl
+namespace MonoDevelop.Gui
{
public delegate void BrowserNavigateEventHandler(object s, BrowserNavigateEventArgs e);
Copied: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/ControlType.cs (from rev 416, trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/ControlType.cs)
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/ControlType.cs 2004-01-10 00:25:20 UTC (rev 416)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/ControlType.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -0,0 +1,13 @@
+using System;
+
+namespace MonoDevelop.Gui
+{
+ public enum ControlType
+ {
+ GtkHtml,
+ GtkMozilla,
+ IE,
+ Safari,
+ WinMozilla,
+ }
+}
Deleted: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/HtmlControl.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/HtmlControl.cs 2004-01-09 07:11:53 UTC (rev 413)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/HtmlControl.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -1,217 +0,0 @@
-using System;
-using System.Threading;
-using System.IO;
-using Gtk;
-using GtkSharp;
-
-namespace ICSharpCode.SharpDevelop.Gui.HtmlControl
-{
- public class HtmlControl : Widget, IWebBrowserEvents
- {
- public const int OLEIVERB_UIACTIVATE = -4;
-
- IWebBrowser control = null;
- //AxHost.ConnectionPointCookie cookie;
-
- string url = "";
- string html = "";
- string cssStyleSheet = "";
- bool windows;
- bool initialized = false;
-
- public HtmlControl() //: base("8856f961-340a-11d0-a96b-00c04fd705a2")
- {
- if ((int) Environment.OSVersion.Platform != 128)
- {
- windows = true;
- //Console.WriteLine ("using IE for HtmlControl");
- }
- else
- {
- //Console.WriteLine ("using Mozilla for HtmlControl");
- }
-
- AttachInterfaces ();
- }
-
- public virtual void RaiseNavigateComplete(string url)
- {
- BrowserNavigateEventArgs e = new BrowserNavigateEventArgs(url, false);
- if (NavigateComplete != null) {
- NavigateComplete(this, e);
- }
- }
-
- public virtual void RaiseBeforeNavigate(string url, int flags, string targetFrameName, ref object postData, string headers, ref bool cancel)
- {
- if (initialized) {
- BrowserNavigateEventArgs e = new BrowserNavigateEventArgs(url, false);
- if (BeforeNavigate != null) {
- BeforeNavigate(this, e);
- }
- cancel = e.Cancel;
- }
- }
-
- public string CascadingStyleSheet {
- get {
- return cssStyleSheet;
- }
- set {
- cssStyleSheet = value;
- ApplyCascadingStyleSheet();
- }
- }
-
- public string Url {
- set {
- this.url = value;
- if (!windows)
- ((MozillaControl) control).LoadUrl (value);
- }
- }
-
- public string Html {
- set {
- this.html = value;
- if (windows)
- ApplyBody(html);
- }
- }
-
- protected void DetachSink()
- {
- try {
- // this.cookie.Disconnect();
- } catch {
- }
- }
-
- protected void CreateSink()
- {
- try {
- // this.cookie = new ConnectionPointCookie(this.GetOcx(), this, typeof(IWebBrowserEvents));
- } catch {
- }
- }
-
- protected void AttachInterfaces()
- {
- try {
- if (windows)
- {
- this.control = (IWebBrowser)this.GetOcx();
- }
- else
- {
- this.control = new MozillaControl ();
- //Console.WriteLine ("new MozillaControl");
- ((MozillaControl) this.control).Show ();
- }
- } catch {
- }
- }
-
- protected IHTMLDocument2 GetOcx ()
- {
- return null;
- //if (windows)
- //GetOcx ();
- }
-
- protected void OnHandleCreated(EventArgs e)
- {
- //base.OnHandleCreated(e);
-
- NavigateComplete += new BrowserNavigateEventHandler(DelayedInitializeCaller);
-
- object flags = 0;
- object targetFrame = String.Empty;
- object postData = String.Empty;
- object headers = String.Empty;
- this.control.Navigate("about:blank", ref flags, ref targetFrame, ref postData, ref headers);
- }
-
- void DelayedInitializeCaller(object sender, BrowserNavigateEventArgs e)
- {
- //MethodInvoker mi = new MethodInvoker(this.DelayedInitialize);
- //this.BeginInvoke(mi);
- NavigateComplete -= new BrowserNavigateEventHandler(DelayedInitializeCaller);
- }
-
- public void DelayedInitialize()
- {
- initialized = true;
- if (html.Length > 0) {
- ApplyBody(html);
- }
- UIActivate();
- ApplyCascadingStyleSheet();
- }
-
- void UIActivate()
- {
- //this.DoVerb(OLEIVERB_UIACTIVATE);
- }
-
- void ApplyBody(string val)
- {
- try {
- if (control != null) {
- if (!windows)
- {
- ((MozillaControl) control).RenderData (val, "file://", "text/html");
- return;
- }
-
- IHTMLElement el = null;
- IHTMLDocument2 doc = this.control.GetDocument();
-
- if (doc != null) {
- el = doc.GetBody();
- }
-
- if (el != null) {
- UIActivate();
- el.SetInnerHTML(val);
- return;
- }
- else
- {
- Console.WriteLine ("IHTMLElement is null");
- }
- }
- else
- {
- Console.WriteLine ("control is null");
- }
- } catch {}
- }
-
- void ApplyCascadingStyleSheet()
- {
- if (control != null) {
- IHTMLDocument2 htmlDoc = control.GetDocument();
- if (htmlDoc != null) {
- htmlDoc.CreateStyleSheet(cssStyleSheet, 0);
- }
- }
- }
-
- public Gtk.Widget Control
- {
- get
- {
- if (windows)
- return null; //FIXME
- else
- {
- return (MozillaControl) control;
- }
- }
- }
-
- public event BrowserNavigateEventHandler BeforeNavigate;
- public event BrowserNavigateEventHandler NavigateComplete;
- }
-}
Copied: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/HtmlControl.cs (from rev 416, trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/HtmlControl.cs)
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/HtmlControl.cs 2004-01-10 00:25:20 UTC (rev 416)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/HtmlControl.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -0,0 +1,246 @@
+using System;
+using Gtk;
+using GtkSharp;
+
+namespace MonoDevelop.Gui
+{
+ public class HtmlControl : Bin, IWebBrowserEvents
+ {
+ private static GLib.GType type;
+
+ IWebBrowser control = null;
+ string url = "";
+ string html = "";
+ string cssStyleSheet = "";
+ bool initialized = false;
+ ControlType control_type;
+
+ static HtmlControl ()
+ {
+ type = RegisterGType (typeof (HtmlControl));
+ }
+
+ public HtmlControl () : base (type)
+ {
+ if ((int) Environment.OSVersion.Platform != 128)
+ {
+ control_type = ControlType.IE;
+ }
+ else
+ {
+ control_type = ControlType.GtkMozilla;
+ }
+
+ AttachInterfaces ();
+ }
+
+ public virtual void RaiseNavigateComplete(string url)
+ {
+ BrowserNavigateEventArgs e = new BrowserNavigateEventArgs(url, false);
+ if (NavigateComplete != null) {
+ NavigateComplete(this, e);
+ }
+ }
+
+ public virtual void RaiseBeforeNavigate(string url, int flags, string targetFrameName, ref object postData, string headers, ref bool cancel)
+ {
+ if (initialized) {
+ BrowserNavigateEventArgs e = new BrowserNavigateEventArgs(url, false);
+ if (BeforeNavigate != null) {
+ BeforeNavigate(this, e);
+ }
+ cancel = e.Cancel;
+ }
+ }
+
+ public string CascadingStyleSheet {
+ get {
+ return cssStyleSheet;
+ }
+ set {
+ cssStyleSheet = value;
+ ApplyCascadingStyleSheet();
+ }
+ }
+
+ public string Url {
+ set {
+ this.url = value;
+ if (control_type == ControlType.GtkMozilla)
+ ((MozillaControl) control).LoadUrl (value);
+ }
+ }
+
+ public string Html {
+ set {
+ this.html = value;
+ if (control_type == ControlType.IE)
+ ApplyBody(html);
+ }
+ }
+
+ protected void DetachSink()
+ {
+ try {
+ // this.cookie.Disconnect();
+ } catch {
+ }
+ }
+
+ protected void CreateSink()
+ {
+ try {
+ // this.cookie = new ConnectionPointCookie(this.GetOcx(), this, typeof(IWebBrowserEvents));
+ } catch {
+ }
+ }
+
+ protected void AttachInterfaces()
+ {
+ switch (control_type) {
+ case ControlType.IE:
+ this.control = (IWebBrowser)this.GetOcx();
+ //this.Add ((IEControl) this.control);
+ break;
+ case ControlType.GtkMozilla:
+ this.control = new MozillaControl ();
+ //Console.WriteLine ("new MozillaControl");
+ ((MozillaControl) this.control).Show ();
+ this.Add ((MozillaControl) this.control);
+ break;
+ default:
+ throw new NotImplementedException (control_type.ToString ());
+ }
+ }
+
+ protected IHTMLDocument2 GetOcx ()
+ {
+ return null;
+ //if (control_type == ControlType.IE)
+ //GetOcx ();
+ }
+
+ protected void OnHandleCreated(EventArgs e)
+ {
+ //base.OnHandleCreated(e);
+
+ NavigateComplete += new BrowserNavigateEventHandler(DelayedInitializeCaller);
+
+ object flags = 0;
+ object targetFrame = String.Empty;
+ object postData = String.Empty;
+ object headers = String.Empty;
+ this.control.Navigate("about:blank", ref flags, ref targetFrame, ref postData, ref headers);
+ }
+
+ void DelayedInitializeCaller(object sender, BrowserNavigateEventArgs e)
+ {
+ //MethodInvoker mi = new MethodInvoker(this.DelayedInitialize);
+ //this.BeginInvoke(mi);
+ NavigateComplete -= new BrowserNavigateEventHandler(DelayedInitializeCaller);
+ }
+
+ public void DelayedInitialize()
+ {
+ initialized = true;
+ if (html.Length > 0) {
+ ApplyBody(html);
+ }
+ UIActivate();
+ ApplyCascadingStyleSheet();
+ }
+
+ void UIActivate()
+ {
+ //this.DoVerb(OLEIVERB_UIACTIVATE);
+ }
+
+ void ApplyBody(string val)
+ {
+ try {
+ if (control != null) {
+ if (control_type == ControlType.GtkMozilla)
+ {
+ ((MozillaControl) control).RenderData (val, "file://", "text/html");
+ return;
+ }
+
+ IHTMLElement el = null;
+ IHTMLDocument2 doc = this.control.GetDocument();
+
+ if (doc != null) {
+ el = doc.GetBody();
+ }
+
+ if (el != null) {
+ UIActivate();
+ el.SetInnerHTML(val);
+ return;
+ }
+ else
+ {
+ Console.WriteLine ("IHTMLElement is null");
+ }
+ }
+ else
+ {
+ Console.WriteLine ("control is null");
+ }
+ } catch {}
+ }
+
+ void ApplyCascadingStyleSheet()
+ {
+ if (control != null) {
+ IHTMLDocument2 htmlDoc = control.GetDocument();
+ if (htmlDoc != null) {
+ htmlDoc.CreateStyleSheet(cssStyleSheet, 0);
+ }
+ }
+ }
+
+ public void GoBack ()
+ {
+ control.GoBack ();
+ }
+
+ public void GoForward ()
+ {
+ control.GoForward ();
+ }
+
+ public void Stop ()
+ {
+ control.Stop ();
+ }
+
+ public void Refresh ()
+ {
+ control.Refresh ();
+ }
+
+ public Gtk.Widget Control
+ {
+ get
+ {
+ switch (control_type) {
+ case ControlType.IE:
+ // return (IEControl) control;
+ return null; //FIXME
+ case ControlType.GtkMozilla:
+ return (MozillaControl) control;
+ default:
+ throw new NotImplementedException (control_type.ToString ());
+ }
+ }
+ }
+
+ public ControlType HtmlType
+ {
+ set { control_type = value; }
+ }
+
+ public event BrowserNavigateEventHandler BeforeNavigate;
+ public event BrowserNavigateEventHandler NavigateComplete;
+ }
+}
Deleted: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IEControl.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/IEControl.cs 2004-01-09 07:11:53 UTC (rev 413)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IEControl.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -1,60 +0,0 @@
-//
-// IEControl - An Html widget that uses IE
-//
-// Author: John Luke <jluke at cfl.rr.com>
-//
-// Copyright 2003 John Luke
-//
-
-using System;
-
-namespace ICSharpCode.SharpDevelop.Gui.HtmlControl
-{
- public class IEControl : AxHost, IWebBrowser
- {
- public IEControl () : base("8856f961-340a-11d0-a96b-00c04fd705a2")
- {
- }
-
- public void GoHome ()
- {
- }
-
- public void GoSearch ()
- {
- }
-
- public void Navigate (string Url, ref object Flags, ref object targetFrame, ref object postData, ref object headers)
- {
- }
-
- public void Refresh ()
- {
- }
-
- public void Refresh2 ()
- {
- }
-
- public void Stop ()
- {
- }
-
- public void GetApplication ()
- {
- }
-
- public void GetParent ()
- {
- }
-
- public void GetContainer ()
- {
- }
-
- public IHTMLDocument2 GetDocument ()
- {
- return null;
- }
- }
-}
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IHTMLDocument2.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/IHTMLDocument2.cs 2004-01-09 07:11:53 UTC (rev 413)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IHTMLDocument2.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -1,7 +1,7 @@
using System;
using System.Runtime.InteropServices;
-namespace ICSharpCode.SharpDevelop.Gui.HtmlControl
+namespace MonoDevelop.Gui
{
[
InterfaceType(ComInterfaceType.InterfaceIsDual),
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IHTMLElement.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/IHTMLElement.cs 2004-01-09 07:11:53 UTC (rev 413)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IHTMLElement.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -1,7 +1,7 @@
using System;
using System.Runtime.InteropServices;
-namespace ICSharpCode.SharpDevelop.Gui.HtmlControl
+namespace MonoDevelop.Gui
{
[
ComVisible(true),
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IWebBrowser.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/IWebBrowser.cs 2004-01-09 07:11:53 UTC (rev 413)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IWebBrowser.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -1,7 +1,7 @@
using System;
using System.Runtime.InteropServices;
-namespace ICSharpCode.SharpDevelop.Gui.HtmlControl
+namespace MonoDevelop.Gui
{
[Guid(@"eab22ac1-30c1-11cf-a7eb-0000c05bae0b")]
public interface IWebBrowser
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IWebBrowserEvents.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/IWebBrowserEvents.cs 2004-01-09 07:11:53 UTC (rev 413)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/IWebBrowserEvents.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -1,7 +1,7 @@
using System;
using System.Runtime.InteropServices;
-namespace ICSharpCode.SharpDevelop.Gui.HtmlControl
+namespace MonoDevelop.Gui
{
[Guid(@"eab22ac2-30c1-11cf-a7eb-0000c05bae0b"), InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface IWebBrowserEvents
Deleted: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/MozillaControl.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/MozillaControl.cs 2004-01-09 07:11:53 UTC (rev 413)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/MozillaControl.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -1,76 +0,0 @@
-//
-// MozillaControl - An Html widget that uses GtkMozEmbed#
-//
-// Author: John Luke <jluke at cfl.rr.com>
-//
-// Copyright 2003 John Luke
-//
-
-using System;
-using GtkMozEmbed;
-using GtkMozEmbedSharp;
-
-namespace ICSharpCode.SharpDevelop.Gui.HtmlControl
-{
- public class MozillaControl : EmbedWidget, IWebBrowser
- {
- private static GLib.GType type;
-
- static MozillaControl ()
- {
- type = RegisterGType (typeof (MozillaControl));
- }
-
- //FIXME: pick a better path, one of the Environment dirs
- public MozillaControl () : base ("/tmp", "MonoDevelop")
- {
- }
-
- public void GoHome ()
- {
- LoadUrl ("about:blank");
- }
-
- public void GoSearch ()
- {
- }
-
- public void Navigate (string Url, ref object Flags, ref object targetFrame, ref object postData, ref object headers)
- {
- // TODO: what is all that other crap for
- LoadUrl (Url);
- }
-
- public void Refresh ()
- {
- this.Reload ((int) ReloadFlags.Reloadnormal);
- }
-
- public void Refresh2 ()
- {
- this.Reload ((int) ReloadFlags.Reloadnormal);
- }
-
- public void Stop ()
- {
- this.StopLoad ();
- }
-
- public void GetApplication ()
- {
- }
-
- public void GetParent ()
- {
- }
-
- public void GetContainer ()
- {
- }
-
- public IHTMLDocument2 GetDocument ()
- {
- return null;
- }
- }
-}
Copied: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/MozillaControl.cs (from rev 416, trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/MozillaControl.cs)
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/MozillaControl.cs 2004-01-10 00:25:20 UTC (rev 416)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/MozillaControl.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -0,0 +1,77 @@
+//
+// MozillaControl - An Html widget that uses GtkMozEmbed#
+//
+// Author: John Luke <jluke at cfl.rr.com>
+//
+// Copyright 2003 John Luke
+//
+
+using System;
+using GtkMozEmbed;
+using GtkMozEmbedSharp;
+
+namespace MonoDevelop.Gui
+{
+ public class MozillaControl : EmbedWidget, IWebBrowser
+ {
+ private static GLib.GType type;
+
+ static MozillaControl ()
+ {
+ type = RegisterGType (typeof (MozillaControl));
+ }
+
+ //FIXME: pick a better path, one of the Environment dirs
+ public MozillaControl () : base (type)
+ {
+ EmbedWidget.SetProfilePath ("/tmp", "MonoDevelop");
+ }
+
+ public void GoHome ()
+ {
+ LoadUrl ("about:blank");
+ }
+
+ public void GoSearch ()
+ {
+ }
+
+ public void Navigate (string Url, ref object Flags, ref object targetFrame, ref object postData, ref object headers)
+ {
+ // TODO: what is all that other crap for
+ LoadUrl (Url);
+ }
+
+ public void Refresh ()
+ {
+ this.Reload ((int) ReloadFlags.Reloadnormal);
+ }
+
+ public void Refresh2 ()
+ {
+ this.Reload ((int) ReloadFlags.Reloadnormal);
+ }
+
+ public void Stop ()
+ {
+ this.StopLoad ();
+ }
+
+ public void GetApplication ()
+ {
+ }
+
+ public void GetParent ()
+ {
+ }
+
+ public void GetContainer ()
+ {
+ }
+
+ public IHTMLDocument2 GetDocument ()
+ {
+ return null;
+ }
+ }
+}
Copied: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/README (from rev 416, trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/README)
Deleted: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/TODO
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/TODO 2004-01-09 07:11:53 UTC (rev 413)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/TODO 2004-01-10 00:26:41 UTC (rev 417)
@@ -1,6 +0,0 @@
-- make sure it works for more than the about box
-- ChangeLogTabPage crashes (in xml/xsl/html)
-- StyleSheets
-- finish and test IEControl (volunteers?)
-- decide how to build properly
-- fairly slow
Copied: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/HtmlControl/TODO (from rev 416, trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/TODO)
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Makefile
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Makefile 2004-01-10 00:25:20 UTC (rev 416)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Makefile 2004-01-10 00:26:41 UTC (rev 417)
@@ -3,8 +3,8 @@
all: $(DLL)
super-docker: */*.cs
- mcs /debug /out:$(DLL) /target:library /r:System.Drawing.dll /r:gtk-sharp.dll /r:gdk-sharp.dll /r:pango-sharp.dll /r:glib-sharp.dll /define:EXPERIMENTAL_DOCKER /recurse:*.cs
+ mcs /debug /out:$(DLL) /target:library /r:System.Drawing.dll /r:gtk-sharp.dll /r:gdk-sharp.dll /r:pango-sharp.dll /r:glib-sharp.dll /r:gtkmozembed-sharp.dll /define:EXPERIMENTAL_DOCKER /recurse:*.cs
$(DLL): */*.cs
- mcs /debug /out:$(DLL) /target:library /r:System.Drawing.dll /r:gtk-sharp.dll /r:gdk-sharp.dll /r:pango-sharp.dll /r:glib-sharp.dll /recurse:*.cs
+ mcs /debug /out:$(DLL) /target:library /r:System.Drawing.dll /r:gtk-sharp.dll /r:gdk-sharp.dll /r:pango-sharp.dll /r:glib-sharp.dll /r:gtkmozembed-sharp.dll /recurse:*.cs
Modified: trunk/MonoDevelop/src/Main/Base/Commands/ToolsCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/ToolsCommands.cs 2004-01-10 00:25:20 UTC (rev 416)
+++ trunk/MonoDevelop/src/Main/Base/Commands/ToolsCommands.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -17,6 +17,7 @@
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Gui.Dialogs;
+using MonoDevelop.Gui;
namespace ICSharpCode.SharpDevelop.Commands
{
Modified: trunk/MonoDevelop/src/Main/Base/Gui/BrowserDisplayBinding/HtmlViewPane.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/BrowserDisplayBinding/HtmlViewPane.cs 2004-01-10 00:25:20 UTC (rev 416)
+++ trunk/MonoDevelop/src/Main/Base/Gui/BrowserDisplayBinding/HtmlViewPane.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -1,187 +1,187 @@
-// <file>
-// <copyright see="prj:///doc/copyright.txt"/>
-// <license see="prj:///doc/license.txt"/>
-// <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-// <version value="$version"/>
-// </file>
-
-using System;
-using System.Drawing;
+// <file>
+// <copyright see="prj:///doc/copyright.txt"/>
+// <license see="prj:///doc/license.txt"/>
+// <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
+// <version value="$version"/>
+// </file>
+
+using System;
+using System.Drawing;
using Gtk;
-using GtkSharp;
-
-using ICSharpCode.SharpDevelop.Internal.Undo;
-using System.Drawing.Printing;
-using ICSharpCode.Core.Properties;
-
-using ICSharpCode.Core.Services;
-using ICSharpCode.Core.AddIns.Codons;
-using ICSharpCode.SharpDevelop.Gui;
-using ICSharpCode.SharpDevelop.Gui.HtmlControl;
-
-namespace ICSharpCode.SharpDevelop.BrowserDisplayBinding
-{
- public class BrowserPane : AbstractViewContent
- {
- protected HtmlViewPane htmlViewPane;
-
- public override Widget Control {
- get {
- return htmlViewPane;
- }
- }
-
- public override bool IsDirty {
- get {
- return false;
- }
- set {
- }
- }
-
- public override bool IsViewOnly {
- get {
- return true;
- }
- }
-
- protected BrowserPane(bool showNavigation) //: base (type)
- {
- htmlViewPane = new HtmlViewPane(showNavigation);
- //htmlViewPane.HtmlControl.TitleChange += new DWebBrowserEvents2_TitleChangeEventHandler(TitleChange);
- }
-
- public BrowserPane() : this(true)
- {
- }
-
- public override void Dispose()
- {
- htmlViewPane.Dispose();
- }
-
- public override void Load(string url)
- {
- htmlViewPane.Navigate(url);
- }
-
- public override void Save(string url)
- {
- Load(url);
- }
-
- //void TitleChange(object sender, DWebBrowserEvents2_TitleChangeEvent e)
- //{
- // ContentName = e.text;
- //}
- }
-
- public class HtmlViewPane : Gtk.Frame
- {
- HtmlControl htmlControl = null;
-
- VBox topPanel = new VBox (false, 2);
- Toolbar toolBar = new Toolbar ();
- Entry urlTextBox = new Entry ();
-
- bool isHandleCreated = false;
+using GtkSharp;
+
+using ICSharpCode.SharpDevelop.Internal.Undo;
+using System.Drawing.Printing;
+using ICSharpCode.Core.Properties;
+
+using ICSharpCode.Core.Services;
+using ICSharpCode.Core.AddIns.Codons;
+using ICSharpCode.SharpDevelop.Gui;
+using MonoDevelop.Gui;
+
+namespace ICSharpCode.SharpDevelop.BrowserDisplayBinding
+{
+ public class BrowserPane : AbstractViewContent
+ {
+ protected HtmlViewPane htmlViewPane;
+
+ public override Widget Control {
+ get {
+ return htmlViewPane;
+ }
+ }
+
+ public override bool IsDirty {
+ get {
+ return false;
+ }
+ set {
+ }
+ }
+
+ public override bool IsViewOnly {
+ get {
+ return true;
+ }
+ }
+
+ protected BrowserPane(bool showNavigation) //: base (type)
+ {
+ htmlViewPane = new HtmlViewPane(showNavigation);
+ //htmlViewPane.HtmlControl.TitleChange += new DWebBrowserEvents2_TitleChangeEventHandler(TitleChange);
+ }
+
+ public BrowserPane() : this(true)
+ {
+ }
+
+ public override void Dispose()
+ {
+ htmlViewPane.Dispose();
+ }
+
+ public override void Load(string url)
+ {
+ htmlViewPane.Navigate(url);
+ }
+
+ public override void Save(string url)
+ {
+ Load(url);
+ }
+
+ //void TitleChange(object sender, DWebBrowserEvents2_TitleChangeEvent e)
+ //{
+ // ContentName = e.text;
+ //}
+ }
+
+ public class HtmlViewPane : Gtk.Frame
+ {
+ HtmlControl htmlControl = null;
+
+ VBox topPanel = new VBox (false, 2);
+ Toolbar toolBar = new Toolbar ();
+ Entry urlTextBox = new Entry ();
+
+ bool isHandleCreated = false;
string lastUrl = null;
- static GLib.GType type;
-
- public HtmlControl HtmlControl {
- get {
- return htmlControl;
- }
+ static GLib.GType type;
+
+ public HtmlControl HtmlControl {
+ get {
+ return htmlControl;
+ }
}
static HtmlViewPane ()
{
type = RegisterGType (typeof (HtmlViewPane));
- }
-
- public HtmlViewPane(bool showNavigation) : base ()
- {
- //RequestSize = new Size (500, 500);
+ }
+
+ public HtmlViewPane(bool showNavigation) : base ()
+ {
+ //RequestSize = new Size (500, 500);
Shadow = Gtk.ShadowType.None;
VBox mainbox = new VBox (false, 2);
- if (showNavigation) {
-
- //topPanel.RequestSize = new Size (Width, 25);
- //topPanel.Dock = DockStyle.Top;
-
- //toolBar.Dock = DockStyle.None;
-
+ if (showNavigation) {
+
+ //topPanel.RequestSize = new Size (Width, 25);
+ //topPanel.Dock = DockStyle.Top;
+
+ //toolBar.Dock = DockStyle.None;
+
Button toolBarBack = new Button (Gtk.Stock.GoBack);
- toolBarBack.Clicked += new EventHandler (OnBackClicked);
+ toolBarBack.Clicked += new EventHandler (OnBackClicked);
Button toolBarForward = new Button (Gtk.Stock.GoForward);
- toolBarForward.Clicked += new EventHandler (OnForwardClicked);
+ toolBarForward.Clicked += new EventHandler (OnForwardClicked);
Button toolBarStop = new Button (Gtk.Stock.Stop);
- toolBarStop.Clicked += new EventHandler (OnStopClicked);
+ toolBarStop.Clicked += new EventHandler (OnStopClicked);
Button toolBarRefresh = new Button (Gtk.Stock.Refresh);
toolBarRefresh.Clicked += new EventHandler (OnRefreshClicked);
toolBar.ToolbarStyle = ToolbarStyle.Icons;
- toolBar.IconSize = IconSize.SmallToolbar;
+ toolBar.IconSize = IconSize.SmallToolbar;
toolBar.AppendWidget (toolBarBack, "", "");
toolBar.AppendWidget (toolBarForward, "", "");
toolBar.AppendWidget (toolBarStop, "", "");
- toolBar.AppendWidget (toolBarRefresh, "", "");
-
- topPanel.PackStart (toolBar);
+ toolBar.AppendWidget (toolBarRefresh, "", "");
- urlTextBox.Activated += new EventHandler (OnEntryActivated);
-
- topPanel.Add (urlTextBox);
- mainbox.PackStart (topPanel, false, false, 2);
- }
-
+ topPanel.PackStart (toolBar);
+
+ urlTextBox.Activated += new EventHandler (OnEntryActivated);
+
+ topPanel.Add (urlTextBox);
+ mainbox.PackStart (topPanel, false, false, 2);
+ }
+
htmlControl = new HtmlControl ();
- htmlControl.Control.Show ();
-
-// if (showNavigation) {
-// int height = 48;
-// axWebBrowser.Location = new Point(0, height);
-// axWebBrowser.Size = new Size(Width, Height - height);
-// axWebBrowser.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top;
-// axWebBrowser.Dock = DockStyle.Fill;
-// } else {
- //axWebBrowser.Dock = DockStyle.Fill;
-// }
- //axWebBrowser.HandleCreated += new EventHandler(this.CreatedWebBrowserHandle);
- //axWebBrowser.TitleChange += new DWebBrowserEvents2_TitleChangeEventHandler(TitleChange);
+ htmlControl.Control.Show ();
+
+// if (showNavigation) {
+// int height = 48;
+// axWebBrowser.Location = new Point(0, height);
+// axWebBrowser.Size = new Size(Width, Height - height);
+// axWebBrowser.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top;
+// axWebBrowser.Dock = DockStyle.Fill;
+// } else {
+ //axWebBrowser.Dock = DockStyle.Fill;
+// }
+ //axWebBrowser.HandleCreated += new EventHandler(this.CreatedWebBrowserHandle);
+ //axWebBrowser.TitleChange += new DWebBrowserEvents2_TitleChangeEventHandler(TitleChange);
mainbox.PackStart (htmlControl.Control);
-
+
this.Add (mainbox);
this.ShowAll ();
- }
-
- //void TitleChange(object sender, DWebBrowserEvents2_TitleChangeEvent e)
- //{
- // urlTextBox.Text = axWebBrowser.LocationURL;
+ }
+
+ //void TitleChange(object sender, DWebBrowserEvents2_TitleChangeEvent e)
+ //{
+ // urlTextBox.Text = axWebBrowser.LocationURL;
//}
void OnEntryActivated (object o, EventArgs args)
{
htmlControl.Url = urlTextBox.Text;
- }
-
- public void CreatedWebBrowserHandle(object sender, EventArgs evArgs)
- {
- isHandleCreated = true;
- if (lastUrl != null) {
- Navigate(lastUrl);
- }
- }
-
- public void Navigate(string name)
- {
- urlTextBox.Text = name;
- htmlControl.Url = name;
}
+ public void CreatedWebBrowserHandle(object sender, EventArgs evArgs)
+ {
+ isHandleCreated = true;
+ if (lastUrl != null) {
+ Navigate(lastUrl);
+ }
+ }
+
+ public void Navigate(string name)
+ {
+ urlTextBox.Text = name;
+ htmlControl.Url = name;
+ }
+
private void OnBackClicked (object o, EventArgs args)
{
//htmlControl.GoBack ();
@@ -200,6 +200,6 @@
private void OnRefreshClicked (object o, EventArgs args)
{
//htmlControl.Refresh ();
- }
- }
-}
+ }
+ }
+}
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs 2004-01-10 00:25:20 UTC (rev 416)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -1,97 +1,98 @@
-// <file>
-// <copyright see="prj:///doc/copyright.txt"/>
-// <license see="prj:///doc/license.txt"/>
-// <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-// <version value="$version"/>
-// </file>
-
-using System;
-using System.Resources;
-using System.IO;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-using ICSharpCode.SharpDevelop.Gui;
-using ICSharpCode.Core.Properties;
+// <file>
+// <copyright see="prj:///doc/copyright.txt"/>
+// <license see="prj:///doc/license.txt"/>
+// <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
+// <version value="$version"/>
+// </file>
+
+using System;
+using System.Resources;
+using System.IO;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+using ICSharpCode.SharpDevelop.Gui;
+using ICSharpCode.Core.Properties;
using ICSharpCode.Core.Services;
-using ICSharpCode.SharpDevelop.Gui.HtmlControl;
-
using Gdk;
using Gtk;
+using MonoDevelop.Gui;
+using Gdk;
+using Gtk;
using GtkSharp;
-using Pango;
-
-namespace ICSharpCode.SharpDevelop.Gui.Dialogs
-{
- public class ScrollBox : DrawingArea
+using Pango;
+
+namespace ICSharpCode.SharpDevelop.Gui.Dialogs
+{
+ public class ScrollBox : DrawingArea
{
- static GLib.GType type;
- Pixbuf image;
- string text;
+ static GLib.GType type;
+ Pixbuf image;
+ string text;
int scroll = -220;
uint hndlr;
Pango.Font font;
Drawable dr;
- bool initial = true;
-
- public int ScrollY {
- get {
- return scroll;
- }
- set {
- scroll = value;
- }
- }
-
- public Pixbuf Image {
- get {
- return image;
- }
- set {
- image = value;
- }
- }
-
- public string ScrollText {
- get {
- return text;
- }
- set {
- text = value;
- }
+ bool initial = true;
+
+ public int ScrollY {
+ get {
+ return scroll;
+ }
+ set {
+ scroll = value;
+ }
}
+ public Pixbuf Image {
+ get {
+ return image;
+ }
+ set {
+ image = value;
+ }
+ }
+
+ public string ScrollText {
+ get {
+ return text;
+ }
+ set {
+ text = value;
+ }
+ }
+
internal uint Handler
{
get { return hndlr; }
- }
+ }
static ScrollBox ()
{
type = RegisterGType (typeof (ScrollBox));
}
-
- public ScrollBox() : base (type)
+
+ public ScrollBox() : base (type)
{
this.RequestSize = new System.Drawing.Size (400, 220);
- this.ExposeEvent += new ExposeEventHandler (OnExposed);
-
+ this.ExposeEvent += new ExposeEventHandler (OnExposed);
+
ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
- this.Image = resourceService.GetBitmap ("Icons.AboutImage");
-
- text = "\"The most successful method of programming is to begin a program as simply as possible, test it, and then add to the program until it performs the required job.\"\n -- PDP8 handbook, Pg 9-64\n\n\n";
- //text = "\"The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every\n appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.\"\n -- FORTRAN manual for Xerox computers\n\n\n";
- //text = "\"No proper program contains an indication which as an operator-applied occurrence identifies an operator-defining occurrence which as an indication-applied occurrence identifies an indication-defining occurrence different from the one identified by the given indication as an indication- applied occurrence.\"\n -- ALGOL 68 Report\n\n\n";
- //text = "\"The '#pragma' command is specified in the ANSI standard to have an arbitrary implementation-defined effect. In the GNU C preprocessor, `#pragma' first attempts to run the game rogue; if that fails, it tries to run the game hack; if that fails, it tries to run GNU Emacs displaying the Tower of Hanoi; if that fails, it reports a fatal error. In any case, preprocessing does not continue.\"\n --From an old GNU C Preprocessor document";
+ this.Image = resourceService.GetBitmap ("Icons.AboutImage");
- Gtk.Function ScrollHandler = new Gtk.Function (ScrollDown);
hndlr = Timeout.Add (20, ScrollHandler);
- }
-
- bool ScrollDown ()
- {
+ text = "\"The most successful method of programming is to begin a program as simply as possible, test it, and then add to the program until it performs the required job.\"\n -- PDP8 handbook, Pg 9-64\n\n\n";
+ //text = "\"The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every\n appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.\"\n -- FORTRAN manual for Xerox computers\n\n\n";
+ //text = "\"No proper program contains an indication which as an operator-applied occurrence identifies an operator-defining occurrence which as an indication-applied occurrence identifies an indication-defining occurrence different from the one identified by the given indication as an indication- applied occurrence.\"\n -- ALGOL 68 Report\n\n\n";
+ //text = "\"The '#pragma' command is specified in the ANSI standard to have an arbitrary implementation-defined effect. In the GNU C preprocessor, `#pragma' first attempts to run the game rogue; if that fails, it tries to run the game hack; if that fails, it tries to run GNU Emacs displaying the Tower of Hanoi; if that fails, it reports a fatal error. In any case, preprocessing does not continue.\"\n --From an old GNU C Preprocessor document";
+
+ Gtk.Function ScrollHandler = new Gtk.Function (ScrollDown); hndlr = Timeout.Add (20, ScrollHandler);
+ }
+
+ bool ScrollDown ()
+ {
++scroll;
- // FIXME: only redraw the right side
+ // FIXME: only redraw the right side
this.QueueDraw ();
//this.QueueDrawArea (200, 0, 200, 220);
- return true;
+ return true;
}
private void DrawImage ()
@@ -102,7 +103,7 @@
this.GdkWindow.GetInternalPaintInfo (out dr, out xoff, out yoff);
dr.DrawPixbuf (new Gdk.GC (dr), Image, 0, 0, 0, 0, -1, -1, RgbDither.Normal, 0, 0);
-
+
}
}
@@ -118,42 +119,42 @@
layout.SetText (text);
dr.DrawLayout (new Gdk.GC (dr), 200, 0 - scroll, layout);
- if (scroll > 220 ) {
- scroll = -scroll;
+ if (scroll > 220 ) {
+ scroll = -scroll;
}
- }
-
- protected void OnExposed (object o, ExposeEventArgs args)
+ }
+
+ protected void OnExposed (object o, ExposeEventArgs args)
{
this.DrawImage ();
- this.DrawText ();
- }
- }
-
- public class CommonAboutDialog : Dialog
+ this.DrawText ();
+ }
+ }
+
+ public class CommonAboutDialog : Dialog
{
- static GLib.GType type;
+ static GLib.GType type;
static FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
AuthorAboutTabPage aatp;
ChangeLogTabPage changelog;
ScrollBox aboutPictureScrollBox;
-
- public ScrollBox ScrollBox {
- get {
- return (ScrollBox) aboutPictureScrollBox;
- }
- }
-
+
+ public ScrollBox ScrollBox {
+ get {
+ return (ScrollBox) aboutPictureScrollBox;
+ }
+ }
+
static PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
static CommonAboutDialog ()
{
type = RegisterGType (typeof (CommonAboutDialog));
}
-
- public CommonAboutDialog() : base (type)
- {
+
+ public CommonAboutDialog() : base (type)
+ {
}
public CommonAboutDialog(string title, Gtk.Window parent, DialogFlags flags) : base (title, parent, flags)
@@ -177,10 +178,10 @@
nb.AppendPage (aatp.Control, new Label ("Authors"));
nb.AppendPage (changelog.Control, new Label ("ChangeLog"));
nb.AppendPage (vinfo, new Label ("Version Info"));
- this.VBox.PackStart (nb);
+ this.VBox.PackStart (nb);
Gtk.Button close = new Gtk.Button (Gtk.Stock.Close);
- close.Clicked += new EventHandler (OnCloseClicked);
- close.Show ();
+ close.Clicked += new EventHandler (OnCloseClicked);
+ close.Show ();
this.ActionArea.Add (close);
this.ShowAll ();
}
@@ -208,6 +209,6 @@
{
changelog.DelayedInitialize ();
}
- }
- }
-}
+ }
+ }
+}
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs 2004-01-10 00:25:20 UTC (rev 416)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs 2004-01-10 00:26:41 UTC (rev 417)
@@ -1,127 +1,128 @@
-// <file>
-// <copyright see="prj:///doc/copyright.txt"/>
-// <license see="prj:///doc/license.txt"/>
-// <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-// <version value="$version"/>
-// </file>
-
-using System;
-using System.Drawing;
-using Gtk;
-
-using System.Resources;
-using System.IO;
-using System.Text;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-using ICSharpCode.SharpDevelop.Gui;
-using ICSharpCode.Core.Properties;
-
-using ICSharpCode.Core.Services;
-
-using ICSharpCode.SharpDevelop.Internal.Project.Collections;
-using ICSharpCode.SharpDevelop.Internal.Project;
-using ICSharpCode.SharpDevelop.Services;
-
-namespace ICSharpCode.SharpDevelop.Gui.Dialogs
-{
- public class AboutSharpDevelopTabPage : VBox
- {
- static GLib.GType type;
- Label buildLabel = new Label ();
- Label buildTextBox = new Label ();
- Label versionLabel = new Label ();
- Label versionTextBox = new Label ();
- Label sponsorLabel = new Label ();
+// <file>
+// <copyright see="prj:///doc/copyright.txt"/>
+// <license see="prj:///doc/license.txt"/>
+// <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
+// <version value="$version"/>
+// </file>
+
+using System;
+using System.Drawing;
+using Gtk;
+
+using System.Resources;
+using System.IO;
+using System.Text;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+using ICSharpCode.SharpDevelop.Gui;
+using ICSharpCode.Core.Properties;
+
+using ICSharpCode.Core.Services;
+
+using ICSharpCode.SharpDevelop.Internal.Project.Collections;
+using ICSharpCode.SharpDevelop.Internal.Project;
+using ICSharpCode.SharpDevelop.Services;
+using MonoDevelop.Gui;
+
+namespace ICSharpCode.SharpDevelop.Gui.Dialogs
+{
+ public class AboutSharpDevelopTabPage : VBox
+ {
+ static GLib.GType type;
+ Label buildLabel = new Label ();
+ Label buildTextBox = new Label ();
+ Label versionLabel = new Label ();
+ Label versionTextBox = new Label ();
+ Label sponsorLabel = new Label ();
static AboutSharpDevelopTabPage ()
{
type = RegisterGType (typeof (AboutSharpDevelopTabPage));
}
-
- public AboutSharpDevelopTabPage() : base (type)
+
+ public AboutSharpDevelopTabPage() : base (type)
{
- HBox hbox = new HBox (false, 0);
- Version v = Assembly.GetEntryAssembly().GetName().Version;
- versionTextBox.Text = v.Major + "." + v.Minor;
- buildTextBox.Text = v.Revision + "." + v.Build;
-
- ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
- versionLabel.Text = resourceService.GetString("Dialog.About.label1Text");
-
- //versionLabel.TabIndex = 1;
- hbox.PackStart (versionLabel, false, false, 10);
-
- //versionTextBox.TabIndex = 4;
- hbox.PackStart (versionTextBox, false, false, 10);
-
- buildLabel.Text = resourceService.GetString("Dialog.About.label2Text");
- //buildLabel.TabIndex = 2;
- hbox.PackStart (buildLabel, false, false, 10);
+ HBox hbox = new HBox (false, 0);
+ Version v = Assembly.GetEntryAssembly().GetName().Version;
+ versionTextBox.Text = v.Major + "." + v.Minor;
+ buildTextBox.Text = v.Revision + "." + v.Build;
- //buildTextBox.TabIndex = 3;
- hbox.PackStart (buildTextBox, false, false, 10);
+ ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
+ versionLabel.Text = resourceService.GetString("Dialog.About.label1Text");
+
+ //versionLabel.TabIndex = 1;
+ hbox.PackStart (versionLabel, false, false, 10);
+
+ //versionTextBox.TabIndex = 4;
+ hbox.PackStart (versionTextBox, false, false, 10);
+
+ buildLabel.Text = resourceService.GetString("Dialog.About.label2Text");
+ //buildLabel.TabIndex = 2;
+ hbox.PackStart (buildLabel, false, false, 10);
+
+ //buildTextBox.TabIndex = 3;
+ hbox.PackStart (buildTextBox, false, false, 10);
this.PackStart (hbox, false, false, 5);
-
- sponsorLabel.Text = "Released under the GNU General Public license.\n\n" +
- "Sponsored by AlphaSierraPapa\n" +
- " http://www.AlphaSierraPapa.com";
- //sponsorLabel.TabIndex = 8;
- this.PackStart (sponsorLabel, false, false, 5);
- this.ShowAll ();
- }
- }
-
- public class AuthorAboutTabPage : ICSharpCode.SharpDevelop.Gui.HtmlControl.HtmlControl
- {
- public AuthorAboutTabPage()
- {
- try {
- FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
- PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
-
- string html = ConvertXml.ConvertToString(fileUtilityService.SharpDevelopRootPath +
- System.IO.Path.DirectorySeparatorChar + "doc" +
- System.IO.Path.DirectorySeparatorChar + "AUTHORS.xml",
-
- propertyService.DataDirectory +
- System.IO.Path.DirectorySeparatorChar + "ConversionStyleSheets" +
- System.IO.Path.DirectorySeparatorChar + "ShowAuthors.xsl");
-
-
- base.CascadingStyleSheet = propertyService.DataDirectory + System.IO.Path.DirectorySeparatorChar +
- "resources" + System.IO.Path.DirectorySeparatorChar +
- "css" + System.IO.Path.DirectorySeparatorChar +
- "SharpDevelopStandard.css";
- base.Html = html;
- } catch (Exception e) {
- IMessageService messageService = (IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError(e);
- }
- }
- }
-
- public class ChangeLogTabPage : ICSharpCode.SharpDevelop.Gui.HtmlControl.HtmlControl
- {
- public ChangeLogTabPage()
- {
- try {
- FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
- PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
-
- string html = ConvertXml.ConvertToString(fileUtilityService.SharpDevelopRootPath +
- System.IO.Path.DirectorySeparatorChar + "doc" +
- System.IO.Path.DirectorySeparatorChar + "ChangeLog.xml",
-
- propertyService.DataDirectory +
- System.IO.Path.DirectorySeparatorChar + "ConversionStyleSheets" +
- System.IO.Path.DirectorySeparatorChar + "ShowChangeLog.xsl");
-
- base.CascadingStyleSheet = propertyService.DataDirectory + System.IO.Path.DirectorySeparatorChar +
- "resources" + System.IO.Path.DirectorySeparatorChar +
- "css" + System.IO.Path.DirectorySeparatorChar +
- "SharpDevelopStandard.css";
+
+ sponsorLabel.Text = "Released under the GNU General Public license.\n\n" +
+ "Sponsored by AlphaSierraPapa\n" +
+ " http://www.AlphaSierraPapa.com";
+ //sponsorLabel.TabIndex = 8;
+ this.PackStart (sponsorLabel, false, false, 5);
+ this.ShowAll ();
+ }
+ }
+
+ public class AuthorAboutTabPage : HtmlControl
+ {
+ public AuthorAboutTabPage()
+ {
+ try {
+ FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+ PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
+
+ string html = ConvertXml.ConvertToString(fileUtilityService.SharpDevelopRootPath +
+ System.IO.Path.DirectorySeparatorChar + "doc" +
+ System.IO.Path.DirectorySeparatorChar + "AUTHORS.xml",
+
+ propertyService.DataDirectory +
+ System.IO.Path.DirectorySeparatorChar + "ConversionStyleSheets" +
+ System.IO.Path.DirectorySeparatorChar + "ShowAuthors.xsl");
+
+
+ base.CascadingStyleSheet = propertyService.DataDirectory + System.IO.Path.DirectorySeparatorChar +
+ "resources" + System.IO.Path.DirectorySeparatorChar +
+ "css" + System.IO.Path.DirectorySeparatorChar +
+ "SharpDevelopStandard.css";
+ base.Html = html;
+ } catch (Exception e) {
+ IMessageService messageService = (IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
+ messageService.ShowError(e);
+ }
+ }
+ }
+
+ public class ChangeLogTabPage : HtmlControl
+ {
+ public ChangeLogTabPage()
+ {
+ try {
+ FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+ PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
+
+ string html = ConvertXml.ConvertToString(fileUtilityService.SharpDevelopRootPath +
+ System.IO.Path.DirectorySeparatorChar + "doc" +
+ System.IO.Path.DirectorySeparatorChar + "ChangeLog.xml",
+
+ propertyService.DataDirectory +
+ System.IO.Path.DirectorySeparatorChar + "ConversionStyleSheets" +
+ System.IO.Path.DirectorySeparatorChar + "ShowChangeLog.xsl");
+
+ base.CascadingStyleSheet = propertyService.DataDirectory + System.IO.Path.DirectorySeparatorChar +
+ "resources" + System.IO.Path.DirectorySeparatorChar +
+ "css" + System.IO.Path.DirectorySeparatorChar +
+ "SharpDevelopStandard.css";
//base.Html = html;
// feel free to add your name and email here
@@ -138,37 +139,37 @@
+ "<li>nricciar</li>"
+ "<li>jba</li>"
+ "</ul></body></html>";
-
- } catch (Exception e) {
- IMessageService messageService = (IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError(e);
- }
- }
- }
-
-
- public class VersionInformationTabPage : VBox
+
+ } catch (Exception e) {
+ IMessageService messageService = (IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
+ messageService.ShowError(e);
+ }
+ }
+ }
+
+
+ public class VersionInformationTabPage : VBox
{
- private static GLib.GType type;
- private TreeView listView;
+ private static GLib.GType type;
+ private Gtk.TreeView listView;
private Button button;
private TreeStore store;
static VersionInformationTabPage ()
{
type = RegisterGType (typeof (VersionInformationTabPage));
- }
-
- public VersionInformationTabPage() : base (type)
+ }
+
+ public VersionInformationTabPage() : base (type)
{
ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
- TreeView listView = new TreeView ();
+ listView = new Gtk.TreeView ();
listView.RulesHint = true;
listView.AppendColumn (resourceService.GetString("Dialog.About.VersionInfoTabName.NameColumn"), new CellRendererText (), "text", 0);
listView.AppendColumn (resourceService.GetString("Dialog.About.VersionInfoTabName.VersionColumn"), new CellRendererText (), "text", 1);
listView.AppendColumn (resourceService.GetString("Dialog.About.VersionInfoTabName.PathColumn"), new CellRendererText (), "text", 2);
-
+
FillListView ();
ScrolledWindow sw = new ScrolledWindow ();
sw.Add (listView);
@@ -182,49 +183,49 @@
hbox.PackStart (new Label (), false, true, 3);
this.PackStart (hbox, false, false, 6);
- listView.Model = store;
- }
-
- void FillListView()
+ listView.Model = store;
+ }
+
+ void FillListView()
{
store = new TreeStore (typeof (string), typeof (string), typeof (string));
-
- foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
- AssemblyName name = asm.GetName();
-
+
+ foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
+ AssemblyName name = asm.GetName();
+
string loc;
-
- try {
- loc = asm.Location;
- } catch (Exception) {
- loc = "dynamic";
+
+ try {
+ loc = asm.Location;
+ } catch (Exception) {
+ loc = "dynamic";
}
- store.AppendValues (name.Name, name.Version.ToString(), loc);
+ store.AppendValues (name.Name, name.Version.ToString(), loc);
}
- store.SetSortColumnId (0, SortType.Ascending);
- }
-
- void CopyButtonClick(object o, EventArgs args)
- {
- StringBuilder versionInfo = new StringBuilder();
- foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
- AssemblyName name = asm.GetName();
- versionInfo.Append(name.Name);
- versionInfo.Append(",");
- versionInfo.Append(name.Version.ToString());
- versionInfo.Append(",");
- try {
- versionInfo.Append(asm.Location);
- } catch (Exception) {
- versionInfo.Append("dynamic");
- }
-
- versionInfo.Append(Environment.NewLine);
- }
-
- //Clipboard.SetDataObject(new DataObject(System.Windows.Forms.DataFormats.Text, versionInfo.ToString()), true);
- }
- }
-}
+ store.SetSortColumnId (0, SortType.Ascending);
+ }
+
+ void CopyButtonClick(object o, EventArgs args)
+ {
+ StringBuilder versionInfo = new StringBuilder();
+ foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
+ AssemblyName name = asm.GetName();
+ versionInfo.Append(name.Name);
+ versionInfo.Append(",");
+ versionInfo.Append(name.Version.ToString());
+ versionInfo.Append(",");
+ try {
+ versionInfo.Append(asm.Location);
+ } catch (Exception) {
+ versionInfo.Append("dynamic");
+ }
+
+ versionInfo.Append(Environment.NewLine);
+ }
+
+ //Clipboard.SetDataObject(new DataObject(System.Windows.Forms.DataFormats.Text, versionInfo.ToString()), true);
+ }
+ }
+}
Modified: trunk/MonoDevelop/src/Main/Base/Makefile
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Makefile 2004-01-10 00:25:20 UTC (rev 416)
+++ trunk/MonoDevelop/src/Main/Base/Makefile 2004-01-10 00:26:41 UTC (rev 417)
@@ -126,14 +126,6 @@
./Gui/CompletionDatabaseWizard/ChooseLocationPanel.cs \
./Gui/ViewContentCollection.cs \
./Gui/IWorkbenchWindow.cs \
-./Gui/HtmlControl/IHTMLDocument2.cs \
-./Gui/HtmlControl/HtmlControl.cs \
-./Gui/HtmlControl/BrowserNavigateEventArgs.cs \
-./Gui/HtmlControl/IWebBrowser.cs \
-./Gui/HtmlControl/IHTMLElement.cs \
-./Gui/HtmlControl/IWebBrowserEvents.cs \
-./Gui/HtmlControl/MozillaControl.cs \
-./Gui/HtmlControl/ControlType.cs \
./Gui/Workbench/Layouts/SdiWorkspaceWindow.cs \
./Gui/Workbench/Layouts/SdiWorkspaceLayout.cs \
./Gui/Workbench/WorkbenchMemento.cs \
@@ -361,5 +353,4 @@
/r:System.Data.dll /r:System.Web.Services.dll /define:LINUX \
/define:GTK /r:gtk-sharp.dll /r:gdk-sharp.dll /r:glib-sharp.dll \
/r:pango-sharp.dll \
- /r:gtkmozembed-sharp.dll \
$(SOURCES)
More information about the Monodevelop-patches-list
mailing list