summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2010-08-09 22:20:36 +0100
committerBastien Nocera <hadess@hadess.net>2010-08-10 00:30:11 +0100
commitf2fe1042eab90add2360238ed7a84d6690a84ba2 (patch)
treeae926d20eafe04c497fcdeffa5c78d0ddd36bbb3
parentdabd7b26f640e2a3b415d796f5c710c56cfe9295 (diff)
downloadtotem-f2fe1042eab90add2360238ed7a84d6690a84ba2.tar.gz
Add a plural string for "frames per second"
-rw-r--r--src/plugins/properties/bacon-video-widget-properties.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/plugins/properties/bacon-video-widget-properties.c b/src/plugins/properties/bacon-video-widget-properties.c
index 500bacaef..58afd4627 100644
--- a/src/plugins/properties/bacon-video-widget-properties.c
+++ b/src/plugins/properties/bacon-video-widget-properties.c
@@ -58,6 +58,21 @@
g_value_unset (&value); \
} while (0)
+#define UPDATE_FROM_INT_PLURAL(type, name, format_s, format_p, empty) \
+ do { \
+ char *temp; \
+ bacon_video_widget_get_metadata (BACON_VIDEO_WIDGET (bvw), \
+ type, &value); \
+ if (g_value_get_int (&value) != 0) \
+ temp = g_strdup_printf (ngettext (format_s, format_p, g_value_get_int (&value)), \
+ g_value_get_int (&value)); \
+ else \
+ temp = g_strdup (empty); \
+ bacon_video_widget_properties_set_label (props, name, temp); \
+ g_free (temp); \
+ g_value_unset (&value); \
+ } while (0)
+
#define UPDATE_FROM_INT2(type1, type2, name, format) \
do { \
int x, y; \
@@ -234,8 +249,8 @@ bacon_video_widget_properties_update (BaconVideoWidgetProperties *props,
UPDATE_FROM_INT2 (BVW_INFO_DIMENSION_X, BVW_INFO_DIMENSION_Y,
"dimensions", N_("%d x %d"));
UPDATE_FROM_STRING (BVW_INFO_VIDEO_CODEC, "vcodec");
- UPDATE_FROM_INT (BVW_INFO_FPS, "framerate",
- N_("%d frames per second"), _("N/A"));
+ UPDATE_FROM_INT_PLURAL (BVW_INFO_FPS, "framerate",
+ N_("%d frame per second"), N_("%d frames per second"), _("N/A"));
UPDATE_FROM_INT (BVW_INFO_VIDEO_BITRATE, "video_bitrate",
N_("%d kbps"), _("N/A"));
gtk_widget_show (item);
@@ -263,6 +278,7 @@ bacon_video_widget_properties_update (BaconVideoWidgetProperties *props,
#undef UPDATE_FROM_STRING
#undef UPDATE_FROM_INT
+#undef UPDATE_FROM_INT_PLURAL
#undef UPDATE_FROM_INT2
}