]> www.fi.muni.cz Git - evince.git/commitdiff
Fix build with gtk+ >= 2.11.5 due to gtktooltips deprecation. Fixes bug
authorCarlos Garcia Campos <carlosgc@gnome.org>
Wed, 11 Jul 2007 16:22:43 +0000 (16:22 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Wed, 11 Jul 2007 16:22:43 +0000 (16:22 +0000)
2007-07-11  Carlos Garcia Campos  <carlosgc@gnome.org>
* cut-n-paste/zoom-control/ephy-zoom-control.c:
* shell/eggfindbar.c: (egg_find_bar_init):
Fix build with gtk+ >= 2.11.5 due to gtktooltips
deprecation. Fixes bug #455667

svn path=/trunk/; revision=2571

ChangeLog
cut-n-paste/zoom-control/ephy-zoom-control.c
shell/eggfindbar.c

index 519b9fc96cf454b3db2b50a54d593a97416b892a..a90dc1996d79cc0942b4fc1404f2264cd7fd7650 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-07-11  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * cut-n-paste/zoom-control/ephy-zoom-control.c:
+       * shell/eggfindbar.c: (egg_find_bar_init):
+
+       Fix build with gtk+ >= 2.11.5 due to gtktooltips
+       deprecation. Fixes bug #455667
+       
 2007-07-10  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * NEWS:
index ada61f2ec7c97cf70fa0259b2897c18489276c72..2f372d9016a00314076a297c754a97e3d27292dc 100644 (file)
@@ -27,7 +27,9 @@
 
 #include <gtk/gtk.h>
 #include <gtk/gtkcombobox.h>
+#if !GTK_CHECK_VERSION (2, 11, 5)
 #include <gtk/gtktooltips.h>
+#endif
 #include <glib/gi18n.h>
 
 #define EPHY_ZOOM_CONTROL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_ZOOM_CONTROL, EphyZoomControlPrivate))
@@ -235,6 +237,7 @@ ephy_zoom_control_get_property (GObject *object,
        }
 }
 
+#if !GTK_CHECK_VERSION (2, 11, 5)
 static void
 set_combo_tooltip (GtkWidget *widget, 
                   GtkTooltipsData *data)
@@ -286,6 +289,7 @@ ephy_zoom_control_set_tooltip (GtkToolItem *tool_item,
 
        return TRUE;
 }
+#endif /* !GTK_CHECK_VERSION (2, 11, 5) */
 
 static void
 ephy_zoom_control_class_init (EphyZoomControlClass *klass)
@@ -302,7 +306,9 @@ ephy_zoom_control_class_init (EphyZoomControlClass *klass)
        object_class->get_property = ephy_zoom_control_get_property;
        object_class->finalize = ephy_zoom_control_finalize;
 
+#if !GTK_CHECK_VERSION (2, 11, 5)
        tool_item_class->set_tooltip = ephy_zoom_control_set_tooltip;
+#endif
 
        g_object_class_install_property (object_class,
                                         PROP_ZOOM,
index a9c66e7bbcf77832d8bfbcbffe0185fb7711ada2..62adea9d5cd61e0aab6ceb09d4f616705a47a9ba 100644 (file)
@@ -34,6 +34,7 @@ Boston, MA 02111-1307, USA.
 #include <gtk/gtkseparatortoolitem.h>
 #include <gtk/gtkarrow.h>
 #include <gtk/gtktoggletoolbutton.h>
+#include <gtk/gtkversion.h>
 
 #include <string.h>
 
@@ -328,17 +329,27 @@ egg_find_bar_init (EggFindBar *find_bar)
   arrow = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE);
   priv->previous_button = gtk_tool_button_new (arrow, Q_("Find Previous"));
   gtk_tool_item_set_is_important (priv->previous_button, TRUE);
+#if GTK_CHECK_VERSION (2, 11, 5)
+  gtk_widget_set_tooltip_text (GTK_WIDGET (priv->previous_button),
+                              _("Find previous occurrence of the search string"));
+#else
   gtk_tool_item_set_tooltip (priv->previous_button, GTK_TOOLBAR (find_bar)->tooltips,
                             _("Find previous occurrence of the search string"),
                             NULL);
+#endif
 
   /* Next */
   arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
   priv->next_button = gtk_tool_button_new (arrow, Q_("Find Next"));
   gtk_tool_item_set_is_important (priv->next_button, TRUE);
+#if GTK_CHECK_VERSION (2, 11, 5)
+  gtk_widget_set_tooltip_text (GTK_WIDGET (priv->next_button),
+                              _("Find next occurrence of the search string"));
+#else
   gtk_tool_item_set_tooltip (priv->next_button, GTK_TOOLBAR (find_bar)->tooltips,
                             _("Find next occurrence of the search string"),
                             NULL);
+#endif
 
   /* Separator*/
   priv->status_separator = gtk_separator_tool_item_new();
@@ -347,9 +358,14 @@ egg_find_bar_init (EggFindBar *find_bar)
   priv->case_button = gtk_toggle_tool_button_new ();
   g_object_set (G_OBJECT (priv->case_button), "label", _("C_ase Sensitive"), NULL);
   gtk_tool_item_set_is_important (priv->case_button, TRUE);
+#if GTK_CHECK_VERSION (2, 11, 5)
+  gtk_widget_set_tooltip_text (GTK_WIDGET (priv->case_button),
+                              _("Toggle case sensitive search"));
+#else  
   gtk_tool_item_set_tooltip (priv->case_button, GTK_TOOLBAR (find_bar)->tooltips,
                             _("Toggle case sensitive search"),
                             NULL);
+#endif
   /* Status */
   priv->status_item = gtk_tool_item_new();
   gtk_tool_item_set_expand (priv->status_item, TRUE);