Commit 0314a0a6 authored by Benedikt Meurer's avatar Benedikt Meurer

2006-07-27 Benedikt Meurer <benny@xfce.org>

	* README, acinclude.m4, configure.in.in, thunar-vfs/, thunar/,
	  plugins/thunar-apr/thunar-apr-provider.c,
	  plugins/thunar-uca/thunar-uca-model.c: Import the trash framework,
	  based on the XDG trash specification, but currently limited to the
	  home trash.
	* thunar/thunar-file.{c,h}, thunar/thunar-standard-view.c
	  (thunar_standard_view_merge_custom_actions): Remove obsolete
	  thunar_file_get_actions(). Bug #1241.
	* thunar/thunar-file.c, thunar/thunar-util.{c,h}: Use localized
	  human readable format for file dates. Bug #2057.
	* thunar/thunar-private.h, thunar/thunar-tree-model.c,
	  thunar/thunar-thumbnail-generator.c, thunar/thunar-shortcuts-model.c,
	  thunar/thunar-renamer-pair.c, thunar/thunar-renamer-model.c,
	  thunar/thunar-clipboard-manager.c: Use the slice allocator to reduce
	  the memory overhead.
	* thunar/thunar-gtk-extensions.{c,h}, thunar/thunar-chooser-button.c,
	  thunar/thunar-permissions-chooser.c, thunar/thunar-chooser-dialog.c,
	  thunar/thunar-preferences-dialog.c, thunar/thunar-renamer-dialog.c,
	  thunar/thunar-size-label.c: Use a single shared GtkTooltips instance
	  for the whole application.
	* thunar/thunar-path-entry.c: Update the path entry icon and text
	  whenever the current file changes.
	* README, acinclude.m4, configure.in.in, plugins/thunar-tpa/: Add a
	  trash panel applet, that communicates with Thunar via D-BUS to
	  display the current state of the trash can and move files to the
	  trash by dropping them to the panel applet.
	* thunar/thunar-preferences.c(thunar_preferences_class_init),
	  docs/README.thunarrc: Disable case-sensitive sorting of the
	  files by default. Bug #2064.
	* docs/reference/thunar-vfs/: Update the API documentation.
	* po/POTFILES.in: Add new files here.
	* po/Thunar.pot, po/*.po: Merge new strings.
	* po/de.po: Update german translations.




(Old svn revision: 22534)
parent bb44fa2c
2006-07-27 Benedikt Meurer <benny@xfce.org>
* README, acinclude.m4, configure.in.in, thunar-vfs/, thunar/,
plugins/thunar-apr/thunar-apr-provider.c,
plugins/thunar-uca/thunar-uca-model.c: Import the trash framework,
based on the XDG trash specification, but currently limited to the
home trash.
* thunar/thunar-file.{c,h}, thunar/thunar-standard-view.c
(thunar_standard_view_merge_custom_actions): Remove obsolete
thunar_file_get_actions(). Bug #1241.
* thunar/thunar-file.c, thunar/thunar-util.{c,h}: Use localized
human readable format for file dates. Bug #2057.
* thunar/thunar-private.h, thunar/thunar-tree-model.c,
thunar/thunar-thumbnail-generator.c, thunar/thunar-shortcuts-model.c,
thunar/thunar-renamer-pair.c, thunar/thunar-renamer-model.c,
thunar/thunar-clipboard-manager.c: Use the slice allocator to reduce
the memory overhead.
* thunar/thunar-gtk-extensions.{c,h}, thunar/thunar-chooser-button.c,
thunar/thunar-permissions-chooser.c, thunar/thunar-chooser-dialog.c,
thunar/thunar-preferences-dialog.c, thunar/thunar-renamer-dialog.c,
thunar/thunar-size-label.c: Use a single shared GtkTooltips instance
for the whole application.
* thunar/thunar-path-entry.c: Update the path entry icon and text
whenever the current file changes.
* README, acinclude.m4, configure.in.in, plugins/thunar-tpa/: Add a
trash panel applet, that communicates with Thunar via D-BUS to
display the current state of the trash can and move files to the
trash by dropping them to the panel applet.
* thunar/thunar-preferences.c(thunar_preferences_class_init),
docs/README.thunarrc: Disable case-sensitive sorting of the
files by default. Bug #2064.
* docs/reference/thunar-vfs/: Update the API documentation.
* po/POTFILES.in: Add new files here.
* po/Thunar.pot, po/*.po: Merge new strings.
* po/de.po: Update german translations.
2006-07-22 Benedikt Meurer <benny@xfce.org>
* thunar/thunar-renamer-progress.c(thunar_renamer_progress_next_idle):
......
......@@ -28,6 +28,7 @@ Thunar can optionally use the following packages:
- libjpeg 6 or above
- libstartup-notification 0.4 or above
- pcre 6.0 or above
- xfce4-panel 4.3.90 or above (for the trash applet)
Installation
......@@ -83,6 +84,9 @@ Thunar supports the following standards/specifications:
* File URI Specification
http://freedesktop.org/wiki/Standards_2ffile_2duri_2dspec
* Desktop Trash Can Specification
http://freedesktop.org/wiki/Standards_2ftrash_2dspec
How to report bugs?
===================
......
......@@ -46,6 +46,34 @@ XDT_CHECK_OPTIONAL_PACKAGE([PCRE], [libpcre], [6.0], [pcre], [Regular expression
dnl # BM_THUNAR_PLUGIN_TPA()
dnl #
dnl # Check whether the "Trash Panel Applet" plugin should
dnl # be built and installed (this is actually a plugin
dnl # for the Xfce panel, not for Thunar).
dnl #
AC_DEFUN([BM_THUNAR_PLUGIN_TPA],
[
AC_ARG_ENABLE([tpa-plugin], AC_HELP_STRING([--disable-tpa-plugin], [Don't build the thunar-tpa plugin, see plugins/thunar-tpa/README]),
[ac_bm_thunar_plugin_tpa=$enable_val], [ac_bm_thunar_plugin_tpa=yes])
if test x"$ac_bm_thunar_plugin_tpa" = x"yes"; then
XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.90],
[
dnl # Can only build thunar-tpa if D-BUS was found previously
ac_bm_thunar_plugin_tpa=$DBUS_FOUND
],
[
dnl # Cannot build thunar-tpa if xfce4-panel is not installed
ac_bm_thunar_plugin_tpa=no
])
fi
AC_MSG_CHECKING([whether to build the thunar-tpa plugin])
AM_CONDITIONAL([THUNAR_PLUGIN_TPA], [test x"$ac_bm_thunar_plugin_tpa" = x"yes"])
AC_MSG_RESULT([$ac_bm_thunar_plugin_tpa])
])
dnl # BM_THUNAR_PLUGIN_UCA()
dnl #
dnl # Check whether the "User Customizable Actions" plugin
......@@ -113,6 +141,36 @@ AC_SUBST([LIBFAM_LIBS])
dnl # BM_THUNAR_VFS_OS_IMPL()
dnl #
dnl # Determine the operating system support to use
dnl # for thunar-vfs.
dnl #
dnl # Sets ac_bm_thunar_vfs_os_impl to "bsd" or "generic" and
dnl # defines the automake conditional THUNAR_VFS_OS_IMPL_BSD.
dnl #
AC_DEFUN([BM_THUNAR_VFS_OS_IMPL],
[
dnl # Auto-detect target operating system support
AC_MSG_CHECKING([for operating system support])
case "$target_os" in
dragonfly*|freebsd*|netbsd*|openbsd*|darwin*)
dnl # The BSD Family is fully supported
ac_bm_thunar_vfs_os_impl=bsd
;;
*)
dnl # Otherwise fallback to generic OS support
ac_bm_thunar_vfs_os_impl=generic
esac
AC_MSG_RESULT([$ac_bm_thunar_vfs_os_impl])
dnl # Set automake conditionals appropriately
AM_CONDITIONAL([THUNAR_VFS_OS_IMPL_BSD], [test x"$ac_bm_thunar_vfs_os_impl" = x"bsd"])
])
dnl # BM_THUNAR_VFS_VOLUME_IMPL()
dnl #
dnl # Determines the volume manager implementation to
......
......@@ -9,7 +9,7 @@ dnl
dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([thunar_verinfo], [3:0:1])
m4_define([thunar_verinfo], [4:0:2])
m4_define([thunar_version_api], [1])
m4_define([thunar_version_major], [0])
m4_define([thunar_version_minor], [3])
......@@ -114,9 +114,9 @@ dnl *** Check for standard functions ***
dnl ************************************
AC_FUNC_MMAP()
AC_CHECK_FUNCS([attropen extattr_get_fd fgetxattr lchmod localeconv \
localtime_r mbrtowc mkfifo pread pwrite readdir_r readlink \
localtime_r mbrtowc mkfifo pread pwrite readdir_r \
sched_yield setgroupent setpassent statfs statvfs strcoll \
symlink])
strlcpy symlink])
dnl ***************************************
dnl *** Check for working posix_madvise ***
......@@ -150,6 +150,38 @@ AC_TRY_LINK([#include <sys/mman.h>], posix_madvise_test(),
])
])
dnl **********************************
dnl *** Check for working strptime ***
dnl **********************************
if test x"$GCC" = x"yes"; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror" # to detect a protected declaration
m4_define([strptime_test], [ strptime (0, 0, 0); ])
AC_MSG_CHECKING([for working strptime])
AC_TRY_LINK([#include <time.h>], strptime_test,
[
AC_DEFINE([HAVE_STRPTIME], [1], [Define if strptime is working])
AC_MSG_RESULT([yes])
],
[
dnl As usual, Linux/glibc doesn't work properly out-of-the-box
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D__USE_XOPEN"
AC_TRY_LINK([#include <time.h>], strptime_test,
[
AC_DEFINE([HAVE_STRPTIME], [1], [Define if strptime is working])
AC_MSG_RESULT([yes])
],
[
CPPFLAGS="$ac_save_CPPFLAGS"
AC_MSG_RESULT([no])
])
])
CFLAGS="$ac_save_CFLAGS"
else
AC_CHECK_FUNCS([strptime])
fi
dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
......@@ -245,6 +277,11 @@ if test x"$enable_xml2po" = x"yes"; then
fi
AM_CONDITIONAL([ENABLE_XML2PO], [test x"$enable_xml2po" = x"yes"])
dnl ******************************************
dnl *** Check for operating system support ***
dnl ******************************************
BM_THUNAR_VFS_OS_IMPL()
dnl ****************************************************
dnl *** Check for file system monitor implementation ***
dnl ****************************************************
......@@ -368,6 +405,7 @@ dnl *** Check for additional plugins ***
dnl ************************************
BM_THUNAR_PLUGIN_APR()
BM_THUNAR_PLUGIN_SBR()
BM_THUNAR_PLUGIN_TPA()
BM_THUNAR_PLUGIN_UCA()
AC_OUTPUT([
......@@ -412,6 +450,7 @@ plugins/Makefile
plugins/thunar-apr/Makefile
plugins/thunar-sbr/Makefile
plugins/thunar-sendto-email/Makefile
plugins/thunar-tpa/Makefile
plugins/thunar-uca/Makefile
po/Makefile.in
po-doc/Makefile
......@@ -434,6 +473,7 @@ dnl ***************************
echo
echo "Build Configuration:"
echo
echo "* Operating system support: $ac_bm_thunar_vfs_os_impl"
if test x"$DBUS_FOUND" = x"yes"; then
echo "* D-BUS support: yes"
else
......@@ -456,5 +496,6 @@ echo "Additional Plugins:"
echo
echo "* Advanced Properties: $ac_bm_thunar_plugin_apr"
echo "* Simple Builting Renamers: $ac_bm_thunar_plugin_sbr"
echo "* Trash Panel Applet: $ac_bm_thunar_plugin_tpa"
echo "* User Customizable Actions: $ac_bm_thunar_plugin_uca"
echo
......@@ -145,7 +145,7 @@ The Thunar Configuration File (thunarrc)
* MiscCaseSensitive (FALSE/TRUE)
Determines whether the sorting should be done in a case-sensitive
manner.
manner. The default is FALSE.
* MiscFoldersFirst (FALSE/TRUE)
......
......@@ -297,6 +297,8 @@ thunar_vfs_file_flags_get_type
<FILE>thunar-vfs-path</FILE>
<TITLE>ThunarVfsPath</TITLE>
ThunarVfsPath
THUNAR_VFS_TYPE_PATH
THUNAR_VFS_TYPE_PATH_LIST
thunar_vfs_path_new
thunar_vfs_path_get_for_home
thunar_vfs_path_get_for_root
......@@ -320,10 +322,9 @@ thunar_vfs_path_list_append
thunar_vfs_path_list_prepend
thunar_vfs_path_list_copy
thunar_vfs_path_list_free
<SUBSECTION Standard>
THUNAR_VFS_TYPE_PATH
<SUBSECTION Private>
thunar_vfs_path_get_type
thunar_vfs_path_list_get_type
</SECTION>
......
......@@ -33,37 +33,3 @@ ThunarVfsInteractiveJob
</para>
<!-- ##### SIGNAL ThunarVfsInteractiveJob::ask ##### -->
<para>
</para>
@thunarvfsinteractivejob: the object which received the signal.
@arg1:
@arg2:
@Returns:
<!-- ##### SIGNAL ThunarVfsInteractiveJob::info-message ##### -->
<para>
</para>
@thunarvfsinteractivejob: the object which received the signal.
@arg1:
<!-- ##### SIGNAL ThunarVfsInteractiveJob::new-files ##### -->
<para>
</para>
@thunarvfsinteractivejob: the object which received the signal.
@arg1:
<!-- ##### SIGNAL ThunarVfsInteractiveJob::percent ##### -->
<para>
</para>
@thunarvfsinteractivejob: the object which received the signal.
@arg1:
......@@ -23,6 +23,16 @@ ThunarVfsJob
</para>
<!-- ##### SIGNAL ThunarVfsJob::ask ##### -->
<para>
</para>
@thunarvfsjob: the object which received the signal.
@arg1:
@arg2:
@Returns:
<!-- ##### SIGNAL ThunarVfsJob::error ##### -->
<para>
......@@ -38,60 +48,62 @@ ThunarVfsJob
@thunarvfsjob: the object which received the signal.
<!-- ##### FUNCTION thunar_vfs_job_launch ##### -->
<!-- ##### SIGNAL ThunarVfsJob::info-message ##### -->
<para>
</para>
@job:
@Returns:
@thunarvfsjob: the object which received the signal.
@arg1:
<!-- ##### FUNCTION thunar_vfs_job_cancel ##### -->
<!-- ##### SIGNAL ThunarVfsJob::infos-ready ##### -->
<para>
</para>
@job:
@thunarvfsjob: the object which received the signal.
@arg1:
@Returns:
<!-- ##### FUNCTION thunar_vfs_job_cancelled ##### -->
<!-- ##### SIGNAL ThunarVfsJob::new-files ##### -->
<para>
</para>
@job:
@Returns:
@thunarvfsjob: the object which received the signal.
@arg1:
<!-- ##### SIGNAL ThunarVfsJob::percent ##### -->
<para>
</para>
<!-- ##### FUNCTION thunar_vfs_job_emit_valist ##### -->
@thunarvfsjob: the object which received the signal.
@arg1:
<!-- ##### FUNCTION thunar_vfs_job_launch ##### -->
<para>
</para>
@job:
@signal_id:
@signal_detail:
@var_args:
@Returns:
<!-- ##### FUNCTION thunar_vfs_job_emit ##### -->
<!-- ##### FUNCTION thunar_vfs_job_cancel ##### -->
<para>
</para>
@job:
@signal_id:
@signal_detail:
@Varargs:
<!-- ##### FUNCTION thunar_vfs_job_error ##### -->
<!-- ##### FUNCTION thunar_vfs_job_cancelled ##### -->
<para>
</para>
@job:
@error:
@Returns:
......@@ -23,6 +23,20 @@ ThunarVfsPath
</para>
<!-- ##### MACRO THUNAR_VFS_TYPE_PATH ##### -->
<para>
</para>
<!-- ##### MACRO THUNAR_VFS_TYPE_PATH_LIST ##### -->
<para>
</para>
<!-- ##### FUNCTION thunar_vfs_path_new ##### -->
<para>
......
......@@ -8,6 +8,10 @@ if THUNAR_PLUGIN_SBR
THUNAR_SBR_SUBDIRS = thunar-sbr
endif
if THUNAR_PLUGIN_TPA
THUNAR_TPA_SUBDIRS = thunar-tpa
endif
if THUNAR_PLUGIN_UCA
THUNAR_UCA_SUBDIRS = thunar-uca
endif
......@@ -15,6 +19,7 @@ endif
SUBDIRS = \
$(THUNAR_APR_SUBDIRS) \
$(THUNAR_SBR_SUBDIRS) \
$(THUNAR_TPA_SUBDIRS) \
$(THUNAR_UCA_SUBDIRS) \
thunar-sendto-email
......
......@@ -22,6 +22,13 @@
#include <config.h>
#endif
#ifdef HAVE_MEMORY_H
#include <memory.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include <thunar-apr/thunar-apr-desktop-page.h>
#include <thunar-apr/thunar-apr-image-page.h>
#include <thunar-apr/thunar-apr-provider.h>
......@@ -85,6 +92,7 @@ thunar_apr_provider_get_pages (ThunarxPropertyPageProvider *property_page_provid
GSList *formats;
GSList *lp;
gchar **mime_types;
gchar *scheme;
GList *pages = NULL;
gint n;
......@@ -92,30 +100,36 @@ thunar_apr_provider_get_pages (ThunarxPropertyPageProvider *property_page_provid
if (G_UNLIKELY (files == NULL || files->next != NULL))
return NULL;
/* ThunarAprDesktopPage case */
if (G_LIKELY (pages == NULL))
/* determine the URI scheme of the file (works only for local files) */
scheme = thunarx_file_info_get_uri_scheme (files->data);
if (G_LIKELY (strcmp (scheme, "file") == 0))
{
/* check if we have a .desktop file here */
if (thunarx_file_info_has_mime_type (files->data, "application/x-desktop"))
pages = g_list_append (pages, g_object_new (THUNAR_APR_TYPE_DESKTOP_PAGE, "file", files->data, NULL));
}
/* ThunarAprDesktopPage case */
if (G_LIKELY (pages == NULL))
{
/* check if we have a .desktop file here */
if (thunarx_file_info_has_mime_type (files->data, "application/x-desktop"))
pages = g_list_append (pages, g_object_new (THUNAR_APR_TYPE_DESKTOP_PAGE, "file", files->data, NULL));
}
/* ThunarAprImagePage case */
if (G_LIKELY (pages == NULL))
{
/* determine the supported GdkPixbuf formats */
formats = gdk_pixbuf_get_formats ();
for (lp = formats; lp != NULL && pages == NULL; lp = lp->next)
/* ThunarAprImagePage case */
if (G_LIKELY (pages == NULL))
{
/* check if any of the mime types of this format matches */
mime_types = gdk_pixbuf_format_get_mime_types (lp->data);
for (n = 0; mime_types[n] != NULL && pages == NULL; ++n)
if (thunarx_file_info_has_mime_type (files->data, mime_types[n]))
pages = g_list_append (pages, g_object_new (THUNAR_APR_TYPE_IMAGE_PAGE, "file", files->data, NULL));
g_strfreev (mime_types);
/* determine the supported GdkPixbuf formats */
formats = gdk_pixbuf_get_formats ();
for (lp = formats; lp != NULL && pages == NULL; lp = lp->next)
{
/* check if any of the mime types of this format matches */
mime_types = gdk_pixbuf_format_get_mime_types (lp->data);
for (n = 0; mime_types[n] != NULL && pages == NULL; ++n)
if (thunarx_file_info_has_mime_type (files->data, mime_types[n]))
pages = g_list_append (pages, g_object_new (THUNAR_APR_TYPE_IMAGE_PAGE, "file", files->data, NULL));
g_strfreev (mime_types);
}
g_slist_free (formats);
}
g_slist_free (formats);
}
g_free (scheme);
return pages;
}
......
# $Id$
INCLUDES = \
-I$(top_builddir) \
-I$(top_builddir)/plugins \
-I$(top_srcdir) \
-I$(top_srcdir)/plugins \
-DEXO_API_SUBJECT_TO_CHANGE \
-DG_LOG_DOMAIN=\"thunar-tpa\" \
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
$(PLATFORM_CPPFLAGS)
pluginsdir = $(libexecdir)/xfce4/panel-plugins
plugins_PROGRAMS = \
thunar-tpa
thunar_tpa_SOURCES = \
main.c \
thunar-tpa-bindings.h \
thunar-tpa-icon.c \
thunar-tpa-icon.h
thunar_tpa_CFLAGS = \
$(DBUS_CFLAGS) \
$(EXO_CFLAGS) \
$(LIBXFCE4PANEL_CFLAGS) \
$(PLATFORM_CFLAGS)
thunar_tpa_LDADD = \
$(DBUS_LIBS) \
$(EXO_LIBS) \
$(LIBXFCE4PANEL_LIBS) \
$(PLATFORM_LDFLAGS)
if MAINTAINER_MODE
BUILT_SOURCES = \
thunar-tpa-bindings.h
DISTCLEANFILES = \
thunar-tpa-bindings.h
thunar-tpa-bindings.h: $(srcdir)/thunar-tpa-bindings.xml Makefile
dbus-binding-tool --mode=glib-client $(srcdir)/thunar-tpa-bindings.xml > thunar-tpa-bindings.h
endif
desktopdir = $(datadir)/xfce4/panel-plugins
desktop_in_in_files = thunar-tpa.desktop.in.in
desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
%.desktop.in: %.desktop.in.in
sed -e "s,\@libexecdir\@,$(libexecdir),g" < $< > $@
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
EXTRA_DIST = \
$(desktop_in_in_files) \
thunar-tpa-bindings.xml \
README
CLEANFILES = \
$(desktop_in_files) \
$(desktop_DATA)
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
Thunar Trash Panel Applet (thunar-tpa)
======================================
Thunar-tpa is an extension for the Xfce Panel, which enables users to add a
trash can to their panel, that
* displays the current state of the trash can
* can move files to the trash by dropping them on the trash icon
* can empty the trash can
* can open the trash can
In order to build and install this plugin, you will need to have the xfce4-panel
development headers and libraries installed (the appropriate package is usually
called xfce4-panel-dev or xfce4-panel-devel). In addition, you'll need to have
D-BUS 0.34 or above installed and Thunar must be built with D-BUS support.
How does it work?
=================
To avoid running several desktop processes that all monitor and manage the
trash can by itself, and thereby create an unnecessary maintaince and resource
overhead, the trash applet simply connects to Thunar via D-BUS to query the
state of the trash and send commands to the Trash.
The trash applet is not limited to Thunar, but can work with any file manager
that implements the org.xfce.Trash interface and owns the org.xfce.FileManager
service. See the thunar-tpa-bindings.xml file for a details about the inter-
face.