projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Included gdkkeysyms-compat.h where necessary
[pspp]
/
src
/
ui
/
gui
/
psppire-keypad.c
diff --git
a/src/ui/gui/psppire-keypad.c
b/src/ui/gui/psppire-keypad.c
index 84107c743ab89302d6972a12b6a96c2bf87fa014..5f60e7c2e50e70228455197dc84a5ad2749a74ad 100644
(file)
--- a/
src/ui/gui/psppire-keypad.c
+++ b/
src/ui/gui/psppire-keypad.c
@@
-1,5
+1,5
@@
/* PSPPIRE - a graphical user interface for PSPP.
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2010
, 2011
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-17,6
+17,7
@@
#include <config.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <config.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
+#include <gdk/gdkkeysyms-compat.h>
#include "psppire-keypad.h"
enum {
#include "psppire-keypad.h"
enum {
@@
-206,9
+207,6
@@
enter_leave_notify (GtkWidget *widget,
if (event->type == GDK_ENTER_NOTIFY)
gtk_widget_grab_focus (widget);
if (event->type == GDK_ENTER_NOTIFY)
gtk_widget_grab_focus (widget);
- if (event->type == GDK_LEAVE_NOTIFY)
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
-
return FALSE;
}
return FALSE;
}
@@
-217,7
+215,7
@@
key_release_callback (GtkWidget *widget,
GdkEventKey *event,
gpointer user_data)
{
GdkEventKey *event,
gpointer user_data)
{
- if ( !
(GTK_WIDGET_FLAGS (widget) & GTK_HAS_FOCUS)
)
+ if ( !
gtk_widget_has_focus (widget)
)
return FALSE;
switch (event->keyval)
return FALSE;
switch (event->keyval)
@@
-313,8
+311,7
@@
psppire_keypad_init (PsppireKeypad *kp)
const int digit_voffset = 0;
const int digit_hoffset = 3;
const int digit_voffset = 0;
const int digit_hoffset = 3;
- GTK_WIDGET_SET_FLAGS (kp, GTK_CAN_FOCUS);
- GTK_WIDGET_UNSET_FLAGS (kp, GTK_HAS_FOCUS);
+ gtk_widget_set_can_focus (GTK_WIDGET (kp), TRUE);
kp->dispose_has_run = FALSE;
kp->dispose_has_run = FALSE;