diff --git a/capplets/common/ChangeLog b/capplets/common/ChangeLog index c026c6877..a75640f20 100644 --- a/capplets/common/ChangeLog +++ b/capplets/common/ChangeLog @@ -1,3 +1,8 @@ +Thu Jan 16 15:51:33 2003 Jonathan Blandford + + * gnome-theme-test.c: new little test program for helping people + debug their installation. + Thu Jan 16 02:41:09 2003 Jonathan Blandford * Release 2.1.7 diff --git a/capplets/common/Makefile.am b/capplets/common/Makefile.am index d9bb3ca45..fe979239c 100644 --- a/capplets/common/Makefile.am +++ b/capplets/common/Makefile.am @@ -23,3 +23,12 @@ libcommon_la_SOURCES = \ capplet-stock-icons.c capplet-stock-icons.h libcommon_la_LIBADD = $(top_builddir)/libbackground/libbackground.la + +gnome_theme_test_SOURCES = \ + gnome-theme-test.c + +gnome_theme_test_LDADD = \ + $(GNOMECC_CAPPLETS_LIBS) + +noinst_PROGRAMS = \ + gnome-theme-test diff --git a/capplets/common/gnome-theme-test.c b/capplets/common/gnome-theme-test.c new file mode 100644 index 000000000..c6a0f7fdc --- /dev/null +++ b/capplets/common/gnome-theme-test.c @@ -0,0 +1,114 @@ +#include +#include +#include +#include +#include +#include +#include +#include "gnome-theme-info.h" + +int +main (int argc, char *argv[]) +{ + gtk_init (&argc, &argv); + gnome_vfs_init (); + gboolean monitor_not_added = FALSE; + GList *themes, *list; + + gnome_theme_init (&monitor_not_added); + + themes = gnome_theme_meta_info_find_all (); + if (themes == NULL) + { + g_print ("No meta themes were found.\n"); + } + else + { + g_print ("%d meta themes were found:\n", g_list_length (themes)); + for (list = themes; list; list = list->next) + { + GnomeThemeMetaInfo *meta_theme_info; + + meta_theme_info = list->data; + g_print ("\t%s\n", meta_theme_info->readable_name); + } + } + g_list_free (themes); + + themes = gnome_theme_icon_info_find_all (); + if (themes == NULL) + { + g_print ("No icon themes were found.\n"); + } + else + { + g_print ("%d icon themes were found:\n", g_list_length (themes)); + for (list = themes; list; list = list->next) + { + GnomeThemeIconInfo *icon_theme_info; + + icon_theme_info = list->data; + g_print ("\t%s\n", icon_theme_info->name); + } + } + g_list_free (themes); + + themes = gnome_theme_info_find_by_type (GNOME_THEME_METACITY); + if (themes == NULL) + { + g_print ("No metacity themes were found.\n"); + } + else + { + g_print ("%d metacity themes were found:\n", g_list_length (themes)); + for (list = themes; list; list = list->next) + { + GnomeThemeInfo *theme_info; + + theme_info = list->data; + g_print ("\t%s\n", theme_info->name); + } + } + g_list_free (themes); + + themes = gnome_theme_info_find_by_type (GNOME_THEME_GTK_2); + if (themes == NULL) + { + g_print ("No gtk-2 themes were found.\n"); + } + else + { + g_print ("%d gtk-2 themes were found:\n", g_list_length (themes)); + for (list = themes; list; list = list->next) + { + GnomeThemeInfo *theme_info; + + theme_info = list->data; + g_print ("\t%s\n", theme_info->name); + } + } + g_list_free (themes); + + themes = gnome_theme_info_find_by_type (GNOME_THEME_GTK_2_KEYBINDING); + if (themes == NULL) + { + g_print ("No keybinding themes were found.\n"); + } + else + { + g_print ("%d keybinding themes were found:\n", g_list_length (themes)); + for (list = themes; list; list = list->next) + { + GnomeThemeInfo *theme_info; + + theme_info = list->data; + g_print ("\t%s\n", theme_info->name); + } + } + g_list_free (themes); + + gtk_main (); + + return 0; +} +