[libgda] Dont't use GtkInfoBar if version < 2.18.0



commit 13a29dd7d40f87fd7e9a8e3bcb6500dcebea1ad5
Author: Vivien Malerba <malerba gnome-db org>
Date:   Sun Aug 1 17:49:40 2010 +0200

    Dont't use GtkInfoBar if version < 2.18.0

 tools/browser/data-manager/xml-spec-editor.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/tools/browser/data-manager/xml-spec-editor.c b/tools/browser/data-manager/xml-spec-editor.c
index c3e3d99..c90c0e9 100644
--- a/tools/browser/data-manager/xml-spec-editor.c
+++ b/tools/browser/data-manager/xml-spec-editor.c
@@ -182,6 +182,7 @@ signal_editor_changed (XmlSpecEditor *sped)
  out:
 	if (lerror) {
 		if (! sped->priv->info) {
+#if GTK_CHECK_VERSION (2,18,0)
 			sped->priv->info = gtk_info_bar_new ();
 			gtk_box_pack_start (GTK_BOX (sped), sped->priv->info, FALSE, FALSE, 0);
 			sped->priv->info_label = gtk_label_new ("");
@@ -189,6 +190,10 @@ signal_editor_changed (XmlSpecEditor *sped)
 			gtk_label_set_ellipsize (GTK_LABEL (sped->priv->info_label), PANGO_ELLIPSIZE_END);
 			gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (sped->priv->info))),
 					   sped->priv->info_label);
+#else
+			sped->priv->info = gtk_label_new ("");
+			sped->priv->info_label = sped->priv->info;
+#endif
 		}
 		gchar *str;
 		str = g_strdup_printf (_("Error: %s"), lerror->message);



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