gtranslator r3601 - in trunk: . src



Author: icq
Date: Mon Sep 22 09:38:36 2008
New Revision: 3601
URL: http://svn.gnome.org/viewvc/gtranslator?rev=3601&view=rev

Log:
Merge memory into the master branch to add memory translation backend to application.ch

Modified:
   trunk/INSTALL
   trunk/src/ChangeLog
   trunk/src/Makefile.am
   trunk/src/application.c
   trunk/src/application.h

Modified: trunk/INSTALL
==============================================================================
--- trunk/INSTALL	(original)
+++ trunk/INSTALL	Mon Sep 22 09:38:36 2008
@@ -1,8 +1,8 @@
 Installation Instructions
 *************************
 
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
 
 This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
@@ -10,10 +10,7 @@
 Basic Installation
 ==================
 
-Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
+These are generic installation instructions.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
@@ -26,9 +23,9 @@
 
    It can also use an optional file (typically called `config.cache'
 and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  Caching is
+the results of its tests to speed up reconfiguring.  (Caching is
 disabled by default to prevent problems with accidental use of stale
-cache files.
+cache files.)
 
    If you need to do unusual things to compile the package, please try
 to figure out how `configure' could check whether to do them, and mail
@@ -38,17 +35,20 @@
 may remove or edit it.
 
    The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
+`configure' by a program called `autoconf'.  You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
 
 The simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
 
-     Running `configure' might take a while.  While running, it prints
-     some messages telling which features it is checking for.
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
 
   2. Type `make' to compile the package.
 
@@ -78,7 +78,7 @@
 by setting variables in the command line or in the environment.  Here
 is an example:
 
-     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
 
    *Note Defining Variables::, for more details.
 
@@ -87,15 +87,17 @@
 
 You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
-own directory.  To do this, you can use GNU `make'.  `cd' to the
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
 the `configure' script.  `configure' automatically checks for the
 source code in the directory that `configure' is in and in `..'.
 
-   With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory.  After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
+   If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory.  After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
 
 Installation Names
 ==================
@@ -188,12 +190,12 @@
      ./configure CC=/usr/local2/bin/gcc
 
 causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
+overridden in the site shell script).  Here is a another example:
 
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf bug.  Until the bug is fixed you can use this workaround:
+     /bin/bash ./configure CONFIG_SHELL=/bin/bash
 
-     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
 
 `configure' Invocation
 ======================

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Mon Sep 22 09:38:36 2008
@@ -4,7 +4,8 @@
 
 SUBDIRS = toolbareditor \
 	  dialogs \
-	  plugin-system
+	  plugin-system \
+	  translation-memory
 
 noinst_LTLIBRARIES = libgtranslator.la
 
@@ -14,6 +15,8 @@
 	-I$(top_srcdir)/src/dialogs				\
 	-I$(top_srcdir)/src/toolbareditor			\
 	-I$(top_srcdir)/src/plugin-system			\
+	-I$(top_srcdir)/src/translation-memory			\
+	-I$(top_srcdir)/src/translation-memory/berkeley		\
 	-DGNOMELOCALEDIR=\""$(prefix)/${DATADIRNAME}/locale"\"	\
 	-DPREFIX=\""$(prefix)"\"                                \
 	-DSYSCONFDIR=\""$(sysconfdir)"\"                        \
@@ -110,7 +113,8 @@
 	$(GTRANSLATOR_LIBS) \
 	dialogs/libdialogs.la \
 	toolbareditor/libtoolbareditor.la \
-	plugin-system/libpluginsystem.la 
+	plugin-system/libpluginsystem.la \
+	translation-memory/libtranslationmemory.la
 	
 #gtranslator_auto_learn_SOURCES = \
 #	auto-learn.c

Modified: trunk/src/application.c
==============================================================================
--- trunk/src/application.c	(original)
+++ trunk/src/application.c	Mon Sep 22 09:38:36 2008
@@ -25,6 +25,8 @@
 #include "window.h"
 #include "egg-toolbars-model.h"
 #include "dialogs/preferences-dialog.h"
+#include "translation-memory.h"
+#include "berkeley.h"
 
 #include <glib.h>
 #include <glib-object.h>
@@ -55,6 +57,8 @@
 	GtkIconFactory *icon_factory;
 
 	gchar *last_dir;
+	
+	GtranslatorTranslationMemory *tm;
 };
 
 static gchar *
@@ -204,6 +208,9 @@
 	/* Create Icon factory */
 	application->priv->icon_factory = gtk_icon_factory_new ();
 	gtk_icon_factory_add_default (application->priv->icon_factory);
+	
+	/* Creating translation memory */
+	application->priv->tm = GTR_TRANSLATION_MEMORY (gtranslator_berkeley_new ());
 }
 
 
@@ -217,6 +224,9 @@
 
 	g_free (app->priv->last_dir);
 	
+	if (app->priv->tm)
+		g_object_unref (app->priv->tm);
+	
 	G_OBJECT_CLASS (gtranslator_application_parent_class)->finalize (object);
 }
 
@@ -531,3 +541,11 @@
 
 	app->priv->last_dir = g_strdup (last_dir);
 }
+
+GObject *
+gtranslator_application_get_translation_memory (GtranslatorApplication *app)
+{
+	g_return_val_if_fail (GTR_IS_APPLICATION (app), NULL);
+	
+	return G_OBJECT (app->priv->tm);
+}

Modified: trunk/src/application.h
==============================================================================
--- trunk/src/application.h	(original)
+++ trunk/src/application.h	Mon Sep 22 09:38:36 2008
@@ -105,6 +105,8 @@
 void              gtranslator_application_register_icon (GtranslatorApplication *app,
 							 const gchar *icon,
 				       			 const gchar *stock_id);
+				       			 
+GObject          *gtranslator_application_get_translation_memory (GtranslatorApplication *app);
 
 /* Non exported funcs */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]