}
static GtkWidget*
-init_object(gchar * name, gchar * filename, gint x, gint y, gint z, gint width, gint height, gboolean visible, gint scale, gint opacity, void (*pfunc)(GtkWidget*, gpointer))
+init_object(AWallpaperPlugin *desktop_plugin, gchar * name, gchar * filename, gint x, gint y, gint z, gint width, gint height, gboolean visible, gint scale, gint opacity, void (*pfunc)(GtkWidget*, gpointer))
{
GtkWidget *actor;
GdkPixbuf *pixbuf;
actor = hildon_animation_actor_new();
gchar str[256];
- snprintf(str, 255, "/usr/share/livewp/theme/Modern/%s", filename);
+ snprintf(str, 255, "/%s/%s/%s", THEME_PATH, desktop_plugin->priv->theme, filename);
//fprintf(stderr, "!!!init object !!!!\nname = %s file = %s\n", name, str);
pixbuf = gdk_pixbuf_new_from_file_at_size (str,
width,
}
static void
-init_scene(GtkWidget *window)
+init_scene(AWallpaperPlugin *desktop_plugin)
{
GtkWidget *actor;
GdkPixbuf *pixbuf;
gint x, y;
GSList * list = NULL;
- scene.window = window;
+ scene.window = desktop_plugin;
scene.daytime = get_daytime();
scene.dynamic_actors = NULL;
scene.static_actors = NULL;
get_sun_pos(&alt, &azm);
get_sun_screen_pos(alt, azm, &x, &y);
- actor = init_object("sun", "sun.png", x, y, 11, 88, 88, 1, 100, 255, &change_sun);
+ actor = init_object(desktop_plugin, "sun", "sun.png", x, y, 11, 88, 88, 1, 100, 255, &change_sun);
//scene.static_actors = g_slist_append(scene.static_actors, G_OBJECT(actor));
scene.dynamic_actors = g_slist_append(scene.dynamic_actors, G_OBJECT(actor));
//ma1->multiactor_init("sun", g_slist_append(list, G_OBJECT(actor)));
- actor = init_object("sky", "sky.png", 0, 0, 5, 800, 480, 1, 100, 255, NULL);
+ actor = init_object(desktop_plugin, "sky", "sky.png", 0, 0, 5, 800, 480, 1, 100, 255, NULL);
scene.dynamic_actors = g_slist_append(scene.dynamic_actors, G_OBJECT(actor));
- actor = init_object("town", "town.png", 0, 480-374, 10, 800, 374, 1, 100, 255, NULL);
+ actor = init_object(desktop_plugin, "town", "town.png", 0, 480-374, 10, 800, 374, 1, 100, 255, NULL);
scene.static_actors = g_slist_append(scene.static_actors, G_OBJECT(actor));
- actor = init_object("border", "border.png", 0, 480-79, 30, 800, 79, 1, 100, 255, NULL);
+ actor = init_object(desktop_plugin, "border", "border.png", 0, 480-79, 30, 800, 79, 1, 100, 255, NULL);
scene.static_actors = g_slist_append(scene.static_actors, G_OBJECT(actor));
- actor = init_object("tram", "tram.png", -350, 60+480-374+34, 25, 350, 274, 1, 100, 255, &change_tram);
+ actor = init_object(desktop_plugin, "tram", "tram.png", -350, 60+480-374+34, 25, 350, 274, 1, 100, 255, &change_tram);
scene.dynamic_actors = g_slist_append(scene.dynamic_actors, G_OBJECT(actor));
/*
}
static void
-init_scene1(GtkWidget *window)
+init_scene1(AWallpaperPlugin *desktop_plugin)
{
GtkWidget *actor;
GdkPixbuf *pixbuf;
gint x, y;
GSList * list = NULL;
- scene.window = window;
+ scene.window = desktop_plugin;
scene.daytime = get_daytime();
scene.dynamic_actors = NULL;
scene.static_actors = NULL;
get_sun_pos(&alt, &azm);
get_sun_screen_pos(alt, azm, &x, &y);
- actor = init_object("sun", "sun.png", x, y, 20, 88, 88, 1, 100, 255, &change_sun);
+ actor = init_object(desktop_plugin, "sun", "sun.png", x, y, 20, 88, 88, 1, 100, 255, &change_sun);
//scene.static_actors = g_slist_append(scene.static_actors, G_OBJECT(actor));
scene.dynamic_actors = g_slist_append(scene.dynamic_actors, G_OBJECT(actor));
//ma1->multiactor_init("sun", g_slist_append(list, G_OBJECT(actor)));
- actor = init_object("background", "sky_dark.png", 0, 0, 4, 800, 480, 1, 100, 255, NULL);
+ actor = init_object(desktop_plugin, "background", "sky_dark.png", 0, 0, 4, 800, 480, 1, 100, 255, NULL);
scene.dynamic_actors = g_slist_append(scene.dynamic_actors, G_OBJECT(actor));
- actor = init_object("sky", "sky.png", 0, 0, 5, 800, 480, 1, 100, 255, &change_sky);
+ actor = init_object(desktop_plugin, "sky", "sky.png", 0, 0, 5, 800, 480, 1, 100, 255, &change_sky);
scene.dynamic_actors = g_slist_append(scene.dynamic_actors, G_OBJECT(actor));
- actor = init_object("town", "town.png", 0, 0, 10, 800, 480, 1, 100, 255, NULL);
+ actor = init_object(desktop_plugin, "town", "town.png", 0, 0, 10, 800, 480, 1, 100, 255, NULL);
scene.static_actors = g_slist_append(scene.static_actors, G_OBJECT(actor));
/*