Mercurial > pidgin
changeset 17708:9f5c9df30287
D-Bus unique stuff. Had to add a few NULL-checks here and there, because
some things were assumed to not be NULL.
author | Gabriel Schulhof <nix@go-nix.ca> |
---|---|
date | Sun, 13 May 2007 19:52:05 +0000 |
parents | 10c7c5d4ea25 |
children | 176d0fc8bc16 |
files | libpurple/dbus-server.c libpurple/plugin.c pidgin/gtkconv.c |
diffstat | 3 files changed, 23 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/dbus-server.c Sun May 13 10:26:08 2007 +0000 +++ b/libpurple/dbus-server.c Sun May 13 19:52:05 2007 +0000 @@ -604,6 +604,25 @@ return; } + if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { + DBusMessage *msg = dbus_message_new_method_call(DBUS_SERVICE_PURPLE, DBUS_PATH_PURPLE, DBUS_INTERFACE_PURPLE, "PurpleBlistShow") ; + + if (NULL != msg) { + DBusMessage *reply = NULL ; + DBusError dbus_error ; + + dbus_error_init(&dbus_error) ; + reply = dbus_connection_send_with_reply_and_block(purple_dbus_connection, msg, 5000, &dbus_error) ; + dbus_message_unref(msg) ; + if (NULL != reply) + dbus_message_unref(reply) ; + dbus_error_free(&dbus_error) ; + } + + purple_core_quit() ; + _exit(0) ; + } + dbus_connection_setup_with_g_main(purple_dbus_connection, NULL); purple_debug_misc("dbus", "okkk\n");
--- a/libpurple/plugin.c Sun May 13 10:26:08 2007 +0000 +++ b/libpurple/plugin.c Sun May 13 19:52:05 2007 +0000 @@ -359,7 +359,7 @@ purple_plugin_destroy(plugin); return NULL; } - else if (plugin->info->ui_requirement && + else if (plugin->info->ui_requirement && NULL != purple_core_get_ui() && strcmp(plugin->info->ui_requirement, purple_core_get_ui())) { plugin->error = g_strdup_printf(_("You are using %s, but this plugin requires %s."),
--- a/pidgin/gtkconv.c Sun May 13 10:26:08 2007 +0000 +++ b/pidgin/gtkconv.c Sun May 13 19:52:05 2007 +0000 @@ -7996,6 +7996,9 @@ purple_prefs_disconnect_by_handle(win); window_list = g_list_remove(window_list, win); + if (NULL == win) + return ; + /* Close the "Find" dialog if it's open */ if (win->dialogs.search) gtk_widget_destroy(win->dialogs.search);