summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorNick Schermer <nick@xfce.org>2012-09-28 20:49:27 +0200
committerNick Schermer <nick@xfce.org>2012-09-28 20:49:27 +0200
commit28cf90311c3f8b66211838867f1a256d863d4bec (patch)
treeea7ed2d25db67bddad05c6c076bf7f9b51a17370 /plugins
parent1c0e847306b687ae6ca7de7ac6d374d24e0a37b9 (diff)
downloadthunar-28cf90311c3f8b66211838867f1a256d863d4bec.tar.gz
Set desktop type in empty desktop files.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/thunar-apr/thunar-apr-desktop-page.c10
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))