void
quit_from_program (Animation_WallpaperPrivate *priv)
{
-
if (priv){
livewp_deinitialize_dbus(priv);
- fprintf(stderr,"Quit from LiveWallpaper \n");
if (priv->long_timer){
g_source_remove(priv->long_timer);
priv->long_timer = 0;
}
destroy_scene(priv->desktop_plugin);
}
- gtk_main_quit();
+ gtk_main_quit();;
}
int
GtkWidget *btn_setting, *vbox, *btn_power;
gint result;
HildonProgram *app;
- int view = 0;
+ int view = 1;
if (argc == 2)
view = atoi(argv[1]);
- fprintf(stderr,"VIEW %i\n", view);
- if (view < 0 || view > 3)
- view = 0;
+ if (view < 1 || view > 4)
+ view = 1;
AWallpaperPlugin *desktop_plugin = g_new0 (AWallpaperPlugin, 1);
Animation_WallpaperPrivate *priv = g_new0 (Animation_WallpaperPrivate, 1);
priv->window = main_widget;
priv->view = view;
- priv->visible = TRUE;
/* Load config */
read_config(priv);
/* Initialize DBUS */
livewp_initialize_dbus(priv);
- set_live_bg(GDK_WINDOW_XDISPLAY (main_widget->window), GDK_WINDOW_XID (main_widget->window), view + 1);
+ set_live_bg(GDK_WINDOW_XDISPLAY (main_widget->window), GDK_WINDOW_XID (main_widget->window), view);
+ if (current_active_view() == view)
+ priv->visible = TRUE;
+ else
+ priv->visible = FALSE;
+
+ fprintf(stderr,"VISIBLE %i %i\n",priv->visible, current_active_view());
init_scene_theme(desktop_plugin);
priv->long_timer = g_timeout_add(LONG_TIMER, (GtkFunction)long_timeout, desktop_plugin);
gtk_main();
- return 0;
}