forked from AuroraMiddleware/gtk
ef38d6e397
These were found in the trash monitor.
177 lines
3.8 KiB
C
177 lines
3.8 KiB
C
#include <gtk/gtk.h>
|
|
|
|
static char *icon_names[] = {
|
|
/* stock icons */
|
|
"dialog-password",
|
|
"dialog-error",
|
|
"dialog-information",
|
|
"dialog-question",
|
|
"dialog-warning",
|
|
/* "gtk-dnd", */
|
|
/* "gtk-dnd-multiple", */
|
|
/* "gtk-apply", */
|
|
/* "gtk-cancel", */
|
|
/* "gtk-no", */
|
|
/* "gtk-ok", */
|
|
/* "gtk-yes", */
|
|
"window-close",
|
|
"list-add",
|
|
"format-justify-center",
|
|
"format-justify-fill",
|
|
"format-justify-left",
|
|
"format-justify-right",
|
|
"go-bottom",
|
|
"media-optical",
|
|
/* "gtk-convert", */
|
|
"edit-copy",
|
|
"edit-cut",
|
|
"go-down",
|
|
"system-run",
|
|
"application-exit",
|
|
"go-first",
|
|
/* "gtk-select-font", */
|
|
"view-fullscreen",
|
|
"view-restore",
|
|
"drive-harddisk",
|
|
"help-contents",
|
|
"go-home",
|
|
"dialog-information",
|
|
"go-jump",
|
|
"go-last",
|
|
"go-previous",
|
|
"image-missing",
|
|
"network-idle",
|
|
"document-new",
|
|
"document-open",
|
|
/* "gtk-orientation-portrait", */
|
|
/* "gtk-orientation-landscape", */
|
|
/* "gtk-orientation-reverse-portrait", */
|
|
/* "gtk-orientation-reverse-landscape", */
|
|
/* "gtk-page-setup", */
|
|
"edit-paste",
|
|
/* "gtk-preferences", */
|
|
"document-print",
|
|
"printer-error",
|
|
/* "printer-paused", */
|
|
"document-print-preview",
|
|
/* "printer-info", */
|
|
/* "printer-warning", */
|
|
"document-properties",
|
|
"edit-redo",
|
|
"list-remove",
|
|
"view-refresh",
|
|
"document-revert",
|
|
"go-next",
|
|
"document-save",
|
|
"media-floppy",
|
|
"document-save-as",
|
|
"edit-find",
|
|
"edit-find-replace",
|
|
"view-sort-descending",
|
|
"view-sort-ascending",
|
|
"tools-check-spelling",
|
|
"process-stop",
|
|
"format-text-bold",
|
|
"format-text-italic",
|
|
"format-text-strikethrough",
|
|
"format-text-underline",
|
|
"format-indent-more",
|
|
"format-indent-less",
|
|
"go-top",
|
|
"edit-delete",
|
|
/* "gtk-undelete", */
|
|
"edit-undo",
|
|
"go-up",
|
|
"text-x-generic",
|
|
"folder",
|
|
"help-about",
|
|
/* "gtk-connect", */
|
|
/* "gtk-disconnect", */
|
|
/* "gtk-edit", */
|
|
/* "gtk-caps-lock-warning", */
|
|
"media-seek-forward",
|
|
"media-skip-forward",
|
|
"media-playback-pause",
|
|
"media-playback-start",
|
|
"media-skip-backward",
|
|
"media-record",
|
|
"media-seek-backward",
|
|
"media-playback-stop",
|
|
/* "gtk-index", */
|
|
"zoom-original",
|
|
"zoom-in",
|
|
"zoom-out",
|
|
"zoom-fit-best",
|
|
"edit-select-all",
|
|
"edit-clear",
|
|
/* "gtk-select-color", */
|
|
/* "gtk-color-picker" */
|
|
"pan-down-symbolic",
|
|
"pan-up-symbolic",
|
|
"pan-start-symbolic",
|
|
"pan-end-symbolic",
|
|
"audio-volume-muted",
|
|
"audio-volume-high",
|
|
"audio-volume-low",
|
|
"audio-volume-medium",
|
|
"audio-volume-muted-symbolic",
|
|
"audio-volume-high-symbolic",
|
|
"audio-volume-low-symbolic",
|
|
"audio-volume-medium-symbolic",
|
|
"document-open-symbolic",
|
|
"edit-find-symbolic",
|
|
"edit-clear-symbolic",
|
|
"window-close-symbolic",
|
|
"window-minimize-symbolic",
|
|
"window-maximize-symbolic",
|
|
"window-restore-symbolic",
|
|
"dialog-warning-symbolic",
|
|
"list-add-symbolic",
|
|
"list-remove-symbolic",
|
|
"text-x-generic",
|
|
"dialog-password",
|
|
"dialog-password-symbolic",
|
|
"changes-allow-symbolic",
|
|
"changes-prevent-symbolic",
|
|
"user-trash-symbolic",
|
|
"user-trash-full-symbolic"
|
|
};
|
|
|
|
static void
|
|
test_icon_existence (gconstpointer icon_name)
|
|
{
|
|
GtkIconInfo *info;
|
|
|
|
/* Not using generic fallback and builtins here, as we explicitly want to check the
|
|
* icon theme.
|
|
* The icon size is randomly chosen.
|
|
*/
|
|
info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (), icon_name, 16, 0);
|
|
if (info == NULL)
|
|
{
|
|
g_test_message ("Failed to look up icon for \"%s\"", (char *) icon_name);
|
|
g_test_fail ();
|
|
return;
|
|
}
|
|
|
|
g_object_unref (info);
|
|
}
|
|
|
|
int
|
|
main (int argc, char *argv[])
|
|
{
|
|
guint i;
|
|
char *test_name;
|
|
|
|
gtk_test_init (&argc, &argv);
|
|
|
|
for (i = 0; i < G_N_ELEMENTS (icon_names); i++)
|
|
{
|
|
test_name = g_strdup_printf ("/check-icon-names/%s", icon_names[i]);
|
|
g_test_add_data_func (test_name, icon_names[i], test_icon_existence);
|
|
g_free (test_name);
|
|
}
|
|
|
|
return g_test_run();
|
|
}
|