Commit Graph

80 Commits

Author SHA1 Message Date
Kristian Rietveld
2518fbdc02 Fix compile warning in defaultvalue test 2009-09-30 13:09:22 +02:00
Kristian Rietveld
dc04e012cf Ignore certain GtkSettings in defaultvalues unit test
Like the other GtkSettings already registered, these are influenced from
the outside and cannot be properly tested.  The defaultvalues test
passes again now.
2009-09-30 13:05:33 +02:00
Kristian Rietveld
77fc6e3539 Bug 596580 - Blank rows in entry autocompletion
gtk_tree_model_build_level() always needs to emit row-inserted when
requested, this should not depend on whether the level has a parent
level or a virtual root, which is a check whether or not we need to
reference the node in the child model.  Furthermore, we also need
to emit row-has-child-toggled after row-inserted when appropriate.

When gtk_tree_model_filter_row_changed() pulls in the root level, it
must request build_level() to emit signals for this.  The refilter
function uses row_changed to process the changes, so build_level() in
the first call to row_changed() might pull in multiple new nodes in this
scenario, for all of these signals need to be emitted.  Of course,
build_level() will then also emit the signals for the node row_changed()
is processing, we should not emit a duplicate signal, this is now
accounted for.

Add a unit test for this.  For this small functionality to block the
row-changed signal has been implemented, so that we can simulate calls
to the refilter function using the current visible column setup.
2009-09-30 10:25:48 +02:00
Kristian Rietveld
3a69f6772b Pretty print non-matching signals in filter model test suite 2009-09-30 10:25:48 +02:00
Kristian Rietveld
16c5339ea8 Don't access the parent level, there might not be one
Use the index instead, that can be -1.  A unit test has been added as
well.
2009-09-08 15:52:18 +02:00
Paolo Borelli
4e78b4c7d1 One more unit test 2009-09-07 11:17:49 +02:00
Paolo Borelli
04a58d8757 Simple expander unit test 2009-09-07 09:14:21 +02:00
Kristian Rietveld
d0051a46f7 Fix compiler warnings 2009-09-05 17:15:43 +02:00
Kristian Rietveld
855fee8f1f Fix memleak in filter model unit test
(There is one larger memleak left here, but this is a side effect of the
test case for bug 346800).
2009-09-05 17:15:43 +02:00
Kristian Rietveld
c2f6611e4b List work left to do in the filter model unit test 2009-09-05 17:15:43 +02:00
Kristian Rietveld
f483c5b7d6 Emit row-has-child-toggled when a first node becomes visible in a level
If we have a level with zero visible nodes and the first node becomes
visible in that level, then parent has just become a "real" parent node.
In such a case we need to emit row-has-child-toggled.  This only applies
to non-root levels that have a parent.  This problem was also found when
writing the unit test, the respective cases in the unit test have been
corrected.

This fixes bugs:
 Bug 372010 - Filtering not working properly
 Bug 525965 - Filtered and sorted GtkTreeView is missing rows
2009-09-05 17:15:42 +02:00
Kristian Rietveld
bf573a1e1e Have the unit test check if the filter model emits the right signals 2009-09-05 17:15:42 +02:00
Kristian Rietveld
bbb5bbb591 Extend filter model unit test with row-has-child-toggled testers 2009-09-05 17:15:42 +02:00
Kristian Rietveld
6606989019 Remove unused variable 2009-09-05 17:15:42 +02:00
Kristian Rietveld
5b766102fd More virtual root unit tests 2009-09-05 17:15:42 +02:00
Kristian Rietveld
7b1d2de75e Add a rather specially crafted test case 2009-09-05 17:15:42 +02:00
Kristian Rietveld
15fdf44501 Correct unfiltered test cases 2009-09-05 17:15:41 +02:00
Kristian Rietveld
18b20416e5 Check for successfull iterator retrieval 2009-09-05 17:15:41 +02:00
Kristian Rietveld
958f772c24 Refilter is required after setting visible column 2009-09-05 17:15:41 +02:00
Kristian Rietveld
2cca680c66 Correct /FilterModel/empty/vroot-show-nodes test case 2009-09-05 17:15:41 +02:00
Kristian Rietveld
378a6dffce Generalize fixture setup code 2009-09-05 17:15:41 +02:00
Kristian Rietveld
b6559c31a7 Make a start with virtual root unit tests 2009-09-05 17:15:41 +02:00
Kristian Rietveld
93b29a9cff Add test cases for bugs 464173 and 529287 2009-09-05 17:15:41 +02:00
Kristian Rietveld
6f2aff35f7 Add unit test for bug 540201 2009-09-05 17:15:41 +02:00
Kristian Rietveld
81bc45ee69 Add a helper for inserting paths in the test tree store 2009-09-05 17:15:41 +02:00
Kristian Rietveld
923a6a8083 Start a testsuite for GtkTreeModelFilter 2009-09-05 17:15:41 +02:00
Paolo Borelli
2d8b8e054a buffer_backspace should delete \r\n in one go
Special case \r\n in gtk_text_buffer_backspace since \r should not be
reinserted even if we are deleting one char at a time. Also add
corresponding unit test. Fixes bug #544724.
2009-08-29 21:29:57 -04:00
Kristian Rietveld
44469e4684 Make gtk_tree_view_real_set_cursor() handle non-existing paths
Such paths (eg. a child node that is collapsed) should be ignored.  This
is fixed by checking the return value of _gtk_tree_view_find_node(),
which returns a partial return value (the parent node) when it returns
TRUE.  Also added a unit test.
2009-08-28 11:04:54 +02:00
Kristian Rietveld
7b4f09a589 Add a scrolling test case involving creating new rows in tree stores
Based on a bug report from Miroslav Rajcic, details are in the tree view
scrolling suite source code.
2009-08-23 22:06:16 +02:00
Kristian Rietveld
105e0be70e Rework naming of tests to make better use of path matching feature 2009-08-23 22:06:16 +02:00
Kristian Rietveld
a4a5d3da0e Change prefix of tree view scrolling tests into TreeView 2009-08-23 22:06:16 +02:00
Paolo Borelli
0696bc8e86 Fix memory leaks in unit tests 2009-08-14 15:56:44 +02:00
Paolo Borelli
6cfb23d185 Fix duplicated id detection in gtkbuilder
Fix memory handling of duplicated id hashtable and add unit test
2009-08-14 15:56:44 +02:00
Kristian Rietveld
d743b2fbea Bug 586374 – code does not follow documentation
Properly invalidate iterators in iter_next, iter_children,
iter_nth_child and iter_parent when FALSE is returned.  ListStore was
actually already mostly in order as the GSequence pointers are very
strictly checked, but to be a little stricter we've added stamp = 0
lines.  TreeStore did not invalidate its iterators, so stamp = 0 lines
were added where appropriate.  Unit tests have been added to check this.

Fixes bug 586374, reported by Mike Gemunde.
2009-07-30 21:23:47 +02:00
Kristian Rietveld
069a593b0f Bug 539377 – Unnecessary warnings when GtkTreeView is not realized
Adapt gtk_tree_view_get_path_at_pos() and
gtk_tree_view_get_drag_dest_row() to just return FALSE when bin_window
is NULL and not hit a warning.  Makes this case consistent with the tree
view not having a model.  Documentation has been updated to clarify
this, unit test has been added.

Fixes bug 539377, based on a patch by Bjorn Lindqvist.
2009-07-30 20:24:31 +02:00
Kristian Rietveld
531c7e535b Start general GtkTreeView unit tests
Includes a test case for bug 546005 to start with, logic provided by
Paul Pogonyshev and Bjorn Lindqvist.  In the future, we should maybe
merge treeview-scrolling.c with this one to create one large monolithic
tree view tester.
2009-07-30 20:24:31 +02:00
Matthias Clasen
c25ef64c70 Exclude GtkEntry::buffer from default value testing 2009-07-10 18:12:42 -04:00
Alexander Larsson
8ebf278ebb Fix defaultvalue test due to csw
Initialize GdkWindowAttr required fields. This makes sure toplevel
windows are not accidentally larger than 16bit.
2009-07-08 18:47:43 +02:00
Matthias Clasen
b3969a3d75 2.17.3 2009-07-07 01:05:29 -04:00
Benjamin Otte
1a385c50f0 fix compile warnings
Fallout from running make CFLAGS="-Werror"; mostly missing casts and
constness issues.
2009-06-17 10:28:03 +02:00
Matthias Clasen
3bf1c7adad More uses of the get_cell_renderers functions 2009-06-16 12:37:33 -04:00
Matthias Clasen
a85fac7145 Add a message area widget
It is called GtkInfoBar. See bug 555344.
2009-06-05 18:00:26 -04:00
Behdad Esfahbod
a398c840be Add git.mk to generate .gitignore files
Add four new doc templates that were not in repository.
2009-05-04 14:29:21 -04:00
Matthias Clasen
cc4cf97d62 GTK+ 2.17.0 2009-05-04 01:54:06 -04:00
Matthias Clasen
1ad8bfb69a Better i18n support in GtkBuilder
Let descriptions of accessible actions be translated, by specifying
the description as content of the <action> element, and allowing
"translatable", "context" and "comment" as attributes. (#518642)
2009-04-06 12:12:08 -04:00
Matthias Clasen
50f87bfcdf Fix make check
svn path=/trunk/; revision=22036
2009-01-01 21:14:07 +00:00
Matthias Clasen
1934d3423b Fix a typo
svn path=/trunk/; revision=21877
2008-12-13 05:20:10 +00:00
Christian Dywan
ba9c358b53 Bug 559619 – invisible-char default cannot be tested
2008-11-12  Christian Dywan  <christian@imendio.com>

	Bug 559619 – invisible-char default cannot be tested

	* gtk/tests/defaultvalue.c (test_type):
        Skip invisible-char when testing

svn path=/trunk/; revision=21786
2008-11-12 15:48:51 +00:00
Christian Dywan
f95709b394 Bug 525550 – GTK+ 2.13.0 GtkCurve test fails
2008-11-12  Christian Dywan  <christian@imendio.com>

	Bug 525550 – GTK+ 2.13.0 GtkCurve test fails

	* gtk/tests/object.c (list_ignore_properties),
	(object_test_property), (main): Ignore GtkCurve when testing

svn path=/trunk/; revision=21784
2008-11-12 15:15:02 +00:00
Tristan Van Berkom
4858ae47e2 Made buildable and added support for adding children of type "submenu"
* gtk/gtkmenuitem.c: Made buildable and added support for adding children
	of type "submenu"

	* gtk/gtkwindow.c: Added support for custom tag "accel-groups" to add GtkAccelGroups
	to the window.

	* gtk/gtkcontainer.c: Added builder contextual warnings in buildable_add_child()

	* gtk/tests/builder.c: Added tests for buildable menus (test that accelerators are
	properly connected on stock items, test the menu hierarchy, test permission to
	add alien/custom menuitem children).

	* docs/reference/gtk/tmpl/gtkbuilder.sgml, docs/reference/gtk/tmpl/gtkwindow.sgml,
	docs/reference/gtk/tmpl/gtkmenuitem.sgml: Updated docs for buildable submenus
	and accel groups.


svn path=/trunk/; revision=21767
2008-11-06 17:34:30 +00:00