[Xfce4-commits] [apps/xfburn] 01/01: Bugfix: there may be no selected drive
noreply at xfce.org
noreply at xfce.org
Sun Mar 23 23:33:31 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 75557169edbb5f499ed97b6bc8708f96f8469d4c
Author: David Mohr <david at mcbf.net>
Date: Sun Mar 23 16:32:24 2014 -0600
Bugfix: there may be no selected drive
---
xfburn/xfburn-blank-dialog.c | 4 ++--
xfburn/xfburn-burn-image-dialog.c | 4 +---
xfburn/xfburn-device-box.c | 23 ++++++++++++++---------
3 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/xfburn/xfburn-blank-dialog.c b/xfburn/xfburn-blank-dialog.c
index 8920a3c..ed3ded6 100644
--- a/xfburn/xfburn-blank-dialog.c
+++ b/xfburn/xfburn-blank-dialog.c
@@ -278,8 +278,8 @@ static void fill_combo_mode (XfburnBlankDialog *dialog)
static gboolean is_valid_blank_mode (XfburnDevice *device, XfburnBlankMode mode)
{
- int profile_no;
- gboolean erasable;
+ int profile_no = 0;
+ gboolean erasable = FALSE;
enum burn_disc_status disc_state;
XfburnDeviceList *devlist = xfburn_device_list_new ();
diff --git a/xfburn/xfburn-burn-image-dialog.c b/xfburn/xfburn-burn-image-dialog.c
index 65b8160..54042a2 100644
--- a/xfburn/xfburn-burn-image-dialog.c
+++ b/xfburn/xfburn-burn-image-dialog.c
@@ -248,10 +248,8 @@ xfburn_burn_image_dialog_init (XfburnBurnImageDialog * obj)
g_signal_connect (G_OBJECT (obj), "response", G_CALLBACK (cb_dialog_response), obj);
device = xfburn_device_list_get_current_device (priv->devlist);
- cb_volume_change_end (priv->devlist, TRUE, device, obj);
-
if (device)
- gtk_widget_set_sensitive (priv->check_dummy, xfburn_device_can_dummy_write (device));
+ cb_volume_change_end (priv->devlist, TRUE, device, obj);
}
static void
diff --git a/xfburn/xfburn-device-box.c b/xfburn/xfburn-device-box.c
index 6ee1998..85feff1 100644
--- a/xfburn/xfburn-device-box.c
+++ b/xfburn/xfburn-device-box.c
@@ -416,15 +416,17 @@ fill_combo_speed (XfburnDeviceBox *box, XfburnDevice *device)
{
XfburnDeviceBoxPrivate *priv = XFBURN_DEVICE_BOX_GET_PRIVATE (box);
GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->combo_speed));
- GSList *el;
- int profile_no;
+ GSList *el = NULL;
+ int profile_no = 0;
int factor;
GtkTreeIter iter_max;
- g_object_get (G_OBJECT (xfburn_device_list_get_current_device (priv->devlist)),
- "profile-no", &profile_no,
- "supported-speeds", &el,
- NULL);
+ if (device) {
+ g_object_get (G_OBJECT (device),
+ "profile-no", &profile_no,
+ "supported-speeds", &el,
+ NULL);
+ }
gtk_list_store_clear (GTK_LIST_STORE (model));
@@ -667,20 +669,23 @@ fill_combo_mode (XfburnDeviceBox *box, XfburnDevice *device)
XfburnDeviceBoxPrivate *priv = XFBURN_DEVICE_BOX_GET_PRIVATE (box);
GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->combo_mode));
GtkTreeIter iter;
- gint block_types;
+ gint block_types = 0;
gtk_list_store_clear (GTK_LIST_STORE (model));
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
gtk_list_store_set (GTK_LIST_STORE (model), &iter, MODE_TEXT_COLUMN, _("Auto"), MODE_VALUE_COLUMN, WRITE_MODE_AUTO, -1);
- g_object_get (G_OBJECT (device), "tao-block-types", &block_types, NULL);
+ if (device)
+ g_object_get (G_OBJECT (device), "tao-block-types", &block_types, NULL);
+
if (block_types) {
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
gtk_list_store_set (GTK_LIST_STORE (model), &iter, MODE_TEXT_COLUMN, "TAO", MODE_VALUE_COLUMN, WRITE_MODE_TAO, -1);
}
- g_object_get (G_OBJECT (device), "sao-block-types", &block_types, NULL);
+ if (device)
+ g_object_get (G_OBJECT (device), "sao-block-types", &block_types, NULL);
if (block_types & BURN_BLOCK_SAO) {
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
gtk_list_store_set (GTK_LIST_STORE (model), &iter, MODE_TEXT_COLUMN, "SAO", MODE_VALUE_COLUMN, WRITE_MODE_SAO, -1);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list