tools/gst-inspect.c: Fix interface output with gst-inspect -a; don't print newlines...
authorTim-Philipp Müller <tim@centricular.net>
Thu, 20 Oct 2005 13:10:13 +0000 (13:10 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Thu, 20 Oct 2005 13:10:13 +0000 (13:10 +0000)
Original commit message from CVS:
* tools/gst-inspect.c: (print_interfaces),
(print_element_properties_info), (print_element_info):
Fix interface output with gst-inspect -a; don't print
newlines after double/float properties.

ChangeLog
tools/gst-inspect.c

index fb458ca..8e27dd1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-20  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * tools/gst-inspect.c: (print_interfaces),
+       (print_element_properties_info), (print_element_info):
+         Fix interface output with gst-inspect -a; don't print
+         newlines after double/float properties.
+
 2005-10-20  Wim Taymans  <wim@fluendo.com>
 
        * gst/base/gstbasesink.c: (gst_base_sink_get_position),
index c460e29..b789e85 100644 (file)
@@ -247,13 +247,13 @@ print_interfaces (GType type)
 
   if (ifaces) {
     if (n_ifaces) {
-      g_print ("Implemented Interfaces:\n");
+      g_print ("%sImplemented Interfaces:\n", _name);
       iface = ifaces;
       while (*iface) {
-        g_print ("  %s\n", g_type_name (*iface));
+        g_print ("%s  %s\n", _name, g_type_name (*iface));
         iface++;
       }
-      g_print ("\n");
+      g_print ("%s\n", _name);
       g_free (ifaces);
     }
   }
@@ -410,7 +410,7 @@ print_element_properties_info (GstElement * element)
         g_print ("Range: %15.7g - %15.7g Default: %15.7g ",
             pfloat->minimum, pfloat->maximum, pfloat->default_value);
         if (readable)
-          g_print ("Current: %15.7g\n", g_value_get_float (&value));
+          g_print ("Current: %15.7g", g_value_get_float (&value));
         break;
       }
       case G_TYPE_DOUBLE:
@@ -421,7 +421,7 @@ print_element_properties_info (GstElement * element)
         g_print ("Range: %15.7g - %15.7g Default: %15.7g ",
             pdouble->minimum, pdouble->maximum, pdouble->default_value);
         if (readable)
-          g_print ("Current: %15.7g\n", g_value_get_double (&value));
+          g_print ("Current: %15.7g", g_value_get_double (&value));
         break;
       }
       default:
@@ -1086,7 +1086,7 @@ print_element_info (GstElementFactory * factory, gboolean print_names)
 
   gst_object_unref (factory);
 
-  if (_name != "")
+  if (_name[0] != '\0')
     g_free (_name);
 
   return 0;