From 35b876a877fc7f111f3f31c370b19f5fa9d89a5b Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Wed, 12 Aug 2015 12:20:25 +0200 Subject: [PATCH] Deprecazioni varie e header non inclusi in glib.h. --- src/allegato.c | 4 +++- src/ooo.c | 2 ++ src/solipa.c | 5 +---- src/utils.c | 3 ++- tests/allegato.c | 5 +++-- tests/mail_check_address.c | 4 +--- tests/mail_get_addresses_from_string.c | 4 +--- tests/mailui.c | 1 + tests/utils_compare_version.c | 2 -- tests/utils_gdatetime.c | 4 +--- tests/utils_gstring_initial_capital.c | 4 +--- tests/utils_gtktreemodel_copy.c | 4 +++- 12 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/allegato.c b/src/allegato.c index 16a56b3..bbf3fbf 100644 --- a/src/allegato.c +++ b/src/allegato.c @@ -20,6 +20,8 @@ #include #endif +#include + #include #include @@ -606,7 +608,7 @@ solipa_allegato_on_btn_file_clicked (GtkButton *button, if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { char *filename; - struct stat buf; + GStatBuf buf; filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); diff --git a/src/ooo.c b/src/ooo.c index ccdcbcc..0fc28c7 100644 --- a/src/ooo.c +++ b/src/ooo.c @@ -22,6 +22,8 @@ #include +#include + #include "ooo.h" static void solipa_ooo_class_init (SolipaOOOClass *class); diff --git a/src/solipa.c b/src/solipa.c index cf82eb6..44e0f3b 100644 --- a/src/solipa.c +++ b/src/solipa.c @@ -22,6 +22,7 @@ #include +#include #include #ifdef G_OS_WIN32 @@ -113,10 +114,6 @@ Solipa Solipa *solipa; SolipaPrivate *priv; - /* inizializzo GType e GThread */ - g_type_init (); - g_thread_init (NULL); - solipa = SOLIPA (g_object_new (solipa_get_type (), NULL)); priv = SOLIPA_GET_PRIVATE (solipa); diff --git a/src/utils.c b/src/utils.c index 776c911..6201b22 100644 --- a/src/utils.c +++ b/src/utils.c @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -1899,7 +1900,7 @@ solipa_apri_collegamento (GtkWindow *transient, const gchar *indirizzo) #ifdef G_OS_WIN32 /* da rimuovere quando gnome-vfs-extra (o gvfs) sarà compilabile in win */ - guint err; + HINSTANCE err; err = ShellExecute (NULL, "open", indirizzo, NULL, NULL, SW_SHOW); if (err < 33) diff --git a/tests/allegato.c b/tests/allegato.c index 2666a2a..fdb384b 100644 --- a/tests/allegato.c +++ b/tests/allegato.c @@ -16,8 +16,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include +#include "solipa.h" +#include "allegato.h" +#include "utils.h" GtkWidget *w; diff --git a/tests/mail_check_address.c b/tests/mail_check_address.c index e3a1a14..23f5fce 100644 --- a/tests/mail_check_address.c +++ b/tests/mail_check_address.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Andrea Zagli + * Copyright (C) 2011-2015 Andrea Zagli * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,8 +21,6 @@ int main (int argc, char **argv) { - g_type_init (); - if (argc != 2) return 0; if (!solipa_mail_check_email_address (argv[1])) diff --git a/tests/mail_get_addresses_from_string.c b/tests/mail_get_addresses_from_string.c index d94f19d..3400b11 100644 --- a/tests/mail_get_addresses_from_string.c +++ b/tests/mail_get_addresses_from_string.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Andrea Zagli + * Copyright (C) 2011-2015 Andrea Zagli * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,8 +26,6 @@ main (int argc, char **argv) gchar *name; gchar *address; - g_type_init (); - if (argc != 2) return 0; lst = solipa_mail_get_addresses_from_string (argv[1]); diff --git a/tests/mailui.c b/tests/mailui.c index ab339cd..c8a0334 100644 --- a/tests/mailui.c +++ b/tests/mailui.c @@ -16,6 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "utils.h" #include Solipa *solipa; diff --git a/tests/utils_compare_version.c b/tests/utils_compare_version.c index 7c85be0..be10577 100644 --- a/tests/utils_compare_version.c +++ b/tests/utils_compare_version.c @@ -25,8 +25,6 @@ main (int argc, char *argv[]) int ret; guint part; - g_type_init (); - if (argc == 3) { ret = solipa_compare_version (argv[1], argv[2], NULL, &part); diff --git a/tests/utils_gdatetime.c b/tests/utils_gdatetime.c index 457e356..eedf156 100644 --- a/tests/utils_gdatetime.c +++ b/tests/utils_gdatetime.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Andrea Zagli + * Copyright (C) 2011-2015 Andrea Zagli * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,8 +24,6 @@ main (int argc, char *argv[]) { GDateTime *gdatetime; - g_type_init (); - if (argc == 3) { gdatetime = solipa_get_gdatetime_from_string (argv[1], argv[2]); diff --git a/tests/utils_gstring_initial_capital.c b/tests/utils_gstring_initial_capital.c index 7aee2f7..d53c712 100644 --- a/tests/utils_gstring_initial_capital.c +++ b/tests/utils_gstring_initial_capital.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Andrea Zagli + * Copyright (C) 2012-2015 Andrea Zagli * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,8 +24,6 @@ main (int argc, char *argv[]) { GString *str; - g_type_init (); - if (argc == 2) { str = g_string_new (argv[1]); diff --git a/tests/utils_gtktreemodel_copy.c b/tests/utils_gtktreemodel_copy.c index fea02fb..d0febdc 100644 --- a/tests/utils_gtktreemodel_copy.c +++ b/tests/utils_gtktreemodel_copy.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Andrea Zagli + * Copyright (C) 2011-2015 Andrea Zagli * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,6 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #include #include -- 2.49.0