From: Hugo Villeneuve Date: Fri, 9 Sep 2011 04:38:56 +0000 (-0400) Subject: Improve GRIP home page opening in external browser X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=ac3dc15eeec6da8d9e01f997aacc43103c2fa720;p=hvgrip.git Improve GRIP home page opening in external browser --- diff --git a/src/grip.c b/src/grip.c index 303366c..ee0fe2d 100644 --- a/src/grip.c +++ b/src/grip.c @@ -52,6 +52,8 @@ static void LoadImages(GripGUI *uinfo); static void DoLoadConfig(GripInfo *ginfo); void DoSaveConfig(GripInfo *ginfo); +#define GRIP_URL "http://www.nostatic.org/grip" + #define BASE_CFG_ENTRIES \ {"grip_version",CFG_ENTRY_STRING,256,ginfo->version},\ {"cd_device",CFG_ENTRY_STRING,256,ginfo->cd_device},\ @@ -626,7 +628,18 @@ static void MakeStyles(GripGUI *uinfo) static void Homepage(void) { - system("gnome-moz-remote http://www.nostatic.org/grip"); + int status; + + status = system("firefox " GRIP_URL); + if (status != 0) { + status = system("opera " GRIP_URL); + if (status != 0) { + status = system("chromium-browser " GRIP_URL); + if (status != 0) { + status = system("gnome-moz-remote " GRIP_URL); + } + } + } } static void LoadImages(GripGUI *uinfo)