Commit Graph

273 Commits

Author SHA1 Message Date
Matthias Clasen
3e05518881 Drop unneeded includes
We no longer use the private GtkAccessible api here.
2011-07-14 19:40:50 -04:00
Cosimo Cecchi
1fdfb18c37 iconview: make it possible for selected cells to render a border
Call gtk_render_frame() after gtk_render_background() there.

https://bugzilla.gnome.org/show_bug.cgi?id=654179
2011-07-08 11:36:04 -04:00
Matthias Clasen
521807f33d Drop the factory from the icon view accessible 2011-07-05 16:10:26 -04:00
Matthias Clasen
89e57c6978 Convert GailContainer to GtkContainerAccessible 2011-07-05 16:08:57 -04:00
Matthias Clasen
6c9f20e58d GtkIconViewPrivate: Improve struct packing 2011-04-12 12:33:24 -04:00
Tristan Van Berkom
f85e80aada More patchwork for icon view subclasses that access the icon view api prematurely.
In this patch we adress rows_reordered() and row_deleted() callbacks
(since some icon view subclasses manipulate the connected treemodel
from _init()).
2011-02-25 16:00:20 +09:00
Tristan Van Berkom
2408b1c59e More patchwork to ensure GtkIconView subclasses can use the icon view api
from the subclass's instance structure initializer
2011-02-25 15:07:55 +09:00
Tristan Van Berkom
4164a49b84 Added documentation to "cell-area" construct-only properties.
Indicate what kind of area will be used by default if none is
provided by the user.
2011-02-24 16:05:41 +09:00
Tristan Van Berkom
4d76644f5c Add more defensive code to avoid accessing GtkIconView's cell area before it exists.
Adding these cases here to cater to icon view subclasses that want to
access icon view APIs from the instance structure initializer instead
of properly waiting for the super class to initialize and adding renderers
from the ->constructor() vfunc.
2011-02-23 20:50:50 +09:00
Matthias Clasen
c9b152ec71 Remove a leaking get_name implementation
This was leaking a lot of memory; just rely on atk_object_get_name.
2011-02-17 15:57:39 -05:00
Matthias Clasen
e757d1b2d2 Use _gtk_accessible_set_factory_type for GtkIconView 2011-02-17 01:30:33 -05:00
Matthias Clasen
beb8c290d1 Always chain up in ::style-updated
This was not handled consistently, but the default handler
does useful things, so we should always chain up.
2011-02-07 07:30:37 -05:00
Matthias Clasen
726b0d8736 Bandaid fix for icon view subclassing
I've decided that it is isn't feasible to make cell areas runtime-settable
in the time we have left before 3.0, therefore, I'm going with the
approach to allow init() functions to instantiate the default cell area
and issue a warning if a construct property is ignored.

This is not ideal, but it keeps existing icon view and combo box
subclasses working.

https://bugzilla.gnome.org/show_bug.cgi?id=639139
2011-01-31 17:39:42 -05:00
Carlos Garnacho
3efc1b0b4f Make GtkIconView use GtkStyleContext 2011-01-27 20:57:11 +01:00
Carlos Garnacho
41d6837fa2 Make GtkCellArea use GtkStyleContext
gtk_cell_area_[gs]et_style_detail() is no longer needed, as
the passed widget's context would already have all necessary
info.
2011-01-27 19:32:07 +01:00
Matthias Clasen
d9fcc4c630 Silence new gcc warnings
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 21:51:38 -05:00
Pavel Holejsovsky
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
Pavel Holejsovsky
3c8fc21e9b [GI] Fixes of existing incorrect annotations 2011-01-20 13:56:06 +01:00
Pavel Holejsovsky
a1c297a310 [GI] Cosmetic cleanups of annotations and doc comments
This change does not introduce any functionality change, mostly
cosmtic cleanups, like re-linebreak when introduced annotations messed
up indentation or whitespace errors fixes.
2011-01-18 17:31:59 +01:00
Martin Pitt
b208b9c0e9 Fix GtkIconView GI annotations
Add the missing (out) annotations, and a missing allow-none.
2011-01-18 12:32:52 +01:00
Martin Pitt
234b3b2c6f Annotate GtkIconView array arguments 2011-01-17 16:01:40 +01:00
Tristan Van Berkom
4d8c7c5782 Ensure that GtkIconView items get redrawn when the focus cell changes.
Seems the redraw was not happenning from keynav when set_focus_cell()
was called because keynav already updates the focus-cell. Now we
just unconditionally redraw the focus item when set_focus_cell() is
called.
2011-01-06 13:51:49 +09:00
Tristan Van Berkom
bab0f5a5c1 Fixed GtkIconView keynav
Icon View was not initially setting focus on a cell when
focus initially comes into the view. Focusing into whatever
is the first cell in the cursor item when set_cursor_item
is called with a NULL cell fixes this.
2011-01-06 13:51:49 +09:00
Tristan Van Berkom
b7c25c41d6 Fixed gtkiconview dispose cycle to not fire warnings. 2011-01-06 13:51:49 +09:00
Tristan Van Berkom
56580d1b8b Restored the old GtkIconView guess for wrap-width/width size of text cell
GtkIconView sets the minimum width of the text cell to be at least 50
pixels and otherwise twice the width of the first pixbuf cell found
in the icon list.
2011-01-06 13:51:49 +09:00
Tristan Van Berkom
60e5fcf4db Made GtkIconView reset the context and invalidate all sizes when a row changes.
GtkIconView should have a "grow-only" mode to handle optimization to
only allow icons to grow in width when rows change, however since
GtkIconView still does not handle large numbers of rows for now we'll
just relayout the whole thing whenever a series of rows change.

Also fixed up to watch the context incase of implicit resets.
2011-01-06 13:51:49 +09:00
Tristan Van Berkom
6036c51d52 Removed gtk_icon_view_get_item_area()
Now use a GdkRectangle at the begining of the GtkIconViewItem
structure and just re-cast the struct to get the item area.
2011-01-06 13:51:49 +09:00
Tristan Van Berkom
d0f13ae52c Fixed GtkIconView buildable custom tag end to let cell layout properly
handle <cell-packing>
2011-01-06 13:51:48 +09:00
Tristan Van Berkom
01a35e4483 Added gtk_icon_view_new_with_area() 2011-01-06 13:51:48 +09:00
Tristan Van Berkom
a160358830 GtkIconView now uses a per-row GtkCellAreaContext to store the alignments
of each row.

GtkIconView now properly calculates the height of each row separately
using a separate GtkCellAreaContext stored in an array which it can
always easily index with the item->row index for all purposes.
2011-01-06 13:51:48 +09:00
Tristan Van Berkom
2d5eadb7f9 Alignments with variable row heights almost works perfectly.
However, I'm going to have to figure a way to store the alignments
for rows separately, this may involve using a separate GtkCellAreaContext
for each row, unfortunately.
2011-01-06 13:51:48 +09:00
Tristan Van Berkom
e51592c0b3 Experimenting with allocating the context a different height for each row. 2011-01-06 13:51:48 +09:00
Tristan Van Berkom
c77abe1f83 Committing working version of GtkIconView using GtkCellArea.
Some things still not sorted out, GtkCellAreaContext is not allocated
so icons dont recieve alignments yet, focus navigation is not exactly
what it used to be (maybe we can work around that by observing the
item orientation and explicitly setting focus to the same cell when
navigating in the wrong orientation).
2011-01-06 13:51:48 +09:00
Tristan Van Berkom
951ea857cc Initial messy commit of GtkIconView using GtkCellArea (nothing works yet). 2011-01-06 13:51:48 +09:00
Tristan Van Berkom
6d483ed930 Added GtkCellArea & GtkCellAreaContext to GtkIconView
First commit to icon-view-refactor, essentially only adds the
construct-only "cell-area" property and the context but doesnt
use it.
2011-01-06 13:51:48 +09:00
Benjamin Otte
a317499031 iconview: Update adjustment usage for sealing 2011-01-05 23:50:21 +01:00
Benjamin Otte
aa495f00b4 iconview: Use gtk_adjustment_configure() instead of g_object_set()
Simplifies code quite a bit apart from jsut making it more readable.
2011-01-05 23:50:21 +01:00
Benjamin Otte
3f1a65d6f5 iconview: Use set_[hv]adjustment_values() also when just changing upper
Simplifies the code quite a bit and the code is smart enough to not do
extra work if only one value changes.
2011-01-05 23:50:21 +01:00
Matthias Clasen
98440ad031 Remove gtktypeutils altogether
Based on patches by Javier Jardón.

https://bugzilla.gnome.org/show_bug.cgi?id=629955
2011-01-04 14:51:19 -05:00
Matthias Clasen
b5c6904c2f Drop explicit includes of gdkkeysyms.h
These are no longer needed. At the same time, port gtkimcontextsimpleseqs.h
to use the new GDK_KEY_ symbols.
2011-01-04 12:21:41 -05:00
Javier Jardón
fbbe9f5191 gtk/gtkiconview.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Matthias Clasen
83204928b9 Don't access GdkDragContext fields directly
Instead use the accessors.
2010-12-10 00:59:07 -05:00
Benjamin Otte
645d0ac403 API: gdk: Remove depth argument from gdk_window_get_geometry()
We don't want to expose depth anymore. If you need it, query the visual.
2010-12-06 01:02:52 +01:00
Bastien Nocera
66122b369e gtk: Centre the text under the icon in GtkIconView
No point in setting the alignment to centre if we don't center it
within the cell itself.
2010-12-02 15:04:32 +00:00
Matthias Clasen
289ad41bd1 Fix recursion in the GtkIconView accessible initialization
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=634474
2010-11-27 20:56:09 -05:00
Carlos Garcia Campos
3b90a21763 docs: Mention that tooltip_column text should be escaped in GtkIconView 2010-11-14 12:39:48 +01:00
Tristan Van Berkom
814cd2c3ff Removed size_request from GtkIconView. 2010-10-27 14:11:36 +09:00
Tristan Van Berkom
3fe0fb4ed9 Added GtkScrollablePolicy property to scrollable interface
This patch adds the GtkScrollablePolicy type property to GtkScrollable
and implements it in all subclasses. GtkScrolledWindow observes this
property to make a good guess about when to show/hide scrollbars for
height-for-width content.

Most scrollable children do not do height-for-width *yet* but
most certainly will (toolpalette, treeview, iconview, textview
widgets all TODO), for scrollable widgets that do have a minimum
and natural size, it's important for them to observe the state
of this property in order to properly drive the scroll adjustments
according to the desired GtkScrollablePolicy. This patch makes
GtkViewport do this.

Patch also adds tests/testscrolledwindow.c to display the effects
of this property.
2010-10-26 10:15:56 +09:00
Matthias Clasen
0d9ebb501d Move min-display-width/height to GtkScrolledWindow
It is just too annoying to have to implement these properties in
every scrollable. Instead, we now have ::min-content-height/width
in GtkScrolledWindow.

We also add GtkScrollablePolicy to determine how to size the
scrollable content.
2010-10-22 19:21:17 +02:00
Tadej Borovšak
55196a705f Add GtkScrollable interface
The GtkScrollable interface provides "hadjustment" and "vadjustment"
properties that are used by GtkScrolledWindow. It replaces
the ::set_scroll_adjustment signal. The scrollable interface
also has ::min-display-width/height properties that can be
used to control the minimally visible part inside a scrolled window.
2010-10-22 11:03:45 +02:00