Commit Graph

21221 Commits

Author SHA1 Message Date
Matthias Clasen
81bb13510b 2.24.13 2012-09-23 16:42:08 -04:00
Matthias Clasen
b8a49d1e87 Updates 2012-09-23 16:41:44 -04:00
Matthias Clasen
7336783e57 Change the location of the online docs
It is better to install these under gdk2/ and gtk2/, to make
it explicit what version they are about. Doing this will eventually
let us move the gtk3 docs to gtk/.
2012-09-23 15:04:06 -04:00
Chun-wei Fan
8f5ab02369 Visual C++ support: Add projeccts to build gailutil
This adds Visual C++ 2008/2010 projects to build the gailutil DLL, like
the 3.x releases.
2012-09-18 17:56:17 +08:00
Michael Natterer
79b3326eaa quartz: Bug 674108 - Hard crash due to wrong NSAutoreleasePool stacking
Apply patch from Kristian Rietveld which addresses two issues
in gdkeventloop-quartz.c:

This patch moves the autorelease pool drain and introduces protection against
the invalidated ufds. Basically, when we suspect ufds has been invalidated by a
recursive main loop instance, we refrain from calling the collect function.
2012-09-14 15:18:33 +02:00
Matthias Clasen
c8aa94f7a8 immulticontext: Always check if the global context id changed
This makes sure that if the gtk-im-module setting changes we update
our internal state immediately on the next event whichever it is.
In particular this fixes the case of the gtk-im-module setting
changing while the user is typing and the slave context remaining
the same, effectively ignoring the setting change.

Backport of a0f155e839.

https://bugzilla.gnome.org/show_bug.cgi?id=675365
2012-09-09 20:06:38 -04:00
Matthias Clasen
1533e67ae4 Try harder to discriminate Shift-F10 and F10
A change in xkeyboard-config 2.4.1 made it so that function keys
now have a shift level which has the same symbol, but 'eats' the
shift modifier. This would ordinarily make it impossible for us
to discriminate between these key combinations.

This commit tries harder to discriminate in 2 ways:
- XKB has a mechanism to tell us when a modifier should not be
  consumed even though it was used in determining the level.
  We now respect such 'preserved' modifiers. This does not fix
  the Shift-F10 vs F10 problem yet, since xkeyboard-config does
  not currently mark Shift as preserved for function keys.
- Don't consume modifiers that do not change the symbol. For
  the function keys, the symbol on the shift level is the same
  as the base level, so we don't consider Shift consumed.

For more background on the xkeyboard-config change, see
https://bugs.freedesktop.org/show_bug.cgi?id=45008

https://bugzilla.gnome.org/show_bug.cgi?id=661973
2012-09-09 18:49:18 -04:00
Kristian Rietveld
b4ddf24234 Implement gtk-primary-button-warps-slider GtkSetting
It replaces the recently added GtkRange:primary-button-warps-slider
style property. Implement the setting in the quartz backend,
it proxies the "click in the scroll bar to" property from the
OS X PrefPane.
2012-09-07 16:46:08 +02:00
Cosimo Cecchi
15999ec5f3 range: make condition consistent with GTK3
cc7abf6a1c introduced the
primary-button-warps-slider style property, but with a different
condition check than the GTK3 counterpart.
It turns out we really need to check for the mouse click location here,
or we'll warp the slider to pointer also in case we clicked on the
slider itself.

https://bugzilla.gnome.org/show_bug.cgi?id=683512
2012-09-06 12:03:17 -04:00
Piotr Drąg
1c401ea913 Updated Polish translation 2012-09-04 02:28:08 +02:00
Matthias Clasen
8b18b439af 2.24.12 2012-09-03 14:33:47 -04:00
Emmanuele Bassi
1070c5849e recent-manager: Coalesce multiple changes
Since the ::changed implementation of GtkRecentManager implies a
synchronous write operation, when we receive multiple requests to emit a
::changed signal we might end up blocking.

This change coalesces multiple ::changed emission requests using the
following sequence:

  • the first request will install a timeout in 250 ms, which will
    emit the ::changed signal

  • each further request while the timeout has not been emitted
    will increase a counter

      ‣ if the counter reaches 250 before the timeout has been
        emitted, then the RecentManager will remove the timeout
        source and force a signal emission and reset the counter

This sequence should guarantee that frequent ::changed emission requests
are coalesced, and also guarantee that we don't let them dangle for too
long.

https://bugzilla.gnome.org/show_bug.cgi?id=616997
2012-09-03 13:23:56 -04:00
Cosimo Cecchi
cc7abf6a1c range: add a primary-button-warps-slider style property
Setting this to TRUE (it's FALSE by default) enables the behavior we
have in GTK3 for scrollbars.

https://bugzilla.gnome.org/show_bug.cgi?id=683279
2012-09-03 11:56:58 -04:00
Piotr Drąg
88bfb0f59e Updated Polish translation 2012-08-31 20:45:02 +02:00
Cosimo Cecchi
af26ec6a73 tooltip: add tooltip-radius and tooltip-alpha style properties
This allows themes to change the tooltip opacity and radius. Based on a
downstream Fedora patch by Matthias Clasen.

https://bugzilla.gnome.org/show_bug.cgi?id=683070
2012-08-30 21:41:40 -04:00
Kristian Rietveld
3d5cd6e055 quartz: fix corruption during scrolling in some cases
A call to scrollRect must be followed by a call to set that the offset
rect needs display for the changes to "take effect". This was not
done prior to this patch which, in some cases, caused corruption during
scrolling.
2012-08-26 15:45:46 +02:00
Michael Natterer
c0c3085128 quartz: add evil casting to make sure time wraps correctly on 32bit machines
get_time_from_ns_event(): apply patch from Michael Hutchinson which
makes sure the returned guint32 wraps correctly on 32 bit machines
when the uptime exceeds 2^32 ms.
(cherry picked from commit 78506bd604)
2012-08-23 09:32:20 +02:00
John Ralls
48547aadef Bug 681784 Colorspaces used in gtk+ and cairo quartz backends do not
match

Changes inspired by parafin <help@imtrappedininternet.com>
Replace colorspace creation calls to match those used by Cairo.
2012-08-21 16:21:28 -07:00
YunQiang Su
fa98721182 fix an typo in zh_CN translation 2012-08-18 11:20:11 +08:00
Michael Natterer
ebe50bbecb gtk: ref the action around gtk_action_emit_activate()
for the same reason we already ref the action's group in the function.
2012-08-03 23:24:39 +02:00
Matthias Clasen
1d07ef714d Allow building with automake 1.12 2012-08-01 08:47:58 +02:00
Funda Wang
c2274c8912 fix bug#680901: translations of "even sheet" and "odd sheet" are wrong 2012-07-31 22:06:52 +00:00
Chun-wei Fan
3047719340 demos/gtk-demo/rotated_text.c: Remove C99ism 2012-07-26 17:15:23 +08:00
Matthias Clasen
a9fb816a3f Fix a case of 'stuck grab'
This was showing up when using a combo box in list mode. After popping
up the list, the keyboard grab appeared stuck. What was stuck here is
only the client-side grab, since we forgot to clean up our grabs
when receiving an UnmapNotify.

This bug was introduced in 3f6592f60f.

[ Alexandre Rostovtsev <tetromino@gentoo.org>: backport to 2.24 ]

https://bugzilla.gnome.org/show_bug.cgi?id=680346
2012-07-20 20:02:33 -04:00
Matthias Clasen
9a0fcd0f41 Bump version 2012-07-15 15:49:50 -04:00
Matthias Clasen
2b67dc0e8d Updates 2012-07-15 15:10:41 -04:00
Cosimo Cecchi
85f2a721cf pixbuf-engine: add a GtkRC option for widget direction
Add a GtkRC option to select for an LTR/RTL widget direction in the
pixbuf engine; this will allow the engine to apply different theming
assets according to the text direction, which is useful when theming
e.g. a spinbutton or a combobox entry.
2012-07-05 10:08:10 -04:00
Daniel Sabo
da324fa2d5 [Bug 676362] _gdk_quartz_image_copy_to_image always returns black for
the root window

Revised patch which doesn't depend upon NSRect being typdeffed from
CGRect (64-bit only).
2012-06-13 17:37:35 +01:00
Daniel Sabo
2f706868ff Bug 676362 - _gdk_quartz_image_copy_to_image always returns black...
Implement a special case for the root window, which has to be handled
differently on OS X.

Contains some bit fiddling corrections by Kristian Rietveld.
2012-06-11 21:10:19 +02:00
Kristian Rietveld
860499ce90 quartz: delay emission of EnterNotify until window position is known
Beforehand, the check whether or not emission is necessary was done
based on the "uninitialized" window position in the top left corner.
We now wait until the window size is set for the first time, to avoid
emitting EnterNotify when it is not necessary.
2012-06-11 21:10:19 +02:00
Matthias Clasen
0b59fbfb9d Allow fallback for input method modules
Accept a :-separated list of module names in GTK_IM_MODULE and
the corresponding setting, to deal a bit better with broken
situations.

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

Patch by Akira Tagoh, backported from GTK+ 3. The backport
is required because GTK+ 2 and 3 are listening to the same env
vars and settings for immodules.
2012-06-05 17:03:42 -04:00
Michael Natterer
b32a9eb691 GtkTreeView: make tree expanding/collapsing more robust
gtk_grab_remove() *after* we did the expanding/collapsing, otherwise
grab_notify() might kick in and mess with our state. Fixes bug #675835.
2012-05-31 11:02:09 +02:00
Michael Natterer
8750833e61 gtk-demo: add semikolon to make it build again 2012-05-27 23:05:30 +02:00
Connor Behan
5b91e0d501 Make gtk2 demos comply with gseal
Demos in gtk-demo are supposed to be exemplary. However, if one were to
give them dummy main functions many of them would not compile with
-DGSEAL_ENABLE. This changes the demos to make them use accessor
functions whenever possible instead of direct changes to the struct
members.

http://bugzilla.gnome.org/show_bug.cgi?id=667155
2012-05-26 20:04:40 +00:00
Christian Kellner
43c9a702c7 quartz: Don't use compound text for selections
Explicitly return FALSE in selection_set_compound_text() to
indicate that we don't want to support compound text selections;
this will eliminate the "not implemented" warning for quartz.
2012-05-14 21:33:08 +02:00
Kristian Rietveld
eb831590cd Implement _gtk_clipboard_store_all()
This pushes the clipboard contents to the OS X clipboard when the
application is quit. Without doing this, clipboard data set by a GTK+
application cannot be accessed after the clipboard has been quit.

Currently, we implement this the easy way because the clipboard
support is fully implemented in GTK+. In the future this might change.
2012-05-14 20:55:26 +02:00
Kristian Rietveld
194d5544b4 quartz: Ignore events from all mouse buttons past the resize boundary
Before, right click events were still let through into GDK. In this
case, also middle/right button events with x-coordinates in the range
[-3, 0] are processed, resulting in failures/crashes in the window
finding code because no GdkWindows are present in this range.
2012-05-13 18:00:47 +02:00
Michael Natterer
71164e57b9 quartz: add a special case to GtkIMContextSimply for entering '"'
Turn dead_doubleacute plus space into '"' and not into a double
acute because that's the way to enter double quotes on the
US-International keyboard layout.
2012-05-10 10:57:16 +02:00
Michael Natterer
b738cf85d9 quartz: handle yet another dead tilde variant
which is delivered by the US-International keyboard layout.
2012-05-08 15:52:52 +02:00
Federico Mena Quintero
2b624f6f8f bgo#675421 - Set the wm_role on GtkFileChooserDialog
The window's role is 'GtkFileChooserDialog', so that window managers can match it
for positioning.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-05-07 15:43:20 -05:00
Dumitru Mișu Moldovan
fb2cbb3cde Updated Romanian translation 2012-05-05 11:26:08 +03:00
John Ralls
63f6e92001 modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
Fix up accesses of ipp structures in gtkcupsutils.c
2012-04-23 14:50:01 -07:00
John Ralls
75103b62e5 modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
Having refactored cups_request_printer_list_cb so that the cups
 version-dependent block size is small enough to be handled in a single
 ifdef, make the ifdef HAVE_CUPS_API_1_6 block
2012-04-23 14:49:47 -07:00
John Ralls
7d2725e400 Move some variable declarations into the scopes in which they're used. 2012-04-23 14:49:25 -07:00
John Ralls
b7d59f73db Extract Function cups_create_printer 2012-04-23 14:48:52 -07:00
John Ralls
0d1edac55b Extract function cups_printer_handle_attribute 2012-04-23 14:48:39 -07:00
John Ralls
61dd746d51 Extract printer setup variables into a struct
So that it can be passed as a single parameter to functions as we
extract-function to make cups_request_printer_list_cb more manageable.

Note that not all of the affected variables are changed in this
changeset. Those are in extracted functions and will be addressed in the
next two changes.
2012-04-23 14:48:25 -07:00
John Ralls
399f31021c Create enum PrinterStateLevel
Fixes "magic number" in printer_state_reason_level.
2012-04-23 14:47:33 -07:00
John Ralls
3100279bf1 Extract reasons and reasons_desc arrays to file level
So that they can be used from more than one function. Rename them to
avoid naming conflicts.
2012-04-23 14:47:15 -07:00
John Ralls
0883b09086 modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
The first, simple changes. Turns off the deprecation warnings and
 substitutes macros and short ifdef blocks where feasible.
2012-04-23 14:46:54 -07:00