Commit Graph

32883 Commits

Author SHA1 Message Date
Michael Natterer
ed5d7fed89 quartz: filter out button press events on the window frame
Don't try to handle button press events on the window frame, they
have out-of-window coordinates. Also, break grabs on such events
so popup menus go away.
Patch from Kristian Rietveld, fixes bug 684419.
(cherry picked from commit 43e1354b71)
2012-11-15 12:35:58 +01:00
Jonny Lamb
2f8c2a3244 filechooser: remember sidebar width
https://bugzilla.gnome.org/show_bug.cgi?id=524295

Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
2012-11-14 20:03:23 -06:00
Benjamin Otte
5671a869c2 Revert parts of "window: Remove useless functions"
This reverts the size_allocate removal from commit
8449e05865. That code was using
_gtk_window_set_allocation() instead of gtk_widget_set_allocation(). And
that broke glade.
2012-11-14 20:12:30 +01:00
Piotr Drąg
f9b2edff39 Updated POTFILES.skip 2012-11-14 16:15:27 +01:00
Benjamin Otte
53262cf7a6 sizerequest: Optimize CONSTANT_SIZE better
We can set for_size to -1 earlier than we did. Doing so makes sure we
only cache one value (as we should in the first place). In GTK 3.6, this
worked properly, but with Previously, this check was moved further up to
avoid interacting with size groups. But after recent refactorings, size
groups are handled way earlier anyway.
2012-11-14 14:03:47 +01:00
Benjamin Otte
6d3b4d9382 stylecontext: Add a flag to force style_updated() emission
This is used in gtk_widget_reset_style() (via GTK_CSS_CHANGE_ANY) now,
and that makes GtkSettings font related changes work again.
2012-11-14 13:25:44 +01:00
Benjamin Otte
d3143779d2 sizerequestcache: Move rest of code to array
... of orientation. Reduces more duplicate if branches.
2012-11-14 01:55:29 +01:00
Benjamin Otte
43fc428cf0 sizerequestcache: Make code an array
We can use orientation as the index into an array. That way we can
delete half the code. Do it for the base request first in this patch.
2012-11-14 01:55:29 +01:00
Benjamin Otte
70ba973d1d sizegroup: Simplify comparison 2012-11-14 01:55:29 +01:00
Benjamin Otte
fd6ea42319 sizerequest: Use GtkOrientation
... instead of GtkSizeGroupMode. Orientation is what we're interested in
after all. When we need a GtkSizeGroupMode, we can do the translation
where we need it.
2012-11-14 01:55:29 +01:00
Benjamin Otte
0e0ee480d3 sizerequestcache: Move lookup function
...and clean up its API.
2012-11-14 01:55:29 +01:00
Benjamin Otte
78d0ef1d0b sizerequestcache: Move commit function 2012-11-14 01:55:28 +01:00
Benjamin Otte
14c8e33ab9 widget: Get rid of unused flags
Now that we clear the cache immediately, there's no need anymore to
track if a request has been queued.
2012-11-14 01:55:28 +01:00
Benjamin Otte
c08efb2b32 sizerequest: Cache the request mode
... in the GtkSizeRequestCache. That way, we only need to query it once,
and can remove the caching code from GtkContainer.
2012-11-14 01:55:28 +01:00
Benjamin Otte
c98ee1ec39 sizerequestcache: Make clear_cache clear all the cache 2012-11-14 01:55:28 +01:00
Benjamin Otte
4366f80aab sizerequestcache: Move functions
... into the sizerequestcache.c file.
2012-11-14 01:55:28 +01:00
Benjamin Otte
15570dd63d reftests: Turns out, green changed color
What used to be "green" is now "lime"
2012-11-14 01:55:28 +01:00
Benjamin Otte
10c47c0226 reftests: Update named colors reftest
Make reftest conform with correct colors. Pango has been updated to
these colors in commit d2c319b9ded8cce864914d9f1fd704a7aff3112f
2012-11-14 01:55:28 +01:00
Benjamin Otte
0a1a2ac148 sizerequest: Split out size request cache code into separate header 2012-11-14 01:55:28 +01:00
Michael Natterer
aa989a637a quartz: move SPLASHSCREEN-hinted windows to NSStatusWindowLevel
which does not really have a different effect than the previously
used NSPopUpMenuWindowLevel, but is what all code examples I found
are using, and it does make more sense.
(cherry picked from commit 47f0e3f1e1)
2012-11-13 20:05:33 +01:00
Timothy Arceri
50a09957a4 Remove bookmark duplicate of shortcut
Application code can set shortcut folders that are already bookmarks.
This code causes the bookmarks to be refreshed after the shortcut is
added removing any possible bookmark duplicates

https://bugzilla.gnome.org/show_bug.cgi?id=577806
2012-11-13 12:54:15 -06:00
Chun-wei Fan
e57ecafb6b Visual C++ property sheets: Update GtkBinaryVersion
This should now be 3.0.0 like the autotools builds...
2012-11-13 14:26:08 +08:00
Mike Gorse
b7743430aa Add accessibles for GtkEntry icons
Expose GtkEntry icons as child accessibles of a GtkEntry, and provide
actions to simulate clicking them. Also, refactor the a11y children test
slightly to add a test.

https://bugzilla.gnome.org/show_bug.cgi?id=686347
2012-11-12 09:21:27 -06:00
Mike Gorse
77c0f9d8e6 Send a notification when a GtkEntry icon's tooltip text changes 2012-11-12 09:15:46 -06:00
Benjamin Otte
872097603f reftests: Add a test for border-width problems 2012-11-11 20:26:28 +01:00
Benjamin Otte
5e01a05b30 bin: Handle border width if we have to
Some bin subclasses call gtk_container_handle_border_width(), some
don't. So work with both cases.
2012-11-11 20:26:28 +01:00
Benjamin Otte
a08eb4d58a container: Simplify code
We will never get allocated a too small size, so no need to handle that
case.
2012-11-11 20:26:28 +01:00
Benjamin Otte
8449e05865 window: Remove useless functions
Now that GtkBin implements sizing functionality, there's no need to do
the same in GtkWindow
2012-11-11 20:26:28 +01:00
Benjamin Otte
b0f3aa82b7 bin: Only handle size for the child if it is visible 2012-11-11 20:26:27 +01:00
Piotr Drąg
4950f68a87 Updated POTFILES.skip 2012-11-10 20:21:33 +01:00
Benjamin Otte
5f20d909e6 tests: Add an intersection test for the recent bug
Just using the hardcoded bitmasks triggered the bug fixed in commit
e8f2eeac92 - so just do that as the test.
2012-11-10 18:55:14 +01:00
Benjamin Otte
c59e8de533 tests: Add some bitmasks to the hardcoded list
The bitmasks with the 31st, 32nd and 63rd bit set are added. The make up
the largest bitmasks on 32bit/64bit that can be represented without
allocating and the smallest bitmask on 32bit that must be allocated.
2012-11-10 18:53:34 +01:00
Benjamin Otte
e8f2eeac92 bitmask: Fix intersection code
With the fix in 77912a65e2, another bug
got visible: booleans are 32 bits, so if the intersection between the 2
bitmasks happened in higher bits, the return value would be truncated to
FALSE.

This actually made slider handles disappear, so it was pretty visible.
2012-11-10 18:35:37 +01:00
Benjamin Otte
aae2bf91cb cssvalue: Make shade() work properly again
In a previous commit, I accidentally scaled the hue instead of the
saturation. Ooops.
2012-11-10 14:25:18 +01:00
Benjamin Otte
10c3a66e40 reftests: Add a test for all the color names
BIG NOTE: We fail on some of these to give the colors defined in the CSS
specs. This is not good, but I'm not sure how to best fix it.
For those cases, I've kept the correct color in the CSS file but added
the correct one next to it.
2012-11-10 14:25:17 +01:00
Piotr Drąg
42fc6ab5d3 Updated POTFILES.skip 2012-11-10 00:38:13 +01:00
Stef Walter
c8de9abe98 icon-theme: Add some preconditions for NULL arguments
Related to this crash: https://bugzilla.gnome.org/show_bug.cgi?id=687967

https://bugzilla.gnome.org/show_bug.cgi?id=687977
2012-11-09 11:59:09 +01:00
Alexander Larsson
e60c9219f1 Make _gtk_css_lookup_get_missing inline
This is called a lot in the loop in gtk_css_style_provider_lookup which
actually showed up on profiles.
2012-11-09 10:16:23 +01:00
Alexander Larsson
1c4158a649 gtk_css_style_provider_lookup: minor loop optimiziation
This is a minor performance improvement but this loop
is run a lot so it actually matters in large state
changes.
2012-11-09 10:16:18 +01:00
Alexander Larsson
55d65571f3 Exit early in gtk_style_context_update_cache codepaths
If lookup->missing is empty we don't need to continue looking.
We short circuit in several places as this can happen
after iteratively makeign lookup->missing smaller.
2012-11-09 10:15:23 +01:00
Alexander Larsson
77912a65e2 Fix cnp bug in _gtk_bitmask_intersects
We need to use the allocated codepath if *any* argument is
allocated, not if one arg is not allocated.
This bug caused unnecessary calls to _gtk_bitmask_is_allocated,
as well as return completely wrong result if both bitmask are
allocated.
2012-11-09 10:11:47 +01:00
Alexander Larsson
8a40d8fe2a gdk: Add gdk_window_has_alpha helper
This centralizes the current checks for has_alpha_bg, which
lets us extend the check later.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2012-11-09 10:08:22 +01:00
Alexander Larsson
c94002f8c0 Add "parent widget" button to test property editor
Without this its hard to access the properties of container
widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2012-11-09 10:08:22 +01:00
Jasper St. Pierre
f4438a1ffc gtkbin: Remove the silliest code on earth
What is this bin doing with all these crazy deltas? Company does:

<Company> that can safely be removed
<Company> in general, code that isn't obvious can either be understood
<Company> with a bit of thinking or it can be removed
<Company> if in doubt, go for the 2nd of those :)

Most GtkBin subclasses override this strange garbage anyway, so it's
not like this code is ever *run*, per se. Just make it proxy directly
to the child, and hope nothing goes wrong.
2012-11-08 19:19:53 -05:00
Jasper St. Pierre
3563d11fc6 gtkbin: Complete more of a base implementation for GtkBin subclasses
Implement get_preferred_width, get_preferred_height, and size_allocate.
This allows GtkBin subclasses to be quick and easy, without the
author doing the subclassing to have to do much work.
2012-11-08 19:19:46 -05:00
Jasper St. Pierre
7b950944b0 gtkversion.h.in: Put the documentation inside the header guards
This fixes a warning with gobject-introspecion scanning
2012-11-08 19:19:00 -05:00
Benjamin Otte
ffeef28dbc reftests: Add test for recent fix 2012-11-08 23:34:30 +01:00
Benjamin Otte
0d9a45d460 label: Fix another sizing corner case causing segfaults
If the "wider" label is the smaller one, use the wider size for both
cases. This can happen when ellipsizing a single character, which is
often smaller than the ellipsizing glpyph(s).
2012-11-08 23:34:30 +01:00
Benjamin Otte
947fed0961 stylecontext: Fix a memleak 2012-11-08 23:34:30 +01:00
Benjamin Otte
ba88174614 stylecontext: Remove unused function 2012-11-08 23:34:29 +01:00