[gnumeric] [gtk] adapt to deprecation of GTK_WIDGET_CAN_FOCUS



commit 7bbaa24060df9cd519638c11570f2f7180c865d3
Author: Jody Goldberg <jody gnome org>
Date:   Thu Jan 14 08:48:27 2010 -0500

    [gtk] adapt to deprecation of GTK_WIDGET_CAN_FOCUS

 NEWS                             |    1 +
 configure.in                     |    2 +-
 src/dialogs/dialog-cell-format.c |    8 ++++++++
 3 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 6147085..99a6ee1 100644
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,7 @@ Jody:
 	* More win32 build fixes (xslt for libgda & poppler).
 	* Fix pango test harness.
 	* Fix use of Tab in ExprEntry for gurus.
+	* Adapt to latest gtk-2.19.3 GSEAL.
 
 Morten:
 	* Fix GCD border case.  [#606870]
diff --git a/configure.in b/configure.in
index dd3a624..8a98716 100644
--- a/configure.in
+++ b/configure.in
@@ -678,7 +678,7 @@ LIBS="$GNUMERIC_LIBS $LIBS"
 
 AC_CHECK_FUNCS(g_date_set_time_t g_slice_alloc g_option_context_set_delocalize)
 AC_CHECK_FUNCS(pango_font_map_create_context)
-AC_CHECK_FUNCS(gtk_orientable_set_orientation gtk_adjustment_configure gtk_widget_get_window gsf_open_pkg_foreach_rel gtk_dialog_get_content_area gtk_entry_get_buffer)
+AC_CHECK_FUNCS(gtk_orientable_set_orientation gtk_adjustment_configure gtk_widget_get_window gsf_open_pkg_foreach_rel gtk_dialog_get_content_area gtk_entry_get_buffer gtk_widget_get_can_focus)
 AC_CHECK_FUNCS(gsf_infile_msvba_steal_modules)
 
 AC_MSG_CHECKING([for PANGO_WEIGHT_THIN etc.])
diff --git a/src/dialogs/dialog-cell-format.c b/src/dialogs/dialog-cell-format.c
index c1cc5dd..82064ab 100644
--- a/src/dialogs/dialog-cell-format.c
+++ b/src/dialogs/dialog-cell-format.c
@@ -2369,10 +2369,18 @@ set_initial_focus (FormatState *s)
 	else
 		focus_widget = NULL;
 
+
+#ifdef HAVE_GTK_WIDGET_GET_CAN_FOCUS
+	if (focus_widget
+	    && gtk_widget_get_can_focus (focus_widget)
+	    && gtk_widget_is_sensitive (focus_widget))
+		gtk_widget_grab_focus (focus_widget);
+#else
 	if (focus_widget
 	    && GTK_WIDGET_CAN_FOCUS (focus_widget)
 	    && GTK_WIDGET_IS_SENSITIVE (focus_widget))
 		gtk_widget_grab_focus (focus_widget);
+#endif
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]