From b6856992e22c81580baa2b2bec9846e739d26cbb Mon Sep 17 00:00:00 2001 From: "Alejandro G. Castro" Date: Fri, 14 Nov 2008 13:08:38 +0000 Subject: [PATCH] Reviewed the use of MAEMO_GTK define, now we add the define in the compilation line, and we also add it to the pc file. * configure.ac: Added MAEMO_GTK define to the compilation command and removed it from the config.h. * pkgconfig/hildon.pc.in: Added MAEMO_GTK, that way applications do not have to take care about this define if the library was compiled with it. * src/hildon-gtk.c: * src/hildon-gtk.h: Replaced MAEMO_CHANGES with MAEMO_GTK. --- ChangeLog | 15 +++++++++++++++ configure.ac | 5 +++-- pkgconfig/hildon.pc.in | 2 +- src/hildon-gtk.c | 4 ++-- src/hildon-gtk.h | 4 ++-- 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index ca3c1ba..e080cd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,20 @@ 2008-11-14 Alejandro G. Castro + Reviewed the use of MAEMO_GTK define, now we add the define in the + compilation line, and we also add it to the pc file. + + * configure.ac: Added MAEMO_GTK define to the compilation command + and removed it from the config.h. + + * pkgconfig/hildon.pc.in: Added MAEMO_GTK, that way applications + do not have to take care about this define if the library was + compiled with it. + + * src/hildon-gtk.c: + * src/hildon-gtk.h: Replaced MAEMO_CHANGES with MAEMO_GTK. + +2008-11-14 Alejandro G. Castro + * examples/Makefile.am, * examples/hildon-pannable-area-buttons-scroll-example.c, * examples/hildon-pannable-area-gesture-signals-example.c, diff --git a/configure.ac b/configure.ac index 0b6d4f3..4703d02 100644 --- a/configure.ac +++ b/configure.ac @@ -113,7 +113,8 @@ AM_CONDITIONAL(USE_MAEMO_GTK, test "x$USE_MAEMO_GTK" = "xyes") # just print out our status if test x$USE_MAEMO_GTK = xyes; then AC_MSG_NOTICE(Will use Maemo GTK+ specific API) - AC_DEFINE(MAEMO_GTK, [], [Whether to use Maemo GTK+ specific API]) + MAEMO_GTK="-DMAEMO_GTK" + AC_SUBST(MAEMO_GTK) MAEMO_CHANGES="-DMAEMO_CHANGES" AC_SUBST(MAEMO_CHANGES) else @@ -184,7 +185,7 @@ EXTRA_CFLAGS="$DISABLE_DEPRECATED" AC_SUBST(EXTRA_CFLAGS) ### enable MAEMO platform extensions -CFLAGS="$CFLAGS $MAEMO_CHANGES" +CFLAGS="$CFLAGS $MAEMO_CHANGES $MAEMO_GTK" # HILDON_OBJ_* # default vars for the examples diff --git a/pkgconfig/hildon.pc.in b/pkgconfig/hildon.pc.in index 74e956f..fe69c59 100644 --- a/pkgconfig/hildon.pc.in +++ b/pkgconfig/hildon.pc.in @@ -8,4 +8,4 @@ Description: Hildon widgets library Requires: gtk+-2.0 >= @GTK_VERSION@ Version: @VERSION@ Libs: -L${libdir} -lhildon-@API_VERSION_MAJOR@ -Cflags: -I${includedir} @MAEMO_CHANGES@ +Cflags: -I${includedir} @MAEMO_CHANGES@ @MAEMO_GTK@ diff --git a/src/hildon-gtk.c b/src/hildon-gtk.c index b9583bb..6057df0 100644 --- a/src/hildon-gtk.c +++ b/src/hildon-gtk.c @@ -239,7 +239,7 @@ hildon_gtk_radio_button_new_from_widget (HildonSizeType size, return button; } -#ifdef MAEMO_CHANGES +#ifdef MAEMO_GTK /** * hildon_gtk_tree_view_new: * @mode: the Hildon UI mode @@ -303,7 +303,7 @@ hildon_gtk_icon_view_new_with_model (HildonUIMode mode, { return g_object_new (GTK_TYPE_ICON_VIEW, "hildon-ui-mode", mode, "model", model, NULL); } -#endif /* MAEMO_CHANGES */ +#endif /* MAEMO_GTK */ /** * hildon_gtk_window_set_progress_indicator: diff --git a/src/hildon-gtk.h b/src/hildon-gtk.h index 748a2e0..f0d2ca9 100644 --- a/src/hildon-gtk.h +++ b/src/hildon-gtk.h @@ -52,7 +52,7 @@ GtkWidget * hildon_gtk_radio_button_new_from_widget (HildonSizeType size, GtkRadioButton *radio_group_member); -#ifdef MAEMO_CHANGES +#ifdef MAEMO_GTK GtkWidget * hildon_gtk_tree_view_new (HildonUIMode mode); @@ -66,7 +66,7 @@ hildon_gtk_icon_view_new (HildonUIMode mode); GtkWidget * hildon_gtk_icon_view_new_with_model (HildonUIMode mode, GtkTreeModel *model); -#endif /* MAEMO_CHANGES */ +#endif /* MAEMO_GTK */ void hildon_gtk_window_set_progress_indicator (GtkWindow *window, -- 1.7.9.5