gnome-subtitles r994 - in trunk: . src/GnomeSubtitles/Core
- From: pcastro svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-subtitles r994 - in trunk: . src/GnomeSubtitles/Core
- Date: Sat, 7 Jun 2008 22:45:42 +0000 (UTC)
Author: pcastro
Date: Sat Jun 7 22:45:42 2008
New Revision: 994
URL: http://svn.gnome.org/viewvc/gnome-subtitles?rev=994&view=rev
Log:
Do not use Tooltips because it has been deprecated.
Clear the tooltips when Undo and Redo are not sensitive.
Modified:
trunk/gnome-subtitles.mdp
trunk/src/GnomeSubtitles/Core/Menus.cs
Modified: trunk/gnome-subtitles.mdp
==============================================================================
--- trunk/gnome-subtitles.mdp (original)
+++ trunk/gnome-subtitles.mdp Sat Jun 7 22:45:42 2008
@@ -2,15 +2,15 @@
<Configurations active="Debug">
<Configuration name="Debug" ctype="DotNetProjectConfiguration">
<Output directory="build" assembly="gnome-subtitles" />
- <Build debugmode="True" target="Exe" />
+ <Build debugmode="True" target="WinExe" />
<Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
- <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" win32Icon="." ctype="CSharpCompilerParameters" />
+ <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="GnomeSubtitles.Executable" generatexmldocumentation="False" win32Icon="." ctype="CSharpCompilerParameters" />
</Configuration>
<Configuration name="Release" ctype="DotNetProjectConfiguration">
<Output directory="build" assembly="gnome-subtitles" />
- <Build debugmode="False" target="Exe" />
+ <Build debugmode="False" target="WinExe" />
<Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
- <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="False" mainclass="" generatexmldocumentation="False" win32Icon="." ctype="CSharpCompilerParameters" />
+ <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="False" mainclass="GnomeSubtitles.Executable" generatexmldocumentation="False" win32Icon="." ctype="CSharpCompilerParameters" />
</Configuration>
</Configurations>
<Contents>
Modified: trunk/src/GnomeSubtitles/Core/Menus.cs
==============================================================================
--- trunk/src/GnomeSubtitles/Core/Menus.cs (original)
+++ trunk/src/GnomeSubtitles/Core/Menus.cs Sat Jun 7 22:45:42 2008
@@ -26,7 +26,6 @@
namespace GnomeSubtitles {
public class Menus {
- private Tooltips tooltips = new Tooltips();
/* Constant strings */
private string videoTagText = Catalog.GetString("Video");
@@ -36,7 +35,6 @@
public Menus () {
(Global.GetWidget(WidgetNames.Toolbar) as Toolbar).UnsetStyle(); //Unset toolbar style that was set in Glade
SetToolbarHomogeneity();
- tooltips.Enable();
}
public void BlankStartUp () {
@@ -514,20 +512,36 @@
private void UpdateUndoRedoMessages () {
CommandManager commandManager = Global.CommandManager;
+
+ /* Update undo messages */
+ ToolButton undoButton = Global.GetWidget(WidgetNames.UndoButton) as ToolButton;
if (commandManager.CanUndo) {
string undoDescription = commandManager.UndoDescription;
- ToolButton undoButton = Global.GetWidget(WidgetNames.UndoButton) as ToolButton;
- undoButton.SetTooltip(tooltips, undoDescription, null);
+ SetTooltip(undoButton, undoDescription);
MenuItem undoMenuItem = Global.GetWidget(WidgetNames.EditUndo) as MenuItem;
(undoMenuItem.Child as Label).Text = undoDescription;
}
+ else
+ ClearTooltip(undoButton);
+
+ /* Update redo messages */
+ ToolButton redoButton = Global.GetWidget(WidgetNames.RedoButton) as ToolButton;
if (commandManager.CanRedo) {
string redoDescription = commandManager.RedoDescription;
- ToolButton redoButton = Global.GetWidget(WidgetNames.RedoButton) as ToolButton;
- redoButton.SetTooltip(tooltips, redoDescription, null);
+ SetTooltip(redoButton, redoDescription);
MenuItem redoMenuItem = Global.GetWidget(WidgetNames.EditRedo) as MenuItem;
(redoMenuItem.Child as Label).Text = redoDescription;
}
+ else
+ ClearTooltip(redoButton);
+ }
+
+ private void SetTooltip (Widget widget, string text) {
+ widget.TooltipText = text;
+ }
+
+ private void ClearTooltip (Widget widget) {
+ SetTooltip(widget, null);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]