Commit Graph

15569 Commits

Author SHA1 Message Date
Benjamin Otte
acb73f99bb API: cellrenderer: Add a private struct 2011-12-16 04:53:15 +01:00
Benjamin Otte
c28f641921 a11y: Add GtkRendererCellAcessible::renderer 2011-12-16 04:53:15 +01:00
Benjamin Otte
dfb82333a3 a11y: Remove unused variable 2011-12-16 04:53:15 +01:00
Benjamin Otte
ccabccc42f treeview: Send changed signal directly to a11y code
No more signal handler is needed, therefore the code can also get rid of
tracking the treemodel. And we use a faster approach for iterating the
changed cellrenderers: We just iterate all columns instead of over all
cell accessibles, as that number is likely quite a bit smaller.
2011-12-16 04:53:15 +01:00
Benjamin Otte
f5621a3a8e treeview: Emit cursor-changed signal when new model is set 2011-12-16 04:53:15 +01:00
Benjamin Otte
c9c7e91db9 a11y: Improve treeview's add/remove_selection() 2011-12-16 04:53:15 +01:00
Benjamin Otte
dc8f5effd4 a11y: Improve get_selected_rows() 2011-12-16 04:53:15 +01:00
Benjamin Otte
20b56689c5 a11y: Improve table_is_row_selected() 2011-12-16 04:53:15 +01:00
Benjamin Otte
3112679a5e treeview: Signal selection changes to the accessible
And another signal gone.
2011-12-16 04:53:15 +01:00
Benjamin Otte
1a3226e2f7 a11y: Emit children-changed properly for treeviews
Fixes the patch reverted in b7e74ef95f1d9cd851fb81a124beca0ca11dad00
properly.

https://bugzilla.gnome.org/show_bug.cgi?id=548782
2011-12-16 04:53:15 +01:00
Benjamin Otte
0005d820c7 treeview: Remove unnecessary accessible_expanded()
Instead, just call remove_state().
2011-12-16 04:53:15 +01:00
Benjamin Otte
c7b82c2cea treeview: Add add() function to accessible
... and use that to emit the insertion signals.
2011-12-16 04:53:14 +01:00
Benjamin Otte
82a9f6faa0 treeview: Set expandable flag from treeview
... instead of trying to update it manually.
2011-12-16 04:53:14 +01:00
Benjamin Otte
9e9533fc88 a11y: Redo cell accessible action handling
Multiple changes:
- actions are now available unconditionally, but only work in the right
  state. This mirrors other actions.
- instead of adding actions manually, they invoke the action on the
  GtkCellAccessibleParent interface.

Tests have been updated to reflect the changes
2011-12-16 04:53:14 +01:00
Benjamin Otte
f840efae96 a11y: Remove "toggle" action from cell renderers
This is identical to "edit" (even though that name is kinda confusing).
2011-12-16 04:53:14 +01:00
Benjamin Otte
adf183b71f treeview: Set EXPANDED state directly on a11y elements 2011-12-16 04:53:14 +01:00
Benjamin Otte
6fa72300be treeview: Deprecate gtk_tree_view_set_destroy_count_func()
The accessibility code doesn't need it anymore.
2011-12-16 04:53:14 +01:00
Benjamin Otte
ab9c2c2de2 a11y: Remove destroy_count_func usage
It's not needed anymore.
2011-12-16 04:53:14 +01:00
Benjamin Otte
8ca5192d6d a11y: Emit row-deleted signal when rows get deleted
Instead of in the old callbacks.
2011-12-16 04:53:14 +01:00
Benjamin Otte
25445837ca a11y: Revert 22a47c3dbd
The fix is wrong on multiple levels. I'll add a proper fix soon.

https://bugzilla.gnome.org/show_bug.cgi?id=548782
2011-12-16 04:53:14 +01:00
Benjamin Otte
95dc248790 treeview: Don't use signals in a11y row expansion
Instead, add a function and call it directly.
2011-12-16 04:53:14 +01:00
Benjamin Otte
d9b71702dc a11y: Add _gtk_tree_view_accessible_add_state()
... and _gtk_tree_view_accessible_remove_state(). They should be called
by gtktreeview.c to notify about changes of state for a row.
2011-12-16 04:53:13 +01:00
Benjamin Otte
3badf48d2e a11y: Split out function
I want to use that function when sending notifications. See next
commits.
2011-12-16 04:53:13 +01:00
Benjamin Otte
ff80ae16d9 a11y: Readd FOCUSABLE state
The state was lost in commit 08d86fabc4.

Also order the states that are always set alphabetically.
2011-12-16 04:53:13 +01:00
Benjamin Otte
0ef6771bcc a11y: Remove old notify about showing/visible
As cells are always visible and showing, there is no need to do complex
notification mechanisms anymore.
2011-12-16 04:53:13 +01:00
Benjamin Otte
7f42a9465a a11y: Add _gtk_cell_accessible_state_changed()
It's supposed to replace the old state_set calls.
2011-12-16 04:53:13 +01:00
Benjamin Otte
90f04b56a7 a11y: Split out renderer<->atk state matching
We now keep a state map. This makes adding new states easier, and
doesn't introduce bugs with state change emissions.
2011-12-16 04:53:13 +01:00
Benjamin Otte
acfb3b3d88 a11y: Don't duplicate information anymore
We do provide the expandable and expanded information via
GtkCellRendererState now so there is no need to use extra flags.
2011-12-16 04:53:13 +01:00
Benjamin Otte
bb029420fd a11y: Set new treeview flags 2011-12-16 04:53:13 +01:00
Benjamin Otte
175043bd8d treeview: Set the new flags when rendering the cell 2011-12-16 04:53:13 +01:00
Benjamin Otte
b6aa011c43 cellrenderer: Add EXPANDED and EXPANDABLE states
These make more sense as flags than they do as properties of the cell
renderer.
2011-12-16 04:53:13 +01:00
Benjamin Otte
953b4aedf1 tests: Add a test for latest commit 2011-12-16 04:53:05 +01:00
Benjamin Otte
94f00eb04d widget: Don't change sensitive state with insensitve parent
This way child.set_sensitive(True) with an insensitive parent doesn't
cause child to become sensitive.
2011-12-16 04:50:11 +01:00
Benjamin Otte
1377ff08c0 fontchooserwidget: Handle dpi < 0
Just use 96.0
2011-12-16 04:50:11 +01:00
Matthias Clasen
14f1811158 Add new symbols 2011-12-15 22:40:01 -05:00
Cosimo Cecchi
f0714338b3 iconhelper: treat the empty string as a NULL icon name
Treat the empty string as if it was a NULL icon name instead of
rendering GTK_STOCK_MISSING_IMAGE.
This used to be the previous behavior of GtkCellRendererPixbuf and
applications might still rely on it.
2011-12-15 20:01:35 +01:00
Cosimo Cecchi
798413151f cellrendererpix: save the icon size locally instead of in the helper
We need to save the icon size locally for GtkCellRendererPixbuf, since
its properties are set again every time it's drawn (resetting the icon
size on the helper by means of _gtk_icon_helper_clear() each time).
2011-12-15 19:59:24 +01:00
Cosimo Cecchi
69a5b3af94 menuitem: cleanup arrow-spacing fetch code
Refactor get_arrow_size() to return the spacing as well, since basically
we always need both.
2011-12-15 18:52:30 +01:00
Cosimo Cecchi
05e62e0251 menuitem: share code between HFW and non-HFW height requests
The code is very similar; having two slightly different code paths is
bad and can lead to bugs. Refactor the code to use the same height
request function.
2011-12-15 18:52:30 +01:00
Cosimo Cecchi
4d76b10ce5 menuitem: properly respect padding when drawing the separators
Use the padding when calculating the draw coordinates of the separator.

https://bugzilla.gnome.org/show_bug.cgi?id=666242
2011-12-15 18:52:30 +01:00
Cosimo Cecchi
713df0c72b menuitem: force odd height if we're not using wide separators
So that the 1px line can receive the same amount of space above and
below.

https://bugzilla.gnome.org/show_bug.cgi?id=666242
2011-12-15 18:52:30 +01:00
Cosimo Cecchi
20e94c1275 menuitem: don't request twice the padding for separator menu items
Padding was requested twice for separator menu items.

https://bugzilla.gnome.org/show_bug.cgi?id=666242
2011-12-15 18:52:30 +01:00
Florian Müllner
4f8f8fe828 window: Add hide-titlebar-when-maximized property
For maximized windows, titlebars cannot be used to reposition or
scale the window, so if an application does not use it to convey
useful information (other than the application name), the screen
space occupied by titlebars could be put to better use.
Add a new window property which requests from the window manager
to hide titlebars when windows are maximized to account for this.

https://bugzilla.gnome.org/show_bug.cgi?id=665616
2011-12-15 16:31:56 +01:00
Cosimo Cecchi
cfa0339559 scale: remove unused variable 2011-12-15 12:16:09 +01:00
Rui Matos
1235dc320b widget: Synthesize crossing only if sensitivity changed while propagating state 2011-12-14 17:03:44 +00:00
Andrea Cimitan
40423df234 Add has-origin property for GtkScale
If the scale has an origin (it will have one by default), GtkRange will
render the two sides before/after the current value with different style
classes, making it possible for themes to use different colors and
properties for the two areas.
This was possible in GTK 2 with style details, but got lost during the
road to 3.0.

https://bugzilla.gnome.org/show_bug.cgi?id=665140
2011-12-14 17:16:09 +01:00
Alexander Larsson
10b5ec20f2 Fix set_focus_child handling during focus changes
In many cases we used to set focus_child to NULL all the way up
to the top and then to the right value, even if there was
a common ancestor, meaning these see a temporary NULL value for
focus_child. Only when the new focus widgets direct parent was
in the previous ancestor list did we stop early.

This fixes that by always stopping propagation when reaching
the common ancestor.
2011-12-14 00:26:40 +01:00
Claudio Saavedra
064204da9b GtkFrame: Fix a casting in the compute_child_allocation() method
The casting used to calculate the child allocation is confusing MAX().
As a result, width and height end up with negative values, which makes no sense.

https://bugzilla.gnome.org/show_bug.cgi?id=666109
2011-12-13 20:26:30 +02:00
Cosimo Cecchi
a7f3a9ff74 themingengine: split a GtkThemingBackground object
Allows easier modification and general sanity of the CSS background
rendering code.
2011-12-12 12:46:52 +01:00
Cosimo Cecchi
1e23a74a95 image: take misc padding into account when calculating x/y draw coords
This fixes the misc-alignment.ui reftest.
2011-12-12 12:30:27 +01:00