]> saetta.ns0.it Git - solipa/libsolipa/commitdiff
Alcuni aggiustamenti.
authorAndrea Zagli <azagli@libero.it>
Sun, 5 Jul 2015 16:30:45 +0000 (18:30 +0200)
committerAndrea Zagli <azagli@libero.it>
Sun, 5 Jul 2015 16:30:45 +0000 (18:30 +0200)
.anjuta/session/anjuta.session
.anjuta_sym_db.db
.gitignore
configure.ac
src/Makefile.am
src/ooo.c

index 70a28604a47969bc79be1136cc6618c8c49aab22..a999cde6bc29f8a2f95f00cacf84ca92918eb750 100644 (file)
@@ -6,6 +6,7 @@ Geometry=1366x715+0+27
 bookmarks=<?xml version="1.0" encoding="UTF-8"?>\n<bookmarks/>\n
 
 [Project Manager]
+Shortcut=libsolipa//src//libsolipa.la%%%libsolipa//src//libsolipaooo.la%%%libsolipa//tests//allegato%%%libsolipa//tests//mail%%%libsolipa//tests//mail_check_address%%%libsolipa//tests//mail_get_addresses_from_string%%%libsolipa//tests//mailui%%%libsolipa//tests//ooo%%%libsolipa//tests//progresswindow%%%libsolipa//tests//utils%%%libsolipa//tests//utils_apri_collegamento%%%libsolipa//tests//utils_codfisc_piva%%%libsolipa//tests//utils_format_money%%%libsolipa//tests//utils_gdatetime%%%libsolipa//tests//utils_gstring_initial_capital%%%libsolipa//tests//utils_gtktreemodel_copy%%%libsolipa//tests//utils_infobar%%%libsolipa//tests//utils_round
 Expand=libsolipa
 
 [Execution]
index a79f5d0a423df85fbfffeef2097d485b8119453e..951228fd5cb0b7d9b384fa97e28fc00265376f49 100644 (file)
Binary files a/.anjuta_sym_db.db and b/.anjuta_sym_db.db differ
index b7716d9f759d02d0e272490ca8f074db518838b5..1b4271ecfef16421908705b2421aef247548814e 100644 (file)
@@ -54,11 +54,14 @@ tests/mail
 tests/mail_get_addresses_from_string
 tests/mail_check_address
 tests/mailui
+tests/log
 tests/ooo
+tests/ooo_pycmd
 tests/progresswindow
 tests/utils
 tests/utils_apri_collegamento
 tests/utils_codfisc_piva
+tests/utils_compare_version
 tests/utils_format_money
 tests/utils_gdatetime
 tests/utils_gstring_initial_capital
index 0302e63cf109ab03c0724eb395affb7a0e8022f9..aaa777136dca10895b5caec355d66a4314e01569 100644 (file)
@@ -33,9 +33,7 @@ AC_PROG_RANLIB
 PKG_CHECK_MODULES(SOLIPA, [libgdaex >= 0.5.0
                            libgtkform >= 0.5.0
                            gio-2.0 >= 2.36
-                           gio-windows-2.0 >= 2.36
-                           gtk+-3.0 >= 3.0
-                           gtk+-win32-3.0 >= 3.0])
+                           gtk+-3.0 >= 3.0])
 
 AC_SUBST(SOLIPA_CFLAGS)
 AC_SUBST(SOLIPA_LIBS)
@@ -93,6 +91,13 @@ esac
 
 AM_CONDITIONAL(PLATFORM_WIN32, [test $platform_win32 = yes])
 
+if test x$platform_win32 = xyes; then
+   PKG_CHECK_MODULES(SOLIPA_WIN32, [gio-windows-2.0 >= 2.36
+                                    gtk+-win32-3.0 >= 3.0])
+fi
+AC_SUBST(SOLIPA_WIN32_CFLAGS)
+AC_SUBST(SOLIPA_WIN32_LIBS)
+
 # Output files
 AC_CONFIG_FILES([
        libsolipa.pc
index a178933fbe40dc8c8bde8d6b90468874f1a2af3f..6421d3fe3db8f3bd1c3558005488a7af6cfe8315 100644 (file)
@@ -7,6 +7,7 @@ WIN32_LIBS=
 endif
 
 LIBS = $(SOLIPA_LIBS) \
+       $(SOLIPA_WIN32_LIBS) \
        $(CAMEL_LIBS) \
        $(WIN32_LIBS)
 
@@ -21,6 +22,7 @@ endif
 endif
 
 AM_CPPFLAGS = $(SOLIPA_CFLAGS) \
+              $(SOLIPA_WIN32_CFLAGS) \
               $(CAMEL_CFLAGS) \
               -DGUIDIR=\""$(guidir)"\" \
               -DG_LOG_DOMAIN=\"Solipa\" \
index c4475cbb563ee9f0c7738ab834175a9921c67092..ccdcbcc989ea38f0478c32f4b9bd1cc36f2728f7 100644 (file)
--- a/src/ooo.c
+++ b/src/ooo.c
@@ -450,7 +450,11 @@ solipa_ooo_pycmd_apri_openoffice (SolipaOOO *ooo)
        gchar *curdir;
 
        curdir = g_get_current_dir ();
-       chdir (priv->ooo_path);
+       if (g_chdir (priv->ooo_path) == -1)
+               {
+                       g_warning ("Unable to change directory");
+                       return FALSE;
+               }
 
        str = g_string_new (ENCODING "\n");
 
@@ -544,8 +548,13 @@ solipa_ooo_pycmd_apri_openoffice (SolipaOOO *ooo)
 
        gtk_widget_destroy (dialog);
 
-       chdir (curdir);
+       if (g_chdir (curdir) == -1)
+               {
+                       g_warning ("Unable to change directory.");
+               }
        g_free (curdir);
+
+       return TRUE;
 }
 
 static gboolean
@@ -774,9 +783,6 @@ solipa_ooo_salva_documento (SolipaOOO *ooo,
                             const gchar *filename)
 {
        gchar *str;
-       PyObject *obj;
-
-       SolipaOOOPrivate *priv = SOLIPA_OOO_GET_PRIVATE (ooo);
 
        str = solipa_ooo_pycmd_salva_documento (ooo, filename);
        PyRun_SimpleString (str);
@@ -818,9 +824,6 @@ solipa_ooo_salva_documento_pdf (SolipaOOO *ooo,
                                 const gchar *filename)
 {
        gchar *str;
-       PyObject *obj;
-
-       SolipaOOOPrivate *priv = SOLIPA_OOO_GET_PRIVATE (ooo);
 
        str = solipa_ooo_pycmd_salva_documento_pdf (ooo, filename);
 
@@ -891,7 +894,7 @@ solipa_ooo_pycmd_exec_script (SolipaOOO *ooo, const gchar *body)
 
        str = g_string_new (solipa_ooo_pycmd_header (ooo));
 
-       g_string_append_printf (str, body);
+       g_string_append (str, body);
 
        /* creo il file temporaneo da eseguire */
        stream = NULL;
@@ -920,7 +923,11 @@ solipa_ooo_pycmd_exec_script (SolipaOOO *ooo, const gchar *body)
        g_output_stream_close (ostream, NULL, &error);
 
        gchar *curdir = g_get_current_dir ();
-       chdir (priv->ooo_path);
+       if (g_chdir (priv->ooo_path) == -1)
+               {
+                       g_warning ("Unable to change directory.");
+                       return;
+               }
 
        tmp_path = g_file_get_path (gfile);
        g_string_printf (str, "python.exe %s", tmp_path);
@@ -930,7 +937,10 @@ solipa_ooo_pycmd_exec_script (SolipaOOO *ooo, const gchar *body)
 
        pclose (pipa);
 
-       chdir (curdir);
+       if (g_chdir (curdir) == -1)
+               {
+                       g_warning ("Unable to change directory.");
+               }
        g_free (curdir);
 
        /* elimino il file */