/*
* Flashlight applet (widget) for Maemo.
- * Copyright (C) 2009 Roman Moravcik
+ * Copyright (C) 2009, 2010 Roman Moravcik
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
g_return_if_fail (priv);
banner = hildon_banner_show_information (GTK_WIDGET (priv->button), NULL, text);
- hildon_banner_set_timeout (HILDON_BANNER (banner), 9000);
+ hildon_banner_set_timeout (HILDON_BANNER (banner), 3000);
}
static void
if (flashlight_open (priv->flashlight, "/dev/video0") < 0) {
flashlight_status_plugin_show_notification (plugin,
_("Unable to initialize flashlight.\nCamera in use by another application."));
+ flashlight_close (priv->flashlight);
return;
}
if (flashlight_set_intensity (priv->flashlight, 1) < 0) {
flashlight_status_plugin_show_notification (plugin,
_("Unable to turn on flashlight."));
+ flashlight_close (priv->flashlight);
return;
}
if (priv->hal) {
libhal_device_remove_property_watch (priv->hal, CAM_COVER_UDI, NULL);
libhal_ctx_set_user_data (priv->hal, NULL);
+ libhal_ctx_shutdown (priv->hal, NULL);
libhal_ctx_free (priv->hal);
}