Bastien Nocera [Thu, 3 Nov 2011 15:39:57 +0000 (15:39 +0000)]
gtk: Add accel with keycode parsing functions
Which handle accelerators with keycodes as well as keyvals,
so we can use it in applications that use GtkCellRendererAccel's
"Other" mode of operations (namely gnome-control-center and
gnome-settings-daemon).
Matthias Clasen [Wed, 2 Nov 2011 12:28:34 +0000 (08:28 -0400)]
Revert a change to the plug/socket headers
I was trying to avoid including gtk.h here, but this breaks
some of our tests, and there's a good chance that 3rd party
code also relies on this include.
Matthias Clasen [Wed, 2 Nov 2011 02:14:45 +0000 (22:14 -0400)]
Don't use *_DISABLE_DEPRECATED
Instead of undefining the DISABLE_DEPRECATED guards,
define the GDK_DISABLE_DEPRECATION_WARNING macro where needed.
Also replace INCLUDES by AM_CPPFLAGS to shut up automake.
Benjamin Otte [Fri, 28 Oct 2011 15:04:11 +0000 (08:04 -0700)]
x11: Do fallback resize without deprecated functions
After consulting with Carlos, we agreed that it should be enough to grab
the core pointer instead of doing a full grab. If it turns out that's
wrong, we need to adapt the internal API for resizes to take the device
doing the resize.
Cosimo Cecchi [Tue, 1 Nov 2011 00:33:41 +0000 (20:33 -0400)]
iconview: layout items immediately when setting a GtkTreeModel
As the draw handler expects the items to be laid out already, we cannot
queue a layout here to avoid a race condition with the resize that is
queued immediately after, which in turn would lead to a segfault later
in the paint_item() implementation.
Michael Natterer [Tue, 25 Oct 2011 20:19:11 +0000 (22:19 +0200)]
gtkrc.key.mac: add Command-cursor text navigation
and some emacs-ish Control bindings that work in native widgets.
Patch from Michael Hutchinson.
(cherry picked from commit ccf12f7b406ecbd8f0c26b0e6dc86d4593144dab)
Benjamin Otte [Mon, 3 Oct 2011 15:05:40 +0000 (17:05 +0200)]
a11y: Hack around infinite loops in parent setting
This is kind of a hack to get rid of infinite loops that occur when
child accessibles try to set their parent upon creation but the parent
accessible creates its children in the initialize vfunc. Because in that
case, the parent will not have an accessible set when the child tries to
access it, because it is still initializing itself. Which will cause a
new accessible to be created.
Cosimo Cecchi [Mon, 24 Oct 2011 17:12:21 +0000 (13:12 -0400)]
notebook: update tab area allocation when switching page
When the active page is switched, it's important
gtk_notebook_pages_allocate() is called after the bulk of
gtk_notebook_real_switch_page() is run, as the former allocates a
different space according to the currently active tab, which is set by
the latter.
gtk_notebook_pages_allocate() already calls gtk_notebook_redraw_tabs()
when the allocation changes, so just move its call down to
gtk_notebook_real_switch_page() to fix the bug.
Michael Natterer [Sat, 22 Oct 2011 06:48:13 +0000 (08:48 +0200)]
gtk: clean up the private horror
- add gtkmodulesprivate.h and move stuff there from gtkprivate.h
- add gtkprivate.c and move stuff there from gtkmain.c
- add gtkwin32.c and move stuff there from gtkmain.c
- don't redefine GTK_DATADIR and friends in gtkprivate.h
- have _gtk_get_datadir() and friends on all platforms
- remove the horrid hacks where gtkprivate.h can't be included,
or must be included later due to redefinition of the compile-time
directories
Cosimo Cecchi [Fri, 21 Oct 2011 20:30:34 +0000 (16:30 -0400)]
GtkRange: use the right widget for coordinate translation
GtkRange needs to check if its allocation intersects with the resize
grip allocation (trimming its own allocation if it does).
In order to do that, it needs to translate its allocation into window
coordinates, and before that, find the window to whose the allocation
is relative; code goes all the way finding the right parent widget, but
then doesn't actually use it when translating the coordinates, leading
to using the wrong rectangles for the intersection check.
Matthias Clasen [Fri, 21 Oct 2011 00:59:50 +0000 (20:59 -0400)]
DND: Work better with XI2
It turns out that simply using XIGrabKeycode instead of XGrabKey
makes the DND keyboard support mostly work (there seem to be some
minor issues with modifiers). This means we no longer grab the
keyboard actively during DND, which in turn makes Alt-Tab and
other window manager shortcuts work again during DND.
At the same time, bring the DND key handling code into the
multi-backend work, by checking for X11 and XI2 at runtime,
in addition to compile time.
Cosimo Cecchi [Thu, 6 Oct 2011 21:06:57 +0000 (17:06 -0400)]
tooltip: add support for opacity and rounded corners for tooltips
Rounded corners now will always work, using XShape in case we're not
running a composite manager.
Also, setting an RGBA visual (if available) on the tooltip toplevel
enables them to be transparent if the theme specifies so.
Antoine Jacoutot [Sat, 15 Oct 2011 09:27:47 +0000 (11:27 +0200)]
GMountOperation on OpenBSD: remove the need for kvm(3)
kvm(3) is considered a deprecated interface, so make
GMountOperation::show-processes use the recommended sysctl(3) interface
instead. This also removes the need to link with libkvm.
Chun-wei Fan [Mon, 17 Oct 2011 07:34:24 +0000 (15:34 +0800)]
Update VS property sheets
Bid farewell to G_DISABLE_DEPRECATED and the build errors it causes as
warnings are now used to deter people from using deprecated GLib items
in a more subtle manner
Chun-wei Fan [Wed, 12 Oct 2011 03:39:06 +0000 (11:39 +0800)]
Bug 660730: Win32: Only use _fstat32 if available
_fstat32 is only introduced with msvcrt80.dll (i.e. Visual C++ 2005), in
which using this function will break compilation with MinGW, which links
against msvcrt.dll. The msvcrt.lib in the Windows DDK which links to
a later incarnation of the msvcrt.dll in later Windows systems may have
this symbol defined, but that needs to be checked upon to be sure.
Thanks to Dieter Verfaillie for pointing out this problem.
John Ralls [Sun, 25 Sep 2011 01:19:56 +0000 (18:19 -0700)]
Bug 658767 - Drag and Drop NSEvent capture is racy
Create a synthetic NSMouseLeftDown to store in the GtkQuartzDragSourceInfo
rather than relying on the NSWindow's latest event being the right one (or the
right kind).
Bug 657770 - Write to released memory in gtkdnd-quartz.c
Clear the Drag paste board just before the info->context is released.
This way the GtkDragSourceOwner is released just before the drag context
is and thus can pasteboard:provideDataForType: not accidentally access
an already released drag context
Alex Corrado [Sun, 9 Oct 2011 16:52:14 +0000 (09:52 -0700)]
Quartz, Bug 655057: Eliminate Compiler Warning
When compiled with older SDKs, the original change for this bug caused a
compiler warning about NSWindow not being able to handle a setStyleMask
message. This tricks the compiler into thinking that it can.