Lines Matching full:bookmark
20 test_load (GBookmarkFile *bookmark,
26 res = g_bookmark_file_load_from_file (bookmark, filename, &error);
37 test_query (GBookmarkFile *bookmark)
44 size = g_bookmark_file_get_size (bookmark);
45 uris = g_bookmark_file_get_uris (bookmark, &uris_len);
55 if (!g_bookmark_file_has_item (bookmark, uris[i]))
57 g_print ("URI/bookmark mismatch: bookmark for '%s' does not exist\n", uris[i]);
68 test_modify (GBookmarkFile *bookmark)
76 g_bookmark_file_set_title (bookmark, NULL, "a file");
77 g_bookmark_file_set_description (bookmark, NULL, "a bookmark file");
79 text = g_bookmark_file_get_title (bookmark, NULL, &error);
84 text = g_bookmark_file_get_description (bookmark, NULL, &error);
86 g_assert_cmpstr (text, ==, "a bookmark file");
90 g_print ("\t=> check bookmark title/description...");
91 g_bookmark_file_set_title (bookmark, TEST_URI_0, "a title");
92 g_bookmark_file_set_description (bookmark, TEST_URI_0, "a description");
94 text = g_bookmark_file_get_title (bookmark, TEST_URI_0, &error);
100 g_print ("\t=> check non existing bookmark...");
101 g_bookmark_file_get_description (bookmark, TEST_URI_1, &error);
107 g_bookmark_file_set_mime_type (bookmark, TEST_URI_0, TEST_MIME);
108 g_bookmark_file_add_application (bookmark, TEST_URI_0,
111 g_assert (g_bookmark_file_has_application (bookmark, TEST_URI_0, TEST_APP_NAME, NULL) == TRUE);
112 g_bookmark_file_get_app_info (bookmark, TEST_URI_0, TEST_APP_NAME,
119 g_assert (stamp == g_bookmark_file_get_modified (bookmark, TEST_URI_0, NULL));
122 g_bookmark_file_get_app_info (bookmark, TEST_URI_0, "fail",
132 g_bookmark_file_add_group (bookmark, TEST_URI_1, "Test");
133 g_assert (g_bookmark_file_has_group (bookmark, TEST_URI_1, "Test", NULL) == TRUE);
134 g_assert (g_bookmark_file_has_group (bookmark, TEST_URI_1, "Fail", NULL) == FALSE);
138 g_assert (g_bookmark_file_remove_item (bookmark, TEST_URI_1, &error) == TRUE);
140 g_assert (g_bookmark_file_remove_item (bookmark, TEST_URI_1, &error) == FALSE);