[totem/gnome-3-4] main: Fix remote option parsing



commit ba514cc256a3073d620ab363cce2e64d448e2e58
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Mar 28 14:01:10 2012 +0200

    main: Fix remote option parsing
    
    When calling a function remotely for the second time, we were
    inheriting the options from the first call. Eg. --pause followed by
    --play would play and pause instantly the second time.
    
    Note that we cannot do this at the same time as we reset the filenames
    because we would end up with no "late" options to handle (such as
    session restore).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=669327

 src/totem.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/totem.c b/src/totem.c
index 89aa82b..ff865da 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -197,6 +197,9 @@ app_command_line (GApplication             *app,
 
 	argv = g_application_command_line_get_arguments (command_line, &argc);
 
+	/* Reset the options, if they were used before */
+	memset (&optionstate, 0, sizeof (optionstate));
+
 	/* Options parsing */
 	context = g_option_context_new (N_("- Play movies and songs"));
 	baconoptiongroup = bacon_video_widget_get_option_group();



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