* Fixed problem with option 'One theme for all displays' in configuration window
authorvlad <vlad@vlanout.(none)>
Wed, 8 Sep 2010 18:37:13 +0000 (21:37 +0300)
committervlad <vlad@vlanout.(none)>
Wed, 8 Sep 2010 18:37:13 +0000 (21:37 +0300)
 * Improved to show video in mode 'One theme for all displays'
 * Added option Smoothing in theme 'Video

applet/debian/changelog
applet/src/livewp-config.c
applet/src/livewp-main.c
applet/src/livewp-settings.c

index feafe0f..4c0af89 100644 (file)
@@ -1,8 +1,11 @@
 live-wallpaper (0.9.1) unstable; urgency=low
 
-  * Fixed problem with option 'One theme for all displays' 
+  * Fixed problem with option 'One theme for all displays' in configuration
+  window
+  * Improved to show video in mode 'One theme for all displays' 
+  * Added option Smoothing in theme 'Video'
 
- -- Vlad Vasiliev <vlad@gas.by>  Tue, 07 Sep 2010 18:59:10 +0200
+ -- Vlad Vasiliev <vlad@gas.by>  Wed, 08 Sep 2010 20:59:10 +0200
 
 live-wallpaper (0.9) unstable; urgency=low
 
index 6a1624b..2275a10 100644 (file)
@@ -44,6 +44,8 @@ current_active_view(void){
 void 
 fill_priv(Animation_WallpaperPrivate *priv)
 {
+    /* Reset data */
+    priv->hash_theme = NULL;
     /* Load config */
     read_config(priv);
     /* Set function */
index 5e921e0..fa5ebda 100644 (file)
@@ -50,7 +50,15 @@ set_live_bg (Display *display, Window xwindow, int mode)
                   (unsigned char *) &mode, 1);
 }
 /*******************************************************************************/
+gboolean
+delayed_pause_video (AWallpaperPlugin *desktop_plugin){
 
+    if (!desktop_plugin->priv->visible){
+        gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_PAUSED);
+    }
+    return FALSE;
+}
+/*******************************************************************************/
 void
 view_state_changed (Animation_WallpaperPrivate *priv)
 {
@@ -72,7 +80,7 @@ view_state_changed (Animation_WallpaperPrivate *priv)
        }
 
        if (!priv->running){
-            if (g_hash_table_lookup(priv->hash_theme, "exec_path")){
+            if (priv->hash_theme && g_hash_table_lookup(priv->hash_theme, "exec_path")){
                 init_scene_External(priv->desktop_plugin);
             }
        }
@@ -85,7 +93,10 @@ view_state_changed (Animation_WallpaperPrivate *priv)
    }else{
         /* For Video */
         if (priv->pipeline){
-           gst_element_set_state (priv->pipeline, GST_STATE_PAUSED);
+           if (priv->one_in_all_view)
+                g_timeout_add(200, (GtkFunction)delayed_pause_video, priv);
+           else
+                gst_element_set_state (priv->pipeline, GST_STATE_PAUSED);
            return;
         }
         /* For Conky */
@@ -253,7 +264,7 @@ long_timeout (AWallpaperPlugin *desktop_plugin)
 
     /*fprintf(stderr, "long_timeout %i\n", desktop_plugin->priv->long_timer); */
     if (desktop_plugin->priv->pipeline){
-       if (!desktop_plugin->priv->visible){
+       if (!desktop_plugin->priv->visible && !desktop_plugin->priv->theme_bool_parametr1){
                gst_element_query_position(desktop_plugin->priv->pipeline, &fmt, &p);
                desktop_plugin->priv->theme_int_parametr1 = p / GST_SECOND;
                gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_NULL);
index 51ed788..6aa28a0 100644 (file)
@@ -603,6 +603,7 @@ void
 additional_parametr_for_theme_video(GtkWidget *vbox, Animation_WallpaperPrivate *priv){
 
     GtkWidget *file_button;
+    GtkWidget *smoothing_button;
     GtkWidget *rich_animation_button;
 
     if (priv->theme_string_parametr1)
@@ -622,16 +623,13 @@ additional_parametr_for_theme_video(GtkWidget *vbox, Animation_WallpaperPrivate
     gtk_box_pack_start(GTK_BOX(vbox),
                                    rich_animation_button, TRUE, TRUE, 5);
     g_object_set_data(G_OBJECT(priv->window), "rich_animation_button", rich_animation_button);
-    /* Create sound button */  
-#if 0
+    /* Create Smoothing button */  
 
-    /* Doesn't work in real device. Hardware volume buttons can to change volume for mutted track */
-    sound_button = create_bool_button(priv->theme_bool_parametr1, _("Sound"));
+    smoothing_button = create_bool_button(priv->theme_bool_parametr1, _("Smoothing (Need more memory)"));
     gtk_box_pack_start(GTK_BOX(vbox),
-                                   sound_button, TRUE, TRUE, 5);
-    g_object_set_data(G_OBJECT(priv->window), "sound_button", sound_button);
-    gtk_widget_show (sound_button);
-#endif
+                                   smoothing_button, TRUE, TRUE, 5);
+    g_object_set_data(G_OBJECT(priv->window), "smoothing_button", smoothing_button);
+    gtk_widget_show (smoothing_button);
     gtk_widget_show (file_button);
     gtk_widget_show (rich_animation_button);
 
@@ -656,6 +654,7 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
     GtkWidget *enable_button;
     GtkWidget *vbox;
     GtkWidget *area_vbox;
+    GtkWidget *temp_button; 
     GtkWidget *button1 = NULL;
     GtkWidget *rich_animation_button = NULL;
     gint view = priv->view;
@@ -788,15 +787,13 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
                             g_free(priv->theme_string_parametr1);
                         priv->theme_string_parametr1 = g_strdup((gchar*)hildon_button_get_value (HILDON_BUTTON(button1)));
                     }
-                    /* 
-                    temp_button = g_object_get_data(G_OBJECT(priv->window), "sound_button");
+                    temp_button = g_object_get_data(G_OBJECT(priv->window), "smoothing_button");
                     if (temp_button){
                         if (hildon_check_button_get_active (HILDON_CHECK_BUTTON(temp_button)))
                             priv->theme_bool_parametr1 = TRUE;
                         else
                             priv->theme_bool_parametr1 = FALSE;
                     }
-                    */
                 }
                 /* Check external themes */
                 GSList *store = priv->extheme_list;