brasero r1578 - in trunk: . src
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1578 - in trunk: . src
- Date: Sat, 29 Nov 2008 17:17:31 +0000 (UTC)
Author: philippr
Date: Sat Nov 29 17:17:31 2008
New Revision: 1578
URL: http://svn.gnome.org/viewvc/brasero?rev=1578&view=rev
Log:
Fix a problem introduced lately by changes related to CD-TEXT.
Disc copy wasn\'t possible anymore with same source and destination burner
* src/brasero-burn-options.c (brasero_burn_options_add_source),
(brasero_burn_options_init), (brasero_burn_options_finalize):
* src/brasero-medium-selection.c
(brasero_medium_selection_update_no_disc_entry):
* src/brasero-session-cfg.c (brasero_session_cfg_update):
* src/brasero-src-image.c (brasero_src_image_set_track),
(brasero_src_image_init):
* src/burn-caps.c
(brasero_burn_caps_is_session_supported_same_src_dest),
(brasero_burn_caps_is_session_supported):
* src/burn-caps.h:
Modified:
trunk/ChangeLog
trunk/src/brasero-burn-options.c
trunk/src/brasero-medium-selection.c
trunk/src/brasero-session-cfg.c
trunk/src/brasero-src-image.c
trunk/src/burn-caps.c
trunk/src/burn-caps.h
Modified: trunk/src/brasero-burn-options.c
==============================================================================
--- trunk/src/brasero-burn-options.c (original)
+++ trunk/src/brasero-burn-options.c Sat Nov 29 17:17:31 2008
@@ -46,6 +46,8 @@
gulong valid_sig;
+ GtkSizeGroup *size_group;
+
GtkWidget *source;
GtkWidget *message_input;
GtkWidget *selection;
@@ -80,8 +82,22 @@
list = g_slist_prepend (list, priv->message_input);
va_start (vlist, title);
- while ((child = va_arg (vlist, GtkWidget *)))
- list = g_slist_prepend (list, child);
+ while ((child = va_arg (vlist, GtkWidget *))) {
+ GtkWidget *hbox;
+ GtkWidget *alignment;
+
+ hbox = gtk_hbox_new (FALSE, 12);
+ gtk_widget_show (hbox);
+
+ gtk_box_pack_start (GTK_BOX (hbox), child, TRUE, TRUE, 0);
+
+ alignment = gtk_alignment_new (0.0, 0.5, 0., 0.);
+ gtk_widget_show (alignment);
+ gtk_size_group_add_widget (priv->size_group, alignment);
+ gtk_box_pack_start (GTK_BOX (hbox), alignment, FALSE, FALSE, 0);
+
+ list = g_slist_prepend (list, hbox);
+ }
va_end (vlist);
source = brasero_utils_pack_properties_list (title, list);
@@ -368,6 +384,8 @@
priv = BRASERO_BURN_OPTIONS_PRIVATE (object);
+ priv->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+
gtk_dialog_set_has_separator (GTK_DIALOG (object), FALSE);
/* Create the session */
@@ -421,6 +439,7 @@
gtk_container_add (GTK_CONTAINER (alignment), priv->selection);
priv->properties = brasero_medium_properties_new (BRASERO_BURN_SESSION (priv->session));
+ gtk_size_group_add_widget (priv->size_group, priv->properties);
gtk_widget_show (priv->properties);
gtk_box_pack_start (GTK_BOX (selection),
priv->properties,
@@ -502,6 +521,11 @@
priv->session = NULL;
}
+ if (priv->size_group) {
+ g_object_unref (priv->size_group);
+ priv->size_group = NULL;
+ }
+
G_OBJECT_CLASS (brasero_burn_options_parent_class)->finalize (object);
}
Modified: trunk/src/brasero-medium-selection.c
==============================================================================
--- trunk/src/brasero-medium-selection.c (original)
+++ trunk/src/brasero-medium-selection.c Sat Nov 29 17:17:31 2008
@@ -310,10 +310,12 @@
if (brasero_medium_monitor_is_probing (monitor))
gtk_list_store_set (GTK_LIST_STORE (model), iter,
NAME_COL, _("Searching for available discs"),
+ ICON_COL, "image-loading",
-1);
else
gtk_list_store_set (GTK_LIST_STORE (model), iter,
NAME_COL, _("No available disc"),
+ ICON_COL, "drive-optical",
-1);
g_object_unref (monitor);
Modified: trunk/src/brasero-session-cfg.c
==============================================================================
--- trunk/src/brasero-session-cfg.c (original)
+++ trunk/src/brasero-session-cfg.c Sat Nov 29 17:17:31 2008
@@ -668,19 +668,18 @@
}
}
else {
- /* NOTE: don't use flags here as they will be adapted afterwards */
- result = brasero_burn_caps_is_input_supported (priv->caps,
- BRASERO_BURN_SESSION (self),
- &source,
- FALSE);
+ /* Don't use flags as they'll be adapted later. */
+ result = brasero_burn_caps_is_session_supported (priv->caps,
+ BRASERO_BURN_SESSION (self),
+ FALSE);
if (result != BRASERO_BURN_OK
&& source.type == BRASERO_TRACK_TYPE_AUDIO
&& (source.subtype.audio_format & BRASERO_METADATA_INFO)) {
- /* Another special case in case some burning backends don't
- * support CD-TEXT for audio (libburn). If no other backend is
- * available remove CD-TEXT option but tell user... */
- /* NOTE: set flags to NONE as they'll need to be updated */
+ /* Another special case in case some burning backends
+ * don't support CD-TEXT for audio (libburn). If no
+ * other backend is available remove CD-TEXT option but
+ * tell user... */
source.subtype.audio_format &= ~BRASERO_METADATA_INFO;
result = brasero_burn_caps_is_input_supported (priv->caps,
BRASERO_BURN_SESSION (self),
Modified: trunk/src/brasero-src-image.c
==============================================================================
--- trunk/src/brasero-src-image.c (original)
+++ trunk/src/brasero-src-image.c Sat Nov 29 17:17:31 2008
@@ -223,6 +223,13 @@
g_free (path);
if (string) {
+ /* This is hackish and meant to avoid ellipsization to make the
+ * label to small. */
+ if (strlen (string) > strlen (_("Click here to select an _image")) + 5)
+ gtk_label_set_ellipsize (GTK_LABEL (priv->label), PANGO_ELLIPSIZE_START);
+ else
+ gtk_label_set_ellipsize (GTK_LABEL (priv->label), PANGO_ELLIPSIZE_NONE);
+
gtk_label_set_text (GTK_LABEL (priv->label), string);
g_free (string);
}
@@ -686,7 +693,7 @@
label = gtk_label_new_with_mnemonic (string);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
- gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_START);
+ gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_NONE);
gtk_widget_show (label);
g_free (string);
Modified: trunk/src/burn-caps.c
==============================================================================
--- trunk/src/burn-caps.c (original)
+++ trunk/src/burn-caps.c Sat Nov 29 17:17:31 2008
@@ -1894,7 +1894,8 @@
static BraseroBurnResult
brasero_burn_caps_is_session_supported_same_src_dest (BraseroBurnCaps *self,
- BraseroBurnSession *session)
+ BraseroBurnSession *session,
+ gboolean use_flags)
{
GSList *iter;
BraseroTrackType input;
@@ -1911,14 +1912,18 @@
brasero_burn_session_get_input_type (session, &input);
BRASERO_BURN_LOG_TYPE (&input, "input");
- /* NOTE: DAO can be a problem. So just in case remove it. It is not
- * really useful in this context. What we want here is to know whether
- * a medium can be used given the input; only 1 flag is important here
- * (MERGE) and can have consequences. */
- session_flags = brasero_burn_session_get_flags (session);
- session_flags &= ~BRASERO_BURN_FLAG_DAO;
+ if (use_flags) {
+ /* NOTE: DAO can be a problem. So just in case remove it. It is
+ * not really useful in this context. What we want here is to
+ * know whether a medium can be used given the input; only 1
+ * flag is important here (MERGE) and can have consequences. */
+ session_flags = brasero_burn_session_get_flags (session);
+ session_flags &= ~BRASERO_BURN_FLAG_DAO;
- BRASERO_BURN_LOG_FLAGS (session_flags, "flags");
+ BRASERO_BURN_LOG_FLAGS (session_flags, "flags");
+ }
+ else
+ session_flags = BRASERO_BURN_FLAG_NONE;
/* Find one available output format */
format = BRASERO_IMAGE_FORMAT_CDRDAO;
@@ -1935,7 +1940,7 @@
&output,
&input,
BRASERO_PLUGIN_IO_ACCEPT_FILE,
- TRUE);
+ use_flags);
if (!supported)
continue;
@@ -1971,7 +1976,8 @@
BraseroBurnResult
brasero_burn_caps_is_session_supported (BraseroBurnCaps *self,
- BraseroBurnSession *session)
+ BraseroBurnSession *session,
+ gboolean use_flags)
{
gboolean result;
BraseroTrackType input;
@@ -1980,9 +1986,9 @@
/* Special case */
if (brasero_burn_session_same_src_dest_drive (session))
- return brasero_burn_caps_is_session_supported_same_src_dest (self, session);
+ return brasero_burn_caps_is_session_supported_same_src_dest (self, session, use_flags);
- if (!brasero_burn_caps_flags_check_for_drive (session))
+ if (use_flags && !brasero_burn_caps_flags_check_for_drive (session))
BRASERO_BURN_CAPS_NOT_SUPPORTED_LOG_RES (session);
/* Here flags don't matter as we don't record anything.
@@ -2010,14 +2016,16 @@
BRASERO_BURN_LOG_TYPE (&output, "Checking support for session output");
BRASERO_BURN_LOG_TYPE (&input, "and input");
- BRASERO_BURN_LOG_FLAGS (brasero_burn_session_get_flags (session), "with flags");
+
+ if (use_flags)
+ BRASERO_BURN_LOG_FLAGS (brasero_burn_session_get_flags (session), "with flags");
result = brasero_caps_try_output_with_blanking (self,
session,
&output,
&input,
io_flags,
- TRUE);
+ use_flags);
if (!result) {
BRASERO_BURN_LOG_TYPE (&output, "Output not supported");
return BRASERO_BURN_NOT_SUPPORTED;
Modified: trunk/src/burn-caps.h
==============================================================================
--- trunk/src/burn-caps.h (original)
+++ trunk/src/burn-caps.h Sat Nov 29 17:17:31 2008
@@ -115,7 +115,8 @@
BraseroBurnResult
brasero_burn_caps_is_session_supported (BraseroBurnCaps *caps,
- BraseroBurnSession *session);
+ BraseroBurnSession *session,
+ gboolean use_flags);
BraseroMedia
brasero_burn_caps_get_required_media_type (BraseroBurnCaps *caps,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]