[longomatch] Print properly hotkeys when using GDK
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Print properly hotkeys when using GDK
- Date: Mon, 6 Feb 2012 02:12:40 +0000 (UTC)
commit a5357d6ce7f61c78e6a22fda5ee7a272cee88fd0
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sat Jan 28 10:28:11 2012 +0100
Print properly hotkeys when using GDK
LongoMatch.Core/Store/HotKey.cs | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/LongoMatch.Core/Store/HotKey.cs b/LongoMatch.Core/Store/HotKey.cs
index 5224684..fc6a4a3 100644
--- a/LongoMatch.Core/Store/HotKey.cs
+++ b/LongoMatch.Core/Store/HotKey.cs
@@ -24,6 +24,9 @@ using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Mono.Unix;
+#if HAVE_GTK
+using Gdk;
+#endif
namespace LongoMatch.Store
{
@@ -119,17 +122,20 @@ namespace LongoMatch.Store
public override string ToString()
{
- string modifierS;
+ string modifierS = "";
+
if(!Defined)
return Catalog.GetString("Not defined");
- if(Modifier == 3)//ModifierType.Mod1Mask)
+
+#if HAVE_GTK
+ if(Modifier == (int)ModifierType.Mod1Mask)
modifierS = "<Alt>+";
- else if(Modifier == 0)// ModifierType.ShiftMask)
+ else if(Modifier == (int)ModifierType.ShiftMask)
modifierS = "<Shift>+";
- else
- modifierS = "";
-
+ return string.Format("{0}{1}", modifierS,((Gdk.Key)Key).ToString().ToLower());
+#else
return string.Format("{0}{1}", modifierS,(Key.ToString()).ToLower());
+#endif
}
#endregion
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]