From 652ea75b88a109481a7a2492a448eff9f35d5973 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Sun, 9 Jul 2006 02:32:36 -0400 Subject: Bounce icon correctly according to dock orientation. --- dock.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dock.c b/dock.c index c7336c6..f759f99 100644 --- a/dock.c +++ b/dock.c @@ -532,9 +532,17 @@ kiba_launcher_exec (gpointer data) KibaLauncher *launcher = data; char **argv; GError *error = NULL; + const KibaDockLayoutData *d; /* Bounce the icon. */ - launcher->object->previous_position.y += g_random_double_range (5, 10); + d = &kiba_dock_layout_data[launcher->dock->position]; + + if (d->orientation == GTK_ORIENTATION_VERTICAL) + launcher->object->previous_position.x += + (d->halignment - 1) * g_random_double_range (5, 10); + else + launcher->object->previous_position.y += + (d->valignment - 1) * g_random_double_range (5, 10); /* FIXME: Support drag and drop on launchers with %U and %F */ /* FIXME: Use g_shell_quote or split or whatever it was... */ -- cgit v1.2.3