diff options
author | Nick Schermer <nick@xfce.org> | 2012-09-28 20:49:27 +0200 |
---|---|---|
committer | Nick Schermer <nick@xfce.org> | 2012-09-28 20:49:27 +0200 |
commit | 28cf90311c3f8b66211838867f1a256d863d4bec (patch) | |
tree | ea7ed2d25db67bddad05c6c076bf7f9b51a17370 /plugins | |
parent | 1c0e847306b687ae6ca7de7ac6d374d24e0a37b9 (diff) | |
download | thunar-28cf90311c3f8b66211838867f1a256d863d4bec.tar.gz |
Set desktop type in empty desktop files.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/thunar-apr/thunar-apr-desktop-page.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/thunar-apr/thunar-apr-desktop-page.c b/plugins/thunar-apr/thunar-apr-desktop-page.c index d90ab370..069cd4b1 100644 --- a/plugins/thunar-apr/thunar-apr-desktop-page.c +++ b/plugins/thunar-apr/thunar-apr-desktop-page.c @@ -555,6 +555,16 @@ thunar_apr_desktop_page_save (ThunarAprDesktopPage *desktop_page, /* save the widget changes to the key file */ thunar_apr_desktop_page_save_widget (desktop_page, widget, key_file); + /* give empty desktop files a type */ + if (!g_key_file_has_key (key_file, G_KEY_FILE_DESKTOP_GROUP, + G_KEY_FILE_DESKTOP_KEY_TYPE, NULL)) + { + g_key_file_set_string (key_file, + G_KEY_FILE_DESKTOP_GROUP, + G_KEY_FILE_DESKTOP_KEY_TYPE, + "Application"); + } + /* determine the content of the key file */ data = g_key_file_to_data (key_file, &data_length, &error); if (G_LIKELY (data_length > 0)) |