Mercurial > pidgin
comparison plugins/dbus-example.c @ 13956:f61428cc4019
[gaim-migrate @ 16505]
Change the music messaging plugin to not try to load if our D-BUS stuff
is not initialized. Also extracted the gaim_notify_error() message code
to a #define in src/dbus-server.c
And print a debug warning if something tries to register a callback for
a signal using a handle that we don't have any registered signals for
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Mon, 17 Jul 2006 06:21:53 +0000 |
| parents | 2d6f7ac4b6f2 |
| children | b43aec5fa9eb |
comparison
equal
deleted
inserted
replaced
| 13955:2d6f7ac4b6f2 | 13956:f61428cc4019 |
|---|---|
| 107 /* And now standard plugin stuff */ | 107 /* And now standard plugin stuff */ |
| 108 | 108 |
| 109 static gboolean | 109 static gboolean |
| 110 plugin_load(GaimPlugin *plugin) | 110 plugin_load(GaimPlugin *plugin) |
| 111 { | 111 { |
| 112 const char *dbus_init_error; | 112 GAIM_DBUS_RETURN_FALSE_IF_DISABLED(plugin); |
| 113 | |
| 114 dbus_init_error = gaim_dbus_get_init_error(); | |
| 115 if (dbus_init_error != NULL) | |
| 116 { | |
| 117 gaim_notify_error(NULL, _("Unable to Load Plugin"), | |
| 118 _("Gaim's D-BUS server is not running for the reason listed below"), | |
| 119 _(dbus_init_error)); | |
| 120 return FALSE; | |
| 121 } | |
| 122 | 113 |
| 123 /* First, we have to register our four exported functions with the | 114 /* First, we have to register our four exported functions with the |
| 124 main gaim dbus loop. Without this statement, the gaim dbus | 115 main gaim dbus loop. Without this statement, the gaim dbus |
| 125 code wouldn't know about our functions. */ | 116 code wouldn't know about our functions. */ |
| 126 GAIM_DBUS_REGISTER_BINDINGS(plugin); | 117 GAIM_DBUS_REGISTER_BINDINGS(plugin); |
