static void
animation_wallpaper_plugin_init (AWallpaperPlugin *desktop_plugin)
{
- GtkWidget *widget;
GtkWidget *rich_animation;
gchar buffer[2048];
- GtkWidget *background_town = NULL;
fprintf(stderr, "!!!!!!!plugin init \n");
Animation_WallpaperPrivate *priv = Animation_Wallpaper_HOME_PLUGIN_GET_PRIVATE (desktop_plugin);
/* Load config */
read_config(priv);
priv->desktop_plugin = desktop_plugin;
- widget = gtk_fixed_new();
+ desktop_plugin->priv->main_widget = gtk_fixed_new();
- gtk_widget_set_size_request(widget, 100, 32);
+ gtk_widget_set_size_request(desktop_plugin->priv->main_widget, 100, 32);
+ desktop_plugin->priv->right_corner = NULL;
snprintf(buffer, sizeof(buffer) - 1, "%s/%s/%s", THEME_PATH, desktop_plugin->priv->theme, "town0_right_corner.png");
- background_town = gtk_image_new_from_file (buffer);
- if (background_town){
- gtk_fixed_put(GTK_FIXED(widget), background_town, 0, 0);
- gtk_widget_show (background_town);
+ desktop_plugin->priv->right_corner = gtk_image_new_from_file (buffer);
+ if (desktop_plugin->priv->right_corner){
+ gtk_fixed_put(GTK_FIXED(desktop_plugin->priv->main_widget), desktop_plugin->priv->right_corner, 0, 0);
+ gtk_widget_show (desktop_plugin->priv->right_corner);
}
/* Create rich animation event */
rich_animation = gtk_event_box_new();
gtk_widget_set_size_request(rich_animation, 100, 32);
gtk_widget_show (rich_animation);
g_signal_connect(rich_animation, "button-press-event", G_CALLBACK(rich_animation_press), desktop_plugin);
- gtk_fixed_put(GTK_FIXED(widget), rich_animation, 0, 0);
+ gtk_fixed_put(GTK_FIXED(desktop_plugin->priv->main_widget), rich_animation, 0, 0);
}
/*
GtkWidget *label = gtk_label_new ("ddddddddddddd");
hd_home_plugin_item_set_settings (HD_HOME_PLUGIN_ITEM (desktop_plugin), TRUE);
g_signal_connect (desktop_plugin, "show-settings",
G_CALLBACK (lw_settings), priv);
- gtk_widget_show (widget);
- gtk_container_add (GTK_CONTAINER (desktop_plugin), widget);
+ gtk_widget_show (desktop_plugin->priv->main_widget);
+ gtk_container_add (GTK_CONTAINER (desktop_plugin), desktop_plugin->priv->main_widget);
init_applet_position();