[brasero] Use new private helper function brasero_burn_session_tag_lookup_int () in some other places
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Use new private helper function brasero_burn_session_tag_lookup_int () in some other places
- Date: Mon, 24 Aug 2009 13:45:56 +0000 (UTC)
commit 351f1212efa09fb94b1ebeecbf0cbbc98d09dc36
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Wed Aug 19 15:02:52 2009 +0200
Use new private helper function brasero_burn_session_tag_lookup_int () in some other places
libbrasero-burn/brasero-dest-selection.c | 8 +-------
libbrasero-burn/brasero-image-properties.c | 8 +-------
libbrasero-burn/brasero-video-options.c | 15 ++++++---------
3 files changed, 8 insertions(+), 23 deletions(-)
---
diff --git a/libbrasero-burn/brasero-dest-selection.c b/libbrasero-burn/brasero-dest-selection.c
index 5f456c7..bfe8333 100644
--- a/libbrasero-burn/brasero-dest-selection.c
+++ b/libbrasero-burn/brasero-dest-selection.c
@@ -514,14 +514,8 @@ brasero_dest_selection_format_medium_string (BraseroMediumSelection *selection,
format = brasero_burn_session_get_output_format (priv->session);
if (format == BRASERO_IMAGE_FORMAT_CUE) {
- GValue *value = NULL;
-
g_free (medium_name);
- brasero_burn_session_tag_lookup (priv->session,
- BRASERO_VCD_TYPE,
- &value);
-
- if (value && g_value_get_int (value) == BRASERO_SVCD)
+ if (brasero_burn_session_tag_lookup_int (priv->session, BRASERO_VCD_TYPE) == BRASERO_SVCD)
medium_name = g_strdup (_("SVCD image"));
else
medium_name = g_strdup (_("VCD image"));
diff --git a/libbrasero-burn/brasero-image-properties.c b/libbrasero-burn/brasero-image-properties.c
index d0c16d2..bf31fcf 100644
--- a/libbrasero-burn/brasero-image-properties.c
+++ b/libbrasero-burn/brasero-image-properties.c
@@ -245,15 +245,9 @@ brasero_image_properties_set_formats (BraseroImageProperties *self,
priv->is_video);
if (priv->is_video && format == BRASERO_IMAGE_FORMAT_CUE) {
- GValue *value = NULL;
-
/* see whether it's a SVCD or a VCD */
- brasero_burn_session_tag_lookup (BRASERO_BURN_SESSION (priv->session),
- BRASERO_VCD_TYPE,
- &value);
-
brasero_image_type_chooser_set_VCD_type (BRASERO_IMAGE_TYPE_CHOOSER (priv->format),
- (value && g_value_get_int (value) == BRASERO_SVCD));
+ (brasero_burn_session_tag_lookup_int (BRASERO_BURN_SESSION (priv->session), BRASERO_VCD_TYPE) == BRASERO_SVCD));
}
else
brasero_image_type_chooser_set_format (BRASERO_IMAGE_TYPE_CHOOSER (priv->format),
diff --git a/libbrasero-burn/brasero-video-options.c b/libbrasero-burn/brasero-video-options.c
index 47a5636..d90f68f 100644
--- a/libbrasero-burn/brasero-video-options.c
+++ b/libbrasero-burn/brasero-video-options.c
@@ -74,7 +74,6 @@ static void
brasero_video_options_update_from_tag (BraseroVideoOptions *options,
const gchar *tag)
{
- GValue *value = NULL;
BraseroVideoOptionsPrivate *priv;
if (!tag)
@@ -83,11 +82,9 @@ brasero_video_options_update_from_tag (BraseroVideoOptions *options,
priv = BRASERO_VIDEO_OPTIONS_PRIVATE (options);
if (!strcmp (tag, BRASERO_VCD_TYPE)) {
- brasero_burn_session_tag_lookup (priv->session,
- tag,
- &value);
+ gint svcd_type = brasero_burn_session_tag_lookup_int (priv->session, tag);
- if (value && g_value_get_int (value) == BRASERO_SVCD) {
+ if (svcd_type == BRASERO_SVCD) {
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->svcd_button)))
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->svcd_button), TRUE);
@@ -106,6 +103,8 @@ brasero_video_options_update_from_tag (BraseroVideoOptions *options,
}
}
else if (!strcmp (tag, BRASERO_VIDEO_OUTPUT_FRAMERATE)) {
+ GValue *value = NULL;
+
brasero_burn_session_tag_lookup (priv->session,
tag,
&value);
@@ -123,11 +122,9 @@ brasero_video_options_update_from_tag (BraseroVideoOptions *options,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->button_native), TRUE);
}
else if (!strcmp (tag, BRASERO_VIDEO_OUTPUT_ASPECT)) {
- brasero_burn_session_tag_lookup (priv->session,
- tag,
- &value);
+ gint aspect_type = brasero_burn_session_tag_lookup_int (priv->session, tag);
- if (value && g_value_get_int (value) == BRASERO_VIDEO_ASPECT_16_9) {
+ if (aspect_type == BRASERO_VIDEO_ASPECT_16_9) {
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->button_16_9)))
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->button_16_9), TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]