[Xfce4-commits] <exo:master> Use g_printerr in exo-desktop-item-edit.

Nick Schermer noreply at xfce.org
Sun Feb 14 20:40:01 CET 2010


Updating branch refs/heads/master
         to 787e118423cda9c23900dd1da01174754c0f5192 (commit)
       from 9ac5fa5088da4b9c5ad04dec7363781896f25bbf (commit)

commit 787e118423cda9c23900dd1da01174754c0f5192
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Feb 14 20:35:48 2010 +0100

    Use g_printerr in exo-desktop-item-edit.

 exo-desktop-item-edit/main.c |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/exo-desktop-item-edit/main.c b/exo-desktop-item-edit/main.c
index 31ed135..74f8892 100644
--- a/exo-desktop-item-edit/main.c
+++ b/exo-desktop-item-edit/main.c
@@ -134,13 +134,13 @@ main (int argc, char **argv)
       if (G_UNLIKELY (error != NULL))
         {
           /* use the supplied error message */
-          g_critical ("%s", error->message);
+          g_printerr ("%s\n", error->message);
           g_error_free (error);
         }
       else
         {
           /* no error message, the GUI initialization failed */
-          g_critical ("%s %s", _("Failed to open display"),
+          g_printerr ("%s %s\n", _("Failed to open display"),
                       STR_FB (gdk_get_display_arg_name (), ""));
         }
 
@@ -167,7 +167,7 @@ main (int argc, char **argv)
   /* verify that a file/folder is specified */
   if (G_UNLIKELY (argc != 2))
     {
-      g_critical (_("No file/folder specified"));
+      g_printerr ("%s\n", _("No file/folder specified"));
       return EXIT_FAILURE;
     }
 
@@ -213,14 +213,14 @@ main (int argc, char **argv)
           /* we cannot open the file */
           if (G_LIKELY (error != NULL))
             {
-              g_critical (_("Failed to load contents from \"%s\": %s"), argv[1], error->message);
+              g_printerr (_("Failed to load contents from \"%s\": %s"), argv[1], error->message);
               g_error_free (error);
             }
           else
             {
-              g_critical (_("The file \"%s\" contains no data"), argv[1]);
+              g_printerr (_("The file \"%s\" contains no data"), argv[1]);
             }
-
+          g_printerr ("\n");
           return EXIT_FAILURE;
         }
 
@@ -231,7 +231,8 @@ main (int argc, char **argv)
       if (G_UNLIKELY (!res))
         {
           /* failed to parse the file */
-          g_critical (_("Failed to parse contents of \"%s\": %s"), argv[1], error->message);
+          g_printerr (_("Failed to parse contents of \"%s\": %s"), argv[1], error->message);
+          g_printerr ("\n");
           g_error_free (error);
           return EXIT_FAILURE;
         }
@@ -243,7 +244,8 @@ main (int argc, char **argv)
   if (G_UNLIKELY (value == NULL))
     {
       /* we cannot continue without a type */
-      g_critical (_("File \"%s\" has no type key"), argv[1]);
+      g_printerr (_("File \"%s\" has no type key"), argv[1]);
+      g_printerr ("\n");
       return EXIT_FAILURE;
     }
 
@@ -253,7 +255,8 @@ main (int argc, char **argv)
   if (G_UNLIKELY (enum_value == NULL))
     {
       /* tell the user that we don't support the type */
-      g_critical (_("Unsupported desktop file type \"%s\""), value);
+      g_printerr (_("Unsupported desktop file type \"%s\""), value);
+      g_printerr ("\n");
       return EXIT_FAILURE;
     }
   g_free (value);



More information about the Xfce4-commits mailing list