Re: Can't display html attachments



On Thu, 31 Aug 2000 01:35:50 Pawel Salek wrote:
> 
> On 31 Aug 2000 05:25 Robert Broughton wrote:
> > > 
> > OK, I did this, and have successfully viewed an html attachment.
> However,
> > someone else sent me an email with application/msword attachment, and
> I have the same
> > problem; I have a program defined for it in the control center, but
> balsa
> > doesn't know about it. 
> 
> Hi, 
> 
> well it does work for me (but it doesn't mean much, of course). Anyway,
> I enclose short test programs that prints gnome mime associations.
> 
> #include <gnome.h>
> 
> int main(int argc, char* argv[]) {
>     int i;
>     const gchar *cmd;
> 
>     if(argc<=1) 
> 	fprintf(stderr,"No mime types to check\n");
>     for(i=1; i<argc; i++)
> 	printf("%s: %s\n",argv[i], 
> 	       (cmd=gnome_mime_get_value(argv[i], "view"))
> 	       ? cmd : "No view action defined");
> 
>     return argc>1;
> }
> 
> I compile it with 
> 
> gcc -I/usr/lib/gnome-libs/include/ -I/usr/lib/glib/include
> gnome-mime-test.c -lgnome -lgnomesupport -laudiofile -lesd -ldb
>
gcc -I/opt/gnome/include/ -I/usr/X11R6/include
-I/opt/gnome/lib/gnome-libs/include test.c -L/opt/gnome/lib -lgnome -lgnomesupport -laudiofile -lesd -ldb
 
> and then run:
> ./a.out application/pdf application/msword text/html
> In my case it prints:
> 
> application/pdf: gv -safer %f
> application/msword: No view action defined
> text/html: No view action defined
> 
> If you get that there is no action defined it means there is no view
> action defined :-).
> 
application/pdf: No view action defined
application/msword: No view action defined
text/html: No view action defined

-----
    .--.    Bob Broughton
   |o_o |   mailto:rbrought@smartt.com
   |:_/ |   WWW: http://personal.smartt.com/~rbrought/
  //   \ \  Vancouver, BC, Canada
 (|     | )
/'\_   _/`\
\___)=(___/





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