Commit Graph

25021 Commits

Author SHA1 Message Date
Matthias Clasen
5f75ffc974 Add gtk_widget_path_get_type to the headers
Bug 636591
2010-12-06 09:50:01 -05:00
Kristian Rietveld
fd6e57687d Port Quartz backend to latest rendering-cleanup changes 2010-12-06 14:15:47 +01:00
Matthias Clasen
3b753aa05e Fix Makefile syntax 2010-12-06 07:26:00 -05:00
Tristan Van Berkom
55bbe4a3a5 Adding gtk_tree_view_column_new_with_area().
Creates a treeviewcolumn using a specific GtkCellArea.
This patch also makes GtkEntryCompletion use the new api
instead of g_object_new().
2010-12-06 19:04:51 +09:00
Tristan Van Berkom
f08f1f92aa Fixed some nit-picking bugs in GtkCellArea
- Dont try fetching a cell renderer for an event when the event
    coordinate is outside the cell area allocation (can happen
    on the y axis, not all events are button events).
  - Dont remove focus-line-width (inner area) an extra time from
    GtkCellArea->event
  - Dont remove focus-line-width from the cell area at all for the
    editable widget... use the whole area including the focus line
    (compared with git master behaviour and now it looks right, check
    the multiline editable string in testtreeedit).
2010-12-06 17:27:03 +09:00
Tristan Van Berkom
0d0ec85877 Fixed GtkTreeViewColumn to reset the context when _gtk_tree_view_column_cell_set_dirty is called.
This fixes autosize columns... result can be viewable by checking
tests/testtreeview and setting the second column to autosize and then
expanding/colapsing some rows.
2010-12-06 17:03:53 +09:00
Tristan Van Berkom
bf1aa2ad87 Changed GtkTreeViewColumn->requested_width to ->padding
Now we bookkeep the treeview assigned padding asides from the
requested width stored in the GtkCellAreaContext, this removes
the need for bookkeeping the deepest expanded depth in gtktreeview.c

At allocation time, just remove the padding from the allocated width
of the column and feed the rest to the underlying cell area.
2010-12-06 16:31:07 +09:00
Tristan Van Berkom
a090d62339 Added expand controls to testtreeedit (now you can play with align & expand effects in cells there). 2010-12-06 16:30:18 +09:00
Tristan Van Berkom
9366a345b4 Fix GtkCellAreaBox allocate_cells_manually to handle undersized areas. 2010-12-06 16:29:40 +09:00
Tristan Van Berkom
c6572265cb Fixed gtk-doc statement in GtkCellArea header 2010-12-06 16:29:13 +09:00
Matthias Clasen
f1fafca6ca Make invalid stylesheets fail to parse again
The recent improvements to error reporting caused gtk_css_provider_load...
to always return TRUE and leave the error unset. Error messages were instead
dumped out with g_message, which is not helpful.

This commit changes things back to the way they were before:
If a GError is passed in, parsing will fail at the first error, reporting
it in the given GError. If no GError is passed in, we keep going and
just issue the warning messages. This fixes the parser tests.
2010-12-06 00:47:13 -05:00
Matthias Clasen
94c9eb72ce Don't use g_warning when loading an engine fails
This causes the tests to abort if clearlooks can't be found.
2010-12-06 00:44:01 -05:00
Tristan Van Berkom
2588165bfb Added gtk_cell_area_foreach_alloc() to further simplify GtkCellArea subclasses
gtk_cell_area_foreach_alloc() itterates over an allocated list of cells
and calls a callback with the cell's allocation until the callback returns
TRUE.
  - Removed vfunc get_cell_allocation() and implemented
    gtk_cell_area_get_cell_allocation() using foreach_alloc()
  - Added gtk_cell_area_get_cell_at_position() using foreach_alloc()
  - Removed GtkCellAreaBox ->event() implementation and implemented
    mouse "click" cell activation in GtkCellArea class directly using
    gtk_cell_area_get_cell_at_position().
2010-12-06 14:11:28 +09:00
Tristan Van Berkom
4b065f5389 Changed gtk_cell_area_forall to gtk_cell_area_foreach since thats more widely used semantics.
Also gave a boolean return value to the callback to allow breaking out of the loop.
2010-12-06 12:41:38 +09:00
Benjamin Otte
d378470e87 appchooser: Remove bogus function declaration 2010-12-06 01:30:19 +01:00
Benjamin Otte
6d6ee9a26a style: Remove unused code 2010-12-06 01:02:52 +01:00
Benjamin Otte
e4c9d1a321 gdk: Constify argument to gdk_rgba_copy() 2010-12-06 01:02:52 +01:00
Benjamin Otte
d55073fde6 gdk: Remove depth argument from GdkWindowImpl->get_geometry() 2010-12-06 01:02:52 +01: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
Benjamin Otte
84fd9b166c gdk: Remove nonexisting function from internal header 2010-12-06 01:02:19 +01:00
Paolo Borelli
b36cb87df9 Use the new style context API in GtkButton
Mostly replaces gtk_widget_style_get with gtk_style_context_get_style
2010-12-05 23:12:32 +01:00
Paolo Borelli
4a7e746bbc Use the new style context API in GtkLabel. 2010-12-05 22:07:30 +01:00
Paolo Borelli
561346bd40 Remove unused function modify_color_property 2010-12-05 22:07:30 +01:00
Carlos Garnacho
4cca7554b8 GtkStyleContext: warn on meaningless coords in gtk_render_* calls 2010-12-05 20:19:55 +01:00
Carlos Garnacho
5361490db8 Bug 636511 - New style override functions do not work on textview
Emit ::style-set on overrider style changes, this is necessary
in the mean time so widgets not listening yet to ::style-updated
get the style changes.
2010-12-05 20:19:55 +01:00
Jorge González
059aa89cbd Updated Spanish translation 2010-12-05 18:33:31 +01:00
Kristian Rietveld
d28cbd6e6d Bring back _gtk_tree_view_column_get_cell_at_pos
The function has been re-implemented around GtkCellArea.  This commits
also brings back the invocation of this function in
gtk_tree_view_button_press().  I shouldn't have removed this.
2010-12-05 18:18:36 +01:00
Matthias Clasen
d5df33c75f Fix abi check after recent merges 2010-12-05 12:18:30 -05:00
Kristian Rietveld
2a6550176c Replace FIRST_PIXEL macros with something that's more clear 2010-12-05 18:04:07 +01:00
Kristian Rietveld
7fe950a745 Clean up and clarify row height calculations 2010-12-05 17:56:30 +01:00
Kristian Rietveld
924359c31d Clean up _gtk_tree_view_column_cell_event 2010-12-05 17:12:37 +01:00
Kristian Rietveld
6c73647727 Remove the need for _gtk_tree_view_column_get_focus_area 2010-12-05 17:10:21 +01:00
Kristian Rietveld
64ddd3f40f Clarify start_pos parameter gtk_tree_view_column_cell_get_position
By renaming it to x_offset.
2010-12-05 17:04:52 +01:00
Kristian Rietveld
77d972e436 Remove private accessor for focus column 2010-12-05 15:20:17 +01:00
Kristian Rietveld
0a1982aff3 Move _gtk_tree_view_column_cell_focus to gtktreeview.c 2010-12-05 15:18:13 +01:00
Kristian Rietveld
131783005e Use structure bitfield instead of GtkTreeViewFlags 2010-12-05 15:12:53 +01:00
Fran Diéguez
4701aeb3bc Updated Galician translations 2010-12-05 14:57:08 +01:00
Kristian Rietveld
73f99eda1d Turn TREE_VIEW_DRAW_EXPANDERS into an inline function 2010-12-05 14:47:51 +01:00
Kristian Rietveld
ebba08a842 Remove unused TREE_VIEW_COLUMN_REQUESTED_WIDTH macro 2010-12-05 14:42:40 +01:00
Kristian Rietveld
43de55d7a9 Turn TREE_VIEW_HEADER_HEIGHT into an inline function 2010-12-05 14:42:08 +01:00
Tristan Van Berkom
364fe807f4 Added g_getenv("RTL") to test rtl layouting. 2010-12-05 22:15:31 +09:00
Tristan Van Berkom
3ca2ec5d2d Fixed conflicts from rebasing GtkTreeViewColumn changes from treeview-refactor. 2010-12-05 22:15:19 +09:00
Tristan Van Berkom
847581b67c Adding testverticalcells.c.
This test displays a GtkTreeViewColumn rendering a vertically
oriented GtkCellArea along side a horizontally oriented column
in the same treeview.
2010-12-05 22:15:03 +09:00
Tristan Van Berkom
78979b2954 Removing hack and fixing gtk_tree_view_column_cell_get_size().
Now consult gtk_cell_area_context_get_preferred_height().

It can be that height-for-widths requested here were too large
when multiple cells are in play because of the alignments stored
in the context... removing the temporary focus-line-width hack.
2010-12-05 22:14:52 +09:00
Tristan Van Berkom
1b28d87253 Added GtkTreeViewColumn:cell-area construct-only property.
Allow feeding treeviewcolumn a custom cell-area (or not a custom one,
but allow sharing the cell-area with say, the combo-box area).

This patch also:

 - Fixes signal connections to the area (now they do eventually get
   disconnected at dispose time, they are handled regardless if a
   treeview is set but execute safely, at least there is only one
   connection/disconnection).

 - Fixes refcounting on the cell_area (GtkCellArea is GInitiallyUnowned).

 - Adds a constructor() in order to build the cell-area if one has
   not been provided by the caller before hand at g_object_new()
   construct time.
2010-12-05 22:14:40 +09:00
Tristan Van Berkom
0baee408f2 Fixed GtkTreeViewColumn allocation to only subtract the depth padding/indentation from the expander column. 2010-12-05 22:14:27 +09:00
Tristan Van Berkom
779125976c Changed GtkTreeView to bookkeep the deepest expanded depth instead of recalculating it at column allocation time. 2010-12-05 22:14:11 +09:00
Tristan Van Berkom
b54c004c6b Allocate proper inner cell area to the GtkTreeViewColumn.
This is a premature patch, it traverses the tree's expanded
rows and fetches the deepest depth every time we allocate a
column. The deepest depth should rather be cached and pushed
when a row expands, then recalculated when the deepest expanded
row collapses.
2010-12-05 22:13:58 +09:00
Tristan Van Berkom
81e1d02de3 Created _gtk_tree_view_column_request_width().
Removed gtk_tree_view_get_real_requested_width_from_column() from
gtktreeview.c in favor of this function in the treeviewcolumn domain
(since this function goes and checks treeviewcolumn internals, settings
and derives the real requested width, seems logical this should be done
by the treeviewcolumn instead).
2010-12-05 22:12:16 +09:00
Tristan Van Berkom
7b36405a94 Use gtk_tree_view_get_real_requested_width_from_column() all around
GtkTreeView duplicated the contents of this function word-for-word
inside gtk_tree_view_update_size().
2010-12-05 22:12:04 +09:00