[gnumeric] gtk+: gtk_widget_is_toplevel
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] gtk+: gtk_widget_is_toplevel
- Date: Fri, 28 May 2010 13:05:42 +0000 (UTC)
commit 2eba802fe2cb1e558b823d50f590140cfdca7ce9
Author: Morten Welinder <terra gnome org>
Date: Fri May 28 09:05:19 2010 -0400
gtk+: gtk_widget_is_toplevel
configure.in | 2 +-
src/widgets/ChangeLog | 3 +++
src/widgets/gnumeric-expr-entry.c | 6 +++++-
3 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/configure.in b/configure.in
index ca5cdc0..f0c1b5e 100644
--- a/configure.in
+++ b/configure.in
@@ -689,7 +689,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_state 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(gtk_orientable_set_orientation gtk_adjustment_configure gtk_widget_get_state gtk_widget_is_toplevel 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/widgets/ChangeLog b/src/widgets/ChangeLog
index 5f93422..ed33c7e 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,5 +1,8 @@
2010-05-28 Morten Welinder <terra gnome org>
+ * gnumeric-expr-entry.c (cb_icon_clicked): Use
+ gtk_widget_is_toplevel, if present.
+
* gnumeric-cell-renderer-text.c (gnumeric_cell_renderer_text_render):
Use gtk_widget_get_state, if present.
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index a2c46a3..955e207 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -39,6 +39,10 @@
#include <gdk/gdkkeysyms.h>
#include <string.h>
+#ifndef HAVE_GTK_WIDGET_IS_TOPLEVEL
+#define gtk_widget_is_toplevel(w_) (GTK_WIDGET_FLAGS ((w_)) & GTK_TOPLEVEL)
+#endif
+
typedef struct {
GnmRangeRef ref;
int text_start;
@@ -187,7 +191,7 @@ cb_icon_clicked (GtkButton *icon,
* not rolled up.
*/
- if (toplevel != NULL && (GTK_WIDGET_FLAGS (toplevel) & GTK_TOPLEVEL)) {
+ if (toplevel != NULL && gtk_widget_is_toplevel (toplevel)) {
GtkWidget *old_entry_parent;
GtkWidget *old_toplevel_child;
GParamSpec **container_props_pspec;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]