On Wednesday 03 May 2006 03:02, Milan wrote: > That's done too. I now use asprintf from glibc, and I put the > getHumanSize function in string.c in gnunet-util lib. If you think > there's a better file to put it in, please feel free to do it.
string.c is fine. > In order to sort files by real size, I need to pass a callback function > to free an integer (tricky issues from GTK+). I used the free() function > instead of the FREE() macro because it wasn't working with the macro. Is > this a problem ? Is there a workaround. Indeed, this is really > insignificant, because I free 3 int so 6 bytes when the GtkTreeView are > closed, and they would have been freed automatically when gnunet-gtk > stops. But let's be clean... Eh, that's not quite the right way to do it. You don't need to define a sort function. All that needed changing was 1228c1251 < "text", NAMESPACE_SIZE, --- > "text", NAMESPACE_HSIZE, to change the display to the human-readable version. If you then do NOT change 1235c1265 < gtk_tree_view_column_set_sort_column_id(column, NAMESPACE_SIZE); --- > gtk_tree_view_column_set_sort_column_id(column, NAMESPACE_HSIZE); the sorting of the now human-readable column is done using the actual sizes -- no need to define a sort function for those. > I saw that gnunet-gtk has been improved recently (libnotify, resizing > columns and ordering, downloading from URI, showing the extracted > keywords before insertion...). This is just great ! Except that I've never seen libnotify work on my system ;-). And showing extracted keywords before insertion already worked in 0.7.0 (at least for me). Christian _______________________________________________ GNUnet-developers mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnunet-developers
