[PATCH] emerillon: replace deprecated macros.



Hello.

The attached patch fixes building emerillon with gtk+ 2.20.
The deprecated macros GTK_WIDGET_NO_WINDOW and GTK_WIDGET_VISIBLE
has been replaced with new accessor functions and the GTK_REQUIRED version
bumped to 2.20 accordingly.

Please consider disabling deprecation flags in release tarballs by default.
Building with deprecation flags causes issues for distributions.
A package that once built fine when uploaded will without warning
stop building when some library it uses is updated which deprecates
new stuff.

-- 
Andreas Henriksson
diff --git a/configure.ac b/configure.ac
index 989b788..b3c23ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,7 +70,7 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
 ################
 GLIB_REQUIRED=2.12.0
 GTHREAD_REQUIRED=2.12.0
-GTK_REQUIRED=2.12.0
+GTK_REQUIRED=2.20.0
 GCONF_REQUIRED=2.5.90
 CHAMPLAIN_REQUIRED=0.4
 CHAMPLAIN_GTK_REQUIRED=0.4
diff --git a/emerillon/sidebar.c b/emerillon/sidebar.c
index e8c10df..e6b0a46 100644
--- a/emerillon/sidebar.c
+++ b/emerillon/sidebar.c
@@ -239,7 +239,7 @@ emerillon_sidebar_menu_position_under (GtkMenu *menu,
   GtkWidget *widget;
 
   g_return_if_fail (GTK_IS_BUTTON (user_data));
-  g_return_if_fail (GTK_WIDGET_NO_WINDOW (user_data));
+  g_return_if_fail (gtk_widget_get_has_window (GTK_WIDGET (user_data)));
 
   widget = GTK_WIDGET (user_data);
 
diff --git a/emerillon/window.c b/emerillon/window.c
index 82f74c6..be22f27 100644
--- a/emerillon/window.c
+++ b/emerillon/window.c
@@ -593,7 +593,7 @@ sidebar_visibility_changed_cb (GtkWidget *widget,
   GtkAction *action;
   gboolean visible;
 
-  visible = GTK_WIDGET_VISIBLE (self->priv->sidebar);
+  visible = gtk_widget_get_visible (self->priv->sidebar);
 
   gconf_client_set_bool (self->priv->client, EMERILLON_CONF_UI_SIDEBAR,
       visible, NULL);


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