[Monodevelop-patches-list] r482 - in trunk/MonoDevelop/src/Main/Base: Commands Gui/Dialogs
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Tue Jan 13 18:35:27 EST 2004
Author: tberman
Date: 2004-01-13 18:35:27 -0500 (Tue, 13 Jan 2004)
New Revision: 482
Modified:
trunk/MonoDevelop/src/Main/Base/Commands/AutostartCommands.cs
trunk/MonoDevelop/src/Main/Base/Commands/HelpCommands.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TipOfTheDay.cs
Log:
everyone's favourite feature: Tip of the Day
and some small code changes
Modified: trunk/MonoDevelop/src/Main/Base/Commands/AutostartCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/AutostartCommands.cs 2004-01-13 23:11:54 UTC (rev 481)
+++ trunk/MonoDevelop/src/Main/Base/Commands/AutostartCommands.cs 2004-01-13 23:35:27 UTC (rev 482)
@@ -167,7 +167,7 @@
PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
- idleEventHandler = new EventHandler(ShowTipOfTheDay);
+ //idleEventHandler = new EventHandler(ShowTipOfTheDay);
//Application.Idle += idleEventHandler;
IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
@@ -212,6 +212,8 @@
((Gtk.Window)WorkbenchSingleton.Workbench).ShowAll ();
+ ShowTipOfTheDay (null, null);
+
// finally run the workbench window ...
Gtk.Application.Run();
Modified: trunk/MonoDevelop/src/Main/Base/Commands/HelpCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/HelpCommands.cs 2004-01-13 23:11:54 UTC (rev 481)
+++ trunk/MonoDevelop/src/Main/Base/Commands/HelpCommands.cs 2004-01-13 23:35:27 UTC (rev 482)
@@ -89,9 +89,7 @@
{
public override void Run()
{
- ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
- string didyouknowtext = resourceService.GetString("Dialog.TipOfTheDay.DidYouKnowText");
- TipOfTheDayDialog totdd = new TipOfTheDayDialog (didyouknowtext);
+ TipOfTheDayDialog totdd = new TipOfTheDayDialog ();
totdd.Run ();
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TipOfTheDay.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TipOfTheDay.cs 2004-01-13 23:11:54 UTC (rev 481)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TipOfTheDay.cs 2004-01-13 23:35:27 UTC (rev 482)
@@ -44,6 +44,7 @@
TextView view = new TextView ();
view.WrapMode = WrapMode.Word;
+ view.Editable = false;
buffer = view.Buffer;
buffer.InsertAtCursor(tips[curtip]);
@@ -72,17 +73,21 @@
ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
- public TipOfTheDayDialog(string didyouknowtext) : base ((Window) WorkbenchSingleton.Workbench,
- DialogFlags.Modal,
+ public TipOfTheDayDialog() : base ((Window) WorkbenchSingleton.Workbench,
+ DialogFlags.DestroyWithParent,
MessageType.Info,
ButtonsType.None,
- didyouknowtext)
+ "")
{
+
+ this.Modal = false;
+
+ this.Title = resourceService.GetString ("Dialog.TipOfTheDay.DidYouKnowText");
+
this.SetDefaultSize (320, 240);
viewTipsAtStartCheckBox = new CheckButton("Show tips at startup");
- viewTipsAtStartCheckBox.Active = propertyService.GetProperty(
- "ICSharpCode.SharpDevelop.Gui.Dialog.TipOfTheDayView.ShowTipsAtStartup", true);
+ viewTipsAtStartCheckBox.Active = propertyService.GetProperty("ICSharpCode.SharpDevelop.Gui.Dialog.TipOfTheDayView.ShowTipsAtStartup", true);
this.AddActionWidget(viewTipsAtStartCheckBox, (int) UserDefinedResponseType.Show);
nextTipButton = (Button) this.AddButton ("_Next Tip", (int) UserDefinedResponseType.Next);
@@ -114,8 +119,7 @@
tipview.NextTip();
break;
case (int) UserDefinedResponseType.Show :
- propertyService.SetProperty("ICSharpCode.SharpDevelop.Gui.Dialog.TipOfTheDayView.ShowTipsAtStartup",
- viewTipsAtStartCheckBox.Active);
+ propertyService.SetProperty("ICSharpCode.SharpDevelop.Gui.Dialog.TipOfTheDayView.ShowTipsAtStartup", viewTipsAtStartCheckBox.Active);
break;
}
}
More information about the Monodevelop-patches-list
mailing list