File evince-2.30.3-helphack.patch of Package mingw32-evince
diff -Naur evince-2.30.3.orig/shell/ev-window.c evince-2.30.3/shell/ev-window.c
--- evince-2.30.3.orig/shell/ev-window.c 2010-07-25 18:52:26.608016040 +0200
+++ evince-2.30.3/shell/ev-window.c 2010-07-25 20:44:20.844008943 +0200
@@ -26,6 +26,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -40,6 +41,14 @@
#include <gio/gio.h>
#include <gtk/gtk.h>
+#include <glib.h>
+#ifdef G_OS_WIN32
+#ifdef DATADIR
+#undef DATADIR
+#endif
+#include <windows.h>
+#endif
+
#ifdef WITH_GCONF
#include <gconf/gconf-client.h>
#endif
@@ -4012,10 +4021,17 @@
{
GError *error = NULL;
+#ifdef G_OS_WIN32
+ /* This is a ugly hack, should be fixed in glib */
+ if (!(ShellExecute(NULL, "open", EV_HELP, NULL, NULL, SW_SHOWNORMAL) > 32)) {
+ error = g_error_new_literal(0, 0, "failed to open webpage");
+ }
+#else
gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (ev_window)),
EV_HELP,
gtk_get_current_event_time (),
&error);
+#endif
if (error) {
ev_window_error_message (ev_window, error,
"%s", _("There was an error displaying help"));