[Monodevelop-patches-list] r2707 - in trunk/MonoDevelop/Core/src/MonoDevelop.Base: . Gui/Dialogs Services
Lluis Sanchez <lluis@ximian.com>
lluis at mono-cvs.ximian.com
Wed Aug 3 08:04:32 EDT 2005
Author: lluis
Date: 2005-08-03 08:04:32 -0400 (Wed, 03 Aug 2005)
New Revision: 2707
Modified:
trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ErrorDialog.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelop.Base.mdp
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/MessageService.cs
Log:
2005-08-03 Lluis Sanchez Gual <lluis at novell.com>
* MonoDevelop.Base.mdp: Removed unused file.
* Services/MessageService.cs:
* Gui/Dialogs/ErrorDialog.cs: Added Show method. Removed debug code.
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-08-03 09:45:09 UTC (rev 2706)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-08-03 12:04:32 UTC (rev 2707)
@@ -1,3 +1,9 @@
+2005-08-03 Lluis Sanchez Gual <lluis at novell.com>
+
+ * MonoDevelop.Base.mdp: Removed unused file.
+ * Services/MessageService.cs:
+ * Gui/Dialogs/ErrorDialog.cs: Added Show method. Removed debug code.
+
2005-08-03 Lluis Sanchez Gual <lluis at novell.com>
* Gui/Search/SearchOptions.cs: Store options at the correct property set.
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ErrorDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ErrorDialog.cs 2005-08-03 09:45:09 UTC (rev 2706)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/ErrorDialog.cs 2005-08-03 12:04:32 UTC (rev 2707)
@@ -32,7 +32,7 @@
namespace MonoDevelop.Gui.Dialogs
{
- internal class ErrorDialog
+ public class ErrorDialog
{
[Glade.Widget ("ErrorDialog")] Dialog dialog;
[Glade.Widget] Button okButton;
@@ -43,13 +43,12 @@
TextTag tagNoWrap;
TextTag tagWrap;
- public ErrorDialog ()
+ public ErrorDialog (Window parent)
{
new Glade.XML (null, "Base.glade", "ErrorDialog", null).Autoconnect (this);
- dialog.TransientFor = (Window) WorkbenchSingleton.Workbench;
+ dialog.TransientFor = parent;
okButton.Clicked += new EventHandler (OnClose);
expander.Activated += new EventHandler (OnExpanded);
- descriptionLabel.SizeAllocated += new SizeAllocatedHandler (OnResized);
descriptionLabel.ModifyBg (StateType.Normal, new Gdk.Color (255,0,0));
tagNoWrap = new TextTag ("nowrap");
@@ -67,6 +66,7 @@
string message = value;
while (message.EndsWith ("\r") || message.EndsWith ("\n"))
message = message.Substring (0, message.Length - 1);
+ if (!message.EndsWith (".")) message += ".";
descriptionLabel.Text = message;
}
}
@@ -80,10 +80,15 @@
detailsTextView.Buffer.InsertWithTags (ref it, text, tagNoWrap);
}
+ public void Show ()
+ {
+ dialog.ShowAll ();
+ }
+
public void Run ()
{
dialog.ShowAll ();
-// dialog.Run ();
+ dialog.Run ();
}
void OnClose (object sender, EventArgs args)
@@ -103,13 +108,5 @@
dialog.Resize (w, 1);
return false;
}
-
- void OnResized (object sender, SizeAllocatedArgs args)
- {
- int w, h;
- descriptionLabel.GetSizeRequest (out w, out h);
- Console.WriteLine ("AW:" + descriptionLabel.Allocation.Width);
- Console.WriteLine ("RW:" + w);
- }
}
}
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelop.Base.mdp
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelop.Base.mdp 2005-08-03 09:45:09 UTC (rev 2706)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelop.Base.mdp 2005-08-03 12:04:32 UTC (rev 2707)
@@ -459,7 +459,6 @@
<File name="./Gui/Pads/SolutionPad/TypeNodeBuilder.cs" subtype="Code" buildaction="Compile" />
<File name="./Gui/Search/DefaultFind.cs" subtype="Code" buildaction="Compile" />
<File name="./Gui/Search/IFind.cs" subtype="Code" buildaction="Compile" />
- <File name="./Gui/Search/ISearchableDocument.cs" subtype="Code" buildaction="Compile" />
<File name="./Gui/Search/ITextBufferStrategy.cs" subtype="Code" buildaction="Compile" />
<File name="./Gui/Search/SearchOptions.cs" subtype="Code" buildaction="Compile" />
<File name="./Gui/Search/SearchReplaceInFilesManager.cs" subtype="Code" buildaction="Compile" />
@@ -552,4 +551,4 @@
<File name="./Internal/ProgressMonitoring/SynchronizedProgressMonitor.cs" subtype="Code" buildaction="Compile" />
<File name="./Internal/ProgressMonitoring/AggregatedOperationMonitor.cs" subtype="Code" buildaction="Compile" />
</Contents>
-</Project>
\ No newline at end of file
+</Project>
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/MessageService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/MessageService.cs 2005-08-03 09:45:09 UTC (rev 2706)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/MessageService.cs 2005-08-03 12:04:32 UTC (rev 2707)
@@ -53,7 +53,7 @@
public void ShowError (Exception ex, string message)
{
- ErrorDialog dlg = new ErrorDialog ();
+ ErrorDialog dlg = new ErrorDialog ((Window) WorkbenchSingleton.Workbench);
if (message != null) {
dlg.Message = message;
@@ -68,7 +68,7 @@
dlg.AddDetails ("No more details available.", true);
}
- dlg.Run ();
+ dlg.Show ();
}
public void ShowWarning(string message)
More information about the Monodevelop-patches-list
mailing list