Commit Graph

125 Commits

Author SHA1 Message Date
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Will Thompson
507bf6e5cf docs: correct various spelling and grammar errors
I noticed a few cases of "wether", and while fixing them noticed a few
"its" which should be "it's". It all went downhill from there.
2013-03-04 22:48:22 +00:00
Matthias Clasen
050cba6a31 Fix malformed doc comments
Most of these are forgotten :'s and similar details
which gtk-doc now warns about.
2012-04-12 21:12:16 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Javier Jardón
49d232d3a0 gtkcellview: Do not use deprecated GdkColor api 2012-01-03 18:00:57 +01:00
Javier Jardón
a3abc18858 Deprecate all the public API that is using GdkColor struct 2011-12-22 02:59:39 +00:00
Javier Jardón
f84c124e53 gtk/gtkcellview.c: Use new GdkRGBA api instead GdkColor one 2011-12-20 18:32:15 +00:00
Rui Matos
ee669a1b51 cellview: Stop checking for sensitivity on draw
This is needless since GtkCellRenderer does it consistently before rendering.
2011-12-19 19:21:15 +00:00
Javier Jardón
0853ce3077 Use G_VALUE_INIT
Instead of an explicit { 0, } when declaring the variable.
2011-10-15 16:45:16 +01:00
Matthias Clasen
a4e52ece33 GtkCellViewPrivate: Improve struct packing 2011-04-12 12:32:04 -04:00
Tristan Van Berkom
887142f1f5 Added GTK_SIZE_REQUEST_CONSTANT_SIZE to GtkSizeRequestMode
The constant size request mode defines a request mode where
height-for-width geometry is unneeded, thus optimizing GTK+
by reducing the overall amount of requests that need to be
performed and cached while resizing an interface.
2011-03-25 18:42:07 +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
Murray Cumming
f91c04e284 Minor documentation improvements
Mostly correcting it's to its and changing some , to .
2011-02-23 10:26:21 +01: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
Matthias Clasen
4a0aa41742 Add gtkorientableprivate.h header 2011-01-30 03:12:49 -05:00
Tristan Van Berkom
2944af00d0 Removed a useless redundant line of code in gtkcellview.c 2011-01-27 16:04:46 +09:00
Matthias Clasen
cfe909848d Avoid a warning if GtkCellView has no model 2011-01-20 22:35:09 -05:00
Pavel Holejsovsky
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
Carlos Garnacho
e2e7075533 Redo patch in efae64b (Set vertical/horizontal class...)
Add a _gtk_orientable_set_style_classes() function so all
orientation changes to style happen in a single place.
2011-01-12 22:58:41 +01:00
Carlos Garnacho
efae64be66 Set vertical/horizontal class on all widgets overriding GtkOrientable::orientation
This is so g_object_set() on that property leaves widgets' style in
a meaningful state. Fully fixes bug 639157.
2011-01-12 22:28:43 +01:00
Tristan Van Berkom
7b2d6e5cdf Make GtkTreeMenu a private class:
- Removed GtkTreeMenu from gtk-docs.sgml
  - Removed GtkTreeMenu from gtk3-sections.txt
  - Removed GtkTreeMenu from gtk.symbols
  - Make GtkTreeMenu apis prefixed with '_' (including _get_type()).
  - Updated GtkComboBox sources to use the private apis
  - Updated GtkCellView to not mention #GtkTreeMenu in gtk-doc statements
  - Updated tests/testtreemenu to not use a GtkTreeMenu but still
    show a very fancy GtkComboBox
  - Moved gtktreemenu.h to private headers section in the makefile.
  - Removed include of gtktreemenu.h from gtk.h
2011-01-04 23:37:13 +09:00
Tristan Van Berkom
0c9c031962 Fixing GtkCellView to not strcmp() in buildable_custom_tag_end()
GtkCellLayout function now returns boolean if one of the tags
it was interested in was handled.
2011-01-04 23:37:11 +09:00
Tristan Van Berkom
85609d124a Added clarification to the GtkCellView:cell-area-context documentation. 2011-01-04 23:37:11 +09:00
Tristan Van Berkom
1f1e94739b Added remaining missing gtk-doc statements for GtkCellView. 2011-01-04 23:37:11 +09:00
Tristan Van Berkom
c8b63bfe03 Removed calls to gtk_cell_area_context_sum_*() since they went away. 2011-01-04 23:37:10 +09:00
Tristan Van Berkom
15ac4be60f Fixed combo-refactor branch for recent switch to gtk_cell_area_context_reset() api. 2011-01-04 23:37:10 +09:00
Tristan Van Berkom
bd1b4ddf75 Updated GtkCellView for new gtk_cell_area_context_allocate() api. 2011-01-04 23:37:09 +09:00
Tristan Van Berkom
2e2eb786d3 Make GtkCellView orientable and only allocate the cell area in the orientable orientation (unless its a "fit-model" cellview which gets both). 2011-01-04 23:37:09 +09:00
Tristan Van Berkom
6ab29f5fd8 Removing apis from GtkCellView
APIS: gtk_cell_view_get_desired_width_of_row &
gtk_cell_view_get_desired_height_for_width_of_row were introduced in
3.0 only for use from GtkComboBox and now the refactored cellview
does this transparently and just requests the right thing through
GtkWidget apis.
2011-01-04 23:37:09 +09:00
Tristan Van Berkom
39cf1576d7 Fixed GtkCellView to always allocate when in fit-model mode. 2011-01-04 23:37:08 +09:00
Tristan Van Berkom
83c69f4cf3 Implementing GtkComboBox using GtkTreeMenu !
First iteration at implementing combo box using a delegate
treemenu, almost everything is working. Still need to finalize
sensitivity issues in GtkTreeMenu (and should go ahead and pass
through GtkComboBox code with a fine comb...).
2011-01-04 23:37:08 +09:00
Tristan Van Berkom
e1ecd34ce1 Added "fit-model" and "draw-sensitive" properties to GtkCellView
- "fit-model" decides that the cellview should request space for
   the entire treemodel, this ensures the cell view displayed on
   a combo box will not spuriously change size when the selected
   item changes.

 - "draw-sensitive" forces cell area to render cells sensitive
   even if they are insensitive in the model.
2011-01-04 23:37:08 +09:00
Tristan Van Berkom
e628345394 Fixed GtkCellView to call cell_view_set_model() and disconnect signals at dispose time. 2011-01-04 23:37:07 +09:00
Tristan Van Berkom
b6b810ba51 Reduced code in GtkCellView by just implementing the GtkCellLayout->get_area method. 2011-01-04 23:37:06 +09:00
Tristan Van Berkom
88ec6a62ef GtkCellView now watches the "row-changed" signal.
When the "row-changed" signal on the model is trapped, if the row which
changed is the displayed row then the context is flushed and sizes are
recalculated for every area in the same context.
2011-01-04 23:37:06 +09:00
Tristan Van Berkom
6d8dfd5546 Fixed GtkCellView to not clear the layout when disposing
The layout belongs the underlying area which may be shared across
views and treemenus, let the cells be destroyed when the area is finally
destroyed.
2011-01-04 23:37:06 +09:00
Tristan Van Berkom
5e8e4429c7 Fixing GtkCellView PROP_CELL_AREA_CONTEXT property id
... and renaming some internal variables.
2011-01-04 23:37:06 +09:00
Tristan Van Berkom
988200800c Added gtk_cell_view_new_with_context(). 2011-01-04 23:37:06 +09:00
Tristan Van Berkom
b70589b6a4 Reimplemented GtkCellView using an internal GtkCellArea.
Added construct GtkCellArea and GtkCellAreaContext properties,
the context property allows putting multiple cellviews into the
same size request context.
2011-01-04 23:37:05 +09:00
Carlos Garnacho
99791d183c Make GtkCellView use GtkStateFlags 2011-01-04 03:06:18 +01:00
Garrett Regier
c65a617bd7 docs: Move documentation to inline comments: GtkCellView
Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-11-08 11:31:02 +09:00
Carlos Garnacho
684c9415ee GtkCellView: Add gtk_cell_view_set_background_rgba()
A ::background-rgba property was also added, this API is meant
to replace the gtk_cell_view_set_background_color() call.
2010-10-22 20:14:56 +02:00
Benjamin Otte
e66129015d cellrenderer: Merge GtkCellSizeRequest into GtkCellRenderer
This mostly goes to keep consistency with the changes to GtkSizeRequest
in the last patch, as GtkCellSizeRequest requires GtkCellRenderer and
GtkCellRenderer implements GtkCellSizeRequest there's no use in keeping
them separate.

This patch renames the functions:
gtk_cell_size_request_get_request_mode()
  => gtk_cell_renderer_get_request_mode()
gtk_cell_size_request_get_width()
  => gtk_cell_renderer_get_preferred_width()
gtk_cell_size_request_get_height()
  => gtk_cell_renderer_get_preferred_height()
gtk_cell_size_request_get_size()
  => gtk_cell_renderer_get_preferred_size()
gtk_cell_size_request_get_width_for_height()
  => gtk_cell_renderer_get_preferred_width_for_height()
gtk_cell_size_request_get_height_for_width()
  => gtk_cell_renderer_get_preferred_height_for_width()
... and moves the corresponding vfuncs to GtkCellRenderer.

The patch also renames the implementations of these functions in cell
renderers to include the word "preferrred".
2010-09-26 15:11:45 +02:00
Benjamin Otte
d9c9259861 Move GtkSizeRequest into GtkWidget
It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.

Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.

So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
  gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
  gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.

The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
2010-09-26 15:11:45 +02:00
Benjamin Otte
1142c8bf18 API: gtk_cell_renderer_render_cairo() => gtk_cell_renderer_render() 2010-09-26 15:11:43 +02:00
Benjamin Otte
ed996bcd68 cellview: Port to draw vfunc 2010-09-26 15:11:35 +02:00
Benjamin Otte
e9dd3dc46a cellview: Port to Cairo rendering 2010-09-26 15:03:01 +02:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Javier Jardón
e9915fc8d6 gtk/gtkcellview.c: use accessor functions to access GtkWidget 2010-08-22 22:56:14 +02:00
Tristan Van Berkom
9c26bd525f Added height-for-width management for GtkComboBox/GtkCellView
now GtkComboBox (and GtkCellView) request and allocate children/cells
in a height-for-width manner.
2010-08-18 20:01:28 -04:00