aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Piñeiro <apinheiro@igalia.com>2009-06-25 19:32:17 +0200
committerAlejandro Piñeiro <apinheiro@igalia.com>2009-06-26 13:28:57 +0200
commit8559b614213c9536e3f788cd2b56c36f19dd866b (patch)
tree59eee6e305f54616031f82d6231ac639561cb605
parent47de2971f36db26f249d75ccfe772d230248223d (diff)
Fixed the compilation using '--enable-fatal' and '--disable-deprecated' options
* examples/hildon-banner-example.c: Protect deprecated hildon-banner functions with #ifndef HILDON_DISABLE_DEPRECATED * examples/hildon-find-toolbar.c: Protect deprecated HILDON_ICON_SIZE_TOOLBAR with #ifndef HILDON_DISABLE_DEPRECATED * hildon/hildon-find-toolbar.c: Change deprecated HILDON_ICON_SIZE_TOOLBAR in favor of HILDON_ICON_PIXEL_SIZE_FINGER * hildon/hildon-private.h: Unmark hildon_privfate_create_animation() as deprecated. * hildon/hildon-stackable-window.c: Added #undef HILDON_DISABLE_DEPRECATED to allow proper compilation of deprecated functions defined on the header
-rw-r--r--ChangeLog15
-rw-r--r--examples/hildon-banner-example.c17
-rw-r--r--examples/hildon-icon-sizes-example.c4
-rw-r--r--hildon/hildon-find-toolbar.c2
-rw-r--r--hildon/hildon-private.h8
-rw-r--r--hildon/hildon-stackable-window.c2
6 files changed, 42 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a9b8ad..bbeafd8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2009-06-26 Alejandro Pinheiro <apinheiro@igalia.com>
+
+ * examples/hildon-banner-example.c: Protect deprecated hildon-banner
+ functions with #ifndef HILDON_DISABLE_DEPRECATED
+ * examples/hildon-find-toolbar.c: Protect deprecated
+ HILDON_ICON_SIZE_TOOLBAR with #ifndef HILDON_DISABLE_DEPRECATED
+ * hildon/hildon-find-toolbar.c: Change deprecated HILDON_ICON_SIZE_TOOLBAR
+ in favor of HILDON_ICON_PIXEL_SIZE_FINGER
+ * hildon/hildon-private.h: Unmark hildon_privfate_create_animation() as
+ deprecated.
+ * hildon/hildon-stackable-window.c: Added #undef HILDON_DISABLE_DEPRECATED
+ to allow proper compilation of deprecated functions defined on the header
+
+ Fixed compilation using '--enable-fatal' and '--disable-deprecated'
+
2009-06-25 Claudio Saavedra <csaavedra@igalia.com>
* hildon/hildon-pannable-area.c: (hildon_pannable_area_init):
diff --git a/examples/hildon-banner-example.c b/examples/hildon-banner-example.c
index b5b13a6..887c033 100644
--- a/examples/hildon-banner-example.c
+++ b/examples/hildon-banner-example.c
@@ -24,6 +24,8 @@
#include <hildon/hildon.h>
+#ifndef HILDON_DISABLE_DEPRECATED
+
static gboolean
on_animation_idle (GtkWidget *banner)
{
@@ -40,6 +42,8 @@ on_progress_idle (GtkWidget *banner)
return FALSE;
}
+#endif
+
static gboolean
on_information_clicked (GtkWidget *widget)
{
@@ -48,6 +52,8 @@ on_information_clicked (GtkWidget *widget)
return TRUE;
}
+#ifndef HILDON_DISABLE_DEPRECATED
+
static gboolean
on_animation_clicked (GtkWidget *widget)
{
@@ -66,12 +72,17 @@ on_progress_clicked (GtkWidget *widget)
return TRUE;
}
+#endif
+
int
main (int argc,
char **argv)
{
HildonProgram *program;
- GtkWidget *window, *vbox, *button1, *button2, *button3;
+ GtkWidget *window, *vbox, *button1;
+#ifndef HILDON_DISABLE_DEPRECATED
+ GtkWidget *button2, button3;
+#endif
hildon_gtk_init (&argc, &argv);
@@ -82,16 +93,20 @@ main (int argc,
button1 = gtk_button_new_with_label ("Information");
g_signal_connect (button1, "clicked", G_CALLBACK (on_information_clicked), NULL);
+#ifndef HILDON_DISABLE_DEPRECATED
button2 = gtk_button_new_with_label ("Animation");
g_signal_connect (button2, "clicked", G_CALLBACK (on_animation_clicked), NULL);
button3 = gtk_button_new_with_label ("Progress");
g_signal_connect (button3, "clicked", G_CALLBACK (on_progress_clicked), NULL);
+#endif
vbox = gtk_vbox_new (6, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), button1, TRUE, TRUE, 0);
+#ifndef HILDON_DISABLE_DEPRECATED
gtk_box_pack_start (GTK_BOX (vbox), button2, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (vbox), button3, TRUE, TRUE, 0);
+#endif
gtk_container_set_border_width (GTK_CONTAINER (window), 6);
gtk_container_add (GTK_CONTAINER (window), vbox);
diff --git a/examples/hildon-icon-sizes-example.c b/examples/hildon-icon-sizes-example.c
index 9a4f773..ae54bc9 100644
--- a/examples/hildon-icon-sizes-example.c
+++ b/examples/hildon-icon-sizes-example.c
@@ -41,7 +41,11 @@ main (int argc,
g_debug ("Thumb pixel size: %d", HILDON_ICON_PIXEL_SIZE_THUMB);
g_debug ("Large pixel size: %d", HILDON_ICON_PIXEL_SIZE_LARGE);
g_debug ("Extra large pixel size: %d", HILDON_ICON_PIXEL_SIZE_XLARGE);
+#ifndef HILDON_DISABLE_DEPRECATED
g_debug ("Toolbar pixel size: %d", HILDON_ICON_PIXEL_SIZE_TOOLBAR);
+#else
+ g_debug ("Toolbar pixel size: %d", HILDON_ICON_PIXEL_SIZE_FINGER);
+#endif
return 0;
}
diff --git a/hildon/hildon-find-toolbar.c b/hildon/hildon-find-toolbar.c
index 24d7a96..ce9d457 100644
--- a/hildon/hildon-find-toolbar.c
+++ b/hildon/hildon-find-toolbar.c
@@ -713,7 +713,7 @@ hildon_find_toolbar_init (HildonFindToolbar *self)
/* Close button */
priv->close_button = gtk_tool_button_new (
gtk_image_new_from_icon_name ("general_close",
- HILDON_ICON_SIZE_TOOLBAR),
+ HILDON_ICON_PIXEL_SIZE_FINGER),
"Close");
g_signal_connect(priv->close_button, "clicked",
G_CALLBACK(hildon_find_toolbar_emit_close), self);
diff --git a/hildon/hildon-private.h b/hildon/hildon-private.h
index 8302025..5fe53f4 100644
--- a/hildon/hildon-private.h
+++ b/hildon/hildon-private.h
@@ -22,8 +22,6 @@
*
*/
-#ifndef HILDON_DISABLE_DEPRECATED
-
#ifndef __HILDON_PRIVATE_H__
#define __HILDON_PRIVATE_H__
@@ -31,11 +29,15 @@
G_BEGIN_DECLS
+#ifndef HILDON_DISABLE_DEPRECATED
+
gboolean G_GNUC_INTERNAL
hildon_private_composite_focus (GtkWidget *widget,
GtkDirectionType direction,
GtkDirectionType *effective_direction);
+#endif /* HILDON_DISABLE_DEPRECATED */
+
G_GNUC_INTERNAL GtkWidget *
hildon_private_create_animation (gfloat framerate,
const gchar *template,
@@ -44,5 +46,3 @@ hildon_private_create_animation (gfloat framerate,
G_END_DECLS
#endif /* __HILDON_PRIVATE_H__ */
-
-#endif /* HILDON_DISABLE_DEPRECATED */
diff --git a/hildon/hildon-stackable-window.c b/hildon/hildon-stackable-window.c
index 317f35a..1b2d6bb 100644
--- a/hildon/hildon-stackable-window.c
+++ b/hildon/hildon-stackable-window.c
@@ -89,6 +89,8 @@
* </example>
*/
+#undef HILDON_DISABLE_DEPRECATED
+
#include <X11/X.h>
#include <X11/Xatom.h>
#include <gdk/gdkx.h>