[libslab] Remove GTK+ deprecated symbols
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libslab] Remove GTK+ deprecated symbols
- Date: Sat, 22 May 2010 17:27:30 +0000 (UTC)
commit b15a7ef85dc314f0b8b085fe8cfc7ac621fecdf1
Author: Javier Jardón <jjardon gnome org>
Date: Sat May 22 01:07:44 2010 +0200
Remove GTK+ deprecated symbols
Also added GNOME_MAINTAINER_MODE_DEFINES macro to configure.ac to
get notified when we were using deprecated symbols
Still pending: gtk_button_pressed() and gtk_button_leave()
https://bugzilla.gnome.org/show_bug.cgi?id=615671
configure.ac | 3 ++-
libslab/Makefile.am | 3 ++-
libslab/search-bar.c | 6 +++---
libslab/search-entry.c | 4 ++--
libslab/tile.c | 7 ++++---
5 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5810360..0b38415 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,7 @@ dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
GNOME_COMPILE_WARNINGS
+GNOME_MAINTAINER_MODE_DEFINES
AC_ISC_POSIX
AC_PROG_CC
@@ -47,7 +48,7 @@ dnl Check that we meet the dependencies
dnl ==============================================
GLIB_REQUIRED=2.18.0
-GTK_REQUIRED=2.14.0
+GTK_REQUIRED=2.20.0
AM_PATH_GLIB_2_0($GLIB_REQUIRED,,,gobject)
diff --git a/libslab/Makefile.am b/libslab/Makefile.am
index a1a149b..3506016 100644
--- a/libslab/Makefile.am
+++ b/libslab/Makefile.am
@@ -1,7 +1,8 @@
INCLUDES = \
-I$(top_srcdir) \
$(LIBSLAB_CFLAGS) \
- $(WARN_CFLAGS)
+ $(WARN_CFLAGS) \
+ $(DISABLE_DEPRECATED)
HEADER_FILES= \
diff --git a/libslab/search-bar.c b/libslab/search-bar.c
index 8e3f465..31e54ad 100644
--- a/libslab/search-bar.c
+++ b/libslab/search-bar.c
@@ -129,7 +129,7 @@ nld_search_bar_has_focus (NldSearchBar * search_bar)
{
NldSearchBarPrivate *priv = NLD_SEARCH_BAR_GET_PRIVATE (search_bar);
- return GTK_WIDGET_HAS_FOCUS (GTK_WIDGET (priv->entry));
+ return gtk_widget_has_focus (GTK_WIDGET (priv->entry));
}
static void
@@ -187,7 +187,7 @@ nld_search_bar_get_show_contexts (NldSearchBar * search_bar)
{
NldSearchBarPrivate *priv = NLD_SEARCH_BAR_GET_PRIVATE (search_bar);
- return priv->context_picker && GTK_WIDGET_VISIBLE (priv->context_picker);
+ return priv->context_picker && gtk_widget_get_visible (GTK_WIDGET (priv->context_picker));
}
static NldSearchContextPicker *
@@ -344,7 +344,7 @@ nld_search_bar_get_context_id (NldSearchBar * search_bar)
{
NldSearchBarPrivate *priv = NLD_SEARCH_BAR_GET_PRIVATE (search_bar);
- if (priv->context_picker && GTK_WIDGET_VISIBLE (priv->context_picker))
+ if (priv->context_picker && gtk_widget_get_visible (GTK_WIDGET (priv->context_picker)))
return nld_search_context_picker_get_context (priv->context_picker);
else
return -1;
diff --git a/libslab/search-entry.c b/libslab/search-entry.c
index 1d17c94..416f337 100644
--- a/libslab/search-entry.c
+++ b/libslab/search-entry.c
@@ -96,7 +96,7 @@ nld_search_entry_realize (GtkWidget * widget)
return;
priv->height = height - 2;
- gdkcolor = &widget->style->fg[GTK_WIDGET_STATE (widget)];
+ gdkcolor = &widget->style->fg[gtk_widget_get_state (widget)];
snprintf (color, 6, "%02x%02x%02x", gdkcolor->red >> 8, gdkcolor->green >> 8,
gdkcolor->blue >> 8);
svg = g_strdup_printf (SEARCH_ENTRY_WATERMARK_SVG, color, color);
@@ -130,7 +130,7 @@ nld_search_entry_expose_event (GtkWidget * widget, GdkEventExpose * event)
}
else
x = 1;
- gdk_draw_pixbuf (event->window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
+ gdk_draw_pixbuf (event->window, widget->style->fg_gc[gtk_widget_get_state (widget)],
priv->watermark, 0, 0, x, 1, priv->width, priv->height,
GDK_RGB_DITHER_NORMAL, 0, 0);
}
diff --git a/libslab/tile.c b/libslab/tile.c
index 3d7cd16..72045ef 100644
--- a/libslab/tile.c
+++ b/libslab/tile.c
@@ -300,7 +300,7 @@ tile_enter (GtkButton * widget)
static void
tile_leave (GtkButton * widget)
{
- if (GTK_WIDGET_HAS_FOCUS (widget))
+ if (gtk_widget_has_focus (GTK_WIDGET (widget)))
gtk_widget_set_state (GTK_WIDGET (widget), TILE_STATE_FOCUSED);
else
gtk_widget_set_state (GTK_WIDGET (widget), GTK_STATE_NORMAL);
@@ -351,7 +351,8 @@ tile_expose (GtkWidget * widget, GdkEventExpose * event)
gboolean has_focus;
gboolean retval;
- if ((has_focus = GTK_WIDGET_HAS_FOCUS (widget)))
+ has_focus = gtk_widget_has_focus (widget);
+ if (has_focus)
GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
if (TILE (widget)->entered == FALSE)
@@ -440,7 +441,7 @@ tile_popup_menu_position (GtkMenu * menu, gint * x, gint * y, gboolean * push_in
GtkRequisition req;
GtkWidget *top;
- if (!GTK_WIDGET_REALIZED (tile))
+ if (!gtk_widget_get_realized (GTK_WIDGET (tile)))
return;
gtk_widget_size_request (GTK_WIDGET (menu), &req);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]