[Goodies-commits] r3683 - in xfce4-places-plugin/trunk: . panel-plugin

Diego Ongaro ongardie at xfce.org
Sun Dec 9 22:21:26 CET 2007


Author: ongardie
Date: 2007-12-09 21:21:26 +0000 (Sun, 09 Dec 2007)
New Revision: 3683

Modified:
   xfce4-places-plugin/trunk/ChangeLog
   xfce4-places-plugin/trunk/TODO
   xfce4-places-plugin/trunk/autogen.sh
   xfce4-places-plugin/trunk/configure.ac
   xfce4-places-plugin/trunk/panel-plugin/model_system.c
   xfce4-places-plugin/trunk/panel-plugin/model_user.c
   xfce4-places-plugin/trunk/panel-plugin/support.c
   xfce4-places-plugin/trunk/panel-plugin/view.c
Log:
2007-12-09	Diego Ongaro <ongardie at gmail.com>

* *: Improve compatibility with older versions of libs


Modified: xfce4-places-plugin/trunk/ChangeLog
===================================================================
--- xfce4-places-plugin/trunk/ChangeLog	2007-12-09 11:35:17 UTC (rev 3682)
+++ xfce4-places-plugin/trunk/ChangeLog	2007-12-09 21:21:26 UTC (rev 3683)
@@ -1,3 +1,7 @@
+2007-12-09	Diego Ongaro <ongardie at gmail.com>
+
+	* *: Improve compatibility with older versions of libs
+
 2007-12-08	Diego Ongaro <ongardie at gmail.com>
 
 	* model_user.c: Bug #3728: bookmarks may become (un)reachable

Modified: xfce4-places-plugin/trunk/TODO
===================================================================
--- xfce4-places-plugin/trunk/TODO	2007-12-09 11:35:17 UTC (rev 3682)
+++ xfce4-places-plugin/trunk/TODO	2007-12-09 21:21:26 UTC (rev 3683)
@@ -2,3 +2,4 @@
 path/uri mess
 new tooltip API in GTK 2.12
 error messages and notifications for (un)mounting
+label doesn't change when already shown

Modified: xfce4-places-plugin/trunk/autogen.sh
===================================================================
--- xfce4-places-plugin/trunk/autogen.sh	2007-12-09 11:35:17 UTC (rev 3682)
+++ xfce4-places-plugin/trunk/autogen.sh	2007-12-09 21:21:26 UTC (rev 3683)
@@ -1,9 +1,11 @@
 #!/bin/sh
+# 
+# $Id: autogen.sh 1826 2006-08-01 18:12:41Z jannis $
 #
-# Copyright (c) 2002-2005
-#         The Xfce development team. All rights reserved.
+# Copyright (c) 2002-2006
+#         The Thunar development team. All rights reserved.
 #
-# Written for Xfce by Benedikt Meurer <benny at xfce.org>.
+# Written for Thunar by Benedikt Meurer <benny at xfce.org>.
 #
 
 (type xdt-autogen) >/dev/null 2>&1 || {
@@ -16,6 +18,22 @@
   exit 1
 }
 
+# verify that po/LINGUAS is present
+(test -f po/LINGUAS) >/dev/null 2>&1 || {
+  cat >&2 <<EOF
+autogen.sh: The file po/LINGUAS could not be found. Please check your snapshot
+            or try to checkout again.
+EOF
+  exit 1
+}
+
+# substitute revision and linguas
+linguas=`sed -e '/^#/d' po/LINGUAS`
+revision=`LC_ALL=C svn info $0 | awk '/^Revision: / {printf "%05d\n", $2}'`
+sed -e "s/@LINGUAS@/${linguas}/g" \
+    -e "s/@REVISION@/${revision}/g" \
+    < "configure.ac" > "configure.in"
+
 exec xdt-autogen $@
 
 # vi:set ts=2 sw=2 et ai:

Modified: xfce4-places-plugin/trunk/configure.ac
===================================================================
--- xfce4-places-plugin/trunk/configure.ac	2007-12-09 11:35:17 UTC (rev 3682)
+++ xfce4-places-plugin/trunk/configure.ac	2007-12-09 21:21:26 UTC (rev 3683)
@@ -14,22 +14,22 @@
 AM_MAINTAINER_MODE()
 
 dnl check for basic programs
-AC_PROG_CC
-AC_PROG_INSTALL
-AC_PROG_LIBTOOL
-AC_PROG_INTLTOOL([0.31], [no-xml])
+AC_PROG_CC()
+AC_PROG_INSTALL()
+AC_PROG_LIBTOOL()
+AC_PROG_INTLTOOL()
 
+dnl check for required packages
+XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.6.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.3.90.2])
+XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.90.2])
+XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.90.2])
+XDT_CHECK_PACKAGE([THUNAR_VFS], [thunar-vfs-1], [0.3.2])
+XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.1.1])
+
 dnl check for i18n support
 XDT_I18N([@LINGUAS@])
 
-dnl check for required packages
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.6.0])
-XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.3.99.1])
-XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.99.1])
-XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.99.1])
-XDT_CHECK_PACKAGE([THUNAR_VFS], [thunar-vfs-1], [0.4.0])
-XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.1.10])
-
 XDT_FEATURE_DEBUG()
 
 AC_OUTPUT([

Modified: xfce4-places-plugin/trunk/panel-plugin/model_system.c
===================================================================
--- xfce4-places-plugin/trunk/panel-plugin/model_system.c	2007-12-09 11:35:17 UTC (rev 3682)
+++ xfce4-places-plugin/trunk/panel-plugin/model_system.c	2007-12-09 21:21:26 UTC (rev 3683)
@@ -36,17 +36,20 @@
 #define EXO_API_SUBJECT_TO_CHANGE
 #include <thunar-vfs/thunar-vfs.h>
 
+#define TRASH THUNAR_VFS_CHECK_VERSION(0,4,0)
 
 #define pbg_priv(pbg) ((PBSysData*) pbg->priv)
 
 typedef struct
 {
-    ThunarVfsPath *trash_path;
 
     /* These are the things that might "change" */
     gboolean       check_changed;   /* starts off false to indicate the following are meaningless */
     gboolean       desktop_exists;
+#if TRASH
     gboolean       trash_is_empty;
+    ThunarVfsPath *trash_path;
+#endif
 
 } PBSysData;
  
@@ -61,6 +64,7 @@
     g_free(bookmark);
 }
 
+#if TRASH
 static void
 pbsys_free_trash_bookmark(PlacesBookmark *bookmark)
 {
@@ -71,6 +75,7 @@
 
     g_free(bookmark);
 }
+#endif
 
 static GList*
 pbsys_get_bookmarks(PlacesBookmarkGroup *bookmark_group)
@@ -78,7 +83,9 @@
     GList *bookmarks = NULL;           /* we'll return this */
     PlacesBookmark *bookmark;
     PlacesBookmarkAction *open, *terminal;
+#if TRASH
     ThunarVfsInfo *trash_info;
+#endif
     const gchar *home_dir = xfce_get_homedir();
 
     pbg_priv(bookmark_group)->check_changed = TRUE;
@@ -98,6 +105,7 @@
 
     bookmarks = g_list_append(bookmarks, bookmark);
 
+#if TRASH
     /* Trash */
     bookmark                = places_bookmark_create(_("Trash"));
     bookmark->uri           = "trash:///";
@@ -121,6 +129,7 @@
     bookmark->primary_action = open;
 
     bookmarks = g_list_append(bookmarks, bookmark);
+#endif
 
     /* Desktop */
     bookmark                = places_bookmark_create(_("Desktop"));
@@ -166,9 +175,11 @@
 pbsys_changed(PlacesBookmarkGroup *bookmark_group)
 {
     gchar *uri;
+#if TRASH
     gboolean trash_is_empty = FALSE;
     ThunarVfsInfo *trash_info;
-    
+#endif
+
     if(!pbg_priv(bookmark_group)->check_changed)
         return FALSE;
     
@@ -180,6 +191,7 @@
     }else
         g_free(uri);
 
+#if TRASH
     /* see if trash gets a different icon (e.g., was empty, now full) */
     trash_info = thunar_vfs_info_new_for_path(pbg_priv(bookmark_group)->trash_path, NULL);
     if(trash_info->custom_icon != NULL)
@@ -188,6 +200,7 @@
     
     if(trash_is_empty != pbg_priv(bookmark_group)->trash_is_empty)
         return TRUE;
+#endif
 
     return FALSE;
 }
@@ -195,8 +208,10 @@
 static void
 pbsys_finalize(PlacesBookmarkGroup *bookmark_group)
 {
+#if TRASH
     thunar_vfs_path_unref(pbg_priv(bookmark_group)->trash_path);
     thunar_vfs_shutdown();
+#endif
     
     g_free(pbg_priv(bookmark_group));
 
@@ -212,8 +227,10 @@
     bookmark_group->finalize      = pbsys_finalize;
     bookmark_group->priv          = g_new0(PBSysData, 1);
     
+#if TRASH
     thunar_vfs_init();
     pbg_priv(bookmark_group)->trash_path = thunar_vfs_path_get_for_trash();
+#endif
 
     return bookmark_group;
 }

Modified: xfce4-places-plugin/trunk/panel-plugin/model_user.c
===================================================================
--- xfce4-places-plugin/trunk/panel-plugin/model_user.c	2007-12-09 11:35:17 UTC (rev 3682)
+++ xfce4-places-plugin/trunk/panel-plugin/model_user.c	2007-12-09 21:21:26 UTC (rev 3683)
@@ -40,6 +40,9 @@
 #include "model.h"
 #include "support.h"
 
+#include <sys/types.h>
+#include <sys/stat.h>
+
 #include <libxfce4util/libxfce4util.h>
 #include <glib.h>
 #include <glib/gstdio.h>

Modified: xfce4-places-plugin/trunk/panel-plugin/support.c
===================================================================
--- xfce4-places-plugin/trunk/panel-plugin/support.c	2007-12-09 11:35:17 UTC (rev 3682)
+++ xfce4-places-plugin/trunk/panel-plugin/support.c	2007-12-09 21:21:26 UTC (rev 3683)
@@ -27,6 +27,8 @@
 
 #include <libxfce4util/libxfce4util.h>
 #include <libxfcegui4/libxfcegui4.h>
+
+#define EXO_API_SUBJECT_TO_CHANGE
 #include <exo/exo.h>
 
 #include "string.h"

Modified: xfce4-places-plugin/trunk/panel-plugin/view.c
===================================================================
--- xfce4-places-plugin/trunk/panel-plugin/view.c	2007-12-09 11:35:17 UTC (rev 3682)
+++ xfce4-places-plugin/trunk/panel-plugin/view.c	2007-12-09 21:21:26 UTC (rev 3683)
@@ -46,6 +46,9 @@
 #include <libxfce4panel/xfce-hvbox.h>
 #include <libxfcegui4/libxfcegui4.h>
 
+#define EXO_API_SUBJECT_TO_CHANGE
+#include <exo/exo.h>
+
 #include <string.h>
 
 #include "view.h"
@@ -567,7 +570,8 @@
     pd->menu = gtk_menu_new();
     
     /* make sure the menu popups up in right screen */
-    gtk_menu_attach_to_widget(GTK_MENU(pd->menu), pd->button, NULL);
+    /* need exo_noop for GTK 2.6 and 2.8; starting with 2.10, NULL is OK */
+    gtk_menu_attach_to_widget(GTK_MENU(pd->menu), pd->button, (GtkMenuDetachFunc) exo_noop);
     gtk_menu_set_screen(GTK_MENU(pd->menu),
                         gtk_widget_get_screen(pd->button));
 
@@ -953,7 +957,7 @@
 
     pview_reconfigure_model(view);
     
-    view->tooltips = g_object_ref_sink(gtk_tooltips_new());
+    view->tooltips = exo_gtk_object_ref_sink(GTK_OBJECT(gtk_tooltips_new()));
 
     /* init button */
 




More information about the Goodies-commits mailing list