summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRamiro Estrugo <ramiro@src.gnome.org>2001-03-02 09:48:29 +0000
committerRamiro Estrugo <ramiro@src.gnome.org>2001-03-02 09:48:29 +0000
commitc82b82179b758fbf10fcf8db520d633236c31398 (patch)
treede405d2c5e283589b59eef3aa5538e3b495f0f99 /test
parent9ea01db6fb26e2baabc9a56a8bfc0ad821ca3d61 (diff)
downloadnautilus-c82b82179b758fbf10fcf8db520d633236c31398.tar.gz
reviewed by: Eskil Heinous Olsen <eskil@eazel.com>
* libnautilus-extensions/nautilus-string-list.h: * libnautilus-extensions/nautilus-string-list.c: (nautilus_string_list_nth_as_integer), (nautilus_self_check_string_list): New function to get the nth string as an integer - and checks. * libnautilus-extensions/Makefile.am: * libnautilus-extensions/nautilus-font-manager.h: * libnautilus-extensions/nautilus-font-manager.c: * libnautilus-extensions/nautilus-lib-self-check-functions.h: New files. Support for collecting information about the scalable fonts installed on the system. Parts written by Pavel Cisler. * components/text/nautilus-text-view.c: (nautilus_text_view_initialize): Mark a string for translation. * libnautilus-extensions/nautilus-font-factory.c: (nautilus_font_factory_get_font_by_family): Take fontsets into account. Patch submitted by eungkyu@sparcs.kaist.ac.kr. * libnautilus-extensions/nautilus-preferences-item.h: * libnautilus-extensions/nautilus-preferences-item.c: (nautilus_preferences_item_initialize_class), (nautilus_preferences_item_initialize), (preferences_item_destroy), (preferences_item_construct), (preferences_item_update_enum), (preferences_item_create_enum), (preferences_item_update_short_enum), (preferences_item_create_short_enum), (preferences_item_update_boolean), (preferences_item_create_boolean), (preferences_item_update_editable_string), (preferences_item_create_editable_string), (preferences_item_update_integer), (preferences_item_create_integer), (preferences_item_update_font_family), (preferences_item_create_font_family), (nautilus_preferences_item_new), (enum_radio_group_changed_callback), (nautilus_preferences_item_update_displayed_value), (update_text_settings_at_idle): Clean this up a bit. Follow nautilus coding conventions more. Remove long unused theme picker. Remove unused GtkArg stuff. * libnautilus-extensions/nautilus-preferences-pane.c: (nautilus_preferences_pane_new): * libnautilus-extensions/nautilus-preferences-pane.h: Remove unused pane description. * libnautilus-extensions/nautilus-preferences-box.c: (nautilus_preferences_box_add_pane): * libnautilus-extensions/nautilus-preferences-box.h: Remove unused pane description. * libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_install_defaults): Mark font name for translation. (global_preferences_create_dialog), (global_preferences_create_search_pane): Remove unused pane description. * test/.cvsignore: * test/Makefile.am: * test/test-nautilus-glyph-simple.c: (main): * test/test-nautilus-glyph.c: (main): * test/test-nautilus-labeled-image.c: (main): * test/test-nautilus-smooth-text-layout.c: (main): * test/test-nautilus-font-manager.c: (main): * test/test.c: (test_quit): * test/test.h: Some minor changes. New test for font manager.
Diffstat (limited to 'test')
-rw-r--r--test/.cvsignore1
-rw-r--r--test/Makefile.am2
-rw-r--r--test/test-nautilus-font-manager.c37
-rw-r--r--test/test-nautilus-glyph-simple.c4
-rw-r--r--test/test-nautilus-glyph.c2
-rw-r--r--test/test-nautilus-labeled-image.c2
-rw-r--r--test/test-nautilus-smooth-text-layout.c3
-rw-r--r--test/test.c9
-rw-r--r--test/test.h2
9 files changed, 52 insertions, 10 deletions
diff --git a/test/.cvsignore b/test/.cvsignore
index 79ebe3034..fba47c9d1 100644
--- a/test/.cvsignore
+++ b/test/.cvsignore
@@ -10,6 +10,7 @@ test-nautilus-clickable-image
test-nautilus-font
test-nautilus-font-picker
test-nautilus-font-simple
+test-nautilus-font-manager
test-nautilus-glyph
test-nautilus-glyph-simple
test-nautilus-image
diff --git a/test/Makefile.am b/test/Makefile.am
index f6c357977..9cd60bccd 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -35,6 +35,7 @@ noinst_PROGRAMS =\
test-nautilus-font \
test-nautilus-font-picker \
test-nautilus-font-simple \
+ test-nautilus-font-manager \
test-nautilus-glyph \
test-nautilus-glyph-simple \
test-nautilus-image \
@@ -70,6 +71,7 @@ test_nautilus_clickable_image_SOURCES = test-nautilus-clickable-image.c test.c
test_nautilus_font_SOURCES = test-nautilus-font.c test.c
test_nautilus_font_picker_SOURCES = test-nautilus-font-picker.c
test_nautilus_font_simple_SOURCES = test-nautilus-font-simple.c test.c
+test_nautilus_font_manager_SOURCES = test-nautilus-font-manager.c test.c
test_nautilus_glyph_SOURCES = test-nautilus-glyph.c test.c
test_nautilus_glyph_simple_SOURCES = test-nautilus-glyph-simple.c test.c
test_nautilus_image_SOURCES = test-nautilus-image.c
diff --git a/test/test-nautilus-font-manager.c b/test/test-nautilus-font-manager.c
new file mode 100644
index 000000000..0b34bb3ce
--- /dev/null
+++ b/test/test-nautilus-font-manager.c
@@ -0,0 +1,37 @@
+
+#include <config.h>
+
+#include "test.h"
+
+#include <libnautilus-extensions/nautilus-font-manager.h>
+
+static void
+font_iterator_callback (const char *foundry,
+ const char *family,
+ const char *weight,
+ const char *slant,
+ const char *set_width,
+ const char *char_set_registry,
+ const char *char_set_encoding,
+ gpointer callback_data)
+{
+
+ g_print ("%s-%s-%s-%s-%s-%s-%s\n",
+ foundry,
+ family,
+ weight,
+ slant,
+ set_width,
+ char_set_registry,
+ char_set_encoding);
+}
+
+int
+main (int argc, char* argv[])
+{
+ test_init (&argc, &argv);
+
+ nautilus_font_manager_for_each_font (font_iterator_callback, NULL);
+
+ return test_quit (EXIT_SUCCESS);
+}
diff --git a/test/test-nautilus-glyph-simple.c b/test/test-nautilus-glyph-simple.c
index c69bf15d0..8eaa06e9f 100644
--- a/test/test-nautilus-glyph-simple.c
+++ b/test/test-nautilus-glyph-simple.c
@@ -150,7 +150,5 @@ main (int argc, char* argv[])
gdk_pixbuf_unref (pixbuf);
gtk_object_unref (GTK_OBJECT (font));
- test_quit (0);
-
- return 0;
+ return test_quit (EXIT_SUCCESS);
}
diff --git a/test/test-nautilus-glyph.c b/test/test-nautilus-glyph.c
index c8016b4a9..287fda878 100644
--- a/test/test-nautilus-glyph.c
+++ b/test/test-nautilus-glyph.c
@@ -35,7 +35,7 @@ main (int argc, char* argv[])
const guint pixbuf_height = 480;
const gboolean has_alpha = FALSE;
const guint32 background_color = NAUTILUS_RGB_COLOR_WHITE;
- const char text[] = "Something";
+ const char text[] = "ù È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ";
const gboolean solid_background = FALSE;
const guint font_size = 100;
const int opacity = NAUTILUS_OPACITY_FULLY_OPAQUE;
diff --git a/test/test-nautilus-labeled-image.c b/test/test-nautilus-labeled-image.c
index 208f9fdb7..c7d9565f2 100644
--- a/test/test-nautilus-labeled-image.c
+++ b/test/test-nautilus-labeled-image.c
@@ -115,5 +115,5 @@ main (int argc, char* argv[])
gtk_main ();
- return 0;
+ return test_quit (EXIT_SUCCESS);
}
diff --git a/test/test-nautilus-smooth-text-layout.c b/test/test-nautilus-smooth-text-layout.c
index 8fdde2c6a..7fc7dc899 100644
--- a/test/test-nautilus-smooth-text-layout.c
+++ b/test/test-nautilus-smooth-text-layout.c
@@ -136,7 +136,6 @@ main (int argc, char* argv[])
gdk_pixbuf_unref (pixbuf);
gtk_object_unref (GTK_OBJECT (font));
gtk_object_unref (GTK_OBJECT (bold_font));
- test_quit (0);
- return 0;
+ return test_quit (EXIT_SUCCESS);
}
diff --git a/test/test.c b/test/test.c
index 8de4c1504..d596b87ab 100644
--- a/test/test.c
+++ b/test/test.c
@@ -27,11 +27,16 @@ test_init (int *argc,
NULL);
}
-void
+int
test_quit (int exit_code)
{
gnome_vfs_shutdown ();
- gtk_main_quit ();
+
+ if (gtk_main_level () > 0) {
+ gtk_main_quit ();
+ }
+
+ return exit_code;
}
void
diff --git a/test/test.h b/test/test.h
index 0e7aefc0b..0b3c5f001 100644
--- a/test/test.h
+++ b/test/test.h
@@ -30,7 +30,7 @@
void test_init (int *argc,
char ***argv);
-void test_quit (int exit_code);
+int test_quit (int exit_code);
void test_delete_event (GtkWidget *widget,
GdkEvent *event,
gpointer callback_data);