From: <nac...@us...> - 2009-04-13 09:55:30
|
Revision: 719 http://osmo-pim.svn.sourceforge.net/osmo-pim/?rev=719&view=rev Author: nacho_alonso Date: 2009-04-13 09:55:28 +0000 (Mon, 13 Apr 2009) Log Message: ----------- * Fixes for MS-Windows build (incomplete) Modified Paths: -------------- trunk/src/main.c Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2009-04-09 01:19:08 UTC (rev 718) +++ trunk/src/main.c 2009-04-13 09:55:28 UTC (rev 719) @@ -53,7 +53,9 @@ GtkWidget *info_dialog; gchar tmpbuf[BUFFER_SIZE]; gint response = -1; +#ifndef WIN32 struct flock *s_lock = NULL; +#endif /* WIN32 */ int fhandle = 0; GOptionContext *cmd_context; @@ -180,11 +182,13 @@ goto finish; } +#ifndef WIN32 s_lock = g_new0 (struct flock, 1); s_lock->l_type = F_WRLCK; s_lock->l_whence = SEEK_SET; s_lock->l_start = 0; s_lock->l_len = 0; +#endif /* WIN32 */ prefs_read_config (appGUI); @@ -196,7 +200,7 @@ close(creat(prefs_get_config_filename (RUN_FLAG_FILE, appGUI), S_IRUSR | S_IWUSR)); /* create lock file */ fhandle = open(prefs_get_config_filename (RUN_FLAG_FILE, appGUI), O_RDWR); - +#ifndef WIN32 if (fhandle) { if (fcntl(fhandle, F_SETLK, s_lock) == -1) { close (fhandle); @@ -221,6 +225,7 @@ } } } +#endif /* WIN32 */ } @@ -257,8 +262,10 @@ } if (fhandle && appGUI->calendar_only == FALSE) { + #ifndef WIN32 s_lock->l_type = F_UNLCK; fcntl(fhandle, F_SETLK, s_lock); + #endif /* WIN32 */ close (fhandle); } @@ -280,7 +287,9 @@ g_free (cal); g_free (appGUI); +#ifndef WIN32 g_free (s_lock); +#endif /* WIN32 */ return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-04-28 09:24:41
|
Revision: 919 http://osmo-pim.svn.sourceforge.net/osmo-pim/?rev=919&view=rev Author: pasp Date: 2011-04-28 09:24:35 +0000 (Thu, 28 Apr 2011) Log Message: ----------- * Better gettext output codeset initialization Modified Paths: -------------- trunk/src/main.c Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2011-04-27 17:44:16 UTC (rev 918) +++ trunk/src/main.c 2011-04-28 09:24:35 UTC (rev 919) @@ -62,6 +62,7 @@ struct flock *s_lock = NULL; #endif /* WIN32 */ int fhandle = 0; +gchar* output_codeset = NULL; GOptionContext *cmd_context; gboolean cmd_calendar = FALSE; @@ -164,10 +165,23 @@ appGUI->cnt->write_flag = TRUE; #endif /* CONTACTS_ENABLED */ + if (!(output_codeset = bind_textdomain_codeset(PACKAGE, NULL))) { + output_codeset = strdup("UTF-8"); + } else { + output_codeset = strdup(output_codeset); + } + setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); - bind_textdomain_codeset (PACKAGE, "UTF-8"); + + if (bind_textdomain_codeset(PACKAGE, output_codeset) == NULL) { + fprintf(stderr, "Error setting gettext output codeset to %s\n", output_codeset); + g_free (output_codeset); + return -1; + } + textdomain (PACKAGE); + g_free (output_codeset); if (argc == 2 && (!strncmp(argv[1], "--help", 6) || (argv[1][0] == '-' && argv[1][1] == '?'))) { fprintf(stderr, "\nOSMO v%s (%s)\n", VERSION, _("handy personal organizer")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <si...@us...> - 2014-06-30 20:09:46
|
Revision: 938 http://sourceforge.net/p/osmo-pim/code/938 Author: silloz Date: 2014-06-30 20:09:38 +0000 (Mon, 30 Jun 2014) Log Message: ----------- * Fixed compilation problem Modified Paths: -------------- trunk/src/main.c Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2013-09-02 00:53:34 UTC (rev 937) +++ trunk/src/main.c 2014-06-30 20:09:38 UTC (rev 938) @@ -70,7 +70,9 @@ gboolean cmd_check_events = FALSE; gint cmd_check_ndays_events = 0; gchar *cmd_cfg_path = NULL; +#ifdef CONTACTS_ENABLED gchar *cmd_mutt_query = NULL; +#endif /* CONTACTS_ENABLED */ /* FIXME: temporary disabled gboolean cmd_tiny_gui = FALSE; */ @@ -80,9 +82,9 @@ { "check", 'e', 0, G_OPTION_ARG_NONE, &cmd_check_events, N_("Check for events since last run"), NULL }, { "days", 'd', 0, G_OPTION_ARG_INT, &cmd_check_ndays_events, N_("Number of days to check forward for events (default: 0)"), NULL }, { "config", 's', 0, G_OPTION_ARG_STRING, &cmd_cfg_path, N_("Set absolute path for settings and data files"), "STRING" }, - { "mutt-query", 'q', 0, G_OPTION_ARG_STRING, &cmd_mutt_query - , N_("Match contacts with given string"), "STRING" - }, +#ifdef CONTACTS_ENABLED + { "mutt-query", 'q', 0, G_OPTION_ARG_STRING, &cmd_mutt_query, N_("Match contacts with given string"), "STRING" }, +#endif /* CONTACTS_ENABLED */ /* FIXME: temporary disabled { "tinygui", 't', 0, G_OPTION_ARG_NONE, &cmd_tiny_gui, N_("Modify GUI to use Osmo on low resolutions"), NULL }, */ @@ -227,11 +229,13 @@ g_thread_init (NULL); gtk_init (&argc, &argv); +#ifdef CONTACTS_ENABLED if (cmd_mutt_query) { gint n = query (appGUI, cmd_mutt_query); goto finish; } +#endif /* CONTACTS_ENABLED */ if (appGUI->calendar_only == FALSE) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |