Re: GDK_KP_Decimal (on Windows)

2015-05-08 Thread John Emmas

On 04/05/2015 16:49, LRN wrote:

-  *ksymp - GDK_KP_DECIMAL; break;
+  *ksymp = GDK_KEY_KP_Decimal; break;



I just updated from gtk-2-24 git which pulled in the above change 
(commit #1f74f12d).  Whilst the change might be technically more correct 
(and it matches the style for GTK+ version 3) it doesn't match the style 
that was being used in version 2.  In version 2, the other entries in 
'gdkkeys-win32.c' all seem to use this style:-


GDK_KP_WHATEVER

as opposed to this:-

GDK_KEY_KP_WHATEVER

I'm not criticising...  just pointing out that the two versions are 
different.  Thanks.


John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GDK_KP_Decimal (on Windows)

2015-05-08 Thread Emmanuele Bassi
Hi;

On 8 May 2015 at 07:35, John Emmas john...@tiscali.co.uk wrote:
 On 04/05/2015 16:49, LRN wrote:

 -  *ksymp - GDK_KP_DECIMAL; break;
 +  *ksymp = GDK_KEY_KP_Decimal; break;


 I just updated from gtk-2-24 git which pulled in the above change (commit
 #1f74f12d).  Whilst the change might be technically more correct (and it
 matches the style for GTK+ version 3) it doesn't match the style that was
 being used in version 2.  In version 2, the other entries in
 'gdkkeys-win32.c' all seem to use this style:-

 GDK_KP_WHATEVER

 as opposed to this:-

 GDK_KEY_KP_WHATEVER

 I'm not criticising...  just pointing out that the two versions are
 different.  Thanks.

It's inconsequential. The GDK_KEY_* and GDK_* key symbol macros are
generated from the same source. The old GDK_* key symbols are
considered deprecated — mostly because they trample all over the GDK
namespace — and the GDK_KEY_* symbols are preferred, especially for
porting to GTK+ 3.x.

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GDK_KP_Decimal (on Windows)

2015-05-04 Thread LRN
On 01.05.2015 14:35, Matthias Clasen wrote:
 On Thu, Apr 30, 2015 at 2:37 AM, John Emmas wrote:
 Thanks.  Here's a patch produced by one of my colleagues:-

 --- a/gdk/win32/gdkkeys-win32.c 2015-04-29 16:33:41.545406159 +0200
 +++ b/gdk/win32/gdkkeys-win32.c 2015-04-29 16:35:16.821576820 +0200
 @@ -145,6 +145,8 @@
*ksymp = GDK_Meta_R; break;
  case VK_APPS:
*ksymp = GDK_Menu; break;
 +case VK_DECIMAL:
 +  *ksymp = GDK_KP_Decimal; break;
  case VK_MULTIPLY:
*ksymp = GDK_KP_Multiply; break;
  case VK_ADD:

 
 Thanks, applied.

Apply *this*.

-- 
O ascii ribbon - stop html email! - www.asciiribbon.org
From 79c863c59574eea24f9bcc5f6353c3244b3d9c17 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?=
 =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= lrn1...@gmail.com
Date: Mon, 4 May 2015 15:32:22 +
Subject: [PATCH] Use GDK_KEY_KP_Decimal instead of GDK_KP_Decimal

Fixes the FTBFS introduced in 578043f97e891e423648c9f70ddf1d185f4615c4
---
 gdk/win32/gdkkeys-win32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdk/win32/gdkkeys-win32.c b/gdk/win32/gdkkeys-win32.c
index f8c0283..920081c 100644
--- a/gdk/win32/gdkkeys-win32.c
+++ b/gdk/win32/gdkkeys-win32.c
@@ -165,7 +165,7 @@ handle_special (guint  vk,
 case VK_APPS:
   *ksymp = GDK_KEY_Menu; break;
 case VK_DECIMAL:
-  *ksymp = GDK_KP_Decimal; break;
+  *ksymp = GDK_KEY_KP_Decimal; break;
 case VK_MULTIPLY:
   *ksymp = GDK_KEY_KP_Multiply; break;
 case VK_ADD:
-- 
2.3.4



0x922360B0.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GDK_KP_Decimal (on Windows)

2015-05-01 Thread Matthias Clasen
On Thu, Apr 30, 2015 at 2:37 AM, John Emmas john...@tiscali.co.uk wrote:

 Thanks.  Here's a patch produced by one of my colleagues:-

 --- a/gdk/win32/gdkkeys-win32.c 2015-04-29 16:33:41.545406159 +0200
 +++ b/gdk/win32/gdkkeys-win32.c 2015-04-29 16:35:16.821576820 +0200
 @@ -145,6 +145,8 @@
*ksymp = GDK_Meta_R; break;
  case VK_APPS:
*ksymp = GDK_Menu; break;
 +case VK_DECIMAL:
 +  *ksymp = GDK_KP_Decimal; break;
  case VK_MULTIPLY:
*ksymp = GDK_KP_Multiply; break;
  case VK_ADD:


Thanks, applied.
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GDK_KP_Decimal (on Windows)

2015-04-30 Thread John Emmas

On 29/04/2015 19:03, Jasper St. Pierre wrote:

It was likely left out by accident, and nobody so far hit this code
path yet. Thanks for finding it! It looks super easy to fix.



Thanks.  Here's a patch produced by one of my colleagues:-

--- a/gdk/win32/gdkkeys-win32.c 2015-04-29 16:33:41.545406159 +0200
+++ b/gdk/win32/gdkkeys-win32.c 2015-04-29 16:35:16.821576820 +0200
@@ -145,6 +145,8 @@
   *ksymp = GDK_Meta_R; break;
 case VK_APPS:
   *ksymp = GDK_Menu; break;
+case VK_DECIMAL:
+  *ksymp = GDK_KP_Decimal; break;
 case VK_MULTIPLY:
   *ksymp = GDK_KP_Multiply; break;
 case VK_ADD:


___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GDK_KP_Decimal (on Windows)

2015-04-29 Thread Jasper St. Pierre
It was likely left out by accident, and nobody so far hit this code
path yet. Thanks for finding it! It looks super easy to fix.

On Wed, Apr 29, 2015 at 8:01 AM, John Emmas john...@tiscali.co.uk wrote:
 On 29/04/2015 08:54, John Emmas wrote:


 The Windows version looks slightly different:-

 case VK_ADD:
   *ksymp = GDK_KP_Add; break;
 case VK_SEPARATOR:
   *ksymp = GDK_KP_Separator; break;
 case VK_SUBTRACT:
   *ksymp = GDK_KP_Subtract; break;

 // some others

 However, the list for Windows doesn't seem to include 'GDK_KP_Decimal'.
 Might this explain why the decimal point key is getting ignored on Windows?


 Just for the hell of it I decided to add an entry for GDK_KP_Decimal - and
 sure enough, it seems to have fixed the problem.  Does anyone know of a
 valid reason why that one got left out for the Windows list?  Thanks.


 John
 ___
 gtk-devel-list mailing list
 gtk-devel-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/gtk-devel-list



-- 
  Jasper
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GDK_KP_Decimal (on Windows)

2015-04-29 Thread John Emmas

On 29/04/2015 16:25, Ignacio Casal Quinteiro wrote:

Hi John,

out of curiosity can you check if this is true for gtk3?



Hi Ignacio.  I don't actually build Gtk+3 but it looks like 
GDK_KP_Decimal is still missing.


Strangely, it's also missing from 'gdkkeys-x11.c' - and yet I got told 
that the decimal key works on Linux ?!?


John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GDK_KP_Decimal (on Windows)

2015-04-29 Thread Ignacio Casal Quinteiro
Hi John,

out of curiosity can you check if this is true for gtk3?

Cheers.

On Wed, Apr 29, 2015 at 5:01 PM, John Emmas john...@tiscali.co.uk wrote:

 On 29/04/2015 08:54, John Emmas wrote:


 The Windows version looks slightly different:-

 case VK_ADD:
   *ksymp = GDK_KP_Add; break;
 case VK_SEPARATOR:
   *ksymp = GDK_KP_Separator; break;
 case VK_SUBTRACT:
   *ksymp = GDK_KP_Subtract; break;

 // some others

 However, the list for Windows doesn't seem to include 'GDK_KP_Decimal'.
 Might this explain why the decimal point key is getting ignored on Windows?


 Just for the hell of it I decided to add an entry for GDK_KP_Decimal - and
 sure enough, it seems to have fixed the problem.  Does anyone know of a
 valid reason why that one got left out for the Windows list?  Thanks.


 John
 ___
 gtk-devel-list mailing list
 gtk-devel-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/gtk-devel-list




-- 
Ignacio Casal Quinteiro
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GDK_KP_Decimal (on Windows)

2015-04-29 Thread John Emmas

On 29/04/2015 08:54, John Emmas wrote:


The Windows version looks slightly different:-

case VK_ADD:
  *ksymp = GDK_KP_Add; break;
case VK_SEPARATOR:
  *ksymp = GDK_KP_Separator; break;
case VK_SUBTRACT:
  *ksymp = GDK_KP_Subtract; break;

// some others

However, the list for Windows doesn't seem to include 
'GDK_KP_Decimal'.  Might this explain why the decimal point key is 
getting ignored on Windows?




Just for the hell of it I decided to add an entry for GDK_KP_Decimal - 
and sure enough, it seems to have fixed the problem.  Does anyone know 
of a valid reason why that one got left out for the Windows list?  Thanks.


John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list