Re: Can't display html attachments



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

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 :-).

If this program prints you an action but balsa claims something
different, I am interested in further data.

/Pawel
-- 
Pawel Salek (pawsa@theochem.kth.se) http://www.theochem.kth.se/~pawsa/
Theoretical Chemistry Division, KTH voice: +46 8 790-8202






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