Skip to content

Commit

Permalink
Remove Windows ifdef for VK_DECIMAL
Browse files Browse the repository at this point in the history
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
https://gitlab.gnome.org/GNOME/gtk/-/commit/578043f97e891e423648c9f70ddf1d185f4615c4
  • Loading branch information
Bob-IT committed Sep 12, 2024
1 parent 4314bf1 commit 9dee343
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 28 deletions.
5 changes: 0 additions & 5 deletions gnucash/gnome-utils/gnc-amount-edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 0 additions & 6 deletions gnucash/gnome/gnc-budget-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 1 addition & 5 deletions gnucash/register/register-gnome/formulacell-gnome.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 1 addition & 7 deletions gnucash/register/register-gnome/gnucash-sheet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 0 additions & 5 deletions gnucash/register/register-gnome/pricecell-gnome.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9dee343

Please sign in to comment.