[totem] main: Fix remote option parsing
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Fix remote option parsing
- Date: Wed, 28 Mar 2012 15:20:12 +0000 (UTC)
commit 401d165a7746dafb3943ee90a386050dab68111f
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 06f87dd..c6eeb90 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -198,6 +198,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]