added xsnow theme and cosmetic changes
authorvlad <vlad@vlanout.(none)>
Thu, 29 Jul 2010 17:53:50 +0000 (20:53 +0300)
committervlad <vlad@vlanout.(none)>
Thu, 29 Jul 2010 17:53:50 +0000 (20:53 +0300)
applet/src/livewp-home-widget.c
applet/src/livewp-main.c
applet/src/livewp-scene.c

index 3d53e65..e3a13e6 100644 (file)
@@ -533,6 +533,7 @@ animation_wallpaper_plugin_init (AWallpaperPlugin *desktop_plugin)
     g_hash_table_insert(priv->hash_scene_func, g_strdup("Matrix"), (gpointer)&init_scene_Matrix);
     g_hash_table_insert(priv->hash_scene_func, g_strdup("Accel"), (gpointer)&init_scene_Accel);
     g_hash_table_insert(priv->hash_scene_func, g_strdup("Video"), (gpointer)&init_scene_Video);
+    g_hash_table_insert(priv->hash_scene_func, g_strdup("Xsnow"), (gpointer)&init_scene_Video);
 //#endif
     //priv->theme = g_strdup("Accel");
     desktop_plugin->priv->main_widget = gtk_fixed_new();
index b277fa0..dc29de0 100644 (file)
@@ -193,6 +193,7 @@ main(int argc, char *argv[])
     g_hash_table_insert(priv->hash_scene_func, g_strdup("Modern"), (gpointer)&init_scene_Modern);
     g_hash_table_insert(priv->hash_scene_func, g_strdup("Matrix"), (gpointer)&init_scene_Matrix);
     g_hash_table_insert(priv->hash_scene_func, g_strdup("Video"),  (gpointer)&init_scene_Video);
+    g_hash_table_insert(priv->hash_scene_func, g_strdup("Xsnow"),  (gpointer)&init_scene_xsnow);
 
     priv->scene = NULL;
     priv->pipeline = NULL;
index 22fb4c3..6f1ba0c 100644 (file)
@@ -47,7 +47,7 @@ destroy_scene(AWallpaperPlugin *desktop_plugin)
 
     }
 }
-
+/*******************************************************************************/
 void
 reload_scene(AWallpaperPlugin *desktop_plugin)
 {
@@ -55,8 +55,7 @@ reload_scene(AWallpaperPlugin *desktop_plugin)
     destroy_scene(desktop_plugin);
     init_scene_theme(desktop_plugin);
 }
-
-
+/*******************************************************************************/
 void 
 init_scene_Accel(AWallpaperPlugin *desktop_plugin)
 {
@@ -107,7 +106,7 @@ init_scene_Accel(AWallpaperPlugin *desktop_plugin)
 
     run_long_timeout(desktop_plugin);
 }
-
+/*******************************************************************************/
 void  
 parsestring(char *line, char **argv)
 {
@@ -138,6 +137,7 @@ sync_handler(GstBus *bus, GstMessage *message, AWallpaperPlugin *desktop_plugin)
 
 }
 #endif
+/*******************************************************************************/
 static gboolean
 bus_call (GstBus *bus, GstMessage *msg, AWallpaperPlugin *desktop_plugin)
 {
@@ -155,8 +155,10 @@ bus_call (GstBus *bus, GstMessage *msg, AWallpaperPlugin *desktop_plugin)
                 gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_PLAYING);
 
            }else{
-                   if (desktop_plugin->priv->pipeline){                                                                                                                                                                                                                                             gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_NULL);                                                                                                                                                                                                        gst_object_unref (GST_OBJECT (desktop_plugin->priv->pipeline));                                                                                                                                                                                          
-                   } 
+                if (desktop_plugin->priv->pipeline){
+                    gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_NULL);
+                    gst_object_unref (GST_OBJECT (desktop_plugin->priv->pipeline));
+                } 
            }
            break;
        case GST_MESSAGE_ERROR: break;
@@ -164,7 +166,7 @@ bus_call (GstBus *bus, GstMessage *msg, AWallpaperPlugin *desktop_plugin)
      }
        return TRUE;
 }
-
+/*******************************************************************************/
 void
 init_scene_Video(AWallpaperPlugin *desktop_plugin)
 {
@@ -194,7 +196,7 @@ init_scene_Video(AWallpaperPlugin *desktop_plugin)
     if (desktop_plugin->priv->visible)
         gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_PLAYING);
 }
-
+/*******************************************************************************/
 void
 init_scene_Matrix(AWallpaperPlugin *desktop_plugin)
 {
@@ -278,7 +280,7 @@ init_scene_Matrix(AWallpaperPlugin *desktop_plugin)
   run_long_timeout(desktop_plugin);
 
 }
-
+/*******************************************************************************/
 /* Init Modern Scene */
 void
 init_scene_Modern(AWallpaperPlugin *desktop_plugin)
@@ -635,7 +637,7 @@ init_scene_Modern(AWallpaperPlugin *desktop_plugin)
   scene.dynamic_actors = g_slist_append(scene.dynamic_actors, anim);
 #endif  
 }
-
+/*******************************************************************************/
 /* Init Berlin Scene */
 void
 init_scene_Berlin(AWallpaperPlugin *desktop_plugin)
@@ -805,7 +807,7 @@ init_scene_Berlin(AWallpaperPlugin *desktop_plugin)
     run_long_timeout(desktop_plugin);
 
 }
-
+/*******************************************************************************/
 void 
 init_scene_theme(AWallpaperPlugin *desktop_plugin)
 {