* src/grampslib_wrap.c: backout mime type search

svn: r2715
This commit is contained in:
Don Allingham 2004-01-27 03:28:21 +00:00
parent 4d1289d24c
commit a68c3d0226

View File

@ -33,6 +33,9 @@
* and things like that. * and things like that.
* *
* $Log$ * $Log$
* Revision 1.4 2004/01/27 03:28:21 dallingham
* * src/grampslib_wrap.c: backout mime type search
*
* Revision 1.3 2004/01/22 02:03:21 dallingham * Revision 1.3 2004/01/22 02:03:21 dallingham
* * src/grampslib_wrap.c: check the known mime types before calling the * * src/grampslib_wrap.c: check the known mime types before calling the
* gnome functions * gnome functions
@ -574,45 +577,26 @@ extern const char *gnome_vfs_mime_get_description(const char *);
extern const char *gnome_vfs_mime_get_value(const char *,const char *); extern const char *gnome_vfs_mime_get_value(const char *,const char *);
const char* default_application_name(const char* type) { const char* default_application_name(const char* type) {
char* retval = NULL;
GList *node; GnomeVFSMimeApplication *a = gnome_vfs_mime_get_default_application(type);
char* value; if (a) {
char* retval = NULL; return a->name;
} else {
GList *s = gnome_vfs_get_registered_mime_types(); return (char*) NULL;
}
for (node = g_list_first(s); node != NULL; node = g_list_next(node)) {
if (!strcmp((char*)node->data,type)) {
GnomeVFSMimeApplication *a = gnome_vfs_mime_get_default_application(type);
if (a) {
retval = a->name;
break;
}
}
}
gnome_vfs_mime_registered_mime_type_list_free(s);
return retval;
} }
const char* default_application_command(const char* type) { const char* default_application_command(const char* type) {
GList *node; char* retval = NULL;
char* value;
char* retval = NULL;
GList *s = gnome_vfs_get_registered_mime_types(); GnomeVFSMimeApplication *a = gnome_vfs_mime_get_default_application(type);
if (a) {
for (node = g_list_first(s); node != NULL; node = g_list_next(node)) { return a->command;
if (!strcmp((char*)node->data,type)) { } else {
GnomeVFSMimeApplication *a = gnome_vfs_mime_get_default_application(type); return NULL;
if (a) { }
retval = a->command;
break;
}
}
}
gnome_vfs_mime_registered_mime_type_list_free(s);
return retval;
} }
static PyObject *_wrap_gnome_vfs_mime_get_icon(PyObject *self, PyObject *args) { static PyObject *_wrap_gnome_vfs_mime_get_icon(PyObject *self, PyObject *args) {