Remove Windows ifdef for VK_DECIMAL

There was Windows specific ifdef code for the setting of the event
keyval property to GDK_KEY_KP_Decimal in five locations which is now
redundant. The requirement for this was fixed in Gtk version 3.17.2
578043f97e
This commit is contained in:
Robert Fewell 2024-09-12 10:17:42 +01:00
parent 4314bf1c9f
commit 9dee3433c1
5 changed files with 2 additions and 28 deletions

View File

@ -278,11 +278,6 @@ gnc_amount_edit_key_press (GtkWidget *widget, GdkEventKey *event, gpointer user_
gtk_widget_set_tooltip_text (GTK_WIDGET(gae->image), NULL);
}
#ifdef G_OS_WIN32
/* gdk never sends GDK_KEY_KP_Decimal on win32. See #486658 */
if (event->hardware_keycode == VK_DECIMAL)
event->keyval = GDK_KEY_KP_Decimal;
#endif
if (event->keyval == GDK_KEY_KP_Decimal)
{
gchar *decimal;

View File

@ -773,12 +773,6 @@ gbv_key_press_cb (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
if (event->type != GDK_KEY_PRESS || !priv->temp_cr)
return FALSE;
#ifdef G_OS_WIN32
/* gdk never sends GDK_KEY_KP_Decimal on win32. See #486658 */
if (event->hardware_keycode == VK_DECIMAL)
event->keyval = GDK_KEY_KP_Decimal;
#endif
switch (event->keyval)
{
case GDK_KEY_KP_Decimal:

View File

@ -71,11 +71,7 @@ gnc_formula_cell_direct_update( BasicCell *bcell,
* this after fixing a bug where one copy was kept up to date, and the
* other not. So, fix this.
*/
#ifdef G_OS_WIN32
/* gdk never sends GDK_KEY_KP_Decimal on win32. See #486658 */
if (event->hardware_keycode == VK_DECIMAL)
event->keyval = GDK_KEY_KP_Decimal;
#endif
switch (event->keyval)
{
case GDK_KEY_Return:

View File

@ -1876,14 +1876,8 @@ gnucash_sheet_key_press_event (GtkWidget *widget, GdkEventKey *event)
sheet = GNUCASH_SHEET(widget);
/* bug#60582 comment#27 2
save shift state to enable <shift minus> and <shift equal>
bug#618434
save keyval to handle GDK_KEY_KP_Decimal event
*/
#ifdef G_OS_WIN32
/* gdk never sends GDK_KEY_KP_Decimal on win32. See #486658 */
if (event->hardware_keycode == VK_DECIMAL)
event->keyval = GDK_KEY_KP_Decimal;
#endif
sheet->shift_state = event->state & GDK_SHIFT_MASK;
sheet->keyval_state =
(event->keyval == GDK_KEY_KP_Decimal) ? GDK_KEY_KP_Decimal : 0;

View File

@ -60,11 +60,6 @@ gnc_price_cell_direct_update (BasicCell *bcell,
is_return = FALSE;
#ifdef G_OS_WIN32
/* gdk never sends GDK_KEY_KP_Decimal on win32. See #486658 */
if (event->hardware_keycode == VK_DECIMAL)
event->keyval = GDK_KEY_KP_Decimal;
#endif
switch (event->keyval)
{
case GDK_KEY_Return: