Index: app_procs.c =================================================================== RCS file: /cvs/gnome/dia/app/app_procs.c,v retrieving revision 1.150 diff -u -u -r1.150 app_procs.c --- app_procs.c 27 Nov 2004 00:43:52 -0000 1.150 +++ app_procs.c 29 Nov 2004 22:51:07 -0000 @@ -137,9 +137,8 @@ vsprintf (buf, fmt, *args2); - fprintf(stderr, - "%s: %s\n", - title,buf); + g_error("%s: %s\n", title,buf); + } #ifdef GNOME @@ -514,9 +513,9 @@ if (version) { #if (defined __TIME__) && (defined __DATE__) /* TRANSLATOR: 2nd and 3rd %s are time and date respectively. */ - printf(g_locale_from_utf8(_("Dia version %s, compiled %s %s\n"), -1, NULL, NULL, NULL), VERSION, __TIME__, __DATE__); + g_print(_("Dia version %s, compiled %s %s\n"), VERSION, __TIME__, __DATE__); #else - printf(g_locale_from_utf8(_("Dia version %s\n"), -1, NULL, NULL, NULL), VERSION); + g_print(_("Dia version %s\n"), VERSION); #endif exit(0); } @@ -819,7 +818,7 @@ poptSetOtherOptionHelp(poptCtx, _("[OPTION...] [FILE...]")); while (rc >= 0) { if((rc = poptGetNextOpt(poptCtx)) < -1) { - fprintf(stderr,_("Error on option %s: %s.\nRun '%s --help' to see a full list of available command line options.\n"), + g_error(_("Error on option %s: %s.\nRun '%s --help' to see a full list of available command line options.\n"), poptBadOption(poptCtx, 0), poptStrerror(rc), argv[0]); Index: commands.c =================================================================== RCS file: /cvs/gnome/dia/app/commands.c,v retrieving revision 1.128 diff -u -u -r1.128 commands.c --- commands.c 6 Nov 2004 16:51:23 -0000 1.128 +++ commands.c 29 Nov 2004 22:51:08 -0000 @@ -128,12 +128,14 @@ { Diagram *dia; DDisplay *ddisp; - static int untitled_nr = 1; - char buffer[24]; - - g_snprintf(buffer, 24, _("Diagram%d.dia"), untitled_nr++); - - dia = new_diagram(buffer); + static int untitled_nr = 2; + char buffer[40]; + char *filename; + + g_snprintf(buffer, 40, _("Diagram%d.dia"), untitled_nr++); + filename = g_filename_from_utf8(buffer, -1, NULL, NULL, NULL); + dia = new_diagram(filename); + g_free(filename); ddisp = new_display(dia); diagram_tree_add(diagram_tree(), dia); }