[goffice] Use gtk_widget_get_realized/mapped.
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Use gtk_widget_get_realized/mapped.
- Date: Sat, 27 Mar 2010 08:14:20 +0000 (UTC)
commit 08081062036746e95d79ac770229e3fc0e635d84
Author: Jean Brefort <jean brefort normalesup org>
Date: Sat Mar 27 09:08:01 2010 +0100
Use gtk_widget_get_realized/mapped.
ChangeLog | 13 +++++++++++++
configure.in | 2 +-
goffice/canvas/goc-canvas.c | 2 +-
goffice/canvas/goc-item.c | 4 ++--
goffice/graph/gog-child-button.c | 4 ++--
goffice/gtk/go-font-sel.c | 2 +-
goffice/gtk/go-gtk-compat.h | 8 ++++----
goffice/gtk/go-selector.c | 4 ++--
goffice/gtk/goffice-gtk.c | 6 +++---
9 files changed, 29 insertions(+), 16 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6a80c04..326f8d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2010-03-27 Jean Brefort <jean brefort normalesup org>
+
+ * configure.in: fixed gtk compatibility macro names.
+ * goffice/canvas/goc-canvas.c (goc_canvas_invalidate): ditto.
+ * goffice/canvas/goc-item.c (goc_item_dispose),
+ (goc_item_invalidate): ditto.
+ * goffice/graph/gog-child-button.c (gog_child_button_popup): ditto.
+ * goffice/gtk/go-font-sel.c (select_row): ditto.
+ * goffice/gtk/go-gtk-compat.h: ditto.
+ * goffice/gtk/go-selector.c (go_selector_popup): ditto.
+ * goffice/gtk/goffice-gtk.c (cb_activate_default),
+ (cb_parent_mapped), (go_gtk_window_set_transient): ditto.
+
2010-03-26 Morten Welinder <terra gnome org>
* goffice/app/go-conf-keyfile.c (go_conf_set_str_list): Handle
diff --git a/configure.in b/configure.in
index 986ff6b..4510c4d 100644
--- a/configure.in
+++ b/configure.in
@@ -442,7 +442,7 @@ AC_CHECK_FUNCS(gtk_adjustment_get_page_size gtk_adjustment_get_upper \
gtk_selection_data_get_length gtk_selection_data_get_target gtk_tearoff_menu_item_get_torn_off \
gtk_tearoff_menu_item_set_torn_off gtk_widget_get_allocation gtk_widget_get_has_window \
gtk_widget_get_state gtk_widget_get_style gtk_widget_get_visible gtk_widget_get_window \
- gtk_widget_has_focus gtk_widget_is_mapped gtk_widget_is_realized gtk_widget_set_can_default \
+ gtk_widget_has_focus gtk_widget_get_mapped gtk_widget_get_realized gtk_widget_set_can_default \
gtk_widget_is_sensitive gtk_widget_set_can_focus gtk_widget_set_has_focus \
gtk_widget_set_receives_default gtk_window_get_default_widget)
LIBS=$SAVE_LIBS
diff --git a/goffice/canvas/goc-canvas.c b/goffice/canvas/goc-canvas.c
index 91b2ddf..5d6c2fd 100644
--- a/goffice/canvas/goc-canvas.c
+++ b/goffice/canvas/goc-canvas.c
@@ -425,7 +425,7 @@ goc_canvas_get_pixels_per_unit (GocCanvas *canvas)
void
goc_canvas_invalidate (GocCanvas *canvas, double x0, double y0, double x1, double y1)
{
- if (!gtk_widget_is_realized (canvas))
+ if (!gtk_widget_get_realized (GTK_WIDGET (canvas)))
return;
x0 = (x0 - canvas->scroll_x1) * canvas->pixels_per_unit;
y0 = (y0 - canvas->scroll_y1) * canvas->pixels_per_unit;
diff --git a/goffice/canvas/goc-item.c b/goffice/canvas/goc-item.c
index 9e31c93..a234b31 100644
--- a/goffice/canvas/goc-item.c
+++ b/goffice/canvas/goc-item.c
@@ -210,7 +210,7 @@ goc_item_dispose (GObject *object)
item->canvas->last_item = NULL;
if (item->canvas->grabbed_item == item)
item->canvas->grabbed_item = NULL;
- if (gtk_widget_is_realized (item->canvas)) {
+ if (gtk_widget_get_realized (GTK_WIDGET (item->canvas))) {
item->cached_bounds = TRUE; /* avoids a call to update_bounds */
goc_item_invalidate (item);
}
@@ -451,7 +451,7 @@ goc_item_invalidate (GocItem *item)
if (!parent)
return;
- if (!gtk_widget_is_realized (item->canvas))
+ if (!gtk_widget_get_realized (GTK_WIDGET (item->canvas)))
return;
if (!item->cached_bounds)
diff --git a/goffice/graph/gog-child-button.c b/goffice/graph/gog-child-button.c
index 668a3c6..78288df 100644
--- a/goffice/graph/gog-child-button.c
+++ b/goffice/graph/gog-child-button.c
@@ -284,10 +284,10 @@ gog_child_button_set_object (GogChildButton *child_button, GogObject *gog_object
static void
gog_child_button_popup (GogChildButton *child_button, guint button, guint32 event_time)
{
- if (!gtk_widget_is_realized (child_button))
+ if (!gtk_widget_get_realized (GTK_WIDGET (child_button)))
return;
- if (gtk_widget_is_mapped (child_button->menu))
+ if (gtk_widget_get_mapped (GTK_WIDGET (child_button->menu)))
return;
child_button->button_handling_in_progress = TRUE;
diff --git a/goffice/gtk/go-font-sel.c b/goffice/gtk/go-font-sel.c
index 7c719a2..ddb92b1 100644
--- a/goffice/gtk/go-font-sel.c
+++ b/goffice/gtk/go-font-sel.c
@@ -230,7 +230,7 @@ select_row (GtkTreeView *list, int row)
path = gtk_tree_path_new_from_indices (row, -1);
gtk_tree_selection_select_path (gtk_tree_view_get_selection (list), path);
- if (gtk_widget_is_realized (list))
+ if (gtk_widget_get_realized (GTK_WIDGET (list)))
cb_list_adjust (list);
gtk_tree_path_free (path);
}
diff --git a/goffice/gtk/go-gtk-compat.h b/goffice/gtk/go-gtk-compat.h
index 54419ac..89e8690 100644
--- a/goffice/gtk/go-gtk-compat.h
+++ b/goffice/gtk/go-gtk-compat.h
@@ -94,12 +94,12 @@
# define gtk_widget_has_focus(w) GTK_WIDGET_HAS_FOCUS (w)
#endif
-#ifndef HAVE_GTK_WIDGET_IS_MAPPED
-# define gtk_widget_is_mapped(w) GTK_WIDGET_MAPPED (w)
+#ifndef HAVE_GTK_WIDGET_GET_MAPPED
+# define gtk_widget_get_mapped(w) GTK_WIDGET_MAPPED (w)
#endif
-#ifndef HAVE_GTK_WIDGET_IS_REALIZED
-# define gtk_widget_is_realized(w) GTK_WIDGET_REALIZED (w)
+#ifndef HAVE_GTK_WIDGET_GET_REALIZED
+# define gtk_widget_get_realized(w) GTK_WIDGET_REALIZED (w)
#endif
#ifndef HAVE_GTK_WIDGET_GET_VISIBLE
diff --git a/goffice/gtk/go-selector.c b/goffice/gtk/go-selector.c
index 5d43515..4e06c60 100644
--- a/goffice/gtk/go-selector.c
+++ b/goffice/gtk/go-selector.c
@@ -229,10 +229,10 @@ go_selector_popup (GOSelector *selector)
priv = selector->priv;
- if (!gtk_widget_is_realized (selector))
+ if (!gtk_widget_get_realized (GTK_WIDGET (selector)))
return;
- if (gtk_widget_is_mapped (priv->palette))
+ if (gtk_widget_get_mapped (GTK_WIDGET (priv->palette)))
return;
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->button), TRUE);
diff --git a/goffice/gtk/goffice-gtk.c b/goffice/gtk/goffice-gtk.c
index 5d993cc..796c502 100644
--- a/goffice/gtk/goffice-gtk.c
+++ b/goffice/gtk/goffice-gtk.c
@@ -271,7 +271,7 @@ static void
cb_activate_default (GtkWindow *window)
{
GtkWidget *w = gtk_window_get_default_widget (window);
- if (w && gtk_widget_is_sensitive (w))
+ if (w && gtk_widget_get_sensitive (w))
gtk_widget_activate (w);
}
@@ -338,7 +338,7 @@ go_pango_measure_string (PangoContext *context, PangoFontDescription const *font
static void
cb_parent_mapped (GtkWidget *parent, GtkWindow *window)
{
- if (gtk_widget_is_mapped (window)) {
+ if (gtk_widget_get_mapped (GTK_WIDGET (window))) {
gtk_window_present (window);
g_signal_handlers_disconnect_by_func (G_OBJECT (parent),
G_CALLBACK (cb_parent_mapped), window);
@@ -373,7 +373,7 @@ go_gtk_window_set_transient (GtkWindow *toplevel, GtkWindow *window)
gtk_window_set_position (window, position);
- if (!gtk_widget_is_mapped (toplevel))
+ if (!gtk_widget_get_mapped (GTK_WIDGET (toplevel)))
g_signal_connect_after (G_OBJECT (toplevel),
"map",
G_CALLBACK (cb_parent_mapped), window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]