diff --git a/ChangeLog b/ChangeLog index b5fab320b4a352b1c85ac86cf8fbbf426896a730..a0255b974d59df5bee472b88edfcadb6a94eaf8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-04-30 Benedikt Meurer <benny@xfce.org> + + * plugins/thunar-apr/thunar-apr-desktop-page.c: Use g_access() on Win32. + * plugins/thunar-apr/thunar-apr-private.{c,h}, + plugins/thunar-apr/thunar-apr-abstract-page.c, + plugins/thunar-apr/Makefile.am: Properly initialize the i18n support + for the Advanced Properties plugin. + * plugins/thunar-uca/thunar-uca-private.{c,h}, + plugins/thunar-uca/thunar-uca-provider.c, + plugins/thunar-uca/Makefile.am: Properly initialize the i18n support + for the User Customizable Actions plugin. + 2006-04-26 Benedikt Meurer <benny@xfce.org> * thunar/thunar-folder.c: No need to reset the folder in the dispose() diff --git a/plugins/thunar-apr/Makefile.am b/plugins/thunar-apr/Makefile.am index 5150f168041e3ab7ed36710174bfcb0c3121c431..e42dc187924e35b7d36407d875a48d0661070878 100644 --- a/plugins/thunar-apr/Makefile.am +++ b/plugins/thunar-apr/Makefile.am @@ -7,6 +7,7 @@ INCLUDES = \ -I$(top_srcdir)/plugins \ -DEXO_API_SUBJECT_TO_CHANGE \ -DG_LOG_DOMAIN=\"thunar-apr\" \ + -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ $(PLATFORM_CPPFLAGS) extensionsdir = $(libdir)/thunarx-$(THUNAR_VERSION_API) @@ -21,6 +22,8 @@ thunar_apr_la_SOURCES = \ thunar-apr-image-page.c \ thunar-apr-image-page.h \ thunar-apr-plugin.c \ + thunar-apr-private.c \ + thunar-apr-private.h \ thunar-apr-provider.c \ thunar-apr-provider.h diff --git a/plugins/thunar-apr/thunar-apr-abstract-page.c b/plugins/thunar-apr/thunar-apr-abstract-page.c index 49922038ebaee645f7d08be7604ac12f5b39adde..1766c36ecbb67a5f149cb774e522752d981adad2 100644 --- a/plugins/thunar-apr/thunar-apr-abstract-page.c +++ b/plugins/thunar-apr/thunar-apr-abstract-page.c @@ -23,6 +23,7 @@ #endif #include <thunar-apr/thunar-apr-abstract-page.h> +#include <thunar-apr/thunar-apr-private.h> @@ -114,6 +115,8 @@ thunar_apr_abstract_page_class_init (ThunarAprAbstractPageClass *klass) static void thunar_apr_abstract_page_init (ThunarAprAbstractPage *abstract_page) { + /* be sure to setup the i18n support for the thunar-apr plugin */ + thunar_apr_i18n_init (); } diff --git a/plugins/thunar-apr/thunar-apr-desktop-page.c b/plugins/thunar-apr/thunar-apr-desktop-page.c index 3e0ab58f5fb5b633022eb5248e92ea62f4b8d4cb..95f696d71b303bb11507dd0d8dc6b29e3453f4b4 100644 --- a/plugins/thunar-apr/thunar-apr-desktop-page.c +++ b/plugins/thunar-apr/thunar-apr-desktop-page.c @@ -40,8 +40,8 @@ #include <thunar-apr/thunar-apr-desktop-page.h> -/* use g_access() if available */ -#if GLIB_CHECK_VERSION(2,8,0) +/* use g_access() on win32 */ +#if GLIB_CHECK_VERSION(2,8,0) && defined(G_OS_WIN32) #include <glib/gstdio.h> #else #define g_access(filename, mode) (access ((filename), (mode))) diff --git a/plugins/thunar-apr/thunar-apr-private.c b/plugins/thunar-apr/thunar-apr-private.c new file mode 100644 index 0000000000000000000000000000000000000000..756bac13a5333a6d3070599058004e342373e0fc --- /dev/null +++ b/plugins/thunar-apr/thunar-apr-private.c @@ -0,0 +1,53 @@ +/* $Id$ */ +/*- + * Copyright (c) 2006 Benedikt Meurer <benny@xfce.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#ifdef HAVE_LIBINTL_H +#include <libintl.h> +#endif +#ifdef HAVE_LOCALE_H +#include <locale.h> +#endif + +#include <thunar-apr/thunar-apr-private.h> + +#include <exo/exo.h> + + + +/** + * thunar_apr_i18n_init: + * + * Sets up i18n support for the thunar-apr plugin. + **/ +void +thunar_apr_i18n_init (void) +{ + bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); +#ifdef HAVE_BIND_TEXTDOMAIN_CODESET + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); +#endif +} + + + diff --git a/plugins/thunar-apr/thunar-apr-private.h b/plugins/thunar-apr/thunar-apr-private.h new file mode 100644 index 0000000000000000000000000000000000000000..1dff79f8735a9cb9c4abd86a7533cf176779cc2c --- /dev/null +++ b/plugins/thunar-apr/thunar-apr-private.h @@ -0,0 +1,32 @@ +/* $Id$ */ +/*- + * Copyright (c) 2006 Benedikt Meurer <benny@xfce.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __THUNAR_APR_PRIVATE_H__ +#define __THUNAR_APR_PRIVATE_H__ + +#include <glib.h> + +G_BEGIN_DECLS; + +void thunar_apr_i18n_init (void) G_GNUC_INTERNAL; + +G_END_DECLS; + +#endif /* !__THUNAR_APR_PRIVATE_H__ */ diff --git a/plugins/thunar-uca/Makefile.am b/plugins/thunar-uca/Makefile.am index 3f818a542018a3721e9c49c1dc58a226a90cc251..a4b64b29849f5c02af687f448553ce2af786c54c 100644 --- a/plugins/thunar-uca/Makefile.am +++ b/plugins/thunar-uca/Makefile.am @@ -9,6 +9,7 @@ INCLUDES = \ -DDATADIR=\"$(datadir)\" \ -DEXO_API_SUBJECT_TO_CHANGE \ -DG_LOG_DOMAIN=\"thunar-uca\" \ + -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ $(PLATFORM_CPPFLAGS) extensionsdir = $(libdir)/thunarx-$(THUNAR_VERSION_API) @@ -25,6 +26,8 @@ thunar_uca_la_SOURCES = \ thunar-uca-model.c \ thunar-uca-model.h \ thunar-uca-plugin.c \ + thunar-uca-private.c \ + thunar-uca-private.h \ thunar-uca-provider.c \ thunar-uca-provider.h diff --git a/plugins/thunar-uca/thunar-uca-private.c b/plugins/thunar-uca/thunar-uca-private.c new file mode 100644 index 0000000000000000000000000000000000000000..89d1ad5aa0fb374ff2b5aeb7ba0be7e7ac2e9725 --- /dev/null +++ b/plugins/thunar-uca/thunar-uca-private.c @@ -0,0 +1,53 @@ +/* $Id$ */ +/*- + * Copyright (c) 2006 Benedikt Meurer <benny@xfce.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#ifdef HAVE_LIBINTL_H +#include <libintl.h> +#endif +#ifdef HAVE_LOCALE_H +#include <locale.h> +#endif + +#include <thunar-uca/thunar-uca-private.h> + +#include <exo/exo.h> + + + +/** + * thunar_uca_i18n_init: + * + * Sets up i18n support for the thunar-uca plugin. + **/ +void +thunar_uca_i18n_init (void) +{ + bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); +#ifdef HAVE_BIND_TEXTDOMAIN_CODESET + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); +#endif +} + + + diff --git a/plugins/thunar-uca/thunar-uca-private.h b/plugins/thunar-uca/thunar-uca-private.h new file mode 100644 index 0000000000000000000000000000000000000000..a865754dd638cafb7fc7ee99d871629b81486434 --- /dev/null +++ b/plugins/thunar-uca/thunar-uca-private.h @@ -0,0 +1,32 @@ +/* $Id$ */ +/*- + * Copyright (c) 2006 Benedikt Meurer <benny@xfce.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __THUNAR_UCA_PRIVATE_H__ +#define __THUNAR_UCA_PRIVATE_H__ + +#include <glib.h> + +G_BEGIN_DECLS; + +void thunar_uca_i18n_init (void) G_GNUC_INTERNAL; + +G_END_DECLS; + +#endif /* !__THUNAR_UCA_PRIVATE_H__ */ diff --git a/plugins/thunar-uca/thunar-uca-provider.c b/plugins/thunar-uca/thunar-uca-provider.c index 85983b95ad889563116bd2e31e58a5ce92b14ac6..1e6e11910c9f1761db9c96e42d79a4f7389ac860 100644 --- a/plugins/thunar-uca/thunar-uca-provider.c +++ b/plugins/thunar-uca/thunar-uca-provider.c @@ -27,6 +27,7 @@ #include <thunar-uca/thunar-uca-chooser.h> #include <thunar-uca/thunar-uca-context.h> #include <thunar-uca/thunar-uca-model.h> +#include <thunar-uca/thunar-uca-private.h> #include <thunar-uca/thunar-uca-provider.h> @@ -127,6 +128,9 @@ thunar_uca_provider_preferences_provider_init (ThunarxPreferencesProviderIface * static void thunar_uca_provider_init (ThunarUcaProvider *uca_provider) { + /* setup the i18n support first */ + thunar_uca_i18n_init (); + /* grab a reference on the default model */ uca_provider->model = thunar_uca_model_get_default ();