Exemplo n.º 1
0
static gboolean
test_query (GBookmarkFile *bookmark)
{
  gint size;
  gchar **uris;
  gsize uris_len, i;
  gboolean res = TRUE;

  size = g_bookmark_file_get_size (bookmark);
  uris = g_bookmark_file_get_uris (bookmark, &uris_len);
 
  if (uris_len != size)
    {
      g_print ("URI/size mismatch: URI count is %d (should be %d)\n", uris_len, size);

      res = FALSE;
    }

  for (i = 0; i < uris_len; i++)
    if (!g_bookmark_file_has_item (bookmark, uris[i]))
      {
        g_print ("URI/bookmark mismatch: bookmark for '%s' does not exist\n", uris[i]);

	res = FALSE;
      }

  g_strfreev (uris);
  
  return res;
}
Exemplo n.º 2
0
static VALUE
bf_get_size(VALUE self)
{
    return INT2NUM(g_bookmark_file_get_size(_SELF(self)));
}