diff -Naurp xfce4-places-plugin-1.1.0.bak/panel-plugin/model_system.c xfce4-places-plugin-1.1.0/panel-plugin/model_system.c --- xfce4-places-plugin-1.1.0.bak/panel-plugin/model_system.c 2008-06-07 20:01:09.000000000 +0200 +++ xfce4-places-plugin-1.1.0/panel-plugin/model_system.c 2008-10-15 06:02:03.000000000 +0200 @@ -87,6 +87,8 @@ pbsys_get_bookmarks(PlacesBookmarkGroup ThunarVfsInfo *trash_info; #endif const gchar *home_dir = xfce_get_homedir(); + gchar *desktop_dir = NULL; + gboolean desktop_is_home = FALSE; pbg_priv(bookmark_group)->check_changed = TRUE; @@ -133,11 +135,18 @@ pbsys_get_bookmarks(PlacesBookmarkGroup /* Desktop */ bookmark = places_bookmark_create(_("Desktop")); - bookmark->uri = g_build_filename(home_dir, "Desktop", NULL); +#if GLIB_CHECK_VERSION(2,14,0) + desktop_dir = g_strdup(g_get_user_special_dir(G_USER_DIRECTORY_DESKTOP)); + desktop_is_home = exo_str_is_equal(desktop_dir, home_dir); +#endif + if (G_UNLIKELY(desktop_dir == NULL)) + desktop_dir = g_build_filename(home_dir, "Desktop", NULL); + + bookmark->uri = desktop_dir; bookmark->icon = "gnome-fs-desktop"; bookmark->finalize = pbsys_finalize_desktop_bookmark; - if(g_file_test(bookmark->uri, G_FILE_TEST_IS_DIR)){ + if((!desktop_is_home) && (g_file_test(bookmark->uri, G_FILE_TEST_IS_DIR))) { terminal = places_create_open_terminal_action(bookmark); bookmark->actions = g_list_prepend(bookmark->actions, terminal); @@ -179,13 +188,21 @@ pbsys_changed(PlacesBookmarkGroup *bookm gboolean trash_is_empty = FALSE; ThunarVfsInfo *trash_info; #endif + gchar *desktop_dir = NULL; + gboolean desktop_is_home = FALSE; if(!pbg_priv(bookmark_group)->check_changed) return FALSE; /* Check if desktop now exists and didn't before */ - uri = g_build_filename(xfce_get_homedir(), "Desktop", NULL); - if(g_file_test(uri, G_FILE_TEST_IS_DIR) != pbg_priv(bookmark_group)->desktop_exists){ +#if GLIB_CHECK_VERSION(2,14,0) + desktop_dir = g_strdup(g_get_user_special_dir(G_USER_DIRECTORY_DESKTOP)); + desktop_is_home = exo_str_is_equal(desktop_dir, xfce_get_homedir()); +#endif + if (G_UNLIKELY(desktop_dir == NULL)) + desktop_dir = g_build_filename(xfce_get_homedir(), "Desktop", NULL); + uri = desktop_dir; + if((!desktop_is_home) && (g_file_test(uri, G_FILE_TEST_IS_DIR) != pbg_priv(bookmark_group)->desktop_exists)){ g_free(uri); return TRUE; }else