[Xfce4-commits] <parole:0.2.2> Lot of changes with respect to the new interface...

Ali Abdallah noreply at xfce.org
Wed Dec 15 16:26:01 CET 2010


Updating branch refs/heads/0.2.2
         to 07e68468448bcd8c19c5b00655c86c13c44c3450 (commit)
       from 82783c4d4aa882b1e7ff3263e921b42d0b9926c3 (commit)

commit 07e68468448bcd8c19c5b00655c86c13c44c3450
Author: Ali Abdallah <aliov at xfce.org>
Date:   Wed Dec 15 16:25:17 2010 +0100

    Lot of changes with respect to the new interface...

 configure.ac.in                      |    2 -
 data/interfaces/Makefile.am          |    3 +
 data/interfaces/parole-fullscreen.ui |   60 ++++++++++++
 data/interfaces/parole.ui            |   61 +++++++------
 gst/Makefile.am                      |    6 +-
 gst/parole-gst-iface.c               |  108 ---------------------
 gst/parole-gst-iface.h               |   70 --------------
 gst/parole-gst.c                     |  158 ++++++-------------------------
 gst/parole-gst.h                     |    3 +-
 src/parole-medialist.c               |   35 +++++++-
 src/parole-medialist.h               |    8 ++-
 src/parole-player.c                  |  174 ++++++++++++++++++++++++----------
 src/parole-utils.c                   |   46 +++++++++
 src/parole-utils.h                   |    6 +
 14 files changed, 344 insertions(+), 396 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 9b628f8..10eb67b 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -247,8 +247,6 @@ plugins/properties/Makefile
 plugins/tray/Makefile
 plugins/window-title/Makefile
 plugins/power-manager/Makefile
-browser-plugin/Makefile
-browser-plugin/media-plugin/Makefile
 docs/Makefile
 docs/plugin-api/version.xml
 docs/plugin-api/Makefile
diff --git a/data/interfaces/Makefile.am b/data/interfaces/Makefile.am
index c1450b6..7256030 100644
--- a/data/interfaces/Makefile.am
+++ b/data/interfaces/Makefile.am
@@ -2,6 +2,7 @@ interfaces =					\
 	parole.ui				\
 	parole-settings.ui			\
 	playlist.ui				\
+	parole-fullscreen.ui			\
 	mediachooser.ui				\
 	save-playlist.ui			\
 	plugins.ui				\
@@ -34,6 +35,8 @@ plugins_ui.h: plugins.ui
 open-location_ui.h: open-location.ui
 	exo-csource --static --strip-comments --strip-content --name=open_location_ui $< > $@
 
+parole-fullscreen_ui.h: parole-fullscreen.ui
+	exo-csource --static --strip-comments --strip-content --name=parole_fullscreen_ui $< > $@
 
 endif
 
diff --git a/data/interfaces/parole-fullscreen.ui b/data/interfaces/parole-fullscreen.ui
new file mode 100644
index 0000000..10b1d85
--- /dev/null
+++ b/data/interfaces/parole-fullscreen.ui
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.16"/>
+  <!-- interface-naming-policy project-wide -->
+  <object class="GtkWindow" id="fullscreen">
+    <property name="type">popup</property>
+    <property name="window_position">center</property>
+    <property name="gravity">south-west</property>
+    <child>
+      <object class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox1">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkAlignment" id="fs-play-container">
+                <property name="visible">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="fs-scale-container">
+                <property name="visible">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkActionGroup" id="actiongroup1"/>
+</interface>
diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui
index c1d6994..0eaf552 100644
--- a/data/interfaces/parole.ui
+++ b/data/interfaces/parole.ui
@@ -96,13 +96,12 @@
           </object>
           <packing>
             <property name="resize">False</property>
-            <property name="shrink">True</property>
+            <property name="shrink">False</property>
           </packing>
         </child>
         <child>
           <object class="GtkAlignment" id="alignment1">
             <property name="visible">True</property>
-            <property name="top_padding">2</property>
             <child>
               <object class="GtkVBox" id="vbox1">
                 <property name="visible">True</property>
@@ -317,7 +316,7 @@
                                               <object class="GtkMenu" id="menu9">
                                                 <property name="visible">True</property>
                                                 <child>
-                                                  <object class="GtkRadioMenuItem" id="radiomenuitem1">
+                                                  <object class="GtkRadioMenuItem" id="ratio_none">
                                                     <property name="visible">True</property>
                                                     <property name="label" translatable="yes">None</property>
                                                     <property name="use_underline">True</property>
@@ -326,7 +325,7 @@
                                                   </object>
                                                 </child>
                                                 <child>
-                                                  <object class="GtkRadioMenuItem" id="radiomenuitem2">
+                                                  <object class="GtkRadioMenuItem" id="ratio_auto">
                                                     <property name="visible">True</property>
                                                     <property name="label" translatable="yes">Auto</property>
                                                     <property name="use_underline">True</property>
@@ -335,7 +334,7 @@
                                                   </object>
                                                 </child>
                                                 <child>
-                                                  <object class="GtkRadioMenuItem" id="radiomenuitem3">
+                                                  <object class="GtkRadioMenuItem" id="ratio_square">
                                                     <property name="visible">True</property>
                                                     <property name="label" translatable="yes">Square</property>
                                                     <property name="use_underline">True</property>
@@ -344,7 +343,7 @@
                                                   </object>
                                                 </child>
                                                 <child>
-                                                  <object class="GtkRadioMenuItem" id="radiomenuitem4">
+                                                  <object class="GtkRadioMenuItem" id="ratio_4_3">
                                                     <property name="visible">True</property>
                                                     <property name="label" translatable="yes">4:3 (TV)</property>
                                                     <property name="use_underline">True</property>
@@ -353,7 +352,7 @@
                                                   </object>
                                                 </child>
                                                 <child>
-                                                  <object class="GtkRadioMenuItem" id="radiomenuitem5">
+                                                  <object class="GtkRadioMenuItem" id="ratio_16_9">
                                                     <property name="visible">True</property>
                                                     <property name="label" translatable="yes">16:9 (Widescreen)</property>
                                                     <property name="use_underline">True</property>
@@ -362,7 +361,7 @@
                                                   </object>
                                                 </child>
                                                 <child>
-                                                  <object class="GtkRadioMenuItem" id="radiomenuitem6">
+                                                  <object class="GtkRadioMenuItem" id="ratio_20_9">
                                                     <property name="visible">True</property>
                                                     <property name="label" translatable="yes">20:9 (DVB)</property>
                                                     <property name="use_underline">True</property>
@@ -463,7 +462,7 @@
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
-                                <property name="padding">70</property>
+                                <property name="padding">50</property>
                                 <property name="position">0</property>
                               </packing>
                             </child>
@@ -491,9 +490,9 @@
                 <child>
                   <object class="GtkAlignment" id="video-view">
                     <property name="visible">True</property>
-                    <property name="right_padding">5</property>
+                    <property name="right_padding">4</property>
                     <child>
-                      <object class="GtkViewport" id="viewport2">
+                      <object class="GtkViewport" id="videoport">
                         <property name="visible">True</property>
                         <property name="resize_mode">queue</property>
                         <property name="shadow_type">out</property>
@@ -513,18 +512,18 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkAlignment" id="alignment2">
+                  <object class="GtkAlignment" id="control">
                     <property name="visible">True</property>
                     <property name="top_padding">2</property>
                     <property name="bottom_padding">2</property>
                     <property name="left_padding">2</property>
                     <property name="right_padding">2</property>
                     <child>
-                      <object class="GtkVBox" id="vbox2">
+                      <object class="GtkVBox" id="play-box">
                         <property name="visible">True</property>
                         <property name="orientation">vertical</property>
                         <child>
-                          <object class="GtkAlignment" id="alignment4">
+                          <object class="GtkAlignment" id="scale-container">
                             <property name="visible">True</property>
                             <property name="left_padding">5</property>
                             <property name="right_padding">5</property>
@@ -625,16 +624,21 @@
                                                   </packing>
                                                 </child>
                                                 <child>
-                                                  <object class="GtkButton" id="play">
-                                                    <property name="width_request">80</property>
-                                                    <property name="height_request">35</property>
+                                                  <object class="GtkAlignment" id="play-container">
                                                     <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="receives_default">True</property>
-                                                    <property name="image">image1</property>
-                                                    <property name="relief">half</property>
-                                                    <property name="focus_on_click">False</property>
-                                                    <signal name="clicked" handler="parole_player_play_pause_clicked"/>
+                                                    <child>
+                                                      <object class="GtkButton" id="play">
+                                                        <property name="width_request">80</property>
+                                                        <property name="height_request">35</property>
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">True</property>
+                                                        <property name="receives_default">True</property>
+                                                        <property name="image">image1</property>
+                                                        <property name="relief">half</property>
+                                                        <property name="focus_on_click">False</property>
+                                                        <signal name="clicked" handler="parole_player_play_pause_clicked"/>
+                                                      </object>
+                                                    </child>
                                                   </object>
                                                   <packing>
                                                     <property name="position">1</property>
@@ -713,13 +717,14 @@
                                     <property name="visible">True</property>
                                     <property name="orientation">vertical</property>
                                     <child>
-                                      <object class="GtkButton" id="button2">
+                                      <object class="GtkButton" id="leave-fs">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="receives_default">True</property>
                                         <property name="image">image8</property>
                                         <property name="relief">none</property>
                                         <property name="focus_on_click">False</property>
+                                        <signal name="clicked" handler="parole_player_full_screen_activated_cb"/>
                                       </object>
                                       <packing>
                                         <property name="expand">False</property>
@@ -829,10 +834,6 @@
     <property name="visible">True</property>
     <property name="stock">gtk-media-previous</property>
   </object>
-  <object class="GtkImage" id="image1">
-    <property name="visible">True</property>
-    <property name="stock">gtk-media-play</property>
-  </object>
   <object class="GtkImage" id="image2">
     <property name="visible">True</property>
     <property name="stock">gtk-media-next</property>
@@ -897,4 +898,8 @@
       </row>
     </data>
   </object>
+  <object class="GtkImage" id="image1">
+    <property name="visible">True</property>
+    <property name="stock">gtk-media-play</property>
+  </object>
 </interface>
diff --git a/gst/Makefile.am b/gst/Makefile.am
index 14db948..a486f70 100644
--- a/gst/Makefile.am
+++ b/gst/Makefile.am
@@ -18,10 +18,8 @@ GENERATED_FILES =			\
 libparolegst_la_SOURCES =		\
 	$(GENERATED_FILES)		\
 	parole-gst.c			\
-	parole-gst.h			\
-	parole-gst-iface.c		\
-	parole-gst-iface.h
-	
+	parole-gst.h
+
 libparolegst_la_CFLAGS =		\
 	$(GST_VIDEO_CFLAGS)             \
         $(GST_INTERFACES_CFLAGS)	\
diff --git a/gst/parole-gst-iface.c b/gst/parole-gst-iface.c
deleted file mode 100644
index b620c8c..0000000
--- a/gst/parole-gst-iface.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * * Copyright (C) 2009 Ali <aliov at xfce.org>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <glib.h>
-
-#include "parole-gst-iface.h"
-
-GType
-parole_gst_helper_get_type (void)
-{
-    static GType type = G_TYPE_INVALID;
-
-    if (G_UNLIKELY (type == G_TYPE_INVALID))
-    {
-	static const GTypeInfo info =
-	{
-	    sizeof (ParoleGstHelperIface),
-	    NULL,
-	    NULL,
-	    NULL,
-	    NULL,
-	    NULL,
-	    0,
-	    0,
-	    NULL,
-	    NULL,
-	};
-
-	type = g_type_register_static (G_TYPE_INTERFACE, "ParoleGstHelperIface", &info, 0);
-
-	g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
-    }
-    
-    return type;
-}
-
-void parole_gst_helper_draw_logo (ParoleGstHelper *gst)
-{
-    if ( PAROLE_GST_HELPER_GET_IFACE (gst)->draw_logo )
-    {
-	(*PAROLE_GST_HELPER_GET_IFACE (gst)->draw_logo) (gst);
-    }
-}
-
-void parole_gst_helper_load_subtitle (ParoleGstHelper *gst)
-{
-    if ( PAROLE_GST_HELPER_GET_IFACE (gst)->load_subtitle )
-    {
-	(*PAROLE_GST_HELPER_GET_IFACE (gst)->load_subtitle) (gst);
-    }
-}
-
-void parole_gst_helper_set_video_colors	(ParoleGstHelper *gst)
-{
-    if ( PAROLE_GST_HELPER_GET_IFACE (gst)->set_video_color_balance )
-    {
-	(*PAROLE_GST_HELPER_GET_IFACE (gst)->set_video_color_balance) (gst);
-    }
-}
-
-void parole_gst_helper_set_subtitle_font (ParoleGstHelper *gst)
-{
-    if ( PAROLE_GST_HELPER_GET_IFACE (gst)->set_subtitle_font )
-    {
-	(*PAROLE_GST_HELPER_GET_IFACE (gst)->set_subtitle_font) (gst);
-    }
-}
-
-void parole_gst_helper_set_subtitle_encoding (ParoleGstHelper *gst)
-{
-    if ( PAROLE_GST_HELPER_GET_IFACE (gst)->set_subtitle_encoding )
-    {
-	(*PAROLE_GST_HELPER_GET_IFACE (gst)->set_subtitle_encoding) (gst);
-    }
-}
-
-void parole_gst_helper_update_vis (ParoleGstHelper *gst)
-{
-    if ( PAROLE_GST_HELPER_GET_IFACE (gst)->update_vis )
-    {
-	(*PAROLE_GST_HELPER_GET_IFACE (gst)->update_vis) (gst);
-    }
-}
diff --git a/gst/parole-gst-iface.h b/gst/parole-gst-iface.h
deleted file mode 100644
index cf77831..0000000
--- a/gst/parole-gst-iface.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * * Copyright (C) 2009 Ali <aliov at xfce.org>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __PAROLE_GST_HELPER_H
-#define __PAROLE_GST_HELPER_H
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS 
-
-#define PAROLE_TYPE_GST_HELPER      	   (parole_gst_helper_get_type ())
-#define PAROLE_GST_HELPER(o)        	   (G_TYPE_CHECK_INSTANCE_CAST ((o), PAROLE_TYPE_GST_HELPER, ParoleGstHelper))
-#define PAROLE_IS_GST_HELPER(o)      	   (G_TYPE_CHECK_INSTANCE_TYPE ((o), PAROLE_TYPE_GST_HELPER))
-#define PAROLE_GST_HELPER_GET_IFACE(o)     (G_TYPE_INSTANCE_GET_INTERFACE((o), PAROLE_TYPE_GST_HELPER, ParoleGstHelperIface))
-
-typedef struct _ParoleGstHelperIface ParoleGstHelperIface;
-typedef struct _ParoleGstHelper      ParoleGstHelper;
-
-struct _ParoleGstHelperIface
-{
-    GTypeInterface 	__parent__;
-
-    void		(*draw_logo)				(ParoleGstHelper *gst);
-    
-    void		(*set_video_color_balance)		(ParoleGstHelper *gst);
-
-    void		(*load_subtitle)			(ParoleGstHelper *gst);
-
-    void		(*set_subtitle_font)			(ParoleGstHelper *gst);
-    
-    void		(*set_subtitle_encoding)		(ParoleGstHelper *gst);
-
-    void		(*update_vis)				(ParoleGstHelper *gst);
-
-};
-
-GType 			parole_gst_helper_get_type 		(void) G_GNUC_CONST;
-
-void			parole_gst_helper_draw_logo		(ParoleGstHelper *gst);
-
-void			parole_gst_helper_load_subtitle		(ParoleGstHelper *gst);
-
-void			parole_gst_helper_set_video_colors	(ParoleGstHelper *gst);
-
-void 			parole_gst_helper_set_subtitle_font	(ParoleGstHelper *gst);
-
-void 			parole_gst_helper_set_subtitle_encoding (ParoleGstHelper *gst);
-
-void			parole_gst_helper_update_vis		(ParoleGstHelper *gst);
-
-G_END_DECLS
-
-#endif  /*__PAROLE_GST_IFACE_H*/
diff --git a/gst/parole-gst.c b/gst/parole-gst.c
index ad0f099..b20cc6c 100644
--- a/gst/parole-gst.c
+++ b/gst/parole-gst.c
@@ -39,7 +39,6 @@
 #include <gdk/gdkx.h>
 
 #include "parole-gst.h"
-#include "parole-gst-iface.h"
 
 #include "common/parole-common.h"
 #include "common/parole-rc-utils.h"
@@ -52,8 +51,6 @@
 #define PAROLE_GST_GET_PRIVATE(o) \
 (G_TYPE_INSTANCE_GET_PRIVATE ((o), PAROLE_TYPE_GST, ParoleGstPrivate))
 
-static void     parole_gst_helper_iface_init    (ParoleGstHelperIface *iface);
-
 static void	parole_gst_play_file_internal 	(ParoleGst *gst);
 
 static void     parole_gst_change_state 	(ParoleGst *gst, 
@@ -86,7 +83,6 @@ struct ParoleGstPrivate
     gpointer      conf; /* Specific for ParoleMediaPlayer*/
     
     gboolean	  terminating;
-    gboolean	  embedded;
     gboolean      enable_tags;
     
     gboolean	  update_vis;
@@ -119,7 +115,6 @@ enum
 enum
 {
     PROP_0,
-    PROP_EMBEDDED,
     PROP_CONF_OBJ,
     PROP_ENABLE_TAGS
 };
@@ -128,8 +123,7 @@ static gpointer parole_gst_object = NULL;
 
 static guint signals [LAST_SIGNAL] = { 0 };
 
-G_DEFINE_TYPE_WITH_CODE (ParoleGst, parole_gst, GTK_TYPE_WIDGET,
-    G_IMPLEMENT_INTERFACE (PAROLE_TYPE_GST_HELPER, parole_gst_helper_iface_init));
+G_DEFINE_TYPE (ParoleGst, parole_gst, GTK_TYPE_WIDGET)
 
 static void
 parole_gst_finalize (GObject *object)
@@ -345,8 +339,7 @@ parole_gst_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
 	w = allocation->width;
 	h = allocation->height;
 	
-	if ( PAROLE_GST (widget)->priv->embedded == FALSE )
-	    parole_gst_get_video_output_size (PAROLE_GST (widget), &w, &h);
+	parole_gst_get_video_output_size (PAROLE_GST (widget), &w, &h);
 
 	width = w;
 	height = h;
@@ -370,7 +363,7 @@ parole_gst_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
 }
 
 static void
-parole_gst_draw_logo_common (ParoleGst *gst)
+parole_gst_draw_logo (ParoleGst *gst)
 {
     GdkPixbuf *pix;
     GdkRegion *region;
@@ -419,30 +412,8 @@ parole_gst_draw_logo_common (ParoleGst *gst)
 }
 
 static void
-parole_gst_draw_logo_embedded (ParoleGstHelper *helper)
-{
-    ParoleGst *gst;
-    
-    gst = PAROLE_GST (helper);
-    
-    if ( gst->priv->terminating != TRUE )
-	parole_gst_draw_logo_common (gst);
-}
-
-static void
-parole_gst_draw_logo (ParoleGstHelper *helper)
-{
-    ParoleGst *gst;
-    
-    gst = PAROLE_GST (helper);
-    
-    parole_gst_draw_logo_common (gst);
-}
-
-static void
-parole_gst_set_video_color_balance (ParoleGstHelper *helper)
+parole_gst_set_video_color_balance (ParoleGst *gst)
 {
-    ParoleGst *gst;
     GstElement *video_sink;
     
     gint brightness_value;
@@ -450,8 +421,6 @@ parole_gst_set_video_color_balance (ParoleGstHelper *helper)
     gint hue_value;
     gint saturation_value;
 	
-    gst = PAROLE_GST (helper);
-    
     if ( !gst->priv->xvimage_sink)
 	return;
 	
@@ -526,25 +495,28 @@ parole_gst_expose_event (GtkWidget *widget, GdkEventExpose *ev)
     {
 	case GST_STATE_PLAYING:
 	    if ( playing_video || gst->priv->with_vis)
+	    {
+		printf ("Testing------------ v=%d vis=%d\n", playing_video, gst->priv->with_vis);
 		gst_x_overlay_expose (GST_X_OVERLAY (gst->priv->video_sink));
+	    }
 	    else
-		parole_gst_helper_draw_logo (PAROLE_GST_HELPER (gst));
+		parole_gst_draw_logo (gst);
 	    break;
 	case GST_STATE_PAUSED:
 	    if ( playing_video || gst->priv->with_vis || gst->priv->target == GST_STATE_PLAYING )
 		gst_x_overlay_expose (GST_X_OVERLAY (gst->priv->video_sink));
 	    else
-		parole_gst_helper_draw_logo (PAROLE_GST_HELPER (gst));
+		parole_gst_draw_logo (gst);
 	    break;
 	case GST_STATE_READY:
 	    if (gst->priv->target != GST_STATE_PLAYING)
-		parole_gst_helper_draw_logo (PAROLE_GST_HELPER (gst));
+		parole_gst_draw_logo (gst);
 	    else
 		gst_x_overlay_expose (GST_X_OVERLAY (gst->priv->video_sink));
 	    break;
 	case GST_STATE_NULL:
 	case GST_STATE_VOID_PENDING:
-	    parole_gst_helper_draw_logo (PAROLE_GST_HELPER (gst));
+	    parole_gst_draw_logo (gst);
 	    break;
     }
     return TRUE;
@@ -666,13 +638,10 @@ parole_gst_query_duration (ParoleGst *gst)
 }
 
 static void
-parole_gst_set_subtitle_font (ParoleGstHelper *helper)
+parole_gst_set_subtitle_font (ParoleGst *gst)
 {
-    ParoleGst *gst;
     gchar *font;
     
-    gst = PAROLE_GST (helper);
-    
     g_object_get (G_OBJECT (gst->priv->conf),
 		  "subtitle-font", &font,
 		  NULL);
@@ -686,13 +655,10 @@ parole_gst_set_subtitle_font (ParoleGstHelper *helper)
 }
 
 static void
-parole_gst_set_subtitle_encoding (ParoleGstHelper *helper)
+parole_gst_set_subtitle_encoding (ParoleGst *gst)
 {
-    ParoleGst *gst;
     gchar *encoding;
     
-    gst = PAROLE_GST (helper);
-    
     g_object_get (G_OBJECT (gst->priv->conf),
 		  "subtitle-encoding", &encoding,
 		  NULL);
@@ -705,17 +671,14 @@ parole_gst_set_subtitle_encoding (ParoleGstHelper *helper)
 }
 
 static void
-parole_gst_load_subtitle (ParoleGstHelper *helper)
+parole_gst_load_subtitle (ParoleGst *gst)
 {
-    ParoleGst *gst;
     ParoleMediaType type;
     gchar *uri;
     gchar *sub;
     gchar *sub_uri;
     gboolean sub_enabled;
     
-    gst = PAROLE_GST (helper);
-    
     g_object_get (G_OBJECT (gst->priv->stream),
 		  "media-type", &type,
 		  NULL);
@@ -867,13 +830,10 @@ parole_gst_update_stream_info (ParoleGst *gst)
 }
 
 static void
-parole_gst_update_vis (ParoleGstHelper *helper)
+parole_gst_update_vis (ParoleGst *gst)
 {
-    ParoleGst *gst;
     gchar *vis_name;
     
-    gst = PAROLE_GST (helper);
-    
     TRACE ("start");
     
     g_object_get (G_OBJECT (gst->priv->conf),
@@ -951,7 +911,7 @@ parole_gst_evaluate_state (ParoleGst *gst, GstState old, GstState new, GstState
 	    if ( gst->priv->target == GST_STATE_PLAYING )
 	    {
 		if ( gst->priv->update_color_balance )
-		    parole_gst_helper_set_video_colors (PAROLE_GST_HELPER (gst));
+		    parole_gst_set_video_color_balance (gst);
 	    }
 		
 	    gst->priv->media_state = PAROLE_MEDIA_STATE_PAUSED;
@@ -977,7 +937,7 @@ parole_gst_evaluate_state (ParoleGst *gst, GstState old, GstState new, GstState
 	    else if ( gst->priv->target == GST_STATE_READY)
 	    {
 		parole_gst_size_allocate (GTK_WIDGET (gst), &GTK_WIDGET (gst)->allocation);
-		parole_gst_helper_draw_logo (PAROLE_GST_HELPER (gst));
+		parole_gst_draw_logo (gst);
 	    }
 	    break;
 	}
@@ -1297,16 +1257,6 @@ parole_gst_change_state (ParoleGst *gst, GstState new)
 }
 
 static void
-parole_gst_stream_info_notify_cb (GObject * obj, GParamSpec * pspec, ParoleGst *gst)
-{
-    GstMessage *msg;
-    TRACE ("Stream info changed");
-    msg = gst_message_new_application (GST_OBJECT (gst->priv->playbin),
-				       gst_structure_new ("notify-streaminfo", NULL));
-    gst_element_post_message (gst->priv->playbin, msg);
-}
-
-static void
 parole_gst_source_notify_cb (GObject *obj, GParamSpec *pspec, ParoleGst *gst)
 {
     GObject *source;
@@ -1340,7 +1290,7 @@ parole_gst_play_file_internal (ParoleGst *gst)
     }
     
     if ( gst->priv->update_vis)
-	parole_gst_helper_update_vis (PAROLE_GST_HELPER (gst));
+	parole_gst_update_vis (gst);
     
     gtk_widget_queue_draw (GTK_WIDGET (gst));
     
@@ -1355,7 +1305,7 @@ parole_gst_play_file_internal (ParoleGst *gst)
 		  "suburi", NULL,
 		  NULL);
 
-    parole_gst_helper_load_subtitle (PAROLE_GST_HELPER (gst));
+    parole_gst_load_subtitle (gst);
     parole_gst_change_state (gst, GST_STATE_PLAYING);
     g_free (uri);
 }
@@ -1539,9 +1489,6 @@ parole_gst_terminate_internal (ParoleGst *gst, gboolean fade_sound)
 
     parole_window_busy_cursor (GTK_WIDGET (gst)->window);
     
-    if ( gst->priv->embedded )
-	goto out;
-    
     if ( fade_sound && gst->priv->state == GST_STATE_PLAYING && !playing_video )
     {
 	gdouble volume;
@@ -1562,7 +1509,6 @@ parole_gst_terminate_internal (ParoleGst *gst, gboolean fade_sound)
 	}
     }
     
-out:
     parole_gst_change_state (gst, GST_STATE_NULL);
 }
 
@@ -1575,11 +1521,11 @@ parole_gst_conf_notify_cb (GObject *object, GParamSpec *spec, ParoleGst *gst)
     }
     else if ( !g_strcmp0 ("subtitle-font", spec->name) || !g_strcmp0 ("enable-subtitle", spec->name)  )
     {
-	parole_gst_helper_set_subtitle_font (PAROLE_GST_HELPER (gst));
+	parole_gst_set_subtitle_font (gst);
     }
     else if (!g_strcmp0 ("subtitle-encoding", spec->name) )
     {
-	parole_gst_helper_set_subtitle_encoding (PAROLE_GST_HELPER (gst));
+	parole_gst_set_subtitle_encoding (gst);
     }
     else if ( !g_strcmp0 ("brightness", spec->name) || !g_strcmp0 ("hue", spec->name) ||
 	      !g_strcmp0 ("contrast", spec->name) || !g_strcmp0 ("saturation", spec->name) )
@@ -1587,7 +1533,7 @@ parole_gst_conf_notify_cb (GObject *object, GParamSpec *spec, ParoleGst *gst)
 	gst->priv->update_color_balance = TRUE;
 	
 	if ( gst->priv->state >= GST_STATE_PAUSED )
-	    parole_gst_helper_set_video_colors (PAROLE_GST_HELPER (gst));
+	    parole_gst_set_video_color_balance (gst);
     }
     else if ( !g_strcmp0 ("aspect-ratio", spec->name) )
     {
@@ -1609,9 +1555,6 @@ static void parole_gst_get_property (GObject *object,
     
     switch (prop_id)
     {
-	case PROP_EMBEDDED:
-	    g_value_set_boolean (value, gst->priv->embedded);
-	    break;
 	case PROP_CONF_OBJ:
 	    g_value_set_pointer (value, gst->priv->conf);
 	    break;
@@ -1635,9 +1578,6 @@ static void parole_gst_set_property (GObject *object,
     
     switch (prop_id)
     {
-	case PROP_EMBEDDED:
-	    gst->priv->embedded = g_value_get_boolean (value);
-	    break;
 	case PROP_ENABLE_TAGS:
 	    gst->priv->enable_tags = g_value_get_boolean (value);
 	    break;
@@ -1660,31 +1600,6 @@ static void parole_gst_set_property (GObject *object,
     }
 }
 
-static void parole_gst_helper_iface_init (ParoleGstHelperIface *iface)
-{
-}
-
-static void
-parole_gst_set_iface_methods (ParoleGst *gst)
-{
-    ParoleGstHelperIface *iface;
-    iface = PAROLE_GST_HELPER_GET_IFACE (gst);
-	
-    if ( gst->priv->embedded == FALSE)
-    {
-	iface->draw_logo = parole_gst_draw_logo;
-	iface->set_video_color_balance = parole_gst_set_video_color_balance;
-	iface->set_subtitle_encoding = parole_gst_set_subtitle_encoding;
-	iface->set_subtitle_font = parole_gst_set_subtitle_font;
-	iface->load_subtitle = parole_gst_load_subtitle;
-	iface->update_vis = parole_gst_update_vis;
-    }
-    else
-    {
-	iface->draw_logo = parole_gst_draw_logo_embedded;
-    }
-}
-
 static void
 parole_gst_constructed (GObject *object)
 {
@@ -1696,7 +1611,7 @@ parole_gst_constructed (GObject *object)
     
     enable_xv = parole_rc_read_entry_bool ("enable-xv", PAROLE_RC_GROUP_GENERAL, TRUE);
     
-    gst->priv->playbin = gst_element_factory_make ("playbin", "player");
+    gst->priv->playbin = gst_element_factory_make ("playbin2", "player");
  
     if ( G_UNLIKELY (gst->priv->playbin == NULL) )
     {
@@ -1757,23 +1672,14 @@ parole_gst_constructed (GObject *object)
 	g_signal_connect (gst->priv->bus, "sync-message::element",
 			  G_CALLBACK (parole_gst_element_message_sync), gst);
 
-    /*
-     * Handle stream info changes, this can happen on live/radio stream.
-     */
-    g_signal_connect (gst->priv->playbin, "notify::stream-info",
-		      G_CALLBACK (parole_gst_stream_info_notify_cb), gst);
-      
-      
     g_signal_connect (gst->priv->playbin, "notify::source",
 		      G_CALLBACK (parole_gst_source_notify_cb), gst);
 
     
-    parole_gst_set_iface_methods (gst);
-
-    parole_gst_helper_update_vis (PAROLE_GST_HELPER (gst));
+    parole_gst_update_vis (gst);
     parole_gst_load_logo (gst);
-    parole_gst_helper_set_subtitle_encoding (PAROLE_GST_HELPER (gst));
-    parole_gst_helper_set_subtitle_font (PAROLE_GST_HELPER (gst));
+    parole_gst_set_subtitle_encoding (gst);
+    parole_gst_set_subtitle_font (gst);
     
     TRACE ("End");
 }
@@ -1863,14 +1769,6 @@ parole_gst_class_init (ParoleGstClass *klass)
 		      G_TYPE_STRING);
 
     g_object_class_install_property (object_class,
-				     PROP_EMBEDDED,
-				     g_param_spec_boolean ("embedded",
-							   NULL, NULL,
-							   FALSE,
-							   G_PARAM_CONSTRUCT_ONLY|
-							   G_PARAM_READWRITE));
-    
-    g_object_class_install_property (object_class,
 				     PROP_CONF_OBJ,
 				     g_param_spec_pointer ("conf-object",
 							   NULL, NULL,
@@ -1908,6 +1806,7 @@ parole_gst_init (ParoleGst *gst)
     gst->priv->device = NULL;
     gst->priv->enable_tags = TRUE;
     gst->priv->terminating = FALSE;
+    gst->priv->with_vis = FALSE;
     
     gst->priv->conf = NULL;
     
@@ -1921,10 +1820,9 @@ parole_gst_init (ParoleGst *gst)
 }
 
 GtkWidget *
-parole_gst_new (gboolean embedded, gpointer conf_obj)
+parole_gst_new (gpointer conf_obj)
 {
     parole_gst_object = g_object_new (PAROLE_TYPE_GST, 
-				      "embedded", embedded,
 				      "conf-object", conf_obj,
 				      NULL);
 				      
diff --git a/gst/parole-gst.h b/gst/parole-gst.h
index bf1e8d1..1beabe6 100644
--- a/gst/parole-gst.h
+++ b/gst/parole-gst.h
@@ -92,8 +92,7 @@ typedef struct
 
 GType        		parole_gst_get_type        	(void) G_GNUC_CONST;
 
-GtkWidget      	       *parole_gst_new             	(gboolean embedded,
-							 gpointer conf_obj);
+GtkWidget      	       *parole_gst_new             	(gpointer conf_obj);
 
 GtkWidget	       *parole_gst_get 			(void);
 
diff --git a/src/parole-medialist.c b/src/parole-medialist.c
index 86eddc1..2981629 100644
--- a/src/parole-medialist.c
+++ b/src/parole-medialist.c
@@ -1290,7 +1290,7 @@ parole_media_list_setup_view (ParoleMediaList *list)
     GtkTreeViewColumn *col;
     GtkCellRenderer *renderer;
 
-    list_store = gtk_list_store_new (COL_NUMBERS, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_OBJECT);
+    list_store = gtk_list_store_new (COL_NUMBERS, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_OBJECT);
 
     gtk_tree_view_set_model (GTK_TREE_VIEW (list->priv->view), GTK_TREE_MODEL(list_store));
     
@@ -1302,6 +1302,11 @@ parole_media_list_setup_view (ParoleMediaList *list)
     gtk_tree_view_column_pack_start(col, renderer, FALSE);
     gtk_tree_view_column_set_attributes(col, renderer, "pixbuf", PIXBUF_COL, NULL);
 
+
+    /**
+     * Name col
+     * 
+     **/
     renderer = gtk_cell_renderer_text_new();
     
     gtk_tree_view_column_pack_start (col, renderer, TRUE);
@@ -1310,6 +1315,17 @@ parole_media_list_setup_view (ParoleMediaList *list)
 		  "ellipsize", PANGO_ELLIPSIZE_END, 
 		  NULL);
     
+    
+    /**
+     * Media length
+     * 
+     **/
+    renderer = gtk_cell_renderer_text_new();
+    
+    gtk_tree_view_column_pack_start (col, renderer, FALSE);
+    gtk_tree_view_column_set_attributes (col, renderer, "text", LENGTH_COL, NULL);
+    
+    
     gtk_tree_view_append_column (GTK_TREE_VIEW (list->priv->view), col);
     gtk_tree_view_column_set_title (col, _("Media list"));
 
@@ -1608,6 +1624,23 @@ void parole_media_list_set_row_name (ParoleMediaList *list, GtkTreeRowReference
     }
 }
 
+void parole_media_list_set_row_length (ParoleMediaList *list, GtkTreeRowReference *row, const gchar *len)
+{
+    GtkTreeIter iter;
+    GtkTreePath *path;
+    
+    if ( gtk_tree_row_reference_valid (row) )
+    {
+	path = gtk_tree_row_reference_get_path (row);
+	
+	if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path) )
+	{
+	    gtk_list_store_set (list->priv->store, &iter, LENGTH_COL, len, -1);
+	}
+	gtk_tree_path_free (path);
+    }
+}
+
 void parole_media_list_open (ParoleMediaList *list)
 {
     parole_media_list_open_internal (list);
diff --git a/src/parole-medialist.h b/src/parole-medialist.h
index 821dd11..f31e198 100644
--- a/src/parole-medialist.h
+++ b/src/parole-medialist.h
@@ -33,6 +33,7 @@ enum
 {
     PIXBUF_COL,
     NAME_COL,
+    LENGTH_COL,
     DATA_COL,
     COL_NUMBERS
 };
@@ -93,11 +94,16 @@ GtkTreeRowReference		*parole_media_list_get_row_random   (ParoleMediaList *list)
 void				 parole_media_list_set_row_pixbuf   (ParoleMediaList *list,
 								     GtkTreeRowReference *row,
 								     GdkPixbuf *pix);
-								     
+
 void				 parole_media_list_set_row_name     (ParoleMediaList *list,
 							             GtkTreeRowReference *row,
 								     const gchar *name);
 
+
+void				 parole_media_list_set_row_length   (ParoleMediaList *list,
+							             GtkTreeRowReference *row,
+								     const gchar *length);
+
 void				 parole_media_list_open		    (ParoleMediaList *list);
 
 void			         parole_media_list_open_location    (ParoleMediaList *list);
diff --git a/src/parole-player.c b/src/parole-player.c
index 6927220..d42c7fb 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -64,6 +64,8 @@
 #include "enum-gtypes.h"
 #include "parole-debug.h"
 
+
+#include "interfaces/parole-fullscreen_ui.h"
 #include "gst/gst-enum-types.h"
 
 #include "common/parole-common.h"
@@ -227,7 +229,7 @@ struct _ParolePlayer
     
     DBusGConnection     *bus;
     ParoleMediaList	*list;
-    ParoleStatusbar     *status;
+    //ParoleStatusbar     *status;
     ParoleDisc          *disc;
     ParoleScreenSaver   *screen_saver;
     ParoleConf          *conf;
@@ -256,6 +258,8 @@ struct _ParolePlayer
     GtkWidget		*seekf;
     GtkWidget		*seekb;
     GtkWidget		*range;
+    GtkWidget 		*min_view;
+    GtkWidget		*videoport;
     
     GtkWidget		*fs_window; /* Window for packing control widgets 
 				     * when in full screen mode
@@ -267,8 +271,15 @@ struct _ParolePlayer
     
     GtkWidget		*volume;
     GtkWidget		*volume_image;
-    GtkWidget		*menu_bar;
-    GtkWidget		*play_box;
+    
+    /**
+     * Control widget Containers
+     * 
+     **/
+    GtkWidget		*scale_container;
+    GtkWidget		*play_container;
+    
+     
      
     gboolean             exit;
     
@@ -578,6 +589,7 @@ parole_player_playing (ParolePlayer *player, const ParoleStream *stream)
     gint64 duration;
     gboolean seekable;
     gboolean live;
+    gchar *timestr;
     
     pix = parole_icon_load ("player_play", 16);
     
@@ -591,7 +603,7 @@ parole_player_playing (ParolePlayer *player, const ParoleStream *stream)
 		  "duration", &duration,
 		  "live", &live,
 		  NULL);
-		  
+    
     gtk_widget_set_sensitive (player->play_pause, TRUE);
     gtk_widget_set_sensitive (player->stop, TRUE);
 
@@ -603,7 +615,12 @@ parole_player_playing (ParolePlayer *player, const ParoleStream *stream)
     if ( live || duration == 0)
 	parole_player_change_range_value (player, 0);
     else 
+    {
 	gtk_range_set_range (GTK_RANGE (player->range), 0, duration);
+	timestr = parole_format_media_length (duration);
+	parole_media_list_set_row_length (player->list, player->row, timestr);
+	g_free (timestr);
+    }
 	
     player->internal_range_change = FALSE;
     
@@ -932,21 +949,28 @@ parole_player_range_value_changed (GtkRange *range, ParolePlayer *player)
 
 void parole_player_minimize_clicked_cb (GtkWidget *widget, ParolePlayer *player)
 {
+    
     if ( player->minimized )
     {
 	gtk_widget_show (GTK_WIDGET (player->gst));
 	gtk_widget_show (GTK_WIDGET (player->video_view));
-	gtk_widget_show (GTK_WIDGET (player->menu_view));
 	gtk_widget_show (GTK_WIDGET (player->sidebar));
-	
+	gtk_widget_show (player->show_hide_playlist);
+	parole_set_widget_image_from_stock (player->min_view, GTK_STOCK_REMOVE);
 	player->minimized = FALSE;
+	
     }
     else
     {
 	gtk_widget_hide (GTK_WIDGET (player->gst));
 	gtk_widget_hide (GTK_WIDGET (player->video_view));
-	gtk_widget_hide (GTK_WIDGET (player->menu_view));
 	gtk_widget_hide (GTK_WIDGET (player->sidebar));
+	gtk_widget_hide (player->show_hide_playlist);
+	
+	parole_set_widget_image_from_stock (player->min_view, GTK_STOCK_ADD);
+	
+	gtk_window_resize (GTK_WINDOW(player->window), 1, 1);
+	
 	player->minimized = TRUE;
     }
 }
@@ -969,6 +993,7 @@ parole_player_media_tag_cb (ParoleGst *gst, const ParoleStream *stream, ParolePl
 	g_object_get (G_OBJECT (stream),
 		      "title", &title,
 		      NULL);
+	
 	if ( title )
 	{
 	    parole_media_list_set_row_name (player->list, player->row, title);
@@ -1032,58 +1057,96 @@ parole_player_move_fs_window (ParolePlayer *player)
     gdk_screen_get_monitor_geometry (screen,
 				     gdk_screen_get_monitor_at_window (screen, player->window->window),
 				     &rect);
-    
+
     gtk_window_resize (GTK_WINDOW (player->fs_window), 
 		       rect.width, 
-		       player->play_box->allocation.width);
+		       player->fs_window->allocation.height);
     
     gtk_window_move (GTK_WINDOW (player->fs_window),
 		     0, 
-		     rect.height + rect.y - player->play_box->allocation.height);
+		     rect.height - player->fs_window->allocation.height);
+}
+
+static void
+parole_player_create_fullscreen_window (ParolePlayer *player)
+{
+    GtkBuilder *builder;
+    GtkWidget *fs_scale_container, *fs_play_container;
+    
+    builder = parole_builder_new_from_string (parole_fullscreen_ui, parole_fullscreen_ui_length);
+
+    player->fs_window = GTK_WIDGET (gtk_builder_get_object (builder, "fullscreen"));
+    
+    fs_scale_container = GTK_WIDGET (gtk_builder_get_object (builder, "fs-scale-container"));
+    fs_play_container = GTK_WIDGET (gtk_builder_get_object (builder, "fs-play-container"));
+    
+    gtk_widget_reparent (player->range, fs_scale_container);
+    gtk_widget_reparent (player->play_pause, fs_play_container);
+    
+    gtk_widget_set_size_request (player->play_pause, -1, -1);
+    
+    gtk_widget_realize (player->fs_window);
+    
+    g_object_unref (builder);
 }
 
 static void
 parole_player_full_screen (ParolePlayer *player, gboolean fullscreen)
 {
-    gint npages;
-    static gint current_page = 0;
+    //gint npages;
+    //static gint current_page = 0;
     
     if ( player->full_screen == fullscreen )
 	return;
     
     if ( player->full_screen )
     {
-	npages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (player->main_nt));
-	gtk_widget_reparent (player->play_box, player->control);
-	gtk_widget_hide (player->fs_window);
-	parole_statusbar_set_visible (player->status, TRUE);
-	gtk_widget_show (player->play_box);
-	gtk_widget_show (player->menu_bar);
-	gtk_widget_show (player->playlist_nt);
-	gtk_widget_show (player->show_hide_playlist);
-	gtk_widget_hide (player->leave_fs);
+	//npages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (player->main_nt));
+
+	//parole_statusbar_set_visible (player->status, TRUE);
+
+	gtk_alignment_set_padding (GTK_ALIGNMENT (player->video_view), 0, 0, 0, 4);
+	gtk_viewport_set_shadow_type (GTK_VIEWPORT (player->videoport), GTK_SHADOW_OUT);
+
 	
-	gtk_notebook_set_show_tabs (GTK_NOTEBOOK (player->main_nt), npages > 1);
+	gtk_widget_reparent (player->range, player->scale_container);
+	gtk_widget_reparent (player->play_pause, player->play_container);
+    
+	gtk_widget_set_size_request (player->play_pause, 80, 35);
+	
+	gtk_widget_show (player->control);
+	gtk_widget_show (player->menu_view);
+	gtk_widget_show (player->playlist_nt);	
+	gtk_widget_show (GTK_WIDGET (player->sidebar));
+
+	//gtk_notebook_set_show_tabs (GTK_NOTEBOOK (player->main_nt), npages > 1);
 	
 	gtk_window_unfullscreen (GTK_WINDOW (player->window));
-	gtk_notebook_set_current_page (GTK_NOTEBOOK (player->playlist_nt), current_page);
+	//gtk_notebook_set_current_page (GTK_NOTEBOOK (player->playlist_nt), current_page);
 	player->full_screen = FALSE;
+
+	gtk_widget_destroy (player->fs_window);
+	player->fs_window = NULL;
     }
     else
     {
+        if (!player->fs_window)
+	{
+	    parole_player_create_fullscreen_window (player);
+	}
 	parole_player_move_fs_window (player);
-	gtk_widget_reparent (player->play_box, player->fs_window);
-	
-	parole_statusbar_set_visible (player->status, FALSE);
+
+	//parole_statusbar_set_visible (player->status, FALSE);
 	
-	gtk_widget_hide (player->play_box);
-	gtk_widget_hide (player->menu_bar);
+	gtk_widget_hide (player->control);
+	gtk_widget_hide (player->menu_view);
 	gtk_widget_hide (player->playlist_nt);
-	gtk_widget_hide (player->show_hide_playlist);
-	gtk_widget_show (player->leave_fs);
-	
-	current_page = gtk_notebook_get_current_page (GTK_NOTEBOOK (player->playlist_nt));
-	gtk_notebook_set_show_tabs (GTK_NOTEBOOK (player->main_nt), FALSE);
+	gtk_widget_hide (GTK_WIDGET (player->sidebar));
+
+	gtk_alignment_set_padding (GTK_ALIGNMENT (player->video_view), 0, 0, 0, 0);
+	gtk_viewport_set_shadow_type (GTK_VIEWPORT (player->videoport), GTK_SHADOW_NONE);
+	//current_page = gtk_notebook_get_current_page (GTK_NOTEBOOK (player->playlist_nt));
+	//gtk_notebook_set_show_tabs (GTK_NOTEBOOK (player->main_nt), FALSE);
 	
 	gtk_window_fullscreen (GTK_WINDOW (player->window));
 	player->full_screen = TRUE;
@@ -1256,7 +1319,7 @@ static gboolean parole_player_hide_fs_window (gpointer data)
     
     player = PAROLE_PLAYER (data);
     
-    if ( GTK_WIDGET_VISIBLE (player->fs_window) )
+    if ( player->fs_window && GTK_WIDGET_VISIBLE (player->fs_window) )
     {
 	/* Don't hide the popup if the pointer is above it*/
 	w = player->fs_window->allocation.width;
@@ -1281,6 +1344,7 @@ parole_player_gst_widget_motion_notify_event (GtkWidget *widget, GdkEventMotion
     if ( player->full_screen )
     {
 	gtk_widget_show_all (player->fs_window);
+
 	if ( hide_timeout != 0 )
 	{
 	    g_source_remove (hide_timeout);
@@ -1503,20 +1567,21 @@ parole_player_finalize (GObject *object)
     
     g_object_unref (player->conf);
     g_object_unref (player->video_filter);
-    g_object_unref (player->status);
-    g_object_unref (player->disc);
+    //g_object_unref (player->status);
+    //g_object_unref (player->disc);
     g_object_unref (player->screen_saver);
     
     if ( player->client_id )
 	g_free (player->client_id);
 	
-    g_object_unref (player->sm_client);
+    //g_object_unref (player->sm_client);
     
 #ifdef HAVE_XF86_KEYSYM
     g_object_unref (player->button);
 #endif
 
-    gtk_widget_destroy (player->fs_window);
+    if (player->fs_window)
+	gtk_widget_destroy (player->fs_window);
 
     G_OBJECT_CLASS (parole_player_parent_class)->finalize (object);
 }
@@ -1989,13 +2054,13 @@ parole_player_init (ParolePlayer *player)
     g_signal_connect_swapped (player->conf, "notify::reset-saver",
 			      G_CALLBACK (parole_player_reset_saver_changed_cb), player);
     
-    player->gst = parole_gst_new (FALSE, player->conf);
+    player->gst = parole_gst_new (player->conf);
 
-    player->status = parole_statusbar_new ();
+    //player->status = parole_statusbar_new ();
 
-    player->disc = parole_disc_new ();
-    g_signal_connect (player->disc, "disc-selected",
-		      G_CALLBACK (parole_player_disc_selected_cb), player);
+    //player->disc = parole_disc_new ();
+    //g_signal_connect (player->disc, "disc-selected",
+	//	      G_CALLBACK (parole_player_disc_selected_cb), player);
 		     
     player->screen_saver = parole_screen_saver_new ();
     player->list = PAROLE_MEDIA_LIST (parole_media_list_get ());
@@ -2053,15 +2118,13 @@ parole_player_init (ParolePlayer *player)
     player->play_pause = GTK_WIDGET (gtk_builder_get_object (builder, "play"));
     player->stop = GTK_WIDGET (gtk_builder_get_object (builder, "stop"));
     player->seekf = GTK_WIDGET (gtk_builder_get_object (builder, "forward"));
-    player->seekb = GTK_WIDGET (gtk_builder_get_object (builder, "back"));
+    player->seekb = GTK_WIDGET (gtk_builder_get_object (builder, "backward"));
      
     player->range = GTK_WIDGET (gtk_builder_get_object (builder, "scale"));
     
     player->volume = GTK_WIDGET (gtk_builder_get_object (builder, "volume"));
     player->volume_image = GTK_WIDGET (gtk_builder_get_object (builder, "volume-image"));
     
-    player->menu_bar = GTK_WIDGET (gtk_builder_get_object (builder, "menubar"));
-    player->play_box = GTK_WIDGET (gtk_builder_get_object (builder, "play-box"));
     player->playlist_nt = GTK_WIDGET (gtk_builder_get_object (builder, "sidebar-notebook"));
     player->show_hide_playlist = GTK_WIDGET (gtk_builder_get_object (builder, "show-hide-list"));
     player->sidebar = GTK_WIDGET (gtk_builder_get_object (builder, "sidebar"));
@@ -2070,11 +2133,25 @@ parole_player_init (ParolePlayer *player)
     player->control = GTK_WIDGET (gtk_builder_get_object (builder, "control"));
     player->leave_fs = GTK_WIDGET (gtk_builder_get_object (builder, "leave_fs"));
     player->main_box = GTK_WIDGET (gtk_builder_get_object (builder, "main-box"));
+    player->videoport = GTK_WIDGET (gtk_builder_get_object (builder, "videoport"));
+    player->min_view = GTK_WIDGET (gtk_builder_get_object (builder, "min-view"));
     
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "repeat")), 
 				   parole_conf_get_property_bool (player->conf, "repeat"));
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "shuffle")),
 				   parole_conf_get_property_bool (player->conf, "shuffle"));
+				   
+    /***
+     * 
+     * Get Control Widget containers
+     * 
+     **/
+     
+    player->scale_container = GTK_WIDGET (gtk_builder_get_object (builder, "scale-container"));
+    player->play_container = GTK_WIDGET (gtk_builder_get_object (builder, "play-container"));
+      
+      
+    
     
     /*VOLUME*/
     gtk_range_set_range (GTK_RANGE (player->volume), 0, 1.0);
@@ -2136,11 +2213,8 @@ parole_player_init (ParolePlayer *player)
     gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-shuffle")),
 				    shuffle);
 	
-    player->fs_window = gtk_window_new (GTK_WINDOW_POPUP);
+    player->fs_window = NULL;
 
-    gtk_window_set_gravity (GTK_WINDOW (player->fs_window), GDK_GRAVITY_SOUTH_WEST);
-    gtk_window_set_position (GTK_WINDOW (player->fs_window), GTK_WIN_POS_NONE);
-  
     parole_gst_set_default_aspect_ratio (player, builder);
 	
     gtk_builder_connect_signals (builder, player);
diff --git a/src/parole-utils.c b/src/parole-utils.c
index 86da573..7c9655e 100644
--- a/src/parole-utils.c
+++ b/src/parole-utils.c
@@ -597,3 +597,49 @@ parole_get_uri_from_unix_device (const gchar *device)
     
     return uri;
 }
+
+void
+parole_set_widget_image_from_stock (GtkWidget *widget, gchar *stock_id)
+{
+    GtkWidget *img;
+    
+    g_object_get (G_OBJECT (widget),
+		  "image", &img,
+		  NULL);
+
+    if (img)
+    {
+
+	g_object_set (G_OBJECT (img),
+		      "stock", stock_id,
+		      NULL);
+		  
+	g_object_unref (img);
+    }
+}
+
+
+gchar *parole_format_media_length (gint total_seconds)
+{
+    gchar *timestring;
+    
+    gint  hours;
+    gint  minutes;
+    gint  seconds;
+
+    minutes =  total_seconds / 60;
+    seconds = total_seconds % 60;
+    hours = minutes / 60;
+    minutes = minutes % 60;
+
+    if ( hours == 0 )
+    {
+	timestring = g_strdup_printf ("%02i:%02i", minutes, seconds);
+    }
+    else
+    {
+        timestring = g_strdup_printf ("%i:%02i:%02i", hours, minutes, seconds);
+    }
+    
+    return timestring;
+}
diff --git a/src/parole-utils.h b/src/parole-utils.h
index d38a2ef..f2d49da 100644
--- a/src/parole-utils.h
+++ b/src/parole-utils.h
@@ -50,4 +50,10 @@ gchar 	       *parole_guess_uri_from_mount 		(GMount *mount);
 							 
 gchar          *parole_get_uri_from_unix_device		(const gchar *device);
 
+void		parole_set_widget_image_from_stock 	(GtkWidget *widget, 
+							 gchar *stock_id);
+
+gchar	       *parole_format_media_length		(gint total_seconds);
+
+
 #endif /* __PAROLE_UTILS_ */



More information about the Xfce4-commits mailing list