Commit Graph

7527 Commits

Author SHA1 Message Date
Jasper St. Pierre
164c6ee741 text: Bubble up a click and quit early for just static text
Static text shouldn't need a cursor position or anything like that,
and it always eats a button press event.

https://bugzilla.gnome.org/show_bug.cgi?id=673190
2012-04-13 14:34:46 -04:00
Christian Kirbach
2a12747ae3 [l10n] Updated German translation 2012-04-13 19:46:47 +02:00
Emmanuele Bassi
7fffb7290e actor: Return a valid paint volume by default
It's been a year and change, and two stable releases, since we
introduced the paint volume mechanism to allow actors to paint outside
their allocation safely in environments that support clipped redraws.

The time has come to flip the switch, and return a valid paint volume,
matching the actor's allocation, by default - at least for Actor
instances from classes that do not override paint() and
get_paint_volume().

If an actor has a paint signal handler then it's the user responsability
not to paint outside the allocation - and to suffer the consequences of
doing so; in an ideal world, paint() would not be a signal in the first
place anyway. Plus, the idea that painting can happen at any time and
still have a valid surface greatly conflicts with the design goal of
making Clutter's rendering operations fully retained into a render tree.

We can still revert this commit before spinning 1.12, if need be.
2012-04-12 17:50:43 +01:00
Emmanuele Bassi
0bf5008159 interactive/snap-constaint: Modernize code 2012-04-12 17:08:33 +01:00
Emmanuele Bassi
119a25269e actor: Check for mapped children in the default get_paint_volume()
Unmapped children won't be painted so they should not contribute to the
default paint volume computation.
2012-04-12 17:07:06 +01:00
Emmanuele Bassi
98c9dad42f actor: Clear MetaGroups when empty
When removing the last Action, Constraint, or Effect, we should also be
clearing the corresponding MetaGroup: code inside ClutterActor relies on
NULL checks, and changing them all to check for NULL && n_items == 0
would not be fun.
2012-04-12 17:04:57 +01:00
Peter Hutterer
a66fbd258e Rename XINPUT_2_2 define to HAVE_XINPUT_2_2
configure.ac defines XINPUT_2_2 if XI 2.2 support was found. The code
expects XINPUT_2_2 in the device manager, but HAVE_XINPUT_2_2 in the x11
backend.

On newer X servers, the latter causes a BadValue when XIQueryDevice sends a
different major/minor than gdk's device manager (gnome-control-center).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

https://bugzilla.gnome.org/show_bug.cgi?id=673961
2012-04-12 11:31:29 +01:00
Emmanuele Bassi
14b9cb4f7b actor: Fix completed transitions logic
We need to remove the transition only if the current repeat is equal to
the number of repeats, and if the transition was marked as remove on
complete. Otherwise, the transition has to remain where it is.
2012-04-11 13:57:06 +01:00
Rob Bradford
2d48e6e3e4 build: Bump pango dependency to 1.30
Clutter now uses pango_layout_get_character_count() which was added in 1.30.
2012-04-11 11:56:11 +01:00
Carles Ferrando
656d5c31e3 [l10n]Updated Catalan (Valencian) translation 2012-04-10 20:56:50 +02:00
Jordi Serratosa
331488fe86 [l10n] Fixes on Catalan translation 2012-04-10 20:56:46 +02:00
Emmanuele Bassi
ab486bfe70 actor: Remove unnecessary relayout/redraw calls
They will be handled internally.
2012-04-10 13:37:04 +01:00
Emmanuele Bassi
de9112bc8c actor: Do not queue_redraw() in set_opacity()
The opacity internal setter will do it for us, and it will take into
consideration any eventual flatten effect applied to the actor.

This unbreaks the actor-offscreen-redirect conformance test.
2012-04-10 12:59:16 +01:00
Emmanuele Bassi
25bf0b72f6 x11/stage: Leave a comment about multi-head setup
The get_geometry() implementation is broken on multi-head systems; the
only solution is to use XRandR to get the size of the CRTC that contains
the stage.
2012-04-10 12:34:54 +01:00
Emmanuele Bassi
b12514ff9a stage: Unset the natural size when fullscreening
This ensures that constraints and signal handlers will go through the
allocation and not through the cache after ::fullscreen has been
emitted.
2012-04-10 12:12:50 +01:00
Emmanuele Bassi
612b714149 interactive/stage-sizing: Clean up 2012-04-10 12:12:28 +01:00
Emmanuele Bassi
f6da5ea616 x11/device-manager-xi2: Add 'Abs Distance' axis
In XInput 2, the proximity events of XInput 1 have been replaced by an
axis on a valuator class. This means that, on devices that support
proximity information, for instance pens of a tablet, you will start
receiving events with the distance as an axis value - similarly to how
the pressure and tilt are presented in the API.
2012-04-10 09:32:00 +01:00
Emmanuele Bassi
c699972bfa enums: Add CLUTTER_INPUT_AXIS_DISTANCE 2012-04-10 09:32:00 +01:00
Owen W. Taylor
bdf4b3a33a ClutterText: Fix length passed to clutter_text_buffer_set_text()
clutter_text_buffer_set_text() expects a char count, not a byte
count, so pass -1 rather than using strlen.

https://bugzilla.gnome.org/show_bug.cgi?id=673783
2012-04-09 16:11:49 -04:00
Emmanuele Bassi
86a5213473 x11/device-manager-xi2: Remove heuristics for touchscreen devices
Devices that have touch valuator classes will be touchscreens or
touchpads; anything else should be ignored.
2012-04-07 23:07:59 +01:00
Emmanuele Bassi
532904e43d osx: Fix build 2012-04-04 15:33:32 +01:00
Emmanuele Bassi
ea68ccf703 build: Remove -Waggregate-returns 2012-04-04 15:33:05 +01:00
Daniel Nylander
cc43536b3c Updated Swedish translation 2012-04-01 20:31:08 +02:00
Emmanuele Bassi
d45420f992 actor: Make _clutter_actor_foreach_child() safe again
We were using g_list_foreach() prior to the first Apocalypse, and that
function is resilient against changes to the list while iterating it;
since we are not using a GList any more, we need handle this case
ourselves.
2012-03-29 15:52:51 +01:00
Emmanuele Bassi
656c641d31 interactive/bin-layout: Call save/restore easing state
Don't do unprotected calls to set_easing_mode() and
set_easing_duration().
2012-03-29 15:12:09 +01:00
Emmanuele Bassi
499534f3ac actor: Make :content-gravity animatable
Let's start making some non-trivial property animatable, like the
content gravity.
2012-03-29 15:11:52 +01:00
Stefano Facchini
2c46baf30c canvas: avoid emission of "draw" signal when the size is zero
This also avoids the warning

  Cogl-WARNING **: ./cogl-buffer.c:215: GL error (1285): Out of memory

generated by cogl_buffer_map when the CoglBuffer has zero length.
2012-03-29 15:14:29 +02:00
Emmanuele Bassi
97dcfe5bf1 actor: Ensure that we correctly remove transitions
The check on :remove-on-complete was inverted, but we also need to check
that the current repeat of the timeline is also the last.
2012-03-29 12:01:03 +01:00
Emmanuele Bassi
ff9a503c14 actor: Minor optimization to avoid get_preferred_*
When the easing state has a duration of zero milliseconds we can skip
the entire create_transition() call inside set_width() and set_height(),
to avoid what may be a costly call to get_preferred_*.
2012-03-28 18:07:06 +01:00
Emmanuele Bassi
cede56dcdd actor: Ensure we use the current easing duration and mode
When updating a transition in flight, if the current easing state does
not match the transition's.
2012-03-28 16:39:30 +01:00
Emmanuele Bassi
824dfcc67e docs: Mention in-flight value changes 2012-03-28 13:21:58 +01:00
Emmanuele Bassi
39ddf9c542 interactive/animation: Use implicit animations instead of animate()
Also, nest animations.
2012-03-28 13:01:17 +01:00
Emmanuele Bassi
2355b57aab interactive/transitions: Jump to middle-click coordinates
Middle click will update an existing transition while in flight, and
skip it.
2012-03-28 12:46:30 +01:00
Emmanuele Bassi
24d43cd076 actor: Check easing duration when updating in-flight transitions
If we update a transition that is currently playing, we need to check
the current easing state, and look at the eventual duration, in case
the user wants to cancel the transition.
2012-03-28 12:43:57 +01:00
Emmanuele Bassi
3c1358da5d table-layout: Fix [xy]_expand
A copy and paste thinko.

https://bugzilla.gnome.org/show_bug.cgi?id=672853
2012-03-28 12:01:25 +01:00
Jasper St. Pierre
628ffa7b91 actor: Invalidate the current state when popping easing states
https://bugzilla.gnome.org/show_bug.cgi?id=672945
2012-03-28 11:56:01 +01:00
Emmanuele Bassi
fa8d431941 actor: Simplify setters of animatable properties
Instead of checking the duration of the current easing state we should
check if there's a transition in progress, and update it
unconditionally.

If there is no easing state, or the easing state has a duration of zero
milliseconds, then create_transition() should bail out early and set the
requested final state.

This allows us to write:

  clutter_actor_save_easing_state (actor);
  clutter_actor_set_x (actor, 200);
  clutter_actor_restore_easing_state (actor);

  [...]

  clutter_actor_set_x (actor, 100);

and have the second set_x() update the easing in progress, instead of
being ignored.

https://bugzilla.gnome.org/show_bug.cgi?id=672945
2012-03-28 11:52:01 +01:00
Emmanuele Bassi
0f7dab15d8 interactive/transitions: Add missing easing state save/restore
The test hasn't been updated after commit 229241b8, and was trying to
change the easing state without creating one.
2012-03-28 11:49:53 +01:00
Emmanuele Bassi
f4af52ca7f Remove unused fields from LayoutInfo
The x_expand and y_expand members would mess up the initialization of
the constant LayoutInfo default structure.
2012-03-27 12:09:28 +01:00
Emmanuele Bassi
b074db869c actor: Add debug annotation in add_transition() 2012-03-27 11:38:04 +01:00
Emmanuele Bassi
1ef85372cc actor: Add IN_DESTRUCTION checks
Commit 80626e7584 removed an
IN_DESTRUCTION check from within the add_child_internal() method,
outlining an option for bringing it back. It was too late for the 1.10
cycle to do it, and eventually pick up the pieces, but now that we're
at the beginning of the 1.11 cycle we can restore it, and add checks
elsewhere to balance it.
2012-03-27 11:38:04 +01:00
Tristan Van Berkom
67058229f0 Properly manage timeline refcounting in clutter_animation_set_timeline()
This patch fixes clutter to not crash when multiple animations share
the same timeline and the actors are explicitly destroyed before
the timeline completes (bug 672890)
2012-03-27 16:57:38 +09:00
Ihar Hrachyshka
ba3bfde2ea Updated Belarusian translation. 2012-03-26 14:25:45 +03:00
Rudolfs Mazurs
b11031c5ce Updated Latvian translation. 2012-03-25 13:58:54 +03:00
Daniel Korostil
9d33a62f21 Uploaded Ukranian 2012-03-24 18:37:10 +02:00
Kenneth Nielsen
289244f0dd Updated Danish translation 2012-03-24 11:59:17 +01:00
Neil Roberts
c9a81f035e Don't use any GL types or defines in Clutter
Some of the Clutter code was using GL types for the primitive types
such as GLint and GLubyte and then passing these to Cogl. This doesn't
make much sense because the Cogl functions directly take native C
types. This patch just replaces them with either a native C type or a
glib type.

Some of the cogl conformance tests are trying to directly call GL for
example to test creating a foreign texture. These tests have been
changed to manually define the GL enum values instead of relying on a
GL header to define them.

This is necessary because Cogl may soon stop including a GL header
from its public headers.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-23 17:24:42 +00:00
Neil Roberts
04f2be34b2 configure: Fix the -o operator in a call to test
The disjunction operator was misspelt as -O which tests whether the
following file is owned by the calling user. This doesn't take enough
arguments so bash was showing an error and the test was always
failing. This meant that NEED_XKB_UTILS was always false which should
have broken the build but the Makefile was mistakenly including
clutter-xkb-utils.c again if SUPPORT_WAYLAND is defined.

See 1b77565e for reference.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-03-23 16:42:35 +00:00
Emmanuele Bassi
4316a85c16 build: Remove disabling Clutter's deprecation warnings while building it
Now that we have deprecation warnings and not full on symbol removal
from the headers, we can just skip Clutter's own, and use only GLib's.
2012-03-23 11:03:23 +00:00
Rajesh Ranjan
7d4475bce9 hindi translation by Chandan Kumar 2012-03-23 14:48:59 +05:30