Commit Graph

21572 Commits

Author SHA1 Message Date
99db4164bc Fix Quartz clipboard image retrieval.
It does no good to iterate through a series of mime types to call a
function when the eventually-called function,
_gtk_quartz_get_selection_data_from_pasteboard() in this case, gives the
wrong answer and stops the iteration on all but one especially if that
one isn't first.

The one is "image/tiff" and the quartz pasteboard function will return
any image type Quartz knows about for it, so lose the iteration and use
only "image/tiff".
2016-02-11 13:49:07 -08:00
383673643b Avoid a false positive deprecation notice
The comment on the #endif is tripping the deprecation state inside
the gtk-doc parser for gtk_container_get_children().
2016-01-25 10:43:30 +00:00
748900071e Fix interaction between scrolling menus and automatic mnemonics
https://bugzilla.gnome.org/show_bug.cgi?id=612611
2016-01-19 23:51:03 +01:00
679d2a45af Bug 722815 - Deliver GdkModifierType during 'drag-motion'
This bug was also found by clang:

gdkwindow-quartz.c:1956:11: warning: implicit conversion from enumeration type 'GdkEventMask' to
      different enumeration type 'GdkModifierType' [-Wenum-conversion]
  *mask = _gdk_quartz_events_get_current_event_mask ();
        ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
2016-01-12 23:07:25 -05:00
79da37b2c9 Updated Japanese translation
Change B series paper names in accordance with the Japanese standards.
2016-01-12 00:16:50 +09:00
8bbd765930 gtk2-24: add randr 1.5 monitor support [v3]
This patch introduces support for using the newly introduced
monitor objects in the XRandR protocol. These objects are meant
to be used to denote a set of rectangles representing a logical
monitor, and are used to hide details like monitor tiling and
virtual gpu outputs.

This uses the new objects instead of crtc/outputs objects when
they are available to create the monitor lists. X server 1.18
is required on the server side for randr 1.5.

This patch was cherry-picked and fixed from the gtk3 branch and
squashes the two following additional fixupes:

v2: Fix primary monitor determination with XRANDR 1.5
	Matthias Clasen <mclasen@redhat.com>
v3: Fix a typo in the previous patch
	Matthias Clasen <mclasen@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=759912
2015-12-28 10:43:18 -05:00
6de93df9a4 MSVC builds: Build gtk-update-icon-cache
As pointed out by  Paolo Borelli in bug 759436, we ought to build
gtk-update-icon-cache, "install" it and run it nowadays as it becomes more
and more common that we are going to use an external icon theme package,
so that gtk+ programs will run better and faster.
2015-12-15 16:54:00 +08:00
c9899ca93f build: Add support for Visual Studio 2015
This adds support for building with Visual Studio 2015 out-of-the-box
by what we did before: copying the 2010 projects and updating items
in there to make those projects compatible with 2015, as the formats
of the project files are largely unchanged.
2015-12-15 16:46:11 +08:00
339fd3d3f6 Clean Up MSVC Project Generation
Use the common autotools module that was added in the last commit so that
we can clean up the various Makefile.am's in gdk/ and gtk/, and also
make more Visual Studio projects completed during 'make dist', by adding
minimal items to those other Makefile.am's.  This also allows us to make
the property sheets that does the copying of headers and built items
completed at 'make dist', so that we won't have to worry too much about
headers being added (although it would be unlikely for GTK+-2.x).
2015-12-15 16:44:47 +08:00
d1c13ba580 build: Update Makefile-newvs.am
This updates the autotools module copying and generating the MSVC
2012-2015 projects by copying it from from GLib, which also has the
advantage of making things work better when doing 'make -jN dist', and
the Makefile.am's in bui;d/win32/vs[11|12] have been updated accordingly.
2015-12-15 16:38:11 +08:00
8b4e346a26 build/: Add common autotoold module to generate MSVC projects
This adds an autotools module that is copied from GLib, which is
included by the Makefile.am's to generate the complete Visual Studio
projects from their repsective templates, which:

-Cleans up those autotools files
-Make 'make -jN dist' work better
2015-12-15 16:37:45 +08:00
89761b7271 2.28.29 2015-12-10 15:34:40 -05:00
3b65a6a42e Translate GDK_KEY_KP_Decimal according to locale
It makes sense that you should be able to type numbers that are
correctly formatted and parsable according to the current locale,
using just the keypad. This patch makes it so by translating
GDK_KEY_KP_Decimal to the decimal separator for the current locale,
instead of hardcoding a '.'.

https://bugzilla.gnome.org/show_bug.cgi?id=756751
2015-10-25 14:09:03 -04:00
4ba1fbfdb1 Bug 753992 - im-quartz discard_preedit segmentation fault
Replace checking if the NSView is really a GdkWindow, which will crash
in the likely event it's not a GObject, with ensuring that the parent
GdkWindow is really a GdkWindowQuartz.
2015-10-08 21:36:11 -04:00
b3ff8bbe31 Add Language headers to po files
Future versions of gettext will fail if this header is missing.

GTK+ 2 is not going away anytime soon, and some projects (e.g. GIMP)
want to compile it with the latest gettext.

Based on a patch by Sven Claussner <sclaussner@src.gnome.org>.
2015-09-26 19:19:14 +02:00
c4d8fba455 Annotate GtkColorButton get_color
This is a backport of the corresponding change in gtk+ 3.

http://bugzilla.gnome.org/show_bug.cgi?id=754046
2015-08-25 23:46:58 -04:00
46c28bd54d Makefiles: Fix parallel installation for MinGW
Make sure that the destination exists before installing files.

https://bugzilla.gnome.org/show_bug.cgi?id=753691
2015-08-19 10:38:39 +08:00
f3a34856c5 multipress: Only emit preedit signals if needed
When clearing the compose buffer, don't emit preedit-changed
unconditionally. This triggers a recursion which leads to
a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=753644
2015-08-18 15:46:21 -04:00
783afbd64f print operation: let subclasses use a custom paginate
GtkPrintOperation was emitting paginate only if a signal was
connected, this meant that subclassing and overriding the
paginate vfunc lead to the unexpected result that paginate did
not run.
Instead we always emit the signal and use a custom accumulator:
if there is a signal we just run that and avoid the default
handler, otherwise we run the default handler which can be the
one by the subclass or the default handler that just skips
pagination.

Patch by Yevgen Muntyan, fixes #345345
2015-08-18 15:46:21 -04:00
b2a79ef73c File chooser: Fix a crash on dnd in sidebar
We were crashing when reordering the sidebar by dnd.

https://bugzilla.gnome.org/show_bug.cgi?id=745127
2015-07-30 21:58:07 -04:00
5c92821ace quartz: Implement NO_TARGET drag result
This is necessary to make notebook tab DND work.

https://bugzilla.gnome.org/show_bug.cgi?id=752638
2015-07-26 02:17:44 -04:00
2ac4fe1b66 quartz: Check if a drag ends inside a known window
If a drag ends inside a known window, set the dest_window field
in the drag context. This information is needed to implemented
notebook tab dragging.

https://bugzilla.gnome.org/show_bug.cgi?id=752638
2015-07-26 02:15:31 -04:00
50bd9dd9f3 Remove an unused variable
Pointed out by coverity.
2015-07-17 21:27:02 -04:00
7ee8b1fd9a Fix a wrong function call
cairo_region_destroy can't handle GdkRegions. We need to call
gdk_region_destroy. Found by coverity.
2015-07-17 21:23:54 -04:00
b2d60ff8cb MSVC Builds: Update GUID of "Install" Project
The GUID of the "Install" project files happen to be the same as Pango's
"install" projects, so we need to update the GUID here so that the projects
can cooperate with each other when used in an all-in-one build for the GTK+
stack.
2015-07-17 17:13:42 +08:00
93f9c220ab gdkwindow-quartz: partial aspect ratio support
Support was added for GDK_HINT_ASPECT in
gdk_quartz_window_set_geometry_hints though with one restriction:
min_aspect and max_aspect have to be equal, which I believe corresponds
to the most common usage. A warning will be printed if this condition is
not met but min_aspect will be used anyway.
2015-07-07 10:11:39 -07:00
7d93d6f59a Updated Occitan translation 2015-05-29 20:56:52 +00:00
29da0d99aa Fix AM_PATH_GTK_2_0 for cross compilation
With the current code used in the m4 macro, gtk-2.0.m4 can't find
a prefixed pkg-config. This presents issue when cross compiling, as
pkg-config needs to be prefixed to work with the target being compiled
for.

Change the macro to use PKG_PROG_PKG_CONFIG rather than custom
detection code.

https://bugzilla.gnome.org/show_bug.cgi?id=749507
2015-05-22 00:11:46 -04:00
8d907370a6 Updated Occitan translation 2015-05-15 16:33:27 +00:00
b5b0557213 Update NEWS 2015-05-13 08:53:48 -04:00
86a9348dc4 2.24.28 2015-05-13 07:25:53 -04:00
d63bee09e0 printing: Check connection to remote CUPS server on correct port
Add parameter for specification of port to gtk_cups_connection_cups_new().
Use default port returned by ippPort() if the given port is lower than 0.

https://bugzilla.gnome.org/show_bug.cgi?id=693738
2015-05-13 12:27:44 +02:00
1f74f12d9f Use GDK_KEY_KP_Decimal instead of GDK_KP_Decimal
Fixes the FTBFS introduced in cb3eb7cd77
2015-05-04 17:01:29 +00:00
cb3eb7cd77 win32: Support the decimal point on the keypad
Based on a patch by John Emmas.
2015-05-01 07:32:47 -04:00
92fb170917 W32: Support horizontal mouse wheel scrolling
https://bugzilla.gnome.org/show_bug.cgi?id=748014
(cherry picked from commit c0e0a1508be3ccf349717497af2e8a4d77027649)
2015-04-28 00:42:35 -04:00
3da748930f Avoid perl warnings
Apparently, defined is not cool anymore.
2015-04-11 20:23:11 -04:00
a4bffe01bb Fix missing field po file 2015-03-27 18:29:08 +01:00
0edc775d1a Revert "W32: correctly guess max window size from the size of the workarea of the screen it's on"
This is only needed for CSDs. GKT+-2.x has no CSDs, so this
code is completely unnecessary.

This reverts commit d9122d1379.
2015-03-26 17:12:01 +00:00
88f3b248d6 Revert "W32: Correctly set maximized window position"
This is only needed for CSDs. GKT+-2.x has no CSDs, so this
code is completely unnecessary.

This reverts commit 2fdd8627dd.
2015-03-26 17:11:13 +00:00
2fdd8627dd W32: Correctly set maximized window position
Use screen workarea to *also* set the position of a maximized window,
not just its size. Without this the window position defaults to 0:0
(the topleft corner), which is wrong when taskbar is position along the
top or left edge of the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=746821
2015-03-26 16:09:13 +00:00
d9122d1379 W32: correctly guess max window size from the size of the workarea of the screen it's on
Get monitor on which the most of the window is located (nearest monitor if
window is not on screen), get its work area (area not occupied by taskbar or
any other bars) and use that for maxsize.

Previous default of 30000 meant that windows maximized onto full screen,
even covering the area where taskbar is.

https://bugzilla.gnome.org/show_bug.cgi?id=726592
2015-03-26 16:09:13 +00:00
dd882f5b80 Fix a sporadic segfault in treeview keynav
If a a treeview has frequent periodic additions and removals of
rows, it is possible that a page down keypress moves the cursor
out of the height of the treeview. In some of these cases, we
can be tricked into dereferencing a  NULL pointer.

Bug 612919.

https://bugzilla.gnome.org/show_bug.cgi?id=746269
2015-03-16 12:34:44 -04:00
ba48b46574 Fix problems with sticky handling (backport of 01320e57737).
Reading a card32 property into a long may lead to undefined high bits, so mask
them off. Also, make the conditions for setting and unsetting the stick flag
opposites, to avoid unintended changes.

https://bugzilla.gnome.org/show_bug.cgi?id=746064
2015-03-12 17:30:39 -04:00
df09ce5e87 MSVC Builds: Rename "Install" Projects
Rename the install projects as gtk-install, to ease the integration of the
projects in a grand solution that may be used to build, for example, the
entire GTK+ stack.
2015-03-06 16:56:19 +08:00
bf92167b01 MSVC Builds: "Install" the .pdb Files
"Install" the .pdb files to help people use them to debug the GTK+ stack,
or for their GTK-using applications, as they are already generated for all
builds.

Also update the copying of the DLLs, LIBs and EXEs so that we ensure that
we only copy the items from GTK+-2.x, without accidently copying items that
are not meant to be copied, or make extra copies of items in the wrong
places, such as when the projects here are used in parts of grand solutions
used to build the entire GTK+ stack.
2015-03-06 15:21:52 +08:00
e129c94171 MSVC 2010+ Builds: Fix .pdb Generation
The .pdb file name must be specified for Visual Studio 2010+ later in order
fo match the output filename if the output filename is different from the
project name.  Update the projects as necessary.
2015-03-06 15:16:39 +08:00
8995a3e19c MSVC 2010+ Builds: Clean up gtk-install.props
Remove empty lines, they aren't really necessary.
2015-03-06 11:17:39 +08:00
e6333a1a37 2.24.27 2015-03-03 11:40:38 -05:00
22eb70adab gdkwindow: Fix event unref iteration
We were double looping previously which caused a NULL deref.

(cherry picked from commit d08ff485f28f23427bff1b3aac64ab3f77a8664d)
2015-03-03 17:13:49 +01:00
5efefdb655 gdk: Fix GdkWindowFilter internal refcounting
Running gnome-shell under valgrind, I saw the attached invalid write.
Basically we can destroy a window during event processing, and the old
window_remove_filters simply called g_free() on the filter, ignoring
the refcount.  Then later in event processing we call filter->refcount--,
which is writing to free()d memory.

Fix this by centralizing list mutation and refcount handling inside
a new shared _gdk_window_filter_unref() function, and using that
everywhere.

==13876== Invalid write of size 4
==13876==    at 0x446B181: gdk_event_apply_filters (gdkeventsource.c:86)
==13876==    by 0x446B411: _gdk_events_queue (gdkeventsource.c:188)
==13876==    by 0x44437EF: gdk_display_get_event (gdkdisplay.c:410)
==13876==    by 0x446B009: gdk_event_source_dispatch (gdkeventsource.c:317)
==13876==    by 0x4AB7159: g_main_context_dispatch (gmain.c:2436)
==13876==    by 0x4AB7957: g_main_context_iterate.clone.5 (gmain.c:3087)
==13876==    by 0x4AB806A: g_main_loop_run (gmain.c:3295)
==13876==    by 0x8084D6B: main (main.c:722)
==13876==  Address 0x1658bcac is 12 bytes inside a block of size 16 free'd
==13876==    at 0x4005EAD: free (vg_replace_malloc.c:366)
==13876==    by 0x4ABE515: g_free (gmem.c:263)
==13876==    by 0x444BCC9: window_remove_filters (gdkwindow.c:1873)
==13876==    by 0x4454BA3: _gdk_window_destroy_hierarchy (gdkwindow.c:2043)
==13876==    by 0x447BF6E: gdk_window_destroy_notify (gdkwindow-x11.c:1115)
==13876==    by 0x43588E2: _gtk_socket_windowing_filter_func (gtksocket-x11.c:518)
==13876==    by 0x446B170: gdk_event_apply_filters (gdkeventsource.c:79)
==13876==    by 0x446B411: _gdk_events_queue (gdkeventsource.c:188)
==13876==    by 0x44437EF: gdk_display_get_event (gdkdisplay.c:410)
==13876==    by 0x446B009: gdk_event_source_dispatch (gdkeventsource.c:317)
==13876==    by 0x4AB7159: g_main_context_dispatch (gmain.c:2436)
==13876==    by 0x4AB7957: g_main_context_iterate.clone.5 (gmain.c:3087)

https://bugzilla.gnome.org/show_bug.cgi?id=637464

Backport of 806c04411d306680353cf90cffee98ce73e122f2 to
the gtk-2-24 branch. 806c0441 was authored by Colin Walters
<walters@verbum.org>

Without this patch, the spotify linux client was crashing during
playback of some songs when using gtk+ 2.24.26

https://bugzilla.gnome.org/show_bug.cgi?id=745536
2015-03-03 17:13:49 +01:00