[Xfce4-commits] [apps/xfburn] 05/06: Refuse to burn read-only media.

noreply at xfce.org noreply at xfce.org
Tue Mar 18 19:24:09 CET 2014


This is an automated email from the git hooks/post-receive script.

squisher pushed a commit to branch master
in repository apps/xfburn.

commit c8ab9be031f46fffc7926500e19a8b5c069db004
Author: David Mohr <david at mcbf.net>
Date:   Tue Mar 18 12:02:22 2014 -0600

    Refuse to burn read-only media.
---
 xfburn/xfburn-device-box.c  |    9 ++++++---
 xfburn/xfburn-device-list.h |    4 ++++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/xfburn/xfburn-device-box.c b/xfburn/xfburn-device-box.c
index a17f113..ceca04d 100644
--- a/xfburn/xfburn-device-box.c
+++ b/xfburn/xfburn-device-box.c
@@ -565,10 +565,13 @@ check_disc_validity (XfburnDeviceBoxPrivate *priv)
       case XFBURN_PROFILE_BD_RE:
         g_object_get (G_OBJECT (device), "dvdr", &priv->valid_disc, NULL);
         break;
+      case XFBURN_PROFILE_CDROM:
+      case XFBURN_PROFILE_DVDROM:
+      case XFBURN_PROFILE_BDROM:
+        g_warning ("Read-only profile 0x%x!", profile_no);
+        priv->valid_disc = FALSE;
+        break;
       default:
-
-        /* >>> should recognize 0x08 = CD-ROM, 0x10 = DVD-ROM, 0x40 BD-ROM */
-
         g_warning ("Unknown disc profile 0x%x!", profile_no);
         priv->valid_disc = TRUE;
         break;
diff --git a/xfburn/xfburn-device-list.h b/xfburn/xfburn-device-list.h
index a747f9f..8390f6d 100644
--- a/xfburn/xfburn-device-list.h
+++ b/xfburn/xfburn-device-list.h
@@ -85,6 +85,10 @@ enum XfburnDiscProfiles {
   XFBURN_PROFILE_DVD_PLUS_R_DL = 0x2b,
   XFBURN_PROFILE_BD_R = 0x41,
   XFBURN_PROFILE_BD_RE = 0x43,
+  /* Read-only profiles */
+  XFBURN_PROFILE_CDROM = 0x08,
+  XFBURN_PROFILE_DVDROM = 0x10,
+  XFBURN_PROFILE_BDROM = 0x40,
 };
 
 GType xfburn_device_list_get_type (void);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list