Re: [Ekiga-devel-list] Next generation base code



Julien Puydt a �it :
Bad news : I found a bug in the plugin manager :-)

Basically, it works unless you write a plugin loading plugins.

I found out by trying this plugin -- the idea being that if ekiga loads plugins from /usr/lib/ekiga, then it won't be easy for us to make tests since it's a system directory.

This plugin would be the only one needed in /usr/lib/ekiga for developping purposed : it would load from $HOME/ekiga/.

It will work great when I'll have fixed my code :-/

Snark
/* Ekiga -- A VoIP and Video-Conferencing application
 * Copyright (C) 2000-2006 Damien Sandras
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 *
 * Ekiga is licensed under the GPL license and as a special exception,
 * you have permission to link or otherwise combine this program with the
 * programs OPAL, OpenH323 and PWLIB, and distribute the combination,
 * without applying the requirements of the GNU GPL to the OPAL, OpenH323
 * and PWLIB programs, as long as you do follow the requirements of the
 * GNU GPL for all the rest of the software thus combined.
 */


/*
 *                         homedir-loader-plugin.c  -  description
 *                         ------------------------------------------
 *   begin                : written in 2007 by Julien Puydt
 *   copyright            : (c) 2007 by Julien Puydt
 *   description          : plugin to load plugins from a user's home directory
 *
 */

#include "plugins/gm-plugin.h"
#include "gm-plugin-manager.h"

static gboolean
init (GmServices *services)
{
  GmPluginManager *manager = NULL;
  gchar *plugin_path = NULL;

  g_return_val_if_fail (GM_IS_SERVICES (services), FALSE);

  manager = (GmPluginManager *)gm_services_peek (services,
						 "ekiga/plugins/manager");

  if (GM_IS_PLUGIN_MANAGER (manager)) {

    plugin_path = g_build_path (G_DIR_SEPARATOR_S,
				g_get_home_dir (), "ekiga_plugins", NULL);
    gm_plugin_manager_load_directory (manager, plugin_path);
    g_free (plugin_path);
    return TRUE;
  } else
    return FALSE;
}

GM_PLUGIN_DEFINE_SIMPLE(init)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]