From d9088cc4f3e2f7f6b77033b813c559bb6cf3f04f Mon Sep 17 00:00:00 2001 From: Elias Aebi Date: Mon, 4 Feb 2013 11:32:27 +0100 Subject: replace some deprecated code --- src/eom-properties-dialog.c | 8 ++++++-- src/eom-thumb-view.c | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/eom-properties-dialog.c b/src/eom-properties-dialog.c index 2549897..6cc737e 100644 --- a/src/eom-properties-dialog.c +++ b/src/eom-properties-dialog.c @@ -161,7 +161,11 @@ pd_update_general_tab (EomPropertiesDialog *prop_dlg, gtk_label_set_text (GTK_LABEL (prop_dlg->priv->type_label), type_str); bytes = eom_image_get_bytes (image); +#if GLIB_CHECK_VERSION (2, 30, 0) + bytes_str = g_format_size (bytes); +#else bytes_str = g_format_size_for_display (bytes); +#endif gtk_label_set_text (GTK_LABEL (prop_dlg->priv->bytes_label), bytes_str); @@ -491,8 +495,8 @@ pd_close_button_clicked_cb (GtkButton *button, static gboolean eom_properties_dialog_page_switch (GtkNotebook *notebook, - GtkNotebookPage *page, - gint page_index, + gpointer page, + guint page_index, EomPropertiesDialog *prop_dlg) { diff --git a/src/eom-thumb-view.c b/src/eom-thumb-view.c index 3375332..9c1a30e 100644 --- a/src/eom-thumb-view.c +++ b/src/eom-thumb-view.c @@ -345,7 +345,11 @@ thumbview_get_tooltip_string (EomImage *image) ExifData *exif_data; #endif +#if GLIB_CHECK_VERSION (2, 30, 0) + bytes = g_format_size (eom_image_get_bytes (image)); +#else bytes = g_format_size_for_display (eom_image_get_bytes (image)); +#endif eom_image_get_size (image, &width, &height); -- cgit v1.2.1 From e90872de53b9026e1d372a833d9778dddc53fdbf Mon Sep 17 00:00:00 2001 From: Elias Aebi Date: Mon, 4 Feb 2013 12:07:56 +0100 Subject: fix some more deprecated code --- src/eom-file-chooser.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/eom-file-chooser.c b/src/eom-file-chooser.c index c73d268..b1ee955 100644 --- a/src/eom-file-chooser.c +++ b/src/eom-file-chooser.c @@ -271,10 +271,18 @@ set_preview_pixbuf (EomFileChooser *chooser, GdkPixbuf *pixbuf, goffset size) bytes_str = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Size"); if (bytes_str != NULL) { bytes = atoi (bytes_str); +#if GLIB_CHECK_VERSION (2, 30, 0) + size_str = g_format_size (bytes); +#else size_str = g_format_size_for_display (bytes); +#endif } else { +#if GLIB_CHECK_VERSION (2, 30, 0) + size_str = g_format_size (size); +#else size_str = g_format_size_for_display (size); +#endif } /* try to read image dimensions */ -- cgit v1.2.1