From ac3dc15eeec6da8d9e01f997aacc43103c2fa720 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Fri, 9 Sep 2011 00:38:56 -0400 Subject: [PATCH] Improve GRIP home page opening in external browser --- src/grip.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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) -- 2.20.1