head 1.4; access; symbols pkgsrc-2013Q2:1.4.0.26 pkgsrc-2013Q2-base:1.4 pkgsrc-2012Q4:1.4.0.24 pkgsrc-2012Q4-base:1.4 pkgsrc-2011Q4:1.4.0.22 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q2:1.4.0.20 pkgsrc-2011Q2-base:1.4 pkgsrc-2009Q4:1.4.0.18 pkgsrc-2009Q4-base:1.4 pkgsrc-2008Q4:1.4.0.16 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.14 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.12 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.10 pkgsrc-2008Q2-base:1.4 pkgsrc-2008Q1:1.4.0.8 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.6 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.4 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.2 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.3.0.36 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.34 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.32 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.30 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.28 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.26 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.24 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.22 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.20 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.18 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.16 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.14 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.12 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.10 pkgsrc-2003Q4-base:1.3 netbsd-1-6-1:1.3.0.6 netbsd-1-6-1-base:1.3 netbsd-1-6:1.3.0.8 netbsd-1-6-RELEASE-base:1.3 pkgviews:1.3.0.4 pkgviews-base:1.3 buildlink2:1.3.0.2 buildlink2-base:1.3 netbsd-1-5-PATCH003:1.2; locks; strict; comment @# @; 1.4 date 2007.05.20.17.28.24; author wiz; state dead; branches; next 1.3; 1.3 date 2002.05.05.22.52.12; author martin; state Exp; branches; next 1.2; 1.2 date 2002.03.24.19.53.49; author rh; state Exp; branches; next 1.1; 1.1 date 2001.09.24.23.47.37; author danw; state Exp; branches; next ; desc @@ 1.4 log @Remove gnome-libs from pkgsrc. All its dependencies were already removed. @ text @$NetBSD: patch-ay,v 1.3 2002/05/05 22:52:12 martin Exp $ --- libgnome/gnome-url.c.orig Thu Jan 10 23:03:17 2002 +++ libgnome/gnome-url.c Mon May 6 00:06:38 2002 @@@@ -80,6 +80,8 @@@@ return default_handler; } +static int gnome_url_show_with_handler (const gchar *url, const gchar *template); + /** * gnome_url_show * @@url: URL to show @@@@ -105,11 +107,9 @@@@ void gnome_url_show(const gchar *url) { - gint i; gchar *pos, *template; gboolean free_template = FALSE; - int argc; - char **argv; + int status; g_return_if_fail (url != NULL); pos = strchr (url, ':'); @@@@ -135,12 +135,26 @@@@ } else /* no : ? -- this shouldn't happen. Use default handler */ template = gnome_url_default_handler (NULL); + status = gnome_url_show_with_handler (url, template); + if (status == -1 && free_template) + gnome_url_show_with_handler (url, gnome_url_default_handler (NULL)); + + if (free_template) + g_free (template); +} + +static int +gnome_url_show_with_handler (const gchar *url, const gchar *template) +{ + int argc, i, status; + char **argv; + /* we use a popt function as it does exactly what we want to do and gnome already uses popt */ if(poptParseArgvString(template, &argc, &argv) != 0) { /* can't parse */ g_warning("Parse error of '%s'", template); - return; + return -1; } /* we can just replace the entry in the array since the @@@@ -154,13 +168,12 @@@@ /* use execute async, and not the shell, shell is evil and a * security hole */ - gnome_execute_async (NULL, argc, argv); - - if (free_template) - g_free (template); + status = gnome_execute_async (NULL, argc, argv); /* the way the poptParseArgvString works is that the entire thing * is allocated as one buffer, so just free will suffice, also * it must be free and not g_free */ free(argv); + + return status; } @ 1.3 log @Fix patch-ay, which seems to have been merged completely wrong by the last update. This prevents crashes when opening URLs (i.e. by selecting "Open in browser" in the gnome-terminal context menu) @ text @d1 1 a1 1 $NetBSD: patch-ay,v 1.2 2002/03/24 19:53:49 rh Exp $ @ 1.2 log @Update gnome-libs to 1.4.1.4. Changes are bugfixes, new man pages, and new translations. @ text @d1 1 a1 1 $NetBSD$ d3 2 a4 2 --- libgnome/gnome-url.c.orig Fri Jan 11 08:03:17 2002 +++ libgnome/gnome-url.c d14 1 a14 1 @@@@ -105,11 +107,11 @@@@ d21 1 a21 1 int argc; a22 1 + char **argv; d27 3 a29 11 @@@@ -140,9 +142,23 @@@@ if(poptParseArgvString(template, &argc, &argv) != 0) { /* can't parse */ g_warning("Parse error of '%s'", template); - return; + status = gnome_url_show_with_handler (url, template); + if (status == -1 && free_template) + gnome_url_show_with_handler (url, gnome_url_default_handler (NULL)); + } else { + gnome_url_show_with_handler (url, template); } d31 4 d45 9 d55 1 a55 3 * array is all in one buffer, we won't leak */ for(i = 0; i < argc; i++) { @@@@ -154,13 +170,12 @@@@ @ 1.1 log @Patch gnome_url_show() to fall back to the default handler if the one specified by gnome_config doesn't work. In particular, if a help file can't be viewed with gnome-help-browser (eg, because gnome-core isn't installed), fall back to the user's web browser rather than silently losing. @ text @d3 3 a5 3 --- libgnome/gnome-url.c.orig Fri Mar 16 14:44:42 2001 +++ libgnome/gnome-url.c Mon Sep 24 18:36:21 2001 @@@@ -72,6 +72,8 @@@@ d14 1 a14 1 @@@@ -97,11 +99,9 @@@@ d21 1 a21 1 - int argc; d23 1 d28 11 a38 3 @@@@ -127,12 +127,26 @@@@ } else /* no : ? -- this shouldn't happen. Use default handler */ template = gnome_url_default_handler (); a39 4 + status = gnome_url_show_with_handler (url, template); + if (status == -1 && free_template) + gnome_url_show_with_handler (url, gnome_url_default_handler ()); + a49 9 /* we use a popt function as it does exactly what we want to do and gnome already uses popt */ if(poptParseArgvString(template, &argc, &argv) != 0) { /* can't parse */ g_warning("Parse error of '%s'", template); - return; + return -1; } d51 3 a53 1 @@@@ -146,13 +160,12 @@@@ @