1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
/*
* arch-tag: Nautilus context menu constructor
* Copyright (C) 2000, 2001 Eazel, Inc
*
* 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., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Author: Maciej Stachowiak
*/
/* libmain.c - object activation infrastructure for shared library
version of tree view. */
#include <config.h>
#include <string.h>
#include "rb-nautilus-context-menu.h"
#include <bonobo.h>
#include <bonobo-activation/bonobo-activation.h>
#define RB_NAUTILUS_CONTEXT_MENU_IID "OAFIID:Rhythmbox_Nautilus_Context_Menu_Item"
static CORBA_Object
rhythmbox_shlib_make_object (PortableServer_POA poa,
const char *iid,
gpointer impl_ptr,
CORBA_Environment *ev)
{
RbNautilusContextMenu *rncm;
if (strcmp (iid, RB_NAUTILUS_CONTEXT_MENU_IID) != 0) {
return CORBA_OBJECT_NIL;
}
rncm = RB_NAUTILUS_CONTEXT_MENU (g_object_new (TYPE_RB_NAUTILUS_CONTEXT_MENU, NULL));
bonobo_activation_plugin_use (poa, impl_ptr);
return CORBA_Object_duplicate (BONOBO_OBJREF (rncm), ev);
}
static const BonoboActivationPluginObject plugin_list[] = {
{ RB_NAUTILUS_CONTEXT_MENU_IID, rhythmbox_shlib_make_object },
{ NULL }
};
const BonoboActivationPlugin Bonobo_Plugin_info = {
plugin_list,
"Rhythmbox Nautilus Context Menu"
};
|