diff options
author | Kristian Høgsberg <krh@redhat.com> | 2006-07-09 02:32:36 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2006-07-09 02:32:36 -0400 |
commit | 652ea75b88a109481a7a2492a448eff9f35d5973 (patch) | |
tree | 762ec416df3cdba846af8e2cc1ba3a93f5b5bd67 | |
parent | b8958ea8248d4067830b0770bd7d39b33d6aad5d (diff) |
Bounce icon correctly according to dock orientation.
-rw-r--r-- | dock.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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... */ |