[brasero] Added more sound notifications:
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Added more sound notifications:
- Date: Fri, 18 Sep 2009 10:02:14 +0000 (UTC)
commit c1df50a2ec2501cdcde52cfec07621b77efc49c3
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Fri Sep 18 11:56:41 2009 +0200
Added more sound notifications:
- when a spanned disc has just been burnt
- when a dummy burn has been performed
- when a blanking/formatting operation has been performed
libbrasero-burn/brasero-blank-dialog.c | 8 ++++++++
libbrasero-burn/brasero-burn-dialog.c | 27 +++++++++++++++++++++++----
2 files changed, 31 insertions(+), 4 deletions(-)
---
diff --git a/libbrasero-burn/brasero-blank-dialog.c b/libbrasero-burn/brasero-blank-dialog.c
index 5a64395..57d101b 100644
--- a/libbrasero-burn/brasero-blank-dialog.c
+++ b/libbrasero-burn/brasero-blank-dialog.c
@@ -37,6 +37,8 @@
#include <gtk/gtk.h>
+#include <canberra-gtk.h>
+
#include "brasero-misc.h"
#include "burn-basics.h"
@@ -275,6 +277,12 @@ brasero_blank_dialog_activate (BraseroToolDialog *dialog,
GTK_STOCK_CLOSE,
GTK_RESPONSE_CLOSE);
+ gtk_widget_show (GTK_WIDGET (message));
+ ca_gtk_play_for_widget (GTK_WIDGET (message), 0,
+ CA_PROP_EVENT_ID, "complete-media-format",
+ CA_PROP_EVENT_DESCRIPTION, _("The disc was successfully blanked."),
+ NULL);
+
answer = gtk_dialog_run (GTK_DIALOG (message));
gtk_widget_destroy (message);
diff --git a/libbrasero-burn/brasero-burn-dialog.c b/libbrasero-burn/brasero-burn-dialog.c
index c123112..ddb8d7d 100644
--- a/libbrasero-burn/brasero-burn-dialog.c
+++ b/libbrasero-burn/brasero-burn-dialog.c
@@ -413,7 +413,8 @@ static gint
brasero_burn_dialog_wait_for_insertion (BraseroBurnDialog *dialog,
BraseroDrive *drive,
const gchar *main_message,
- const gchar *secondary_message)
+ const gchar *secondary_message,
+ gboolean sound_clue)
{
gint result;
gint added_id;
@@ -465,6 +466,14 @@ brasero_burn_dialog_wait_for_insertion (BraseroBurnDialog *dialog,
G_CALLBACK (brasero_burn_dialog_wait_for_insertion_cb),
message);
+ if (sound_clue) {
+ gtk_widget_show (GTK_WIDGET (message));
+ ca_gtk_play_for_widget (GTK_WIDGET (message), 0,
+ CA_PROP_EVENT_ID, "complete-media-burn",
+ CA_PROP_EVENT_DESCRIPTION, main_message,
+ NULL);
+ }
+
result = gtk_dialog_run (GTK_DIALOG (message));
g_signal_handler_disconnect (drive, added_id);
@@ -627,7 +636,7 @@ brasero_burn_dialog_insert_disc_cb (BraseroBurn *burn,
g_free (drive_name);
- result = brasero_burn_dialog_wait_for_insertion (dialog, drive, main_message, secondary_message);
+ result = brasero_burn_dialog_wait_for_insertion (dialog, drive, main_message, secondary_message, FALSE);
g_free (main_message);
g_free (secondary_message);
@@ -1240,6 +1249,12 @@ brasero_burn_dialog_dummy_success_cb (BraseroBurn *burn,
gtk_widget_show (GTK_WIDGET (dialog));
gtk_window_set_urgency_hint (GTK_WINDOW (dialog), TRUE);
+ gtk_widget_show (GTK_WIDGET (message));
+ ca_gtk_play_for_widget (GTK_WIDGET (message), 0,
+ CA_PROP_EVENT_ID, "complete-media-burn-test",
+ CA_PROP_EVENT_DESCRIPTION, _("The simulation was successful."),
+ NULL);
+
answer = gtk_dialog_run (GTK_DIALOG (message));
gtk_widget_destroy (message);
@@ -2092,6 +2107,7 @@ brasero_burn_dialog_record_spanned_session (BraseroBurnDialog *dialog,
priv = BRASERO_BURN_DIALOG_PRIVATE (dialog);
burner = brasero_burn_session_get_burner (priv->session);
+ /* Get the messages now as they can change */
type = brasero_track_type_new ();
brasero_burn_session_get_input_type (priv->session, type);
success_message = brasero_burn_dialog_get_success_message (dialog);
@@ -2136,7 +2152,9 @@ brasero_burn_dialog_record_spanned_session (BraseroBurnDialog *dialog,
res = brasero_burn_dialog_wait_for_insertion (dialog,
burner,
_("Please insert a recordable CD or DVD."),
- secondary_message);
+ secondary_message,
+ TRUE);
+
if (res != GTK_RESPONSE_OK) {
g_free (secondary_message);
return BRASERO_BURN_CANCEL;
@@ -2148,7 +2166,8 @@ brasero_burn_dialog_record_spanned_session (BraseroBurnDialog *dialog,
res = brasero_burn_dialog_wait_for_insertion (dialog,
burner,
_("Please insert a recordable CD or DVD."),
- _("Not enough space available on the disc"));
+ _("Not enough space available on the disc"),
+ FALSE);
if (res != GTK_RESPONSE_OK) {
g_free (secondary_message);
return BRASERO_BURN_CANCEL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]