]> Dogcows Code - chaz/openbox/blobdiff - tools/obxprop/obxprop.c
Updated Italian translation
[chaz/openbox] / tools / obxprop / obxprop.c
index 071ae3f45ddbe492ee37adf477f796abb8f8fff8..83ff54a17ead35e76fb17fdc3e6b5459171339b7 100644 (file)
@@ -28,9 +28,9 @@ gint parse_hex(gchar *s) {
         if (*s >= '0' && *s <='9')
             add = *s-'0';
         else if (*s >= 'A' && *s <='F')
-            add = *s-'A';
+            add = *s-'A'+10;
         else if (*s >= 'a' && *s <='f')
-            add = *s-'a';
+            add = *s-'a'+10;
         else
             break;
 
@@ -98,9 +98,9 @@ static gboolean get_all(Display *d, Window win, Atom prop,
                 default:
                     g_assert_not_reached(); /* unhandled size */
                 }
-            *num = ret_items;
-            ret = TRUE;
         }
+        *num = ret_items;
+        ret = TRUE;
         XFree(xdata);
     }
     return ret;
@@ -254,7 +254,7 @@ void show_properties(Display *d, Window w, int argc, char **argv)
                     }
             }
             if (found)
-                g_print("%s(%s) = %s\n", name, type, val);
+                g_print("%s(%s) = %s\n", name, type, (val ? val : ""));
             g_free(val);
         }
 
This page took 0.023201 seconds and 4 git commands to generate.