[totem] main: Avoid adding files twice on startup



commit 3240c9cb824e8848ef8fa0529beeee1105f66154
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Nov 26 18:13:55 2010 +0000

    main: Avoid adding files twice on startup
    
    Because we open them through totem_action_open_files() in
    app_init(), we don't need to do this again in
    totem_options_process_for_server().

 src/totem.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/totem.c b/src/totem.c
index 1ce9b80..7c07058 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -221,6 +221,10 @@ app_command_line (GApplication             *app,
 	 * We can't use g_application_get_is_remote() because it's not registered yet */
 	if (startup_called != FALSE) {
 		app_init (totem, argv);
+
+		/* Don't add files again through totem_options_process_for_server() */
+		g_strfreev (optionstate.filenames);
+		optionstate.filenames = NULL;
 		startup_called = FALSE;
 	} else {
 		gtk_window_present_with_time (GTK_WINDOW (totem->win), GDK_CURRENT_TIME);



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