brasero r1579 - in trunk: . src
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1579 - in trunk: . src
- Date: Sat, 29 Nov 2008 18:06:53 +0000 (UTC)
Author: philippr
Date: Sat Nov 29 18:06:53 2008
New Revision: 1579
URL: http://svn.gnome.org/viewvc/brasero?rev=1579&view=rev
Log:
Move \"Leave disc open\" option to properties dialog as it well handled
automatically by brasero now and it\'s mainly useful for Data Projects.
* src/brasero-disc-option-dialog.c
(brasero_disc_option_dialog_add_data_options),
(brasero_disc_option_dialog_set_disc),
(brasero_disc_option_dialog_valid_media_cb):
* src/brasero-drive-properties.c
(brasero_drive_properties_get_flags),
(brasero_drive_properties_set_flags),
(brasero_drive_properties_init):
* src/brasero-drive-properties.h:
* src/brasero-session-cfg.h:
Modified:
trunk/ChangeLog
trunk/src/brasero-disc-option-dialog.c
trunk/src/brasero-drive-properties.c
trunk/src/brasero-drive-properties.h
trunk/src/brasero-session-cfg.h
Modified: trunk/src/brasero-disc-option-dialog.c
==============================================================================
--- trunk/src/brasero-disc-option-dialog.c (original)
+++ trunk/src/brasero-disc-option-dialog.c Sat Nov 29 18:06:53 2008
@@ -58,7 +58,6 @@
BraseroDisc *disc;
GtkWidget *joliet_toggle;
- GtkWidget *multi_toggle;
GtkWidget *video_options;
GtkWidget *dvd_audio;
@@ -66,14 +65,10 @@
GtkWidget *vcd_button;
GtkWidget *svcd_button;
- guint label_modified:1;
- guint joliet_warning:1;
-
gulong valid_sig;
- guint checksum_saved:1;
+ guint joliet_warning:1;
guint joliet_saved:1;
- guint multi_saved:1;
};
typedef struct _BraseroDiscOptionDialogPrivate BraseroDiscOptionDialogPrivate;
@@ -81,39 +76,6 @@
static GtkDialogClass *parent_class = NULL;
-static void
-brasero_disc_option_dialog_load_multi_state (BraseroDiscOptionDialog *dialog)
-{
- BraseroDiscOptionDialogPrivate *priv;
- BraseroBurnSession *session;
- gboolean value;
-
- priv = BRASERO_DISC_OPTION_DIALOG_PRIVATE (dialog);
-
- session = brasero_burn_options_get_session (BRASERO_BURN_OPTIONS (dialog));
- if (!brasero_session_cfg_is_supported (BRASERO_SESSION_CFG (session), BRASERO_BURN_FLAG_MULTI)) {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->multi_toggle), FALSE);
- gtk_widget_set_sensitive (priv->multi_toggle, FALSE);
- g_object_unref (session);
- return;
- }
-
- value = (brasero_burn_session_get_flags (session) & BRASERO_BURN_FLAG_MULTI) != 0;
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->multi_toggle), value);
-
- if (!value) {
- gtk_widget_set_sensitive (priv->multi_toggle, TRUE);
- g_object_unref (session);
- return;
- }
-
- /* set sensitivity */
- value = brasero_session_cfg_is_compulsory (BRASERO_SESSION_CFG (session),
- BRASERO_BURN_FLAG_MULTI);
- gtk_widget_set_sensitive (priv->multi_toggle, value != TRUE);
- g_object_unref (session);
-}
-
/**
* These functions are used when caps-changed event or drive-changed event
* are generated. They are used to check that flags or fs are valid.
@@ -181,36 +143,6 @@
}
static void
-brasero_disc_option_dialog_update_multi (BraseroDiscOptionDialog *dialog)
-{
- BraseroTrackType input;
- BraseroBurnSession *session;
- BraseroDiscOptionDialogPrivate *priv;
-
- priv = BRASERO_DISC_OPTION_DIALOG_PRIVATE (dialog);
-
- if (!priv->multi_toggle)
- return;
-
- session = brasero_burn_options_get_session (BRASERO_BURN_OPTIONS (dialog));
- brasero_burn_session_get_input_type (session, &input);
-
- /* MULTI and Video projects don't get along */
- if (input.type == BRASERO_TRACK_TYPE_DATA
- && (input.subtype.fs_type & BRASERO_IMAGE_FS_VIDEO)
- && (brasero_burn_session_get_dest_media (session) & BRASERO_MEDIUM_DVD)) {
- brasero_session_cfg_remove_flags (BRASERO_SESSION_CFG (session), BRASERO_BURN_FLAG_MULTI);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->multi_toggle), FALSE);
- gtk_widget_set_sensitive (priv->multi_toggle, FALSE);
- g_object_unref (session);
- return;
- }
-
- brasero_disc_option_dialog_load_multi_state (dialog);
- g_object_unref (session);
-}
-
-static void
brasero_disc_option_dialog_update_video (BraseroDiscOptionDialog *dialog)
{
BraseroDiscOptionDialogPrivate *priv;
@@ -293,36 +225,6 @@
}
static void
-brasero_disc_option_dialog_set_multi (BraseroDiscOptionDialog *dialog)
-{
- BraseroDiscOptionDialogPrivate *priv;
- BraseroBurnSession *session;
-
- priv = BRASERO_DISC_OPTION_DIALOG_PRIVATE (dialog);
-
- if (!priv->multi_toggle)
- return;
-
- session = brasero_burn_options_get_session (BRASERO_BURN_OPTIONS (dialog));
-
- if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->multi_toggle)))
- brasero_session_cfg_remove_flags (BRASERO_SESSION_CFG (session),
- BRASERO_BURN_FLAG_MULTI);
- else
- brasero_session_cfg_add_flags (BRASERO_SESSION_CFG (session),
- BRASERO_BURN_FLAG_MULTI);
-
- g_object_unref (session);
-}
-
-static void
-brasero_disc_option_dialog_multi_toggled (GtkToggleButton *multi_toggle,
- BraseroDiscOptionDialog *dialog)
-{
- brasero_disc_option_dialog_set_multi (dialog);
-}
-
-static void
brasero_disc_option_dialog_joliet_toggled_cb (GtkToggleButton *toggle,
BraseroDiscOptionDialog *dialog)
{
@@ -411,25 +313,6 @@
return TRUE;
}
-static gboolean
-brasero_disc_option_dialog_multi_widget (BraseroDiscOptionDialog *dialog)
-{
- BraseroDiscOptionDialogPrivate *priv;
-
- priv = BRASERO_DISC_OPTION_DIALOG_PRIVATE (dialog);
- priv->multi_toggle = gtk_check_button_new_with_mnemonic (_("Leave the disc _open to add other files later"));
-
- g_signal_connect (priv->multi_toggle,
- "toggled",
- G_CALLBACK (brasero_disc_option_dialog_multi_toggled),
- dialog);
- gtk_widget_set_tooltip_text (priv->multi_toggle,
- _("Allow to add more data to the disc later"));
-
- brasero_disc_option_dialog_update_multi (dialog);
- return TRUE;
-}
-
static void
brasero_disc_option_dialog_add_data_options (BraseroDiscOptionDialog *dialog)
{
@@ -445,15 +328,11 @@
widget = gtk_vbox_new (FALSE, 0);
brasero_burn_options_add_options (BRASERO_BURN_OPTIONS (dialog), widget);
- /* multisession options */
- brasero_disc_option_dialog_multi_widget (dialog);
-
/* general options */
brasero_disc_option_dialog_joliet_widget (dialog);
string = g_strdup_printf ("<b>%s</b>", _("Disc options"));
options = brasero_utils_pack_properties (string,
- priv->multi_toggle,
priv->joliet_toggle,
NULL);
g_free (string);
@@ -464,40 +343,6 @@
}
static void
-brasero_disc_option_dialog_add_audio_options (BraseroDiscOptionDialog *dialog)
-{
- gchar *string;
- GtkWidget *widget;
- GtkWidget *options;
- BraseroDiscOptionDialogPrivate *priv;
-
- priv = BRASERO_DISC_OPTION_DIALOG_PRIVATE (dialog);
-
- widget = gtk_vbox_new (FALSE, 0);
- brasero_burn_options_add_options (BRASERO_BURN_OPTIONS (dialog), widget);
-
- /* multisession options */
- priv->multi_toggle = gtk_check_button_new_with_mnemonic (_("Leave the disc _open to add a data session later"));
- g_signal_connect (priv->multi_toggle,
- "toggled",
- G_CALLBACK (brasero_disc_option_dialog_multi_toggled),
- dialog);
- gtk_widget_set_tooltip_text (priv->multi_toggle,
- _("Allow creating an enhanced CD or CD+"));
-
- string = g_strdup_printf ("<b>%s</b>", _("Disc options"));
- options = brasero_utils_pack_properties (string,
- priv->multi_toggle,
- NULL);
- g_free (string);
-
- gtk_box_pack_start (GTK_BOX (widget), options, FALSE, FALSE, 0);
-
- brasero_disc_option_dialog_update_multi (dialog);
- gtk_widget_show_all (widget);
-}
-
-static void
brasero_disc_option_dialog_AC3 (GtkToggleButton *button,
BraseroDiscOptionDialog *dialog)
{
@@ -933,9 +778,9 @@
brasero_disc_option_dialog_add_video_options (dialog);
}
else {
+ /* No other specific options for audio */
brasero_burn_options_set_type_shown (BRASERO_BURN_OPTIONS (dialog),
BRASERO_MEDIA_TYPE_WRITABLE);
- brasero_disc_option_dialog_add_audio_options (dialog);
}
}
@@ -976,9 +821,6 @@
/* for video disc see what's the output : CD or DVD */
if (priv->dvd_audio)
brasero_disc_option_dialog_update_video (self);
-
- /* flags could have changed so make sure multi gets updated */
- brasero_disc_option_dialog_update_multi (self);
}
static void
Modified: trunk/src/brasero-drive-properties.c
==============================================================================
--- trunk/src/brasero-drive-properties.c (original)
+++ trunk/src/brasero-drive-properties.c Sat Nov 29 18:06:53 2008
@@ -39,6 +39,7 @@
#include "burn-debug.h"
#include "burn-drive.h"
#include "brasero-utils.h"
+#include "brasero-session-cfg.h"
#include "brasero-drive-properties.h"
typedef struct _BraseroDrivePropertiesPrivate BraseroDrivePropertiesPrivate;
@@ -46,6 +47,7 @@
{
GtkWidget *speed;
GtkWidget *dummy;
+ GtkWidget *multi;
GtkWidget *burnproof;
GtkWidget *notmp;
GtkWidget *eject;
@@ -91,6 +93,9 @@
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->burnproof)))
flags |= BRASERO_BURN_FLAG_BURNPROOF;
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->multi)))
+ flags |= BRASERO_BURN_FLAG_MULTI;
+
return flags;
}
@@ -334,6 +339,11 @@
flags,
supported,
compulsory);
+ brasero_drive_properties_set_toggle_state (priv->multi,
+ BRASERO_BURN_FLAG_MULTI,
+ flags,
+ supported,
+ compulsory);
}
static gchar *
@@ -486,6 +496,8 @@
priv->burnproof = gtk_check_button_new_with_mnemonic (_("Use burn_proof (decrease the risk of failures)"));
priv->eject = gtk_check_button_new_with_mnemonic (_("_Eject after burning"));
priv->notmp = gtk_check_button_new_with_mnemonic (_("Burn the image directly _without saving it to disc"));
+ priv->multi = gtk_check_button_new_with_mnemonic (_("Leave the disc _open to add other files later"));
+ gtk_widget_set_tooltip_text (priv->multi, _("Allow to add more data to the disc later"));
string = g_strdup_printf ("<b>%s</b>", _("Options"));
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox),
@@ -493,6 +505,7 @@
priv->eject,
priv->dummy,
priv->burnproof,
+ priv->multi,
priv->notmp,
NULL),
FALSE,
Modified: trunk/src/brasero-drive-properties.h
==============================================================================
--- trunk/src/brasero-drive-properties.h (original)
+++ trunk/src/brasero-drive-properties.h Sat Nov 29 18:06:53 2008
@@ -51,11 +51,6 @@
GtkDialog parent_instance;
};
-#define BRASERO_DRIVE_PROPERTIES_FLAGS (BRASERO_BURN_FLAG_DUMMY| \
- BRASERO_BURN_FLAG_EJECT| \
- BRASERO_BURN_FLAG_BURNPROOF| \
- BRASERO_BURN_FLAG_NO_TMP_FILES)
-
GType brasero_drive_properties_get_type (void) G_GNUC_CONST;
GtkWidget *brasero_drive_properties_new ();
Modified: trunk/src/brasero-session-cfg.h
==============================================================================
--- trunk/src/brasero-session-cfg.h (original)
+++ trunk/src/brasero-session-cfg.h Sat Nov 29 18:06:53 2008
@@ -50,6 +50,7 @@
GType brasero_session_cfg_get_type (void) G_GNUC_CONST;
#define BRASERO_DRIVE_PROPERTIES_FLAGS (BRASERO_BURN_FLAG_DUMMY| \
+ BRASERO_BURN_FLAG_MULTI| \
BRASERO_BURN_FLAG_EJECT| \
BRASERO_BURN_FLAG_BURNPROOF| \
BRASERO_BURN_FLAG_NO_TMP_FILES)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]