rpms/htmlview/devel htmlview, 1.13, 1.14 htmlview.spec, 1.25, 1.26 launchmail, 1.4, 1.5

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Dec 14 17:11:50 UTC 2006


Author: wtogami

Update of /cvs/dist/rpms/htmlview/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv13785

Modified Files:
	htmlview htmlview.spec launchmail 
Log Message:
- minor modernization of htmlview's app lists
- improve launchmail's non-GNOME error case



Index: htmlview
===================================================================
RCS file: /cvs/dist/rpms/htmlview/devel/htmlview,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- htmlview	20 Nov 2005 01:56:58 -0000	1.13
+++ htmlview	14 Dec 2006 17:11:47 -0000	1.14
@@ -7,7 +7,7 @@
 # WARNING: Deprecated Script
 # This script will be replaced in the future when something better is implemented.
 #
-# v3.0.0
+# v4.0.0
 # ------
 # If DISPLAY is set and gnome-open exists, mimic gnome-open behavior to launch 
 # preferred browser.  Due to MIME associations, gnome-open cannot be directly 
@@ -25,7 +25,7 @@
 #
 # written by Bernhard Rosenkraenzer <bero at redhat.com>
 # changed by Warren Togami <wtogami at redhat.com>
-# (c) 2000-2004 Red Hat, Inc.
+# (c) 2000-2006 Red Hat, Inc.
 #
 # This script is in the public domain.
 
@@ -128,8 +128,8 @@
 TERMS_GENERIC="/usr/bin/rxvt /usr/bin/xterm /usr/bin/Eterm"
 TTYBROWSERS="/usr/bin/links /usr/bin/lynx /usr/bin/w3m"
 X11BROWSERS_KDE="/usr/bin/konqueror /usr/bin/kfmbrowser"
-X11BROWSERS_GNOME="/usr/bin/mozilla /usr/bin/epiphany /usr/bin/galeon"
-X11BROWSERS_GENERIC="/usr/bin/mozilla /usr/bin/netscape"
+X11BROWSERS_GNOME="/usr/bin/seamonkey /usr/bin/firefox /usr/bin/epiphany /usr/bin/galeon"
+X11BROWSERS_GENERIC="/usr/bin/seamonkey /usr/bin/firefox /usr/bin/netscape"
 
 if [ "x`/sbin/pidof gnome-session`" != "x" ]; then
 	X11BROWSERS="$GCONF $X11BROWSERS_GENERIC $X11BROWSERS_GNOME $X11BROWSERS_KDE"


Index: htmlview.spec
===================================================================
RCS file: /cvs/dist/rpms/htmlview/devel/htmlview.spec,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- htmlview.spec	1 Nov 2006 19:15:45 -0000	1.25
+++ htmlview.spec	14 Dec 2006 17:11:47 -0000	1.26
@@ -1,6 +1,6 @@
 Name: htmlview
-Version: 3.0.0
-Release: 15%{?dist}
+Version: 4.0.0
+Release: 1%{?dist}
 Summary: Tools for launching Preferred Applications
 License: Public Domain
 Source0: htmlview
@@ -39,9 +39,14 @@
 %{_datadir}/applications/redhat-email.desktop
 
 %changelog
+* Thu Dec 14 2006 Warren Togami <wtogami at redhat.com> - 4.0.0-1
+- minor modernization of htmlview's app lists
+- improve launchmail's non-GNOME error case
+
 * Wed Nov  1 2006 Matthias Clasen <mclasen at redhat.com> - 3.0.0-15
 - Ensure that launchmail always brings up the mail component 
   of evolution.  (#212718)
+
 * Wed Jul 12 2006 Jesse Keating <jkeating at redhat.com> - 3.0.0-14.1
 - rebuild
 


Index: launchmail
===================================================================
RCS file: /cvs/dist/rpms/htmlview/devel/launchmail,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- launchmail	1 Nov 2006 19:15:45 -0000	1.4
+++ launchmail	14 Dec 2006 17:11:47 -0000	1.5
@@ -4,14 +4,15 @@
 # Usage:
 #	launchmail
 #
-# WARNING: Deprecated Script
-# This script exists only because GNOME 2.6 gnome-open lacks the ability 
-# to launch the preferred mail application directly without arguments.
-# This script will be replaced for target distribution FC3 when 
-# something better is implemented upstream.
+# v4.0.0
+# ------
+# This script exists because gnome-open cannot launch the preferred mail client
+# without a "mailto:" address parameter.  This script also attempts to run a mail
+# client if GNOME's Preferred Application cannot be determined in cases where
+# gconftool-2 is not installed.
 #
 # by Warren Togami <wtogami at redhat.com>
-# (c) 2000-2004 Red Hat, Inc.
+# (c) 2000-2006 Red Hat, Inc.
 #
 # This script is in the public domain.
 
@@ -47,12 +48,9 @@
         [ -x /usr/bin/gnome-default-applications-properties ] && exec /usr/bin/gnome-default-applications-properties
         exit 1
     fi
-
-    # Special case: mozilla mail
-    if [ "$GCONF" = "mozilla" ] && [ -z $1 ]; then
-        GCONF="mozilla -mail"
+    if [ "$GCONF" = "seamonkey" ] && [ -z $1 ]; then
+        GCONF="seamonkey -mail"
     fi
-
     if [ "$GCONF" = "evolution" ]; then
         GCONF="evolution --component=mail"
     fi
@@ -77,7 +75,7 @@
     return $?
 }
 
-# Read GNOME configuration
+# Attempt to run GNOME Preferred Application Mail Client
 if [ -x /usr/bin/gconftool-2 ]; then
 	# Pull key from gconf, remove %s or "%s", trim leading & trailing spaces
 	GCONF=$(gconftool-2 -g /desktop/gnome/url-handlers/mailto/command 2>/dev/null | sed -e 's/%s//; s/\"\"//; s/^\ *//; s/\ *$//')
@@ -94,5 +92,34 @@
 	fi
 fi
 
-# Fallback to hard coded default FC2 mail client if everything above failed
-exec evolution
+# Fallback to *any* mail client if all the above failed
+# usually because gconf and GNOME are not installed
+CLIENTS="thunderbird kmail evolution seamonkey sylpheed balsa"
+for client in $CLIENTS; do
+    if exists "$client"; then
+        if [ "$client" = "seamonkey" ] && [ -z $1 ]; then
+            client="seamonkey -mail"
+        fi
+        if [ "$client" = "evolution" ]; then
+            client="evolution --component=mail"
+        fi
+        exec "$client"
+    fi
+done
+
+# No graphical mail clients, try text-mode mail clients
+# first find a terminal...        
+TERMINALS="gnome-terminal konsole urxvt rxvt aterm xterm"
+for terminal in $TERMINALS; do
+    exists "$terminal" && break
+done
+# find a client...
+CLIENTS="mutt cone pine elm gnus" 
+for client in $CLIENTS; do
+    if exists "$client"; then
+        exec $terminal -e $client
+    fi
+done
+
+error_dialog "ERROR: No mail clients were found."
+exit 1




More information about the fedora-cvs-commits mailing list