[goffice] Fixed gtk_widget_send_focus_change definition
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Fixed gtk_widget_send_focus_change definition
- Date: Tue, 27 Apr 2010 18:35:40 +0000 (UTC)
commit e576139c716b394d344d13afdfca7fdc6a86cd3c
Author: Jean Brefort <jean brefort normalesup org>
Date: Tue Apr 27 20:34:42 2010 +0200
Fixed gtk_widget_send_focus_change definition
goffice/gtk/go-gtk-compat.h | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/goffice/gtk/go-gtk-compat.h b/goffice/gtk/go-gtk-compat.h
index be79083..e11f71c 100644
--- a/goffice/gtk/go-gtk-compat.h
+++ b/goffice/gtk/go-gtk-compat.h
@@ -112,17 +112,20 @@
#ifndef HAVE_GTK_WIDGET_SEND_FOCUS_CHANGE
#define gtk_widget_send_focus_change(w,ev) \
+ do { \
g_object_ref (widget); \
- gtk_widget_set_has_focus (widget, in); \
+ if (t) GTK_WIDGET_SET_FLAGS ((w), GTK_HAS_FOCUS); \
+ else GTK_WIDGET_UNSET_FLAGS ((w), GTK_HAS_FOCUS); \
gtk_widget_event (widget, &fevent); \
g_object_notify (G_OBJECT (widget), "has-focus"); \
- g_object_unref (widget);
+ g_object_unref (widget); \
+ } while (0)
#endif
#ifndef HAVE_GTK_WIDGET_SET_CAN_DEFAULT
#define gtk_widget_set_can_default(w,t) \
do { \
- if (t) GTK_WIDGET_SET_FLAGS ((w), GTK_CAN_DEFAULT); \
+ if (t) GTK_WIDGET_SET_FLAGS ((w), GTK_CAN_DEFAULT); \
else GTK_WIDGET_UNSET_FLAGS ((w), GTK_CAN_DEFAULT); \
} while (0)
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]