Mattias Nordstrom wrote:
> I'm writing an embedded MZ application using the GtkMozEmbed widget. 
> I've got it working so that viewing pages works fine, and it follows 
> links etc. but when I write something in a textbox (ie. a google search) 
> and hit the submit button, nothing happens. Is there a signal of some 
> sort that has to be catched or what?

Catch the new_window signal.

--Chris

> 
> Any help would be apprechiated!
> 
> This is the code so far:
> 
> #include <iostream.h>
> #include <gtk/gtk.h>
> #include <gtkmozembed.h>
> 
> 
> gint open_uri (GtkMozEmbed *embed, const char *uri, gpointer data)
> {
>         cout << "Opening URI: " << uri << endl;
> 
>         return 0;
> }
> 
> int main(int argc, char *argv[])
> {
>         GtkWidget *window;
>         GtkWidget *mozembed;
>         char* url;
> 
>         gtk_init (&argc, &argv);
> 
>         window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
> 
>         mozembed = gtk_moz_embed_new();
> 
>         gtk_signal_connect(GTK_OBJECT(mozembed), "destroy",
>                                 GTK_SIGNAL_FUNC(gtk_main_quit),
>                                                         NULL);
> 
>         gtk_signal_connect(GTK_OBJECT(mozembed), "open_uri",
>                                 GTK_SIGNAL_FUNC(open_uri),
>                                                         NULL);
> 
>         gtk_container_add(GTK_CONTAINER(window), mozembed);
> 
>         gtk_widget_set_usize(window, 1024, 768);
>         gtk_widget_show(mozembed);
>         gtk_widget_show_all(window);
> 
>         url = (argc > 1) ? argv[1] : (char *)"slashdot.org";
>         gtk_moz_embed_load_url(GTK_MOZ_EMBED(mozembed), url);
> 
>         gtk_main ();
> 
>         return 0;
> }
> 
> 
> -- 
> Mattias Nordstrom
> 



-- 
------------
Christopher Blizzard
http://people.redhat.com/blizzard/
"Hell froze over in the geek community yesterday as Mozilla 1.0 was
finally released."
------------


Reply via email to