Mercurial > gftp.yaz
changeset 290:6e255984c0b0
2003-10-18 Brian Masney <masneyb@gftp.org>
* lib/misc.c lib/gftp.h src/text/gftp-text.c src/gtk/gftp-gtk.c - added
gftp_locale_init().
* src/gtk/Makefile.am src/text/Makefile.am - removed declaration of
LOCALE_DIR
* lib/Makefile.am - added declaration of LOCALE_DIR
author | masneyb |
---|---|
date | Sat, 18 Oct 2003 15:21:39 +0000 |
parents | 5f66f09e5194 |
children | 265244924868 |
files | ChangeLog lib/Makefile.am lib/gftp.h lib/misc.c src/gtk/Makefile.am src/gtk/gftp-gtk.c src/text/Makefile.am src/text/gftp-text.c |
diffstat | 8 files changed, 36 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Oct 18 14:54:53 2003 +0000 +++ b/ChangeLog Sat Oct 18 15:21:39 2003 +0000 @@ -1,9 +1,18 @@ -2003-10-17 Brian Masney <masneyb@gftp.org> +2003-10-18 Brian Masney <masneyb@gftp.org> + * lib/misc.c lib/gftp.h src/text/gftp-text.c src/gtk/gftp-gtk.c - added + gftp_locale_init(). + + * src/gtk/Makefile.am src/text/Makefile.am - removed declaration of + LOCALE_DIR + + * lib/Makefile.am - added declaration of LOCALE_DIR + * lib/misc.c (insert_commas) - if _GNU_SOURCE is defined, instead of using my builtin function for formatting numbers, use glibc's %'ld (or %'lld) format to print the numbers out. This is more portable for other locales. +2003-10-17 Brian Masney <masneyb@gftp.org> * lib/rfc959.c (rfc959_ipv[46]_data_connection_new) - when there is an error establishing a connection to the remote server, make sure that GFTP_ERETRYABLE is returned. @@ -1568,7 +1577,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.151 2003/10/18 14:54:52 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.152 2003/10/18 15:21:37 masneyb Exp $ tags * debian/* - updated files from Debian maintainer
--- a/lib/Makefile.am Sat Oct 18 14:54:53 2003 +0000 +++ b/lib/Makefile.am Sat Oct 18 15:21:39 2003 +0000 @@ -3,5 +3,5 @@ noinst_LIBRARIES = libgftp.a libgftp_a_SOURCES=bookmark.c cache.c config_file.c https.c local.c misc.c \ protocols.c pty.c rfc959.c rfc2068.c sshv2.c sslcommon.c -INCLUDES=@GLIB_CFLAGS@ @PTHREAD_CFLAGS@ -I../intl -DSHARE_DIR=\"$(datadir)/gftp\" +INCLUDES=@GLIB_CFLAGS@ @PTHREAD_CFLAGS@ -I../intl -DSHARE_DIR=\"$(datadir)/gftp\" -DLOCALE_DIR=\"$(localedir)\" noinst_HEADERS=gftp.h httpcommon.h options.h
--- a/lib/gftp.h Sat Oct 18 14:54:53 2003 +0000 +++ b/lib/gftp.h Sat Oct 18 15:21:39 2003 +0000 @@ -724,6 +724,8 @@ off_t gftp_parse_file_size ( char *str ); +void gftp_locale_init ( void ); + /* protocols.c */ #define GFTP_FTP_NUM 0 #define GFTP_HTTP_NUM 1
--- a/lib/misc.c Sat Oct 18 14:54:53 2003 +0000 +++ b/lib/misc.c Sat Oct 18 15:21:39 2003 +0000 @@ -1283,3 +1283,21 @@ #endif } + +void +gftp_locale_init (void) +{ +#ifdef HAVE_GETTEXT + + setlocale (LC_ALL, ""); + textdomain ("gftp"); + +#if GLIB_MAJOR_VERSION > 1 + bind_textdomain_codeset ("gftp", "UTF-8"); +#endif + + textdomain ("gftp"); + +#endif +} +
--- a/src/gtk/Makefile.am Sat Oct 18 14:54:53 2003 +0000 +++ b/src/gtk/Makefile.am Sat Oct 18 15:21:39 2003 +0000 @@ -5,7 +5,7 @@ gftp_gtk_SOURCES = bookmarks.c chmod_dialog.c delete_dialog.c dnd.c \ gftp-gtk.c menu-items.c misc-gtk.c mkdir_dialog.c \ options_dialog.c rename_dialog.c transfer.c view_dialog.c -INCLUDES = @GTK_CFLAGS@ @PTHREAD_CFLAGS@ -DSHARE_DIR=\"$(datadir)/gftp\" -DLOCALE_DIR=\"$(localedir)\" -I../../intl +INCLUDES = @GTK_CFLAGS@ @PTHREAD_CFLAGS@ -DSHARE_DIR=\"$(datadir)/gftp\" -I../../intl LDADD = ../../lib/libgftp.a @GTK_LIBS@ @PTHREAD_LIBS@ @EXTRA_LIBS@ @GTHREAD_LIBS@ @SSL_LIBS@ noinst_HEADERS = gftp-gtk.h localedir = $(datadir)/locale
--- a/src/gtk/gftp-gtk.c Sat Oct 18 14:54:53 2003 +0000 +++ b/src/gtk/gftp-gtk.c Sat Oct 18 15:21:39 2003 +0000 @@ -1107,15 +1107,7 @@ char *startup_directory; GtkWidget *window, *ui; -#ifdef HAVE_GETTEXT - setlocale (LC_ALL, ""); - bindtextdomain ("gftp", LOCALE_DIR); -#if GTK_MAJOR_VERSION > 1 - bind_textdomain_codeset ("gftp", "UTF-8"); -#endif - textdomain ("gftp"); -#endif - + gftp_locale_init (); g_thread_init (NULL); main_thread_id = pthread_self (); gtk_set_locale ();
--- a/src/text/Makefile.am Sat Oct 18 14:54:53 2003 +0000 +++ b/src/text/Makefile.am Sat Oct 18 15:21:39 2003 +0000 @@ -3,7 +3,7 @@ bin_PROGRAMS = @GFTP_TEXT@ EXTRA_PROGRAMS = gftp-text gftp_text_SOURCES=gftp-text.c -INCLUDES=@GLIB_CFLAGS@ -DSHARE_DIR=\"$(datadir)/gftp\" -DLOCALE_DIR=\"$(localedir)\" -I../../intl +INCLUDES=@GLIB_CFLAGS@ -DSHARE_DIR=\"$(datadir)/gftp\" -I../../intl LDADD = ../../lib/libgftp.a @GLIB_LIBS@ @EXTRA_LIBS@ @READLINE_LIBS@ @SSL_LIBS@ noinst_HEADERS=gftp-text.h localedir=$(datadir)/locale
--- a/src/text/gftp-text.c Sat Oct 18 14:54:53 2003 +0000 +++ b/src/text/gftp-text.c Sat Oct 18 15:21:39 2003 +0000 @@ -103,10 +103,7 @@ char tempstr[512]; #endif -#ifdef HAVE_GETTEXT - setlocale (LC_ALL, ""); - bindtextdomain ("gftp", LOCALE_DIR); -#endif + gftp_locale_init (); signal (SIGCHLD, sig_child); signal (SIGPIPE, SIG_IGN);