X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=cut-n-paste%2Fzoom-control%2Fephy-zoom-control.c;h=66efbaad1af8dc6a114731159dcff56648251664;hb=09d18721e3015b9e4cc448f1f3620da54784ebba;hp=d3b7e572d130c1abda8afd8e7041be9a560af9ad;hpb=606f66cbbca54996a165121743cda6a993762c47;p=evince.git diff --git a/cut-n-paste/zoom-control/ephy-zoom-control.c b/cut-n-paste/zoom-control/ephy-zoom-control.c index d3b7e572..66efbaad 100644 --- a/cut-n-paste/zoom-control/ephy-zoom-control.c +++ b/cut-n-paste/zoom-control/ephy-zoom-control.c @@ -24,11 +24,8 @@ #include "ephy-zoom-control.h" #include "ephy-zoom.h" -#include "ev-debug.h" #include -#include -#include #include #define EPHY_ZOOM_CONTROL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_ZOOM_CONTROL, EphyZoomControlPrivate)) @@ -73,7 +70,7 @@ ephy_zoom_control_get_type (void) if (G_UNLIKELY (type == 0)) { - static const GTypeInfo our_info = + const GTypeInfo our_info = { sizeof (EphyZoomControlClass), NULL, /* base_init */ @@ -152,10 +149,16 @@ ephy_zoom_control_init (EphyZoomControl *control) for (i = 0; i < n_zoom_levels; i++) { gtk_list_store_append (store, &iter); - gtk_list_store_set (store, &iter, - COL_TEXT, zoom_levels[i].name, - COL_IS_SEP, zoom_levels[i].name == NULL, - -1); + + if (zoom_levels[i].name != NULL) { + gtk_list_store_set (store, &iter, + COL_TEXT, _(zoom_levels[i].name), + -1); + } else { + gtk_list_store_set (store, &iter, + COL_IS_SEP, zoom_levels[i].name == NULL, + -1); + } } p->combo = GTK_COMBO_BOX (gtk_combo_box_new_with_model (GTK_TREE_MODEL (store))); @@ -170,8 +173,7 @@ ephy_zoom_control_init (EphyZoomControl *control) NULL, NULL); gtk_combo_box_set_focus_on_click (p->combo, FALSE); - g_object_ref (p->combo); - gtk_object_sink (GTK_OBJECT (p->combo)); + g_object_ref_sink (G_OBJECT (p->combo)); gtk_widget_show (GTK_WIDGET (p->combo)); i = ephy_zoom_get_zoom_level_index (p->zoom); @@ -230,6 +232,7 @@ ephy_zoom_control_get_property (GObject *object, } } +#if !GTK_CHECK_VERSION (2, 11, 5) static void set_combo_tooltip (GtkWidget *widget, GtkTooltipsData *data) @@ -281,6 +284,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) @@ -297,7 +301,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,