totem r5411 - in trunk: . src



Author: hadess
Date: Sun May 18 14:22:36 2008
New Revision: 5411
URL: http://svn.gnome.org/viewvc/totem?rev=5411&view=rev

Log:
2008-05-16  Bastien Nocera  <hadess hadess net>

	* src/totem-audio-preview.c (main):
	* src/totem-video-indexer.c (main):
	* src/totem-video-thumbnailer.c (main): Use
	g_option_context_get_help () to print out the help



Modified:
   trunk/ChangeLog
   trunk/src/totem-audio-preview.c
   trunk/src/totem-video-indexer.c
   trunk/src/totem-video-thumbnailer.c

Modified: trunk/src/totem-audio-preview.c
==============================================================================
--- trunk/src/totem-audio-preview.c	(original)
+++ trunk/src/totem-audio-preview.c	Sun May 18 14:22:36 2008
@@ -108,7 +108,10 @@
 	}
 
 	if (filenames != NULL && g_strv_length (filenames) != 1) {
-		g_print ("Too many URIs passed but only one is required\n");
+		char *help;
+		help = g_option_context_get_help (context, FALSE, NULL);
+		g_print ("%s", help);
+		g_free (help);
 		return 1;
 	}
 	path = filenames ? filenames[0] : "fd://0";

Modified: trunk/src/totem-video-indexer.c
==============================================================================
--- trunk/src/totem-video-indexer.c	(original)
+++ trunk/src/totem-video-indexer.c	Sun May 18 14:22:36 2008
@@ -187,7 +187,10 @@
 		print_mimetypes ();
 		return 0;
 	} else if (filenames == NULL || g_strv_length (filenames) != 1) {
-		g_print ("Expects exactly one URI\n");
+		char *help;
+		help = g_option_context_get_help (context, FALSE, NULL);
+		g_print ("%s", help);
+		g_free (help);
 		return 1;
 	}
 

Modified: trunk/src/totem-video-thumbnailer.c
==============================================================================
--- trunk/src/totem-video-thumbnailer.c	(original)
+++ trunk/src/totem-video-thumbnailer.c	Sun May 18 14:22:36 2008
@@ -474,7 +474,10 @@
 #endif
 
 	if (filenames == NULL || g_strv_length (filenames) != 2) {
-		g_print ("Expects an input and an output file\n");
+		char *help;
+		help = g_option_context_get_help (context, FALSE, NULL);
+		g_print ("%s", help);
+		g_free (help);
 		return 1;
 	}
 	input = filenames[0];



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]