[Xfce4-commits] <xfce4-settings:master> Also crawl the "Added Associations" and mark as user config.
Nick Schermer
noreply at xfce.org
Sat Jan 21 22:16:03 CET 2012
Updating branch refs/heads/master
to 0817f06bc8304bae8ddc9ecf65dd9d177a105d30 (commit)
from 55e5c6f7df7eca3cadfd20c4e8450c6b88149bfd (commit)
commit 0817f06bc8304bae8ddc9ecf65dd9d177a105d30
Author: Nick Schermer <nick at xfce.org>
Date: Sat Jan 21 01:05:50 2012 +0100
Also crawl the "Added Associations" and mark as user config.
dialogs/mime-settings/xfce-mime-window.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/dialogs/mime-settings/xfce-mime-window.c b/dialogs/mime-settings/xfce-mime-window.c
index 048de46..e2775df 100644
--- a/dialogs/mime-settings/xfce-mime-window.c
+++ b/dialogs/mime-settings/xfce-mime-window.c
@@ -289,6 +289,8 @@ xfce_mime_window_mime_user (void)
XfceRc *rc;
guint i;
gchar **mimes;
+ guint n;
+ const gchar *groups[] = { "Added Associations", "Default Applications" };
table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
@@ -301,12 +303,15 @@ xfce_mime_window_mime_user (void)
if (G_LIKELY (rc != NULL))
{
- mimes = xfce_rc_get_entries (rc, "Default Applications");
- if (G_LIKELY (mimes != NULL))
+ for (n = 0; n < G_N_ELEMENTS (groups); n++)
{
- for (i = 0; mimes[i] != NULL; i++)
- g_hash_table_insert (table, mimes[i], mimes[i]);
- g_free (mimes);
+ mimes = xfce_rc_get_entries (rc, groups[n]);
+ if (G_LIKELY (mimes != NULL))
+ {
+ for (i = 0; mimes[i] != NULL; i++)
+ g_hash_table_insert (table, mimes[i], mimes[i]);
+ g_free (mimes);
+ }
}
xfce_rc_close (rc);
More information about the Xfce4-commits
mailing list