void
change_slideshow(Actor *actor, AWallpaperPlugin *desktop_plugin)
{
- gint num, next, prev, now;
+ gint num, next, prev, now, w, h;
Actor *a1 = NULL, *a2 = NULL;
-
+ GtkImage *image;
+ GdkPixbuf *pixbuf;
struct timeval tvb;
suseconds_t ms;
long sec;
a2->visible = TRUE;
create_hildon_actor(a2, desktop_plugin);
set_actor_opacity(a2, 0);
+ pixbuf = gtk_image_get_pixbuf(a2->image);
+ w = gdk_pixbuf_get_width(pixbuf);
+ h = gdk_pixbuf_get_height(pixbuf);
+ if (w < 800) {
+ set_actor_position(a2, (800-w)/2, 0, 5, desktop_plugin);
+ }
+ if (h < 480){
+ set_actor_position(a2, 0, (480-h)/2, 5, desktop_plugin);
+ }
actor->z = next;
}else {
a2 = g_ptr_array_index(actor->child, next);
void
init_scene_Slideshow(AWallpaperPlugin *desktop_plugin)
{
- gchar *ext, *file, *str;
+ gchar *ext, *file, *str, *bgfile;
Dirent *dp;
DIR *dir_fd;
int i;
}
closedir(dir_fd);
}
+
+ bgfile = g_strdup_printf("/home/user/.backgrounds/background-%i.png", desktop_plugin->priv->view);
+ actor = init_object(desktop_plugin, "original", bgfile,
+ 0, 0, 0, 800, 480,
+ TRUE, TRUE, 100, 255,
+ NULL, NULL, NULL);
+ scene->actors = g_slist_append(scene->actors, actor);
child = g_ptr_array_sized_new(num);
while (store){