rpms/xfce4-places-plugin/devel xfce4-places-plugin-1.1.0-xdg-userdir-compat.patch, NONE, 1.1 xfce4-places-plugin.spec, 1.9, 1.10

Christoph Wickert cwickert at fedoraproject.org
Wed Aug 27 13:27:03 UTC 2008


Author: cwickert

Update of /cvs/pkgs/rpms/xfce4-places-plugin/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32319

Modified Files:
	xfce4-places-plugin.spec 
Added Files:
	xfce4-places-plugin-1.1.0-xdg-userdir-compat.patch 
Log Message:
* Wed Aug 27 2008 Christoph Wickert <fedora christoph-wickert de> - 1.1.0-2
- Respect xdg user directory paths (#457740)


xfce4-places-plugin-1.1.0-xdg-userdir-compat.patch:

--- NEW FILE xfce4-places-plugin-1.1.0-xdg-userdir-compat.patch ---
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-08-08 04:21:58.000000000 +0200
@@ -87,6 +87,7 @@ pbsys_get_bookmarks(PlacesBookmarkGroup 
     ThunarVfsInfo *trash_info;
 #endif
     const gchar *home_dir = xfce_get_homedir();
+    const gchar *desktopDir = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP);
 
     pbg_priv(bookmark_group)->check_changed = TRUE;
 
@@ -133,7 +134,11 @@ pbsys_get_bookmarks(PlacesBookmarkGroup 
 
     /* Desktop */
     bookmark                = places_bookmark_create(_("Desktop"));
-    bookmark->uri           = g_build_filename(home_dir, "Desktop", NULL);
+    if (G_UNLIKELY(desktopDir == NULL)) {
+      bookmark->uri           = g_build_filename(home_dir, "Desktop", NULL);
+    } else {
+      bookmark->uri           = g_strdup(desktopDir);
+    }
     bookmark->icon          = "gnome-fs-desktop";
     bookmark->finalize      = pbsys_finalize_desktop_bookmark;
 
@@ -179,12 +184,17 @@ pbsys_changed(PlacesBookmarkGroup *bookm
     gboolean trash_is_empty = FALSE;
     ThunarVfsInfo *trash_info;
 #endif
+    const gchar *desktopDir=g_get_user_special_dir(G_USER_DIRECTORY_DESKTOP);
 
     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_UNLIKELY(desktopDir==NULL)) {
+      uri = g_build_filename(xfce_get_homedir(), "Desktop", NULL);
+    } else {
+      uri = g_strdup(desktopDir);
+    }
     if(g_file_test(uri, G_FILE_TEST_IS_DIR) != pbg_priv(bookmark_group)->desktop_exists){
         g_free(uri);
         return TRUE;


Index: xfce4-places-plugin.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xfce4-places-plugin/devel/xfce4-places-plugin.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- xfce4-places-plugin.spec	11 Jun 2008 23:57:50 -0000	1.9
+++ xfce4-places-plugin.spec	27 Aug 2008 13:26:33 -0000	1.10
@@ -7,6 +7,7 @@
 License:	GPLv2+
 URL:		http://goodies.xfce.org/projects/panel-plugins/%{name}
 Source0:	http://goodies.xfce.org/releases/%{name}/%{name}-%{version}.tar.bz2
+Patch0:		%{name}-1.1.0-xdg-userdir-compat.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	xfce4-panel-devel >= 4.3.99.1, libxfcegui4-devel >= 4.3.99.1
@@ -26,6 +27,7 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .userdir
 
 %build
 %configure --disable-static
@@ -47,6 +49,9 @@
 %{_datadir}/xfce4/panel-plugins/*.desktop
 
 %changelog
+* Wed Aug 27 2008 Christoph Wickert <fedora christoph-wickert de> - 1.1.0-2
+- Respect xdg user directory paths (#457740)
+
 * Thu Jun 12 2008 Christoph Wickert <fedora christoph-wickert de> - 1.1.0-1
 - Update to 1.1.0
 - Fix changelog




More information about the scm-commits mailing list