changeset 23087:8b8603d354be

merge of 'a9b83251335ed42daf54164bf8c5120166f0e589' and 'cd8c000c5205ad2bdbbc2c7de67b5f08b72e17c8'
author Richard Laager <rlaager@wiktel.com>
date Wed, 21 May 2008 22:26:51 +0000
parents 02ef6c5c6650 (current diff) fb87b6d77543 (diff)
children 00367d8465cf
files
diffstat 4 files changed, 20 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/doc/pidgin.1.in	Wed May 21 05:07:25 2008 +0000
+++ b/doc/pidgin.1.in	Wed May 21 22:26:51 2008 +0000
@@ -19,9 +19,9 @@
 .\" License along with this manual; if not, write to the Free
 .\" Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 .\" Boston, MA  02111-1301  USA.
-.TH pidgin 1
+.TH pidgin 1 "" "Pidgin v@VERSION@"
 .SH NAME
-Pidgin v@VERSION@ \- Instant Messaging client
+pidgin \- Instant Messaging client
 .SH SYNOPSIS
 .TP 5
 \fBpidgin \fI[options]\fR
--- a/libpurple/purple-remote	Wed May 21 05:07:25 2008 +0000
+++ b/libpurple/purple-remote	Wed May 21 22:26:51 2008 +0000
@@ -35,7 +35,7 @@
             raise "Error: " + self.attr + " " + str(args) + " returned " + str(result)
         return result
             
-def show_help():
+def show_help(requested=False):
     print """This program uses D-Bus to communicate with purple.
 
 Usage:
@@ -66,6 +66,10 @@
     PurpleAccountsFindConnected?name=&protocol=prpl-jabber
     PurpleAccountsFindConnected(,prpl-jabber)
 """ % sys.argv[0]
+    if (requested):
+        sys.exit(0)
+    else:
+        sys.exit(1)
 
 cpurple = CheckedObject(purple)
 
@@ -213,10 +217,11 @@
                                 raise "Don't know how to handle type \"%s\"" % type
                     return purple.__getattr__(command)(*methodparams)
             show_help()
-            raise "Unknown command: %s" % command
 
 if len(sys.argv) == 1:
     show_help()
+elif (sys.argv[1] == "--help" or sys.argv[1] == "-h"):
+    show_help(True)
 elif (obj == None):
     print "No existing libpurple instance detected."
     sys.exit(1);
--- a/libpurple/purple-url-handler	Wed May 21 05:07:25 2008 +0000
+++ b/libpurple/purple-url-handler	Wed May 21 22:26:51 2008 +0000
@@ -295,10 +295,14 @@
 
 
 def main(argv=sys.argv):
-    if len(argv) != 2:
+    if len(argv) != 2 or argv[1] == "--help" or argv[1] == "-h":
         print "Usage: %s URI" % argv[0]
         print "Example: %s \"xmpp:romeo@montague.net?message\"" % argv[0]
-        return
+
+        if len(argv) != 2:
+            sys.exit(1)
+        else:
+            return 0
 
     uri = argv[1]
     type = uri.split(":")[0]
--- a/pidgin/gtksound.c	Wed May 21 05:07:25 2008 +0000
+++ b/pidgin/gtksound.c	Wed May 21 22:26:51 2008 +0000
@@ -491,26 +491,12 @@
 		if (purple_running_gnome()) {
 			sink = gst_element_factory_make("gconfaudiosink", "sink");
 		}
-		if (!sink)
-			sink = gst_element_factory_make("autoaudiosink", "sink");
-		if (!sink) {
-			purple_debug_error("sound", "Unable to create GStreamer audiosink.\n");
-			return;
-		}
 	}
 #ifndef _WIN32
 	else if (!strcmp(method, "esd")) {
 		sink = gst_element_factory_make("esdsink", "sink");
-		if (!sink) {
-			purple_debug_error("sound", "Unable to create GStreamer audiosink.\n");
-			return;
-		}
 	} else if (!strcmp(method, "alsa")) {
 		sink = gst_element_factory_make("alsasink", "sink");
-		if (!sink) {
-			purple_debug_error("sound", "Unable to create GStreamer audiosink.\n");
-			return;
-		}
 	}
 #endif
 	else {
@@ -518,6 +504,11 @@
 		return;
 	}
 
+	if (strcmp(method, "automatic") != 0 && !sink) {
+		purple_debug_error("sound", "Unable to create GStreamer audiosink.\n");
+		return;
+	}
+
 	play = gst_element_factory_make("playbin", "play");
 
 	if (play == NULL) {