]> granicus.if.org Git - handbrake/commitdiff
LinGui: make Help->Guide work on windows/mingw
authorjstebbins <jstebbins.hb@gmail.com>
Fri, 4 Jun 2010 00:47:39 +0000 (00:47 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Fri, 4 Jun 2010 00:47:39 +0000 (00:47 +0000)
Call win api ShellExecute to open url in default browser.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3350 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/callbacks.c

index ec29ff6c054d8e56bfcd54e04bd999cb2b2a825f..200e77f3dac50d358aab260da647cccd6827a000 100644 (file)
@@ -3177,6 +3177,10 @@ ghb_log(gchar *log, ...)
 static void
 browse_url(const gchar *url)
 {
+#if defined(_WIN32)
+       HINSTANCE r;
+       r = ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL);
+#else
        gboolean result;
        char *argv[] = 
                {"xdg-open",NULL,NULL,NULL};
@@ -3202,6 +3206,7 @@ browse_url(const gchar *url)
        argv[2] = NULL;
        result = g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL,
                                NULL, NULL, NULL);
+#endif
 }
 
 void