adde images for notifications
[livewp] / applet / src / livewp-actor.c
index 83ce172..f169e0b 100644 (file)
@@ -185,19 +185,51 @@ change_billboard(Actor * actor, AWallpaperPlugin *desktop_plugin)
     GtkWidget *label;
     gchar *mes = NULL, *message = NULL;
     PangoFontDescription *pfd = NULL;
+    gint count = 0;
+    Actor *a = NULL;
      
     fprintf(stderr, "change_billboard\n");   
+    
     if (desktop_plugin->priv->scene->notification < time(NULL)){
+        count = get_notify_count("general_missed");
+        a = g_ptr_array_index(actor->child, 0);
+        if (count > 0){
+            set_actor_visible(a, TRUE);            
+        }else {
+            set_actor_visible(a, FALSE);
+        }
+        count = get_notify_count("general_sms");
+        a = g_ptr_array_index(actor->child, 3);
+        if (count > 0){
+            set_actor_visible(a, TRUE);            
+        }else {
+            set_actor_visible(a, FALSE);
+        }
+        count = get_notify_count("general_chat");
+        a = g_ptr_array_index(actor->child, 1);
+        if (count > 0){
+            set_actor_visible(a, TRUE);            
+        }else {
+            set_actor_visible(a, FALSE);
+        }
+        count = get_notify_count("qgn_list_messagin");
+        a = g_ptr_array_index(actor->child, 2);
+        if (count > 0){
+            set_actor_visible(a, TRUE);            
+        }else {
+            set_actor_visible(a, FALSE);
+        }
+
+        #if 0
         message = read_notification();
         label = actor->image;
-        mes = g_markup_printf_escaped("<span bgcolor=\"%s\" foreground=\"%s\">%s</span>", "#FFFFFF", "#000000", 
-                                      message);
+        mes = g_markup_printf_escaped("<span bgcolor=\"%s\" foreground=\"%s\">%s</span>", "#FFFFFF", "#000000", 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);
-
+#endif
         desktop_plugin->priv->scene->notification = FALSE;
     }
     actor->time_start_animation = time(NULL) + 20;