Commit Graph

29707 Commits

Author SHA1 Message Date
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
3b0a9c59cc demo: Add test for hide-titlebar-when-maximized
Add an additional option to the appwindow demo to test the new
gtk-hide-titlebar-when-maximized setting.

https://bugzilla.gnome.org/show_bug.cgi?id=665616
2011-12-15 16:31:57 +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
Rob Bradford
8c1f8c0668 wayland: Add dummy implementation of the wl_data_device functionality
Setup listener functions for the drag and drop events as well as the selection
events. Then create and save a data structure representing the data offer from
the other client.
2011-12-14 14:47:27 +00:00
Rob Bradford
55b2286c3e wayland: Add an implementation for GdkAtom
This implementation is based on a hash table. The hard coded GtkSelection
atoms are preloaded into the hash table at the correct values. User generated
atoms start after the last preloaded atom.
2011-12-14 14:45:44 +00:00
Rob Bradford
b165c1bac8 wayland: Get the data device during input device setup
The data device is a associated with the input device - fetch the data device
from the data manager for the current input device.
2011-12-14 14:44:44 +00:00
Rob Bradford
aea95c8efc wayland: Retrieve the data device manager object
The data device manager is a global object that provides the support
infrastructure around data devices. These data device objects are the basis
for handling drag and drop as well as selections in Wayland.
2011-12-14 14:43:35 +00:00
Rob Bradford
32c9251b1e wayland: Don't use deprecated function: gdk_window_get_pointer
Replace it with gdk_window_get_device_position.
2011-12-14 14:43:29 +00:00
Pavol Šimo
c66fd84523 Updated Slovak translation 2011-12-14 14:19:06 +01:00
Jan Rękorajski
f807f7834f print dialog: Fix authentication logic
Reset state of CUPS requests correctly during authentization and
check CUPS requests for errors.
Don't initialize variables holding password and username with empty
string (#664640).
2011-12-14 14:09:48 +01:00
Matthias Clasen
ffb56ecc15 Fix nicks for the window class enum
As pointed out in bug 665999, these were just not right.
Before this commit, the nicks were 'output' and 'only'.
After this commit, they are 'input-output' and 'input-only'.
2011-12-13 21:15:14 -05: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
Cosimo Cecchi
b215aeacc8 image: add gtk_image_get_preferred_size()
Add a function to query the preferred size of the GtkImage, and use it
in the get_preferred_width/height implementations.
2011-12-12 12:29:21 +01:00
Benjamin Otte
92929b968b treeview: Ensure selection's changed signal
There was a corner case where the changed signal was not emitted.
If rows were built like this:
  1    (not selected)
  + 2  (selected)
  + 3  (not selected)
And row 1 was removed, no signal would be emitted.

I like it when writing tests actually finds bugs that have been around
since 2003 - introduced by 4a03ea2334
actually. :)
2011-12-10 08:00:26 +01:00
Benjamin Otte
d4d2cc14d2 treeview: Don't try to optimize away selection_changed signal
We get certain cases, in particular with SELECTION_MULTIPLE, where we
cannot figure out in advance of real_set_cursor() if the selection will
actually change.
2011-12-10 08:00:26 +01:00
Benjamin Otte
ef4c4b7836 tests: Add select/unselect calls 2011-12-10 08:00:26 +01:00
Benjamin Otte
559c3c7da1 treeview: Add a CURSOR_INVALID flag to set_cursor_row()
This is necessary so the code doesn't attempt to do things with the
previous cursor, which currently cause crashes.
2011-12-10 08:00:26 +01:00
Benjamin Otte
d3bccfbb6d treeview: Replace lots of boolean args with flags
I want to add more and 3 boolean args is essentially unreadable code.
2011-12-10 08:00:26 +01:00
Benjamin Otte
bf47d8d499 tests: Add sanity checks for selection
We want to know that the selection emits "changed" when it changes.
2011-12-10 08:00:26 +01:00