Nautilus Extension Problem
- From: Ozojie Chikelu <ozojiechikelu gmail com>
- To: nautilus-list gnome org
- Subject: Nautilus Extension Problem
- Date: Tue, 15 Jan 2013 18:51:07 +0100
Hi
I have this application that am developing and I want to integrate it to nautilus file manager on ubuntu 12.04 and am facing problems
according to the guide here
http://taschenorakel.de/svn/repos/bulldozer/tags/release-0.1.0/documentation/NautilusExtensions.html I should be able to build this
#include <iostream>
#include <nautilus/libnautilus-extension/nautilus-menu-provider.h>
#include <nautilus/libnautilus-extension/nautilus-extension-types.h>
#include <nautilus/libnautilus-extension/nautilus-menu-item.h>
#include <nautilus/libnautilus-extension/nautilus-info-provider.h>
#include <nautilus/libnautilus-extension/nautilus-file-info.h>
#include <glib-object.h>
using namespace std;
GList* nautilus_menu_provider_get_background_items(NautilusMenuProvider *provider,
GtkWidget *window,
NautilusFileInfo *current_folder);
void move_file(const char *old_path, const char* new_path);
int main()
{
NautilusMenuProviderIface a_iface;
return 0;
}
GList* nautilus_menu_provider_get_background_items(NautilusMenuProvider *provider,
GtkWidget *window,
NautilusFileInfo *current_folder)
{
NautilusMenuItem *item;
GList *items;
item = nautilus_menu_item_new("Relax::root", "relax", "add to relax", NULL);
g_signal_connect (item, "activate", G_CALLBACK (test_stuff), provider);
g_object_set_data (NAUTILUS_MENU_ITEM (item), "folder", nautilus_file_info_get_uri(current_folder));
items = g_list_append(items, item);
return items;
}
void test_stuff(NautilusMenuItem *item, gpointer user_data)
{
char* folders;
folders = g_object_get_data(item, "folder");
cout << folders;
}
but it doesn't build.
I get this error:
/home/zouga/DevStuffs/couttest/main.cpp:49: error: cannot convert 'NautilusMenuItem* {aka _NautilusMenuItem*}' to 'GObject* {aka _GObject*}' for argument '1' to 'void g_object_set_data(GObject*, const gchar*, gpointer)'
please what am I doing wrong
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]