time_t now;
Actor *actor;
+ fprintf(stderr, "long_timeout %i\n", desktop_plugin->priv->long_timer);
+ if (desktop_plugin->priv->long_timer == 0 )
+ return FALSE;
- /* TODO remove timeout */
if (!desktop_plugin->priv->visible){
- desktop_plugin->priv->short_timer = 0;
+ if(desktop_plugin->priv->short_timer != 0){
+ g_source_remove(desktop_plugin->priv->short_timer);
+ desktop_plugin->priv->short_timer = 0;
+ }
return FALSE;
}
//fprintf(stderr, "timer daytime=%d\n", daytime);
{
gboolean visible;
g_object_get (object, "is-on-current-desktop", &visible, NULL);
+ /* fprintf (stderr, "is-on-current-desktop changed. visible: %u", visible); */
if (visible){
desktop_plugin->priv->visible = TRUE;
- if ( desktop_plugin->priv->long_timer == 0){
+ if (desktop_plugin->priv->long_timer == 0 )
desktop_plugin->priv->long_timer = g_timeout_add(LONG_TIMER, (GtkFunction)long_timeout, desktop_plugin);
- }
}else{
desktop_plugin->priv->visible = FALSE;
- g_source_remove(desktop_plugin->priv->long_timer);
- desktop_plugin->priv->long_timer = 0;
+ if (desktop_plugin->priv->long_timer != 0 ){
+ g_source_remove(desktop_plugin->priv->long_timer);
+ desktop_plugin->priv->long_timer = 0;
+ }
}
- /* fprintf (stderr, "is-on-current-desktop changed. visible: %u", visible); */
}
gboolean
/* Load config */
read_config(priv);
priv->desktop_plugin = desktop_plugin;
+ widget = gtk_fixed_new();
+
- gtk_widget_set_size_request(widget, 95, 68);
++ gtk_widget_set_size_request(widget, 95, 50);
+ snprintf(buffer, sizeof(buffer) - 1, "%s/%s/%s", THEME_PATH, desktop_plugin->priv->theme, "town_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);
+ }
/* Create rich animation event */
rich_animation = gtk_event_box_new();
if(rich_animation){
gtk_widget_set_events(rich_animation, GDK_BUTTON_PRESS_MASK);
gtk_event_box_set_visible_window(GTK_EVENT_BOX(rich_animation), FALSE);
- gtk_widget_set_size_request(rich_animation, 95, 60);
- gtk_widget_set_size_request(rich_animation, 95, 30);
++ gtk_widget_set_size_request(rich_animation, 95, 50);
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);
}
/*
- label = gtk_label_new ("");
+ GtkWidget *label = gtk_label_new ("ddddddddddddd");
gtk_widget_set_size_request(label, 95, 30);
gtk_widget_show (label);
- gtk_container_add (GTK_CONTAINER (desktop_plugin), label);
+// gtk_container_add (GTK_CONTAINER (desktop_plugin), label);
+ gtk_fixed_put(GTK_FIXED(widget), label, 0, 0);
*/
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_container_add (GTK_CONTAINER (desktop_plugin), rich_animation);
+ gtk_widget_show (widget);
+ gtk_container_add (GTK_CONTAINER (desktop_plugin), widget);
init_applet_position();
- /* start value for random */
- seed = time(NULL);
-
+
fprintf(stderr, "!!!theme = %s\n", priv->theme);
if (!strcmp(priv->theme,"Modern"))
init_scene(desktop_plugin);