tools: Exit the app as it is a simgle instance app
authorThibault Saunier <tsaunier@gnome.org>
Wed, 3 Jun 2015 12:56:11 +0000 (14:56 +0200)
committerThibault Saunier <tsaunier@gnome.org>
Fri, 5 Jun 2015 20:49:46 +0000 (22:49 +0200)
And force exiting GstValidate when wanted

tools/ges-launcher.c
tools/ges-validate.c

index 0bfec5b..55ea4d2 100644 (file)
@@ -159,7 +159,7 @@ _project_loaded_cb (GESProject * project, GESTimeline * timeline,
       g_error ("couldn't create uri for '%s", opts->save_path);
 
       self->priv->seenerrors = TRUE;
-      g_application_release (G_APPLICATION (self));
+      g_application_quit (G_APPLICATION (self));
     }
 
     g_print ("\nSaving project to %s\n", uri);
@@ -169,7 +169,7 @@ _project_loaded_cb (GESProject * project, GESTimeline * timeline,
     g_assert_no_error (error);
     if (error) {
       self->priv->seenerrors = TRUE;
-      g_application_release (G_APPLICATION (self));
+      g_application_quit (G_APPLICATION (self));
     }
   }
 
@@ -180,7 +180,7 @@ _project_loaded_cb (GESProject * project, GESTimeline * timeline,
           opts->scenario, &opts->needs_set_state) == FALSE) {
     g_error ("Could not activate scenario %s", opts->scenario);
     self->priv->seenerrors = TRUE;
-    g_application_release (G_APPLICATION (self));
+    g_application_quit (G_APPLICATION (self));
   }
 
   if (opts->needs_set_state
@@ -197,7 +197,7 @@ _error_loading_asset_cb (GESProject * project, GError * error,
   g_printerr ("Error loading asset %s: %s\n", failed_id, error->message);
   self->priv->seenerrors = TRUE;
 
-  g_application_release (G_APPLICATION (self));
+  g_application_quit (G_APPLICATION (self));
 }
 
 static gboolean
@@ -288,12 +288,12 @@ bus_message_cb (GstBus * bus, GstMessage * message, GESLauncher * self)
       g_error_free (err);
       g_free (dbg_info);
       self->priv->seenerrors = TRUE;
-      g_application_release (G_APPLICATION (self));
+      g_application_quit (G_APPLICATION (self));
       break;
     }
     case GST_MESSAGE_EOS:
       g_printerr ("\nDone\n");
-      g_application_release (G_APPLICATION (self));
+      g_application_quit (G_APPLICATION (self));
       break;
     case GST_MESSAGE_STATE_CHANGED:
       if (GST_MESSAGE_SRC (message) == GST_OBJECT_CAST (self->priv->pipeline)) {
@@ -331,7 +331,7 @@ intr_handler (GESLauncher * self)
   GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (self->priv->pipeline),
       GST_DEBUG_GRAPH_SHOW_ALL, "ges-launch.interupted");
 
-  g_application_release (G_APPLICATION (self));
+  g_application_quit (G_APPLICATION (self));
 
   /* remove signal handler */
   return TRUE;
index 64d9e9f..eab7e30 100644 (file)
@@ -87,7 +87,7 @@ ges_validate_clean (GstPipeline * pipeline)
       g_object_get_data (G_OBJECT (pipeline), RUNNER_ON_PIPELINE);
 
   if (runner)
-    res = gst_validate_runner_printf (runner);
+    res = gst_validate_runner_exit (runner, TRUE);
 
   gst_object_unref (pipeline);
   if (runner) {
@@ -111,7 +111,7 @@ ges_validate_handle_request_state_change (GstMessage * message,
       && state == GST_STATE_NULL) {
     gst_validate_printf (GST_MESSAGE_SRC (message),
         "State change request NULL, " "quiting application\n");
-    g_application_release (application);
+    g_application_quit (application);
   }
 }