Re: Accelerator-only actions

On Fri, 2003-09-05 at 04:16, Matthias Clasen wrote:
> This is the last major API change which I want to get into the action
> menu code to make it ready for 2.4:

I haven't had time to look at the current state of the API, but it is
really important that we can do this:

static gboolean
gtk_entry_focus_in_event (GtkWidget *widget, GdkEventFocus *event)
	Handle *handle;

	handle = get_handle_to_menu_system (widget);
	merge_in_my_edit_cut_copy_paste (handle);
	return TRUE;

Then a toplevel like BonoboPlug, descendant of GtkPlug, will somehow get
notified of the merging request and it will proxy the request over to
the BonoboSocket --- which will in turn send it to its own handle to the
menu system:

static void
bonobo_plug_menu_merge_notify (GtkWidget *widget, MenuMerge *mm)
	send_merge_over_corba (mm);

static void
bonobo_socket_receive_menu_merge (CORBA_Object *obj, CorbaMenuMerge
	MenuMerge *mm;
	BonoboSocket *socket;
	Handle *handle;

	mm = demarshal (cmm);
	socket = bonobo_object_from_servant (obj);
	handle = get_handle_to_menu_system (socket);
	menu_system_do_your_thing (mm);

I am giving the GtkEntry example because a Bonobo control which uses
entries internally should not have to wrap every one of them just so
that they will work with the menu system --- this should happen
automatically, and writing Bonobo controls which need to merge menu
items should not be any different from writing normal GTK+ widgets.

Is this possible with the current API right now?


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