[gnome-settings-daemon] wacom: Split real listing in a separate function
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Split real listing in a separate function
- Date: Fri, 25 Nov 2011 17:04:58 +0000 (UTC)
commit b51b86005843a5bb12036838056a101210e73453
Author: Bastien Nocera <hadess hadess net>
Date: Fri Nov 25 15:08:26 2011 +0000
wacom: Split real listing in a separate function
plugins/wacom/list-wacom.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/plugins/wacom/list-wacom.c b/plugins/wacom/list-wacom.c
index 457b0ac..aa61a4c 100644
--- a/plugins/wacom/list-wacom.c
+++ b/plugins/wacom/list-wacom.c
@@ -45,13 +45,12 @@ get_loc (GSettings *settings)
#define BOOL_AS_STR(x) (x ? "yes" : "no")
-int main (int argc, char **argv)
+static void
+list_actual_devices (void)
{
GdkDeviceManager *mgr;
GList *list, *l;
- gtk_init (&argc, &argv);
-
mgr = gdk_display_get_device_manager (gdk_display_get_default ());
list = gdk_device_manager_list_devices (mgr, GDK_DEVICE_TYPE_SLAVE);
@@ -94,6 +93,13 @@ int main (int argc, char **argv)
g_object_unref (device);
}
g_list_free (list);
+}
+
+int main (int argc, char **argv)
+{
+ gtk_init (&argc, &argv);
+
+ list_actual_devices ();
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]