From 63a4c279b607761616dd7cd83078d0aa378e9249 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Thu, 9 Jul 2015 12:32:41 +0200 Subject: Cleanup client a bit --- rcm-client-main.c | 44 +------------------------------------------- rcm-client-main.h | 1 - rcm-client-receive.c | 1 - 3 files changed, 1 insertion(+), 45 deletions(-) diff --git a/rcm-client-main.c b/rcm-client-main.c index cd119a3..51f296b 100644 --- a/rcm-client-main.c +++ b/rcm-client-main.c @@ -48,46 +48,6 @@ poke_objects() g_list_free_full (objects, g_object_unref); } -void -poke_objects2() -{ - GList *objects; - GList *l; - GDBusObjectManager *manager = mgr; - - objects = g_dbus_object_manager_get_objects (manager); - for (l = objects; l != NULL; l = l->next) - { - GDBusInterface *interface; - - interface = g_dbus_object_get_interface(G_DBUS_OBJECT(l->data), - "org.gnome.RemoteControlManager.IRDevice"); - if (!interface) { - g_print("That's weird, an object which is not an ir device...\n"); - continue; - } - - RCIRDevice *object = RCIRDEVICE(interface); - GVariant *reply = NULL; - rcirdevice_call_get_irrxparameters_sync(object, &reply, NULL, NULL); - - printf("Got a reply %p\n", reply); - gchar *ans = NULL; - - g_variant_lookup(reply, "name", "s", &ans); - printf("The rsult is %s\n", ans); -/* - printf("Called object %s: %s\n", g_dbus_object_get_object_path (G_DBUS_OBJECT(l->data)), reply); - printf("Driver name is: %s\n", rcdevice_get_driver_name(object)); - printf("Keymap name is: %s\n", rcdevice_get_kernel_keymap_name(object)); - */ - //g_free(reply); - - g_object_unref(interface); - } - g_list_free_full (objects, g_object_unref); -} - static void on_object_added(GDBusObjectManager *manager, GDBusObject *object, @@ -144,10 +104,8 @@ manager_ready_cb(GObject *source, GAsyncResult *res, gpointer user_data) on_owner_change(mgr, NULL); g_print("Object manager at %s\n", g_dbus_object_manager_get_object_path(mgr)); objects = g_dbus_object_manager_get_objects(mgr); - for (l = objects; l != NULL; l = l->next) { - rcng_client_hardware_list_add(G_DBUS_OBJECT(l->data)); + for (l = objects; l != NULL; l = l->next) rcng_client_hardware_list_add(G_DBUS_OBJECT(l->data)); - } g_list_free_full (objects, g_object_unref); diff --git a/rcm-client-main.h b/rcm-client-main.h index d27fb24..64440c2 100644 --- a/rcm-client-main.h +++ b/rcm-client-main.h @@ -1,5 +1,4 @@ void poke_objects(); -void poke_objects2(); struct global_variables { GtkWindow *window; diff --git a/rcm-client-receive.c b/rcm-client-receive.c index 8abc64a..36c34eb 100644 --- a/rcm-client-receive.c +++ b/rcm-client-receive.c @@ -288,7 +288,6 @@ button_press_event_cb(GtkWidget *widget, button_redraw(rcb, widget); sprintf(buf, "Button at %ux%u clicked\n", rcb->x, rcb->y); poke_objects(); - poke_objects2(); } return true; -- cgit v1.2.3