* 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 ac3cf7dcb5
commit 3b8f30fc1c

View File

@ -33,6 +33,9 @@
* and things like that.
*
* $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
* * src/grampslib_wrap.c: check the known mime types before calling the
* gnome functions
@ -574,46 +577,27 @@ extern const char *gnome_vfs_mime_get_description(const char *);
extern const char *gnome_vfs_mime_get_value(const char *,const char *);
const char* default_application_name(const char* type) {
GList *node;
char* value;
char* retval = NULL;
GList *s = gnome_vfs_get_registered_mime_types();
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;
return a->name;
} else {
return (char*) NULL;
}
}
}
gnome_vfs_mime_registered_mime_type_list_free(s);
return retval;
}
const char* default_application_command(const char* type) {
GList *node;
char* value;
char* retval = NULL;
GList *s = gnome_vfs_get_registered_mime_types();
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->command;
break;
return a->command;
} else {
return NULL;
}
}
}
gnome_vfs_mime_registered_mime_type_list_free(s);
return retval;
}
static PyObject *_wrap_gnome_vfs_mime_get_icon(PyObject *self, PyObject *args) {
PyObject * _resultobj;