diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-06-03 13:57:47 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2010-06-03 13:57:47 -0400 |
| commit | 2e94af28e4c12166cb74233526bb79f50877903c (patch) | |
| tree | 4eb6c3900c63648b34274dc15e5320b3af7f7b32 | |
| parent | b025a0268f302df78589d3cc36aad5f56693799f (diff) | |
save the list of mime types listed as supported by an application
| -rw-r--r-- | obt/link.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -45,8 +45,6 @@ struct _ObtLink { gboolean term; /*!< Run the app in a terminal or not */ ObtLinkAppOpen open; - /* XXX gchar**? or something better, a mime struct.. maybe - glib has something i can use. */ gchar **mime; /*!< Mime types the app can open */ GQuark *categories; /*!< Array of quarks representing the @@ -184,7 +182,12 @@ ObtLink* obt_link_from_ddfile(const gchar *ddname, GSList *paths, } } - /* XXX do something with mime types */ + if ((v = g_hash_table_lookup(keys, "MimeType"))) { + /* steal the string array */ + link->d.app.mime = v->value.strings.a; + v->value.strings.a = NULL; + v->value.strings.n = 0; + } } else if (link->type == OBT_LINK_TYPE_URL) { v = g_hash_table_lookup(keys, "URL"); @@ -214,6 +217,7 @@ void obt_link_unref(ObtLink *dd) if (dd->type == OBT_LINK_TYPE_APPLICATION) { g_free(dd->d.app.exec); g_free(dd->d.app.wdir); + g_strfreev(dd->d.app.mime); g_free(dd->d.app.categories); g_free(dd->d.app.startup_wmclass); } |
