Re: gnome-terminal macros and guile extensions




> gnome-terminal could also add scheme bindings that would make it aware
> of what is on the screen.  so i could have a macro [spell-word] that
> would execute:

You can achieve all sorts of extensions to gnome applications by using
the --gtk-module option.

You could then in your module do something like:

{ 
    guint signal, tag;

    signal = gtk_signal_lookup ("add", gtk_container_get_type ());
    tag = gtk_signal_add_emission_hook (
	  signal, patch_the_menubar, signame);

}

patch_the_menubar (GtkObject *object,
	           guint signal_id,
		   guint n_params,
		   GtkArg *params,
		   gchar *signame)
{
	if (GNOME_IS_DOCK_ITEM (object)){
	    GtkWidget *target = GTK_VALUE_POINTER (args [0]);

	    if (GTk_IS_MENU_BAR (target)){
	       gtk_menu_bar_insert (
	           GTK_MENU_BAR (target),
		   your_menu,
		   2);

	    }
	}
	return TRUE;
}



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