Comment 6 for bug 950781

Revision history for this message
Max Gaukler (mgmax) wrote :

Let's see where this could be fixed.

Inkscape uses GtkRecentManager for the recent-files menu.

inkscape-0.48.4/src/interface.cpp line 974:
    gtk_recent_chooser_set_show_not_found (GTK_RECENT_CHOOSER(recent_menu), FALSE);

(some steps inbetween, not really interesting)

gtk+-3.4.2/gtk/gtkrecentchooserutils.c line 468:
    if (!show_not_found && !gtk_recent_info_exists (info))

gtk+-3.4.2/gtk/gtkrecentmanager.c line 2044 and before:
in function gtk_recent_info_exists:
      if (g_stat (filename, &stat_buf) == 0)

glib-2.38.2/glib/gstdio.c line 496:
in function g_stat:
     retval = _wstat (wfilename, buf);

_wstat is the Win32 API Call, on which the pop-up error arises (AFAIK).

The MSDN forum people say that this pop-up error message can be disabled by SetErrorMode

http://social.msdn.microsoft.com/Forums/vstudio/de-DE/4a6359aa-5604-4d69-9375-08d47a4e9b27/how-do-i-get-rid-of-the-no-disk-error-messagebox-programmatically?forum=vcgeneral

http://social.msdn.microsoft.com/Forums/vstudio/de-DE/7454bccd-abe8-436f-99f5-afae5dcfde5c/how-to-suppress-the-windows-system-message?forum=vcgeneral

SetErrorMode Documentation is here:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms680621(v=vs.85).aspx

I have no idea about building inkscape under Windows. I assume that this line of code should fix the problem, but I'm not sure where the line should be placed.
setErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);