Re: Replace context menu of GTK applications
- From: David NeÄas <yeti physics muni cz>
- To: Simon Schneegans <code simonschneegans de>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Replace context menu of GTK applications
- Date: Mon, 23 Apr 2012 20:54:35 +0200
On Mon, Apr 23, 2012 at 08:18:05PM +0200, Simon Schneegans wrote:
I asked this question on another mailing list. There I got the hint
to ask here, maybe you can help me!
I'm going to write my bachelor thesis on different menu types (e.g.
Pie Menus). For this reason I'd like to replace the context menu of
GTK applications (the menu opened by right-clicking). I don't want
to recompile those applications, some kind of plugin technique would
be awesome!
I thought of two possible approaches:
1. - I know it's possible to do this with the main application menu
(like all the different global menus are doing it).
- So here's my question: Is that possible for context menus as
well? Is there an API for this purpose? If so, what's the way to go?
Documentation on this topic is very sparse...
2. - Write a GTK module and try to do it with some GObject
fancyness. May this work?
GtkMenuFoo classes use a number of internal Gtk+ calls and might not be
reasonably replaceable from outside. So I suggest to simply change the
implementation of menus in Gtk+ source code, recompile it and let
programs use your modified Gtk+ (by setting LD_LIBRARY_PATH). This is
trivial compared to your suggestions. In any case, you may run into
some implicit assertions in the programs about how menus work.
Also, there is no fundamental difference between application, context
and whatever else menus. They are all GtkMenu widgets and programs may
actually use a single GtkMenu object in different places.
Yeti
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]