diff options
author | Bertrand Guiheneuf <bertrand@src.gnome.org> | 2000-03-05 01:55:36 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 2000-03-05 01:55:36 +0800 |
commit | a6d1ec4664e1401e0e79427882cdcb9e851bd183 (patch) | |
tree | ab384214adb9d1383d63c63c4b8e22867e9776f5 /tests/ui-tests | |
parent | 08419b64ea02efb0eded06f20882859e9e3ae643 (diff) | |
download | gsoc2013-evolution-a6d1ec4664e1401e0e79427882cdcb9e851bd183.tar.gz gsoc2013-evolution-a6d1ec4664e1401e0e79427882cdcb9e851bd183.tar.zst gsoc2013-evolution-a6d1ec4664e1401e0e79427882cdcb9e851bd183.zip |
Message browser can now display attachment inline when Bonobo
compenent exist for the mime type. $(prefix)/share/mime-info/bonobo.keys
must be modified for this to work, though. For example, to display
application/svg attachments, the following lines must be added :
application/svg
bonobo-goad-id=embeddable:gill
svn path=/trunk/; revision=2041
Diffstat (limited to 'tests/ui-tests')
-rw-r--r-- | tests/ui-tests/message-browser.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/tests/ui-tests/message-browser.c b/tests/ui-tests/message-browser.c index 57b8b17448..dbf706875a 100644 --- a/tests/ui-tests/message-browser.c +++ b/tests/ui-tests/message-browser.c @@ -366,22 +366,26 @@ on_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, void *data) printf ("object requested : %s\n", class_id); printf ("UID = %s\n", uid); - bonobo_embedable = bonobo_widget_new_subdoc (class_id, NULL); - gtk_widget_show (bonobo_embedable); - gtk_container_add (GTK_CONTAINER(eb), bonobo_embedable); - - if (sscanf (uid, "camel://%p", &stream) == 1) { + bonobo_embedable = bonobo_widget_new_subdoc (class_id, NULL); + + server = bonobo_widget_get_server (BONOBO_WIDGET (bonobo_embedable)); - + + if (!server) { + printf ("Couldn't get the server for the bonobo embedable\n"); + return; + } + /* if the component supports persistant streams, * then we are going to create a mem stream */ if (bonobo_object_client_has_interface (server, "IDL:Bonobo/PersistStream:1.0", NULL)) { + printf ("the bonobo object supports PersistStream. Good\n"); tmp_gstring = g_string_new (""); do { @@ -400,6 +404,8 @@ on_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, void *data) } while (!camel_stream_eos (stream)); + printf ("After reading the stream, the temporary buffer has %d elements\n", tmp_gstring->len); + if (tmp_gstring->len) { mem_stream = bonobo_stream_mem_create (tmp_gstring->str,tmp_gstring->len , TRUE); @@ -443,7 +449,12 @@ on_object_requested (GtkHTML *html, GtkHTMLEmbedded *eb, void *data) CORBA_Object_release (persist, &ev); CORBA_exception_free (&ev); + + gtk_widget_show (bonobo_embedable); + + gtk_container_add (GTK_CONTAINER(eb), bonobo_embedable); + } } } |