static void
impl_deactivate (RBPlugin *rbplugin,
		 RBShell *shell)
{
	RBGPMPlugin *plugin;
	GObject *shell_player;

	plugin = RB_GPM_PLUGIN (rbplugin);

	if (plugin->timeout_id != 0) {
		g_source_remove (plugin->timeout_id);
		plugin->timeout_id = 0;
	}

	if (plugin->cookie != 0) {
		uninhibit (plugin);
		plugin->cookie = 0;
	}

	g_object_get (shell, "shell-player", &shell_player, NULL);

	if (plugin->handler_id != 0) {
		g_signal_handler_disconnect (shell_player, plugin->handler_id);
		plugin->handler_id = 0;
	}

	g_object_unref (plugin->shell);
	g_object_unref (shell_player);

	if (plugin->proxy != NULL) {
		g_object_unref (plugin->proxy);
		plugin->proxy = NULL;
	}
}
Exemplo n.º 2
0
static void
impl_deactivate (PeasActivatable *bplugin)
{
	RBGPMPlugin *plugin;
	GObject *shell_player;
	RBShell *shell;

	plugin = RB_GPM_PLUGIN (bplugin);

	if (plugin->timeout_id != 0) {
		g_source_remove (plugin->timeout_id);
		plugin->timeout_id = 0;
	}

	if (plugin->cookie != 0) {
		uninhibit (plugin);
		plugin->cookie = 0;
	}

	g_object_get (plugin, "object", &shell, NULL);
	g_object_get (shell, "shell-player", &shell_player, NULL);

	if (plugin->handler_id != 0) {
		g_signal_handler_disconnect (shell_player, plugin->handler_id);
		plugin->handler_id = 0;
	}

	g_object_unref (shell);
	g_object_unref (shell_player);
}