Re: new menu api (python) ?
- From: Daniel Brodie <daniel brodienet com>
- To: Danny Milosavljevic <danny milo gmx net>
- Cc: nautilus-list gnome org
- Subject: Re: new menu api (python) ?
- Date: Fri, 05 Mar 2004 17:52:11 -0500
On Fri, 2004-03-05 at 14:30, Danny Milosavljevic wrote:
> Hi,
>
> somewhere on gnomedesktop there was said there is a new menu api that
> can be used to make better "Scripts" now ... (filtering the entries by
> mime type pattern, icon, ...)
>
> (http://www.gnomedesktop.org/comments.php?
> op=showreply&tid=13526&sid=1198&pid=13512&mode=&order=&thold=#13526)
>
> And that it supports python ...
>
> Is that true? Where? How to use it?
>
> Since I don't even know a name, I thought I'd ask here :)
Whew, thats an old discussion. I posted that way back when I was still
in NY :).
That was in new things coming in for 2.4, but now 2.6 is almost upon us.
So, in the 2.4 way of doing it, you imeplement it using bonobo. Bonobo
in python is very simple (atleast compared to the C counterpart).
Basicly, you need to imeplement a Bonobo/Listner that gets called when
your menu item get clicked. Now to create a bonobo component you need
two things, one a .server file, and two, your actual code.
You can see a sample .server file for file-roller's item in the menu
here:
/usr/lib/bonobo/servers/File_Roller_Component.server
About how to actually write the python code to implement the
Bonobo/Listener, I dont have the little code I had anymore, nor can I
find any documentation about this in a quick search. You will probably
have more luck on the pygtk/gnome-python mailing lists.
Now, when 2.6 comes out, there is a more flexiable api, but currently it
is only in C. There is still support for the 2.4 way of doing things.
Once there are python bindings of these new apis it should be simpler
and more powerful then the 2.4 way. I have no idea on the status of such
bindings if any even exsist.
Hope that answered your question! Sorry I couldnt be of more help by
giving actual code. ;)
--
Daniel Brodie
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]