f-spot r4607 - in trunk: . src src/Widgets
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4607 - in trunk: . src src/Widgets
- Date: Fri, 21 Nov 2008 21:06:04 +0000 (UTC)
Author: sdelcroix
Date: Fri Nov 21 21:06:04 2008
New Revision: 4607
URL: http://svn.gnome.org/viewvc/f-spot?rev=4607&view=rev
Log:
use GLib.Format.SizeForDisplay
2008-11-21 Stephane Delcroix <sdelcroix novell com>
* src/Util.cs: obsolete SizeUtil for gtk# > 2.14
* src/SendEmail.cs:
* src/Widgets/InfoBox.cs: use the glib equivalent of SizeUtil
Modified:
trunk/ChangeLog
trunk/src/SendEmail.cs
trunk/src/Util.cs
trunk/src/Widgets/InfoBox.cs
Modified: trunk/src/SendEmail.cs
==============================================================================
--- trunk/src/SendEmail.cs (original)
+++ trunk/src/SendEmail.cs Fri Nov 21 21:06:04 2008
@@ -136,7 +136,11 @@
}
NumberOfPictures.Text = selection.Count.ToString();
+#if GTK_SHARP_2_14_0
+ TotalOriginalSize.Text = GLib.Format.SizeForDisplay (Orig_Photo_Size);
+#else
TotalOriginalSize.Text = SizeUtil.ToHumanReadable (Orig_Photo_Size);
+#endif
UpdateEstimatedSize();
@@ -188,7 +192,11 @@
else
new_approx_total_size = System.Convert.ToInt64(Orig_Photo_Size * avg_scale [new_size_index]);
+#if GTK_SHARP_2_14_0
+ approxresult = GLib.Format.SizeForDisplay (new_approx_total_size);
+#else
approxresult = SizeUtil.ToHumanReadable (new_approx_total_size);
+#endif
ApproxNewSize.Text = approxresult;
}
Modified: trunk/src/Util.cs
==============================================================================
--- trunk/src/Util.cs (original)
+++ trunk/src/Util.cs Fri Nov 21 21:06:04 2008
@@ -153,6 +153,9 @@
public class SizeUtil {
+#if GTK_SHARP_2_14_0
+ [Obsolete ("Use GLib.Format.SizeForDisplay (gtk-sharp > 2.14)")]
+#endif
public static string ToHumanReadable (long size)
{
string tmp_str = String.Empty;
Modified: trunk/src/Widgets/InfoBox.cs
==============================================================================
--- trunk/src/Widgets/InfoBox.cs (original)
+++ trunk/src/Widgets/InfoBox.cs Fri Nov 21 21:06:04 2008
@@ -549,7 +549,11 @@
if (show_file_size) {
try {
Gnome.Vfs.FileInfo file_info = new Gnome.Vfs.FileInfo (photo.DefaultVersionUri.ToString ());
+#if GTK_SHARP_2_14_0
+ file_size_value_label.Text = GLib.Format.SizeForDisplay (file_info.Size);
+#else
file_size_value_label.Text = Gnome.Vfs.Format.FileSizeForDisplay (file_info.Size);
+#endif
} catch (System.IO.FileNotFoundException) {
file_size_value_label.Text = Catalog.GetString("(File not found)");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]