Benjamin Otte [Thu, 15 Dec 2011 22:51:57 +0000 (23:51 +0100)]
a11y: Redo cell update function
1) always emit signals
Previously, newly constructed cells would be told to not emit events.
However, we can ensure that nothing is connected to the signals, so
they will not actually emit anything.
2) don't return anything
The return value is unused anyway.
Benjamin Otte [Wed, 14 Dec 2011 17:14:47 +0000 (18:14 +0100)]
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.
Benjamin Otte [Mon, 12 Dec 2011 14:18:54 +0000 (15:18 +0100)]
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.
Cosimo Cecchi [Thu, 15 Dec 2011 19:01:35 +0000 (20:01 +0100)]
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.
Cosimo Cecchi [Thu, 15 Dec 2011 18:59:24 +0000 (19:59 +0100)]
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).
Cosimo Cecchi [Thu, 15 Dec 2011 17:42:27 +0000 (18:42 +0100)]
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.
Florian Müllner [Sat, 3 Dec 2011 00:47:25 +0000 (01:47 +0100)]
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.
Andrea Cimitan [Wed, 14 Dec 2011 16:16:09 +0000 (17:16 +0100)]
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.
Rob Bradford [Wed, 14 Dec 2011 13:11:18 +0000 (13:11 +0000)]
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.
Rob Bradford [Tue, 13 Dec 2011 17:39:43 +0000 (17:39 +0000)]
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.
Rob Bradford [Mon, 12 Dec 2011 13:56:25 +0000 (13:56 +0000)]
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.
Jan Rękorajski [Wed, 14 Dec 2011 13:09:48 +0000 (14:09 +0100)]
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).
Matthias Clasen [Wed, 14 Dec 2011 02:13:31 +0000 (21:13 -0500)]
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'.
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.
Claudio Saavedra [Tue, 13 Dec 2011 17:25:15 +0000 (19:25 +0200)]
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.
Benjamin Otte [Sat, 10 Dec 2011 06:54:34 +0000 (07:54 +0100)]
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.
Benjamin Otte [Sat, 10 Dec 2011 05:49:29 +0000 (06:49 +0100)]
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.
Benjamin Otte [Sat, 10 Dec 2011 03:48:12 +0000 (04:48 +0100)]
treeview: Handle the case where the cursor row gets deleted
Previously, the cursor would just become invalid, which used to
reselect the first row in the treeview later on (without a
cursor-changed signal). This leads to a crash now with the recent
refactorings.
The patch is longer than I'd like it to be, but the situation is kinda
complicated, because we want to make sure to move the cursor to a good
row. It works like this:
1) From the deleted row, search forward for the first row that is not
going to be deleted and is not a separator.
2) If no such row exists, search backwards for a row that is not a
separator.
3) If no such node exists, clear the cursor.
Benjamin Otte [Sat, 10 Dec 2011 01:06:33 +0000 (02:06 +0100)]
treeview: Replace cursor handling by keeping the node
Previously the code used a GtkTreeRowReference, which was (a) less
performant and more importantly (b) hiding errors.
The errors being hidden were the referenced row becoming invalid or
collapsed, because such rows would not be valid cursor rows and it would
be necesary to select a new row and emit a "cursor-changed" signal.
So if a crash bisects down to this commit, it is very likely that the
cursor has not correctly been updated and the cursor row is invalid.
Calling gdk_keymap_add_virtual_modifiers causes _all_ virtual
modifiers to be added, which causes problem when they are co-located
on the same real modifier (as Super and Hyper often are). Effectively,
this made it impossible to enter key combinations involving Super,
since they all turn into Super+Hyper.
Cosimo Cecchi [Tue, 6 Dec 2011 23:41:33 +0000 (18:41 -0500)]
window: copy back window surface data when the implicit paint is flushed
When an implicit paint is flushed during expose, e.g. because a
non-double buffered widget is painting, make sure to copy the existing
data from the window surface we rendered before flushing back to the
paint surface, instead of using an empty base.
Code was already handling that (and said so in the comment), but only
when no implicit paint was used at all, and not in the case when it's
flushed mid-expose.