gpointing-device-settings r211 - trunk/src
- From: hiikezoe svn gnome org
- To: svn-commits-list gnome org
- Subject: gpointing-device-settings r211 - trunk/src
- Date: Thu, 12 Mar 2009 06:45:46 +0000 (UTC)
Author: hiikezoe
Date: Thu Mar 12 06:45:46 2009
New Revision: 211
URL: http://svn.gnome.org/viewvc/gpointing-device-settings?rev=211&view=rev
Log:
check device existence in is_available.
Modified:
trunk/src/gpds-ui.c
Modified: trunk/src/gpds-ui.c
==============================================================================
--- trunk/src/gpds-ui.c (original)
+++ trunk/src/gpds-ui.c Thu Mar 12 06:45:46 2009
@@ -28,6 +28,7 @@
#include <gconf/gconf-client.h>
#include "gpds-module.h"
#include "gpds-gconf.h"
+#include "gpds-xinput-utils.h"
static GList *uis = NULL;
@@ -205,7 +206,17 @@
g_return_val_if_fail(GPDS_IS_UI(ui), FALSE);
+ if (!gpds_xinput_utils_exist_device(gpds_ui_get_device_name(ui))) {
+ g_set_error(error,
+ GPDS_XINPUT_UTILS_ERROR,
+ GPDS_XINPUT_UTILS_ERROR_NO_DEVICE,
+ _("No %s found."),
+ gpds_ui_get_device_name(ui));
+ return FALSE;
+ }
+
klass = GPDS_UI_GET_CLASS(ui);
+
return (klass->is_available) ? klass->is_available(ui, error) : FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]