[brasero] Prevent splitting tracks into parts with fixed length longer than track
- From: Joshua Lock <joshuagl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [brasero] Prevent splitting tracks into parts with fixed length longer than track
- Date: Tue, 30 Jul 2013 17:41:21 +0000 (UTC)
commit dac5109c1988c410ecd2221dad4db4b214843bb7
Author: Joshua Lock <joshua lock intel com>
Date: Fri Jul 5 17:33:20 2013 +0100
Prevent splitting tracks into parts with fixed length longer than track
Trying to split the track into parts with a fixed length longer than the
track can't work, therefore set the maximum range of the length spinner to
the length of the track to help the user to make a sane choice.
https://bugzilla.gnome.org/show_bug.cgi?id=703797
src/brasero-split-dialog.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/brasero-split-dialog.c b/src/brasero-split-dialog.c
index 81bbf76..0ed5226 100644
--- a/src/brasero-split-dialog.c
+++ b/src/brasero-split-dialog.c
@@ -102,6 +102,7 @@ brasero_split_dialog_set_boundaries (BraseroSplitDialog *self,
gint64 end)
{
BraseroSplitDialogPrivate *priv;
+ guint64 length;
priv = BRASERO_SPLIT_DIALOG_PRIVATE (self);
@@ -120,6 +121,11 @@ brasero_split_dialog_set_boundaries (BraseroSplitDialog *self,
brasero_song_control_set_boundaries (BRASERO_SONG_CONTROL (priv->player),
priv->start,
priv->end);
+
+ /* Don't allow splitting the track in sections longer than the track
+ * length in seconds */
+ length = (gdouble) brasero_song_control_get_length (BRASERO_SONG_CONTROL (priv->player)) /
1000000000;
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON (priv->spin_sec), 1.0, length);
}
GSList *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]