added function kill to conky
[livewp] / applet / src / livewp-main.c
index 28b6fd1..7255562 100644 (file)
@@ -34,6 +34,7 @@ void view_state_changed (Animation_WallpaperPrivate *priv);
 static gboolean short_timeout (AWallpaperPlugin *desktop_plugin);
 void run_long_timeout(AWallpaperPlugin *desktop_plugin);
 gboolean long_timeout (AWallpaperPlugin *desktop_plugin);
+void conky_visible(AWallpaperPlugin *desktop_plugin);
 
 void 
 set_live_bg (Display *display, Window xwindow, int mode)
@@ -55,7 +56,8 @@ void
 view_state_changed (Animation_WallpaperPrivate *priv)
 {
    fprintf(stderr," VIew %i State %i\n", priv->view, priv->visible);
-   if (priv->visible){       
+   if (priv->visible){  
+       /* ToDo  make undependent function */
        if (!strcmp(priv->theme,"Video")){
            if (priv->pipeline){
                gst_element_set_state (priv->pipeline, GST_STATE_PLAYING);
@@ -68,6 +70,10 @@ view_state_changed (Animation_WallpaperPrivate *priv)
                 init_scene_External(priv->desktop_plugin);
             }
        }
+       if (!strcmp(priv->theme,"Conky")){
+           conky_visible(priv->desktop_plugin);
+       }
+
        if (priv->long_timer == 0 ){
             priv->long_timer = g_timeout_add(LONG_TIMER, (GtkFunction)long_timeout, priv->desktop_plugin);
             run_long_timeout(priv->desktop_plugin);