]> saetta.ns0.it Git - libgdaex/commitdiff
Merge 'master'.
authorAndrea Zagli <azagli@libero.it>
Sun, 23 Oct 2011 08:25:37 +0000 (10:25 +0200)
committerAndrea Zagli <azagli@libero.it>
Sun, 23 Oct 2011 08:25:37 +0000 (10:25 +0200)
1  2 
.gitignore
config.h.in
configure.ac
src/Makefile.am
src/gdaex.c
src/gdaex.h
tests/Makefile.am

diff --cc .gitignore
index 219890fba9a15ad28dafbb4d38a67b17efa63c92,34ed456d25cb941c255835d56d4fdb95ea041d3c..97f9e2f777c61c212903cdcba8f15f654eda8aee
@@@ -33,6 -39,7 +39,7 @@@ po/libgdaex.po
  *.bak
  libgdaex*tar*
  tests/test_prefix*
 +tests/query_editor
  tests/grid
 -tests/grid.exe
 +tests/*.exe
+ tests/select
 -tests/select.exe
diff --cc config.h.in
Simple merge
diff --cc configure.ac
index 0d535058f834c2fbf27536101da8526fb682c6df,6f13e15a7bca035d18324b9949dcc1145deeadfb..ea19e7260fe6fcced712d8b76a0c422037371772
@@@ -25,9 -25,18 +25,19 @@@ AC_PROG_INSTAL
  AC_PROG_LN_S
  AC_PROG_MAKE_SET
  AC_PROG_LIBTOOL
 +AC_PROG_RANLIB
  
  GTK_DOC_CHECK(1.0)
+ IT_PROG_INTLTOOL
+ dnl ******************************
+ dnl Translations
+ dnl ******************************
+ GETTEXT_PACKAGE=libgdaex
+ AC_SUBST(GETTEXT_PACKAGE)
+ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
+                    [The prefix for our gettext translation domains.])
+ AM_GLIB_GNU_GETTEXT
  
  # Checks for libraries.
  PKG_CHECK_MODULES(GDAEX, [libgda-4.0 >= 4
diff --cc src/Makefile.am
index 55c1b66921c29785e13c008e1f611ebdafcb0978,2f23eafdce105e0b9121b6b99a2d0cda8049c6fd..bc65d201fd13b8db906d4faf47e17bb920ac4b58
@@@ -1,8 -1,6 +1,9 @@@
 +guidir = $(datadir)/$(PACKAGE)/gui
 +
  AM_CPPFLAGS = -I$(top_srcdir) \
                $(GDAEX_CFLAGS) \
 +              -DGUIDIR=\""$(guidir)"\" \
+               -DLOCALEDIR=\"$(localedir)\" \
                -DG_LOG_DOMAIN=\"GdaEx\"
  
  LIBS = $(GDAEX_LIBS)
diff --cc src/gdaex.c
index e03ece52f48307cf95a0ba3d8ced0fb1566f33ed,aaa931d138d2a1ddec674d9a2d038de9374b640b..40a584406d46e323a9a9d22f64456ab7f798446c
@@@ -137,7 -138,9 +142,10 @@@ static GdaE
  
        GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
  
+       setlocale (LC_ALL, "");
+       gda_locale_changed ();
 +      /* gui */
  #ifdef G_OS_WIN32
  
        gchar *moddir;
            && (g_ascii_strcasecmp (p + 1, "src") == 0
                || g_ascii_strcasecmp (p + 1, ".libs") == 0))
                {
 +                      priv->guidir = g_strdup (GUIDIR);
+                       localedir = g_strdup (LOCALEDIR);
                }
        else
                {
 +                      priv->guidir = g_build_filename (moddir, "share", PACKAGE, "gui", NULL);
+                       localedir = g_build_filename (moddir, "share", "locale", NULL);
                }
  
+       g_free (moddir);
+       g_free (p);
  #else
  
 +      priv->guidir = g_strdup (GUIDIR);
+       localedir = g_strdup (LOCALEDIR);
  
  #endif
  
 +      priv->guifile = g_build_filename (priv->guidir, "libgdaex.ui", NULL);
 +      priv->gtkbuilder = gtk_builder_new ();
 +
++
+       bindtextdomain (GETTEXT_PACKAGE, localedir);
+       textdomain (GETTEXT_PACKAGE);
+       bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+       g_free (localedir);
        return gdaex;
  }
  
diff --cc src/gdaex.h
Simple merge
index 117678521841ce883e8a42ebfe1ccb94e408533e,8d70a92dcca9332fc1480e463b1109ff4a96ce50..325b705c2756fa7252ac1ec9ecb39b72d3386760
@@@ -5,9 -5,9 +5,10 @@@ AM_CPPFLAGS = $(GDAEX_CFLAGS) 
                -I$(top_srcdir)/src \
                -DTESTSDIR="\"@abs_builddir@\""
  
- noinst_PROGRAMS = test_prefix \
+ noinst_PROGRAMS = grid \
 +                  query_editor \
-                   grid
+                   select \
+                   test_prefix
  
  LDADD = $(top_builddir)/src/libgdaex.la