aboutsummaryrefslogtreecommitdiff
path: root/tests/test-gtk-parser.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-06-24 14:15:33 -0400
committerKen VanDine <ken.vandine@canonical.com>2011-06-24 14:15:33 -0400
commit9a8c84b879e78aa8e0a9c1759fc5b73a29efd116 (patch)
tree8471f1da76c5592c05fffb462337726c43b81db5 /tests/test-gtk-parser.c
parent565603d992afa03da6a8f485fcdbe8b71677f7db (diff)
parentb08640dfaa65d54ac758e14f103e92bdc20990e0 (diff)
downloadlibdbusmenu-9a8c84b879e78aa8e0a9c1759fc5b73a29efd116.tar.gz
libdbusmenu-9a8c84b879e78aa8e0a9c1759fc5b73a29efd116.tar.bz2
libdbusmenu-9a8c84b879e78aa8e0a9c1759fc5b73a29efd116.zip
* debian/control, debian/*: Renaming packages for library version
bump from 3 to 4. * New upstream release. * Fixing visibility for Eclipse (LP: #770263 and LP: #618587) * Unseting a GValue properly (LP: #785828) * Memory leaks for GVariant usage (LP: #784890) * Making GTK 3 default build * Removing the SerializableMenuitem object * debian/rules: Making GTK2 the special build * New upstream release. - Fix a typo in the signal name to make it match the XML files (LP: #641209) - Ref'ing the server for the entire time we're getting the bus (LP: #738568) - Watch additions/removals from submenus that get added - Activate new toplevel menu items as they get added - Make sure we don't activate toplevel children that aren't menu items or don't have submenus (LP: #761112)
Diffstat (limited to 'tests/test-gtk-parser.c')
-rw-r--r--tests/test-gtk-parser.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test-gtk-parser.c b/tests/test-gtk-parser.c
index b66b46a..87b0a7f 100644
--- a/tests/test-gtk-parser.c
+++ b/tests/test-gtk-parser.c
@@ -55,9 +55,23 @@ const gchar * test_parser_children_builder =
"</object>"
"</interface>";
+/* Checks the log level to let warnings not stop the program */
+static gboolean
+test_parser_children_log_handler (const gchar * domain, GLogLevelFlags level, const gchar * message, gpointer user_data)
+{
+ if (level & (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG)) {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
/* Ensure the parser can find children */
static void
test_parser_children (void) {
+ /* Hide GTK errors */
+ g_test_log_set_fatal_handler(test_parser_children_log_handler, NULL);
+
GtkBuilder * builder = gtk_builder_new();
g_assert(builder != NULL);