[brasero/gnome-2-30] Fix session logging for tool dialogs (sum+blank)
- From: Philippe Rouquier <philippr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [brasero/gnome-2-30] Fix session logging for tool dialogs (sum+blank)
- Date: Mon, 5 Jul 2010 18:23:30 +0000 (UTC)
commit 087ac37e94aece9bd7a32d786be040fda6169440
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Mon Jul 5 20:22:44 2010 +0200
Fix session logging for tool dialogs (sum+blank)
libbrasero-burn/brasero-blank-dialog.c | 2 ++
libbrasero-burn/brasero-session.c | 11 +++++++++--
libbrasero-burn/brasero-sum-dialog.c | 3 +++
libbrasero-burn/brasero-tool-dialog.c | 1 -
4 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/libbrasero-burn/brasero-blank-dialog.c b/libbrasero-burn/brasero-blank-dialog.c
index 744200a..ca7870e 100644
--- a/libbrasero-burn/brasero-blank-dialog.c
+++ b/libbrasero-burn/brasero-blank-dialog.c
@@ -44,6 +44,7 @@
#include "burn-basics.h"
#include "brasero-session.h"
+#include "brasero-session-helper.h"
#include "brasero-burn.h"
#include "burn-plugin-manager.h"
@@ -202,6 +203,7 @@ brasero_blank_dialog_activate (BraseroToolDialog *dialog,
priv = BRASERO_BLANK_DIALOG_PRIVATE (self);
burn = brasero_tool_dialog_get_burn (dialog);
+ brasero_burn_session_start (priv->session);
result = brasero_burn_blank (burn,
priv->session,
&error);
diff --git a/libbrasero-burn/brasero-session.c b/libbrasero-burn/brasero-session.c
index 479adb0..91c0ff2 100644
--- a/libbrasero-burn/brasero-session.c
+++ b/libbrasero-burn/brasero-session.c
@@ -2135,6 +2135,7 @@ brasero_burn_session_logv (BraseroBurnSession *self,
va_list arg_list)
{
int len;
+ int wlen;
gchar *message;
gchar *offending;
BraseroBurnSessionPrivate *priv;
@@ -2156,8 +2157,14 @@ brasero_burn_session_logv (BraseroBurnSession *self,
*offending = '\0';
len = strlen (message);
- if (write (priv->session, message, len) != len)
- g_warning ("Some log data couldn't be written: %s\n", message);
+ wlen = write (priv->session, message, len);
+ if (wlen != len) {
+ int errnum = errno;
+
+ g_warning ("Some log data couldn't be written: %s (%i out of %i) (%s)\n",
+ message, wlen, len,
+ strerror (errnum));
+ }
g_free (message);
diff --git a/libbrasero-burn/brasero-sum-dialog.c b/libbrasero-burn/brasero-sum-dialog.c
index ffdf300..57e202f 100644
--- a/libbrasero-burn/brasero-sum-dialog.c
+++ b/libbrasero-burn/brasero-sum-dialog.c
@@ -60,6 +60,8 @@
#include "brasero-tags.h"
#include "brasero-track-disc.h"
+
+#include "brasero-session-helper.h"
#include "brasero-burn.h"
G_DEFINE_TYPE (BraseroSumDialog, brasero_sum_dialog, BRASERO_TYPE_TOOL_DIALOG);
@@ -622,6 +624,7 @@ brasero_sum_dialog_activate (BraseroToolDialog *dialog,
self = BRASERO_SUM_DIALOG (dialog);
priv = BRASERO_SUM_DIALOG_PRIVATE (dialog);
+ brasero_burn_session_start (priv->session);
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->md5_check)))
result = brasero_sum_dialog_check_disc_sum (self, brasero_medium_get_drive (medium));
else
diff --git a/libbrasero-burn/brasero-tool-dialog.c b/libbrasero-burn/brasero-tool-dialog.c
index d628ed3..b90cc21 100644
--- a/libbrasero-burn/brasero-tool-dialog.c
+++ b/libbrasero-burn/brasero-tool-dialog.c
@@ -45,7 +45,6 @@
#include "brasero-misc.h"
-#include "brasero-session.h"
#include "brasero-burn.h"
#include "brasero-medium.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]