[Goodies-commits] r4686 - xfburn/trunk/xfburn
David Mohr
squisher at xfce.org
Tue Apr 29 21:58:58 CEST 2008
Author: squisher
Date: 2008-04-29 19:58:58 +0000 (Tue, 29 Apr 2008)
New Revision: 4686
Modified:
xfburn/trunk/xfburn/xfburn-device-box.c
Log:
Bugfix: deallocate HalManager, don't refresh speed list when the DeviceBox is empty
Modified: xfburn/trunk/xfburn/xfburn-device-box.c
===================================================================
--- xfburn/trunk/xfburn/xfburn-device-box.c 2008-04-29 07:43:38 UTC (rev 4685)
+++ xfburn/trunk/xfburn/xfburn-device-box.c 2008-04-29 19:58:58 UTC (rev 4686)
@@ -307,6 +307,9 @@
#ifdef HAVE_THUNAR_VFS
g_object_unref (priv->thunar_volman);
#endif
+#ifdef HAVE_HAL
+ g_object_unref (priv->hal_manager);
+#endif
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -594,10 +597,12 @@
XfburnDevice *device;
device = xfburn_device_box_get_selected_device (box);
- xfburn_device_refresh_supported_speeds (device);
+ if (device != NULL) {
+ xfburn_device_refresh_supported_speeds (device);
- fill_combo_speed (box, device);
- fill_combo_mode (box,device);
+ fill_combo_speed (box, device);
+ fill_combo_mode (box,device);
+ }
g_signal_emit (G_OBJECT (box), signals[DEVICE_CHANGED], 0, device);
}
@@ -606,9 +611,14 @@
static void
cb_volumes_changed (XfburnHalManager *halman, XfburnDeviceBox *box)
{
- //DBG ("Volume change!");
- usleep (1000001);
- cb_speed_refresh_clicked (NULL, box);
+ gboolean visible;
+
+ visible = GTK_WIDGET_VISIBLE (GTK_WIDGET(box));
+ //DBG ("device box visibility: %d", visible);
+ if (visible) {
+ usleep (1000001);
+ cb_speed_refresh_clicked (NULL, box);
+ }
}
#endif
More information about the Goodies-commits
mailing list