From 6a598323ca8b9a25dfffe6a76dbeb695d644288b Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Tue, 25 Mar 2014 21:40:42 -0400 Subject: [PATCH] Use generic method to launch URL in external browser Also change URL to point to hugovil.com website. --- src/grip.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/grip.c b/src/grip.c index d217f55..fb680b2 100644 --- a/src/grip.c +++ b/src/grip.c @@ -52,7 +52,7 @@ static void LoadImages(GripGUI *uinfo); static void DoLoadConfig(GripInfo *ginfo); void DoSaveConfig(GripInfo *ginfo); -#define GRIP_URL "http://www.nostatic.org/grip" +#define GRIP_URL "http://www.hugovil.com/hvgrip" #define BASE_CFG_ENTRIES \ {"grip_version",CFG_ENTRY_STRING,256,ginfo->version},\ @@ -593,7 +593,7 @@ void MakeAboutPage(GripGUI *uinfo) hbox=gtk_hbox_new(TRUE,0); - button=gtk_button_new_with_label("http://www.nostatic.org/grip"); + button=gtk_button_new_with_label(GRIP_URL); gtk_widget_set_style(button,uinfo->style_dark_grey); gtk_widget_set_style(GTK_BIN(button)->child, uinfo->style_dark_grey); @@ -636,18 +636,7 @@ static void MakeStyles(GripGUI *uinfo) static void Homepage(void) { - 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); - } - } - } + g_app_info_launch_default_for_uri(GRIP_URL, NULL, NULL); } static void LoadImages(GripGUI *uinfo) -- 2.20.1