}
return result;
}
-void read_notification(AWallpaperPlugin *desktop_plugin)
+gchar * read_notification()
{
- gchar *message = NULL;
+ gchar *message = "";
gint count = 0;
fprintf(stderr, "read notification \n");
message = g_strdup_printf("%s: %d", _("Missed mail"), count);
}
}
- desktop_plugin->priv->scene->notification = g_strdup(message);
- g_free(message);
+ return message;
}
void
change_billboard(Actor * actor, AWallpaperPlugin *desktop_plugin)
{
GtkWidget *label;
- gchar *mes = NULL;
+ gchar *mes = NULL, *message = NULL;
PangoFontDescription *pfd = NULL;
- fprintf(stderr, "change_billboard\n");
+ fprintf(stderr, "change_billboard\n");
if (desktop_plugin->priv->scene->notification){
+ message = read_notification();
label = actor->image;
mes = g_markup_printf_escaped("<span bgcolor=\"%s\" foreground=\"%s\">%s</span>", "#FFFFFF", "#000000",
- desktop_plugin->priv->scene->notification);
+ message);
gtk_label_set_markup(GTK_LABEL(label), mes);
pfd = pango_font_description_from_string("Sans 16");
gtk_widget_modify_font(GTK_WIDGET(label), NULL);
gtk_widget_modify_font(GTK_WIDGET(label), pfd);
pango_font_description_free(pfd);
+
+ desktop_plugin->priv->scene->notification = FALSE;
}
actor->time_start_animation = time(NULL) + 20;
}