okay, so to check for udisks I've done the following:

1) set a signal handler to watch for udisks starting
2) check for udisks already running
3) send dbus method call to udisks regardless of run state
4) free error which is 100% guaranteed to occur
5) either pick up udisks from signal handler or from random dbus call
6) finally start efm
7) drink heavily.


SVN revision: 56055
This commit is contained in:
Mike Blumenkrantz 2011-01-12 01:44:08 +00:00
parent e232eefc31
commit baa156f189
1 changed files with 3 additions and 2 deletions

View File

@ -936,8 +936,9 @@ _e_fm_main_udisks_init(void)
E_DBUS_FDO_INTERFACE,
"NameOwnerChanged", _e_fm_main_udisks_poll, NULL);
msg = dbus_message_new_method_call(E_UDISKS_BUS, E_UDISKS_PATH, E_UDISKS_BUS, NULL);
e_dbus_method_call_send(_e_fm_main_udisks_conn, msg, NULL, (E_DBus_Callback_Func)_e_fm_main_udisks_test, NULL, -1, NULL);
e_dbus_get_name_owner(_e_fm_main_udisks_conn, E_UDISKS_BUS, _e_fm_main_udisks_test, NULL); /* test for already running udisks */
msg = dbus_message_new_method_call(E_UDISKS_BUS, E_UDISKS_PATH, E_UDISKS_BUS, "suuuuuup");
e_dbus_method_call_send(_e_fm_main_udisks_conn, msg, NULL, (E_DBus_Callback_Func)_e_fm_main_udisks_test, NULL, -1, NULL); /* test for not running udisks */
dbus_message_unref(msg);
}