Commit Graph

753 Commits

Author SHA1 Message Date
Matthias Clasen
76d7331578 Fix the annotation of gtk_tree_view_create_row_drag_icon 2010-09-23 13:17:52 -04:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Matthias Clasen
92411d2c84 Fix an annotation 2010-09-19 00:22:37 -04:00
Javier Jardón
b140884fec Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598

Signed-off-by: Javier Jardón <jjardon@gnome.org>
Signed-off-by: Tristan Van Berkom <tristanvb@openismus.com>
2010-09-15 03:02:58 +02:00
Colin Walters
913cdf3be7 GDK: Prefix key names with KEY_
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.

For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.

Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
2010-09-08 18:51:44 -04:00
Javier Jardón
d05d713068 gtk/gtktreeview.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02:00
Tristan Van Berkom
9934007420 Completely removed requisition cache from GtkWidget instance structure.
Since we have a new mechanism for requesting sizes: GtkSizeRequestIface;
it makes no sense to maintain this cache on the GtkWidget structure...
removing the requisition cache however does not break the old "size-request"
signal which is there for backwards compatability reasons.

In any case widget->requisition should not have been accessed,
gtk_widget_get_child_requisition() would have been the correct way
to consult the cache.

This commit also deprecates the newly added gtk_widget_get_requisition()
API and makes it fallback on gtk_size_request_get_size().
2010-09-08 18:50:24 +02:00
Matthias Clasen
095fb1afe4 Remove GtkTreeView::row-ending-details
This was a style property to let theme engines 'opt-in' to more
    correct behaviour while maintaining compatibility with existing
    themes. GTK+ 3 engines are expected to handle the more correct
    behaviour.
2010-09-01 20:58:39 -04:00
Matthias Clasen
3e4e2b233b Fix trivial doc typo
Pointed out in bug 627912.
2010-08-25 18:17:43 -04:00
Javier Jardón
c05f344c0a Use gtk_window_has_group() to know if the window has an explicit window group.
gtk_window_get_group() never returns NULL; if the window isn't in a group,
a default window group is returned instead. Use gtk_window_has_group() instead.
This fixes some previous commits to use accessors to access GtkWindow.

Reported by Philip Withnall in bug
https://bugzilla.gnome.org/show_bug.cgi?id=627828
2010-08-24 16:16:42 +02:00
Javier Jardón
f05acd707d gtk/gtktreeview.c: Use accessor functions to access GtkWindow 2010-08-23 20:19:38 +02:00
Matthias Clasen
fb48e023d2 Fix a sporadic segfault in treeview keynav
If a a treeview has frequent periodic additions and removals of
rows, it is possible that a page down keypress moves the cursor
out of the height of the treeview. In some of these cases, we
can be tricked into dereferencing a  NULL pointer.

Bug 612919.
2010-08-10 00:31:46 -04:00
Javier Jardón
237ed3bbf8 Remove some unused variables 2010-08-03 12:44:52 +02:00
Benjamin Otte
5cd6d309ea treeview: Draw the dnd pixmaps with Cairo 2010-07-26 16:42:47 +02:00
Benjamin Otte
da426ec97c treeview: Draw lines with Cairo 2010-07-26 16:42:47 +02:00
Benjamin Otte
8dd3317502 treeview: Unify all line drawing into the same function
This is useful because the dashing stuff needs to be done and it seems
like a good idea to unify it.
2010-07-26 16:42:47 +02:00
Benjamin Otte
526aac1fda treeview: Draw column reordering arrows with Cairo 2010-07-26 16:42:47 +02:00
Szilárd Pfeiffer
ac34031b4e Moved the drawing of horizontal grid lines after cell drawing.
Without the change if the cell background is set the horizontal
grid line cannot be seen.
2010-07-25 14:50:12 +02:00
Javier Jardón
3a10216dd0 Use accessor functions to acces GtkContainer 2010-07-13 19:40:46 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Philip Withnall
0b51abbfdf Add (out) annotations to GtkTreeIter parameters 2010-07-07 18:20:37 +02:00
Benjamin Otte
300e6b84cd s/GdkRegion/cairo_region_t/ in all of gtk
https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-06-29 16:06:38 +02:00
Benjamin Otte
3e96cfe8fc Deprecate the GdkRegion API
Includes fixing all callers to use the cairo region API instead. This is
usually just replacing the function names, the only difference is
gdk_region_get_rectangles() being replaced by
cairo_region_num_rectangles() and cairo_region_get_rectangle() which
required a bit more work.

https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-06-29 16:06:38 +02:00
Colin Walters
905f988166 Revert "Add length to gtk_tree_path_get_indices"
This reverts commit eebb16eb1a.

Was an accidental commit.
2010-06-28 14:15:10 -04:00
Colin Walters
eebb16eb1a Add length to gtk_tree_path_get_indices
The old version wasn't introspectable as it didn't have a length
return parameter.  Also, delete gtk_tree_path_get_indices_with_depth,
since it's no longer needed.
2010-06-28 13:50:36 -04:00
Tristan Van Berkom
17516dc83c Exposed GtkTreeView's internal GtkTreeSelection for builder files 2010-06-25 12:15:49 -04:00
John (J5) Palmieri
256759a3b7 gtk_tree_view_get_model: return value annotated transfer none 2010-05-27 16:58:52 -04:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
John (J5) Palmieri
57754edef6 add a transfer none annotation to gtk_tree_view_get_selection
* it returns the selection from its priv structure without reffing
2010-05-25 11:49:10 -04:00
Javier Jardón
b18b33ae82 Revert "Forward-port a GtkAdjustment compatibility fix"
In the early 2.14.x releases, GtkAdjustment was changed to enforce
that values are restricted to the range [lower, upper - page_size].
This has always been the documented behaviour, and the recommended
practice is to set page_size to 0 when using adjustments for simple
scalar values, like in a slider or spin button.
Due to the large number of applications that are affected by this
change, the behaviour has been reverted to the old behaviour in
2.14.3, with an explicit warning that this change will be
reintroduced in 2.90.

This reverts commit e6373738fc.

https://bugzilla.gnome.org/show_bug.cgi?id=619474
2010-05-24 15:39:30 +02:00
Kristian Rietveld
f3fa17a16a Bug 565559 - Incorrect leave-notify signals for treeview
Set enter and leave notify mask on header window.

Extract from a patch by Hans van Hintum.
2010-05-12 12:15:48 +02:00
Alan Knowles
ee357cf885 Fix various gir annotations on tree API
Just add (out) tags where needed to generate valid gir.
2010-05-11 13:40:15 +08:00
Christian Dywan
11e97600f0 Remove deprecated GtkTreeView functions 2010-05-03 01:39:50 +02:00
Emmanuele Bassi
621b415e5b tree-view: Use gtk_widget_send_focus_change()
Remove the second (and last) internal user of the GTK_HAS_FOCUS flag.

https://bugzilla.gnome.org/show_bug.cgi?id=593671
2010-04-26 18:59:24 +01:00
Javier Jardón
32b9aeaadd Don't use GTK_WIDGET_STATE in internal code anymore
Use gtk_widget_get/set_state() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-09 02:40:17 +01:00
Javier Jardón
74ed719fa4 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_MAPPED)
Use new API instead: gtk_widget_set_mapped ()

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-06 12:02:21 +01:00
Javier Jardón
1934de4b65 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_REALIZED)
Use new API instead: gtk_widget_set_realized ()

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-06 11:51:33 +01:00
Javier Jardón
16a59ad912 Deprecate widget flag: GTK_WIDGET_REALIZED
Use gtk_widget_get_realized() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:41:05 +01:00
Javier Jardón
1fe7d3cefd Deprecate widget flag: GTK_WIDGET_MAPPED
Use gtk_widget_get_mapped() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:19:03 +01:00
Javier Jardón
214a023e91 Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 07:52:07 +01:00
Javier Jardón
4232115e22 Deprecate widget flag: GTK_WIDGET_HAS_FOCUS
Use gtk_widget_has_focus() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 06:11:01 +01:00
Javier Jardón
a27d5a2c9e Deprecate widget flag: GTK_WIDGET_IS_SENSITIVE
Use gtk_widget_is_sensitive() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 05:32:51 +01:00
Matthias Clasen
1e381138f3 Correct annotations for gtk_tree_view_get_path_at_pos
Patch by Alan Knowles, bug 609514.
2010-02-23 12:51:45 -05:00
Johan Dahlin
fe85272112 [annotations] Add allow-none
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API

https://bugzilla.gnome.org/show_bug.cgi?id=610474
2010-02-19 17:57:51 -02:00
Michael Natterer
07dc2f6c35 gtk: fix crash in _gtk_rbtree_find_offset() called from update_prelight()
Move the check for tree_view->priv->tree being NULL into update_prelight()
so the function will never call _gtk_rbtree_find_offset() on a NULL rbtree.
2010-02-06 15:57:15 +01:00
Claudio Saavedra
52acceef56 GtkTreeView: plug a leaking GtkTreeRowReference
This is exposed by overshooting in a HildonPannableArea. Leaking
a GtkTreeRowReference also means leaking the whole model, since
the GtkTreeModel reference count is increased for each row
reference.

Fixes bug #607770 - Leak in GtkTreeView with HildonPannableArea
2010-01-22 16:53:33 +02:00
Kristian Rietveld
2f73fb76c1 Bug 607322 - Double-click doesn't work if the item is selected in...
Slight correction to fix for #596473.
2010-01-18 22:22:30 +01:00
Javier Jardón
56a893ca8c Deprecate widget flag: GTK_WIDGET_CAN_FOCUS
https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-01-07 10:05:08 +01:00
Christian Dywan
bb1824c131 Deprecate flag macros for toplevel, state, no window and composite child
Deprecate widget flag macros GTK_WIDGET_STATE, GTK_WIDGET_SAVED_STATE,
GTK_WIDGET_FLAGS, GTK_WIDGET_TOPLEVEL, GTK_WIDGET_NO_WINDOW and
GTK_WIDGET_COMPOSITE_CHILD.

Also deprecate the type macros GTK_WIDGET_TYPE, GTK_OBJECT_TYPE_NAME and
GTK_OBJECT_TYPE which have become redundant.

Instances of GTK_WIDGET_TOPLEVEL are replaced with gtk_widget_is_toplevel,
GTK_WIDGET_TYPE is replaced with G_OBJECT_TYPE, GTK_WIDGET_COMPOSITE_CHILD
is replaced with use of the "composite-child" property and uses of
GTK_WIDGET_NO_WINDOW are adjusted to use gtk_widget_get_has_window.

Uses of GTK_WIDGET_SAVED_STATE and GTK_WIDGET_FLAGS inside GtkWidget are
changed to direct flag usage.

Documentation is updated to refer to gtk_widget_set_has_window and
gtk_widget_get_has_window.

Gail and tests are updated as well.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-01-04 07:57:05 +01:00
Kristian Rietveld
436855210e Unset expander_column when expander column is removed from tree view 2009-12-28 21:34:17 +01:00