[Xfce4-commits] <parole:master> Fixed debug compilition errors.

Sean Davis noreply at xfce.org
Thu Aug 9 20:24:01 CEST 2012


Updating branch refs/heads/master
         to b68b07cb964ace117b34630712586bf92fe5e364 (commit)
       from e8661fee2680afea2230aa11f780dee7d5c16416 (commit)

commit b68b07cb964ace117b34630712586bf92fe5e364
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Thu Aug 9 14:22:47 2012 -0400

    Fixed debug compilition errors.

 src/gst/parole-gst.c         |    9 +-
 src/main.c                   |    1 +
 src/parole-disc.c            |    9 +-
 src/parole-mediachooser.c    |    4 -
 src/parole-medialist.c       |  210 +++++++-----------------------------------
 src/parole-open-location.c   |    4 -
 src/parole-player.c          |  152 ++++++++++++++++++------------
 src/parole-plugins-manager.c |    1 -
 8 files changed, 135 insertions(+), 255 deletions(-)

diff --git a/src/gst/parole-gst.c b/src/gst/parole-gst.c
index dcd4d63..ef1a3a8 100644
--- a/src/gst/parole-gst.c
+++ b/src/gst/parole-gst.c
@@ -43,6 +43,8 @@
 #include "common/parole-common.h"
 #include "common/parole-rc-utils.h"
 
+#include "parole-utils.h"
+
 #include "gst-enum-types.h"
 #include "gstmarshal.h"
 
@@ -252,10 +254,6 @@ parole_gst_realize (GtkWidget *widget)
 static void
 parole_gst_show (GtkWidget *widget)
 {
-    ParoleGst *gst;
-    
-    gst = PAROLE_GST (widget);
-    
     if ( widget->window )
 	gdk_window_show (widget->window);
     
@@ -2313,14 +2311,13 @@ gst_set_current_subtitle_track( ParoleGst *gst, gint track_no )
 {
 	
 	gchar *uri, *sub;
+	gint flags;
 	
 	g_object_get (G_OBJECT (gst->priv->stream),
 		  "uri", &uri,
 		  NULL);
 		  
 	sub = (gchar*) parole_get_subtitle_path(uri);
-	
-	gint flags;
 
 	g_object_get (gst->priv->playbin, "flags", &flags, NULL);
 	
diff --git a/src/main.c b/src/main.c
index 22006d6..7f64524 100644
--- a/src/main.c
+++ b/src/main.c
@@ -48,6 +48,7 @@
 #include "parole-rc-utils.h"
 
 #include <X11/X.h>
+#include <X11/Xlib.h>
 
 static void G_GNUC_NORETURN
 show_version (void)
diff --git a/src/parole-disc.c b/src/parole-disc.c
index 150f76d..6827f02 100644
--- a/src/parole-disc.c
+++ b/src/parole-disc.c
@@ -249,6 +249,11 @@ parole_disc_check_cdrom (ParoleDisc *disc, GVolume *volume, const gchar *device)
 #if defined(__linux__)
     gint fd;
     gint drive;
+    
+    MountData *data;
+    
+	gchar *name;
+	gchar *label;
 
     TRACE ("device : %s", device);
     
@@ -272,11 +277,7 @@ parole_disc_check_cdrom (ParoleDisc *disc, GVolume *volume, const gchar *device)
 	    {
 		if ( drive == CDS_AUDIO || drive == CDS_MIXED )
 		{
-		    MountData *data;
 		    data = parole_disc_get_mount_data (disc, "cdda://", device, PAROLE_DISC_CDDA);
-		    
-		    gchar *name;
-			gchar *label;
 	
 			name = g_volume_get_name (volume);
 			label = g_strdup_printf ("%s '%s'", _("Play Disc"), name);
diff --git a/src/parole-mediachooser.c b/src/parole-mediachooser.c
index c70fad0..b55b941 100644
--- a/src/parole-mediachooser.c
+++ b/src/parole-mediachooser.c
@@ -189,8 +189,6 @@ parole_media_chooser_open_internal (ParoleMediaChooser *media_chooser)
     GtkWidget       *file_chooser;
     GtkBuilder      *builder;
     GtkWidget       *recursive;
-    GtkWidget       *replace;
-    GtkWidget       *play_opened;
     GtkFileFilter   *filter, *all_files;
     gboolean        scan_recursive;
     gboolean        replace_playlist;
@@ -231,8 +229,6 @@ parole_media_chooser_open_internal (ParoleMediaChooser *media_chooser)
 		  NULL);
     
     recursive = GTK_WIDGET (gtk_builder_get_object (builder, "recursive"));
-    replace = GTK_WIDGET (gtk_builder_get_object (builder, "replace"));
-    play_opened = GTK_WIDGET (gtk_builder_get_object (builder, "play-added-files"));
     
     g_object_set_data (G_OBJECT (media_chooser), "file-chooser", file_chooser);
     g_object_set_data (G_OBJECT (media_chooser), "recursive", recursive);
diff --git a/src/parole-medialist.c b/src/parole-medialist.c
index 95ec2ba..f90a350 100644
--- a/src/parole-medialist.c
+++ b/src/parole-medialist.c
@@ -145,6 +145,9 @@ void		parole_media_list_close_save_dialog_cb (GtkButton *button,
 						    
 void		parole_media_list_save_playlist_cb     (GtkButton *button,
 						        ParolePlaylistSave *data);
+						        
+void 		parole_media_list_save_cb (GtkButton *button, 
+								ParoleMediaList *list);
 
 gboolean	parole_media_list_query_tooltip		(GtkWidget *widget,
 							 gint x,
@@ -153,6 +156,9 @@ gboolean	parole_media_list_query_tooltip		(GtkWidget *widget,
 							 GtkTooltip *tooltip,
 							 ParoleMediaList *list);
 							 
+void		parole_media_list_menu_pos (GtkMenu *menu, 
+							gint *px, gint *py, gpointer data);
+							 
 /*
  * End of GtkBuilder callbacks
  */
@@ -866,159 +872,6 @@ parole_media_list_remove_clicked_cb (GtkButton *button, ParoleMediaList *list)
 }
 
 /**
- * parole_media_list_move_on_down:
- * 
- * @store: a #GtkListStore
- * @iter: a #GtkTreeIter
- * 
- * Move the node pointed to by @iter one step down, if the node is the last
- * one then move it to the first position in the @store.
- * 
- **/
-static void
-parole_media_list_move_one_down (GtkListStore *store, GtkTreeIter *iter)
-{
-    GtkTreeIter *pos_iter;
-    
-    /* Save the selected iter to the selected row */
-    pos_iter = gtk_tree_iter_copy (iter);
-
-    /* We are on the last node in the list!*/
-    if ( !gtk_tree_model_iter_next (GTK_TREE_MODEL (store), iter) )
-    {
-	/* Return false if tree is empty*/
-	if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), iter))
-	{
-	    gtk_list_store_move_before (GTK_LIST_STORE (store), pos_iter, iter);
-	}
-    }
-    else
-    {
-	gtk_list_store_move_after (GTK_LIST_STORE (store), pos_iter, iter);
-    }
-    
-    gtk_tree_iter_free (pos_iter);
-}
-
-/**
- * parole_media_list_move_many_down:
- * @path_list: a #GList contains list of #GtkTreePath
- * @model: a #GtkTreeModel
- * 
- * Moves down many nodes pointed to by the paths that are in
- * the list.
- * 
- **/
-static void
-parole_media_list_move_many_down (GList *path_list, GtkTreeModel *model)
-{
-    GList *row_list = NULL;
-    GtkTreeIter iter;
-    guint len;
-    guint i;
-    
-    row_list = parole_media_list_paths_to_row_list (path_list, model);
-    
-    len = g_list_length (row_list);
-    
-    for ( i = 0; i < len; i++)
-    {
-	GtkTreeRowReference *row;
-	GtkTreePath *path;
-	
-	row = g_list_nth_data (row_list, i);
-	
-	path = gtk_tree_row_reference_get_path (row);
-	
-	if ( G_LIKELY (gtk_tree_model_get_iter (model, &iter, path) ) )
-	{
-	    parole_media_list_move_one_down (GTK_LIST_STORE (model), &iter);
-	}
-    }
-    
-    g_list_foreach (row_list, (GFunc) gtk_tree_row_reference_free, NULL);
-    g_list_free (row_list);
-}
-
-/**
- * parole_media_list_move_on_up:
- * 
- * @store: a #GtkListStore
- * @iter: a #GtkTreeIter
- * 
- * Move the node pointed to by @iter one step up, if the node is the first
- * one then move it to the last position in the @store.
- * 
- **/
-static void
-parole_media_list_move_one_up (GtkListStore *store, GtkTreeIter *iter)
-{
-    GtkTreePath *path;
-    GtkTreeIter *pos_iter;
-    
-    /* Save the selected iter to the selected row */
-    pos_iter = gtk_tree_iter_copy (iter);
-    
-    path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), iter);
-    
-    /* We are on the top of the list */
-    if ( !gtk_tree_path_prev (path) )
-    {
-	/* Passing NULL as the last argument will cause this call to move 
-	 * the iter to the end of the list, Gtk API doc*/
-	gtk_list_store_move_before (GTK_LIST_STORE (store), iter, NULL);
-    }
-    else
-    {
-	if (gtk_tree_model_get_iter (GTK_TREE_MODEL (store), iter, path))
-	    gtk_list_store_move_before (GTK_LIST_STORE (store), pos_iter, iter);
-    }
-    
-    gtk_tree_path_free (path);
-    gtk_tree_iter_free (pos_iter);
-}
-
-/**
- * parole_media_list_move_many_up:
- * @path_list: a #GList contains list of #GtkTreePath
- * @model: a #GtkTreeModel
- * 
- * Moves up many nodes pointed to by the paths that are in
- * the list.
- * 
- **/
-static void
-parole_media_list_move_many_up (GList *path_list, GtkTreeModel *model)
-{
-    GList *row_list = NULL;
-    GtkTreeIter iter;
-    guint len;
-    guint i;
-    
-    row_list = parole_media_list_paths_to_row_list (path_list, model);
-    
-    len = g_list_length (row_list);
-    
-    for ( i = 0; i < len; i++)
-    {
-	GtkTreeRowReference *row;
-	GtkTreePath *path;
-	
-	row = g_list_nth_data (row_list, i);
-	
-	path = gtk_tree_row_reference_get_path (row);
-	
-	if ( G_LIKELY (gtk_tree_model_get_iter (model, &iter, path) ) )
-	{
-	    parole_media_list_move_one_up (GTK_LIST_STORE (model), &iter);
-	}
-    }
-    
-    g_list_foreach (row_list, (GFunc) gtk_tree_row_reference_free, NULL);
-    g_list_free (row_list);
-}
-
-/**
  * parole_media_list_row_activated_cb:
  * 
  * 
@@ -1027,11 +880,8 @@ void
 parole_media_list_row_activated_cb (GtkTreeView *view, GtkTreePath *path, 
 				    GtkTreeViewColumn *col, ParoleMediaList *list)
 {
-    GtkTreeModel *model;
     GtkTreeRowReference *row;
     
-    model = gtk_tree_view_get_model (GTK_TREE_VIEW (list->priv->view));
-
     row = gtk_tree_row_reference_new (gtk_tree_view_get_model (GTK_TREE_VIEW (list->priv->view)), 
 				      path);
 				      
@@ -1181,12 +1031,12 @@ parole_media_list_menu_pos (GtkMenu *menu, gint *px, gint *py, gpointer data)
 	gint x, y;
 	GtkAllocation widget_allocation, menu_allocation;
 	GtkWidget *widget = gtk_menu_get_attach_widget( menu );
+	GdkWindow *window;
 	
 	gtk_widget_get_allocation( widget, &widget_allocation );
 	gtk_widget_get_allocation( GTK_WIDGET(menu), &menu_allocation );
 	
-	//g_print("h = %i", requisition.height);
-	GdkWindow *window = gtk_widget_get_window( widget );
+	window = gtk_widget_get_window( widget );
 	gdk_window_get_position( window, &x, &y );
 	
 	px += x + widget_allocation.x - menu_allocation.width + widget_allocation.width;
@@ -1224,22 +1074,25 @@ static void
 parole_media_list_show_button_menu (GtkToggleButton *button, ParoleMediaList *list)
 {
 	gboolean toggled = gtk_toggle_button_get_active( button );
+	gboolean val;
+	GtkBuilder *builder;
+	GtkMenu *menu;
+	GtkMenuItem *clear;
+	GtkCheckMenuItem *repeat_menu, *shuffle_menu, *replace, *play_opened;
+	GtkCheckMenuItem *remember;
+	
 	if (!toggled)
 	return;
-
-	gboolean val;
-    
-    GtkBuilder *builder;
     
     builder = parole_builder_new_from_string (playlist_ui, playlist_ui_length);
     
-    GtkMenu *menu = GTK_MENU (gtk_builder_get_object (builder, "playlist-menu"));
-    GtkCheckMenuItem *repeat_menu = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-repeat"));
-    GtkCheckMenuItem *shuffle_menu = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-shuffle"));
-    GtkCheckMenuItem *replace = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-replace"));
-    GtkCheckMenuItem *play_opened = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-play-opened"));
-    GtkCheckMenuItem *remember = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-remember"));
-    GtkMenuItem *clear = GTK_MENU_ITEM (gtk_builder_get_object (builder, "menu-clear"));
+    menu = GTK_MENU (gtk_builder_get_object (builder, "playlist-menu"));
+    repeat_menu = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-repeat"));
+    shuffle_menu = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-shuffle"));
+    replace = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-replace"));
+    play_opened = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-play-opened"));
+    remember = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-remember"));
+    clear = GTK_MENU_ITEM (gtk_builder_get_object (builder, "menu-clear"));
     
     gtk_menu_attach_to_widget( GTK_MENU(menu), list->priv->settings_button, (GtkMenuDetachFunc) menu_detach );
 
@@ -1304,15 +1157,20 @@ parole_media_list_show_menu (ParoleMediaList *list, GdkEventButton *ev)
     
     GtkBuilder *builder;
     
+    GtkMenu *menu;
+	GtkMenuItem *clear;
+	GtkCheckMenuItem *repeat_menu, *shuffle_menu, *replace, *play_opened;
+	GtkCheckMenuItem *remember;
+    
     builder = parole_builder_new_from_string (playlist_ui, playlist_ui_length);
     
-    GtkMenu *menu = GTK_MENU (gtk_builder_get_object (builder, "playlist-menu"));
-    GtkCheckMenuItem *repeat_menu = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-repeat"));
-    GtkCheckMenuItem *shuffle_menu = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-shuffle"));
-    GtkCheckMenuItem *replace = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-replace"));
-    GtkCheckMenuItem *play_opened = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-play-opened"));
-    GtkCheckMenuItem *remember = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-remember"));
-    GtkMenuItem *clear = GTK_MENU_ITEM (gtk_builder_get_object (builder, "menu-clear"));
+    menu = GTK_MENU (gtk_builder_get_object (builder, "playlist-menu"));
+    repeat_menu = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-repeat"));
+    shuffle_menu = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-shuffle"));
+    replace = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-replace"));
+    play_opened = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-play-opened"));
+    remember = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-remember"));
+    clear = GTK_MENU_ITEM (gtk_builder_get_object (builder, "menu-clear"));
     
     parole_media_list_add_open_containing_folder (list, GTK_WIDGET(menu), (gint)ev->x, (gint)ev->y);
 
diff --git a/src/parole-open-location.c b/src/parole-open-location.c
index 8fdcab4..c314046 100644
--- a/src/parole-open-location.c
+++ b/src/parole-open-location.c
@@ -155,10 +155,6 @@ parole_open_location_init (ParoleOpenLocation *self)
 static void
 parole_open_location_finalize (GObject *object)
 {
-    ParoleOpenLocation *self;
-
-    self = PAROLE_OPEN_LOCATION (object);
-
     G_OBJECT_CLASS (parole_open_location_parent_class)->finalize (object);
 }
 
diff --git a/src/parole-player.c b/src/parole-player.c
index e3c0954..7f9aebf 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -228,10 +228,28 @@ void		ratio_16_9_toggled_cb			(GtkWidget *widget,
 
 void		ratio_20_9_toggled_cb			(GtkWidget *widget,
 							 ParolePlayer *player);
+							 
+void 		parole_player_set_playlist_visible (ParolePlayer *player, 
+							 gboolean visibility);
+							 
+gboolean	parole_player_gst_widget_button_press (GtkWidget *widget, 
+							 GdkEventButton *ev, ParolePlayer *player);
 
 void	        parole_show_about			(GtkWidget *widget,
 							ParolePlayer *player);
 							
+void 		parole_player_set_audiotrack_radio_menu_item_selected(
+							ParolePlayer *player, gint audio_index);
+							
+void 		parole_player_set_subtitle_radio_menu_item_selected(
+							ParolePlayer *player, gint sub_index);
+							
+void 		parole_player_combo_box_audiotrack_changed_cb(GtkWidget *widget, 
+							ParolePlayer *player);
+							
+void 		parole_player_combo_box_subtitles_changed_cb(GtkWidget *widget, 
+							ParolePlayer *player);
+							
 static void parole_player_audiotrack_radio_menu_item_changed_cb(GtkWidget *widget, ParolePlayer *player);
 
 static void parole_player_subtitles_radio_menu_item_changed_cb(GtkWidget *widget, ParolePlayer *player);
@@ -563,20 +581,20 @@ parole_sublang_equal_lists (GList *orig, GList *new)
 static void
 parole_player_clear_subtitles (ParolePlayer *player)
 {
+	GtkTreeIter iter;
+	GList *menu_items, *menu_iter;
+	gint counter = 0;
+	
 	/* Clear the InfoBar Combobox */
 	gtk_list_store_clear(player->priv->liststore_subtitles);
-	GtkTreeIter iter;
 	gtk_list_store_append(GTK_LIST_STORE(player->priv->liststore_subtitles), &iter);
 	gtk_list_store_set(GTK_LIST_STORE(player->priv->liststore_subtitles), &iter, 0, "None", -1);
 	gtk_combo_box_set_active( GTK_COMBO_BOX(player->priv->combobox_subtitles), 0 );
 	
 	/* Clear the subtitle menu options */
-	GList *menu_items, *menu_iter;
 	menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->subtitles_menu) );
-	
 	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(player->priv->subtitles_group), TRUE);
 	
-	gint counter = 0;
 	for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
 	{
 		if (counter >= 4)
@@ -589,28 +607,25 @@ parole_player_clear_subtitles (ParolePlayer *player)
 static void
 parole_player_set_subtitles_list (ParolePlayer *player, GList *subtitle_list)
 {
-	parole_player_clear_subtitles( player );
-	
 	GList *l;
 	gchar* language;
-
-	guint64 index;
-	
-	player->priv->subtitle_list = subtitle_list;
 	
 	GtkTreeIter iter;
-	
 	gint counter = 0;
 	
+	GtkWidget *menu_item;
+
+	parole_player_clear_subtitles( player );
+
+	player->priv->subtitle_list = subtitle_list;
+
 	for (l = subtitle_list; l != NULL; l = l->next)
 	{
 		language = g_strdup (l->data);
-	
-		GtkTreeIter iter;
+
 		gtk_list_store_append(GTK_LIST_STORE(player->priv->liststore_subtitles), &iter);
 		gtk_list_store_set(GTK_LIST_STORE(player->priv->liststore_subtitles), &iter, 0, language, -1);
-    
-    	GtkWidget *menu_item;
+
 		menu_item = gtk_radio_menu_item_new_with_label_from_widget (GTK_RADIO_MENU_ITEM(player->priv->subtitles_group), language);
 		gtk_widget_show (menu_item);
 		
@@ -631,18 +646,21 @@ parole_player_set_subtitles_list (ParolePlayer *player, GList *subtitle_list)
 static void
 parole_player_clear_audio_tracks (ParolePlayer *player)
 {
+	GList *menu_items, *menu_iter;
+	GtkWidget *empty_item;
+
 	gtk_list_store_clear(player->priv->liststore_audiotrack);
 	player->priv->audio_group = NULL;
 	
 	/* Clear the subtitle menu options */
-	GList *menu_items, *menu_iter;
+	
 	menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
 	
 	for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
 	gtk_widget_destroy(GTK_WIDGET(menu_iter->data));
 	g_list_free(menu_items);
 	
-	GtkWidget *empty_item = gtk_menu_item_new_with_label(_("Empty"));
+	empty_item = gtk_menu_item_new_with_label(_("Empty"));
 	gtk_widget_set_sensitive( empty_item, FALSE );
 	gtk_widget_show( empty_item );
 	
@@ -652,24 +670,27 @@ parole_player_clear_audio_tracks (ParolePlayer *player)
 static void
 parole_player_set_audio_list (ParolePlayer *player, GList *audio_list)
 {
-	parole_player_clear_audio_tracks( player );
-	
 	GList *menu_iter;
+	GList *l;
+	gchar* language;
+	
+	GtkTreeIter iter;
+	
+	GtkWidget *menu_item;
+	
+	parole_player_clear_audio_tracks( player );
+
 	menu_iter = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
 	
 	gtk_widget_destroy(GTK_WIDGET(menu_iter->data));
 	g_list_free(menu_iter);
 	
-	GList *l;
-	gchar* language;
-	
 	player->priv->audio_list = audio_list;
 	
 	for (l = audio_list; l != NULL; l = l->next)
 	{
 		language = g_strdup (l->data);
 	
-		GtkTreeIter iter;
 		gtk_list_store_append(GTK_LIST_STORE(player->priv->liststore_audiotrack), &iter);
 		gtk_list_store_set(GTK_LIST_STORE(player->priv->liststore_audiotrack), &iter, 0, language, -1);
 		
@@ -683,7 +704,7 @@ parole_player_set_audio_list (ParolePlayer *player, GList *audio_list)
 			g_signal_connect (player->priv->audio_group, "activate",
 		      G_CALLBACK (parole_player_audiotrack_radio_menu_item_changed_cb), player);
 		} else {
-			GtkWidget *menu_item;
+			
 			menu_item = gtk_radio_menu_item_new_with_label_from_widget (GTK_RADIO_MENU_ITEM(player->priv->audio_group), language);
 			gtk_widget_show (menu_item);
 			gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->languages_menu), menu_item);
@@ -728,17 +749,17 @@ parole_player_update_subtitles (ParolePlayer *player, ParoleGst *gst)
 {
 	GList * list = gst_get_lang_list_for_type (gst, "TEXT");
 	
-	guint64 index;
-	index = 0;
-	
+	guint64 sub_index;
 	gboolean sub_enabled;
 	
+	sub_index = 0;
+	
 	g_object_get (G_OBJECT (player->priv->conf),
 		  "enable-subtitle", &sub_enabled,
 		  NULL);
 		  
 	if (sub_enabled)
-	index = 1;
+	sub_index = 1;
 	
 	if (parole_sublang_equal_lists (player->priv->subtitle_list, list) == TRUE)
 	{
@@ -751,7 +772,7 @@ parole_player_update_subtitles (ParolePlayer *player, ParoleGst *gst)
 	
 	parole_player_set_subtitles_list (player, list);
 	
-	gtk_combo_box_set_active( GTK_COMBO_BOX(player->priv->combobox_subtitles), index );
+	gtk_combo_box_set_active( GTK_COMBO_BOX(player->priv->combobox_subtitles), sub_index );
 	
 	if (g_list_length (list) != 1) {
     	gtk_widget_show(player->priv->infobar);
@@ -877,6 +898,7 @@ parole_player_media_list_repeat_toggled_cb (ParoleMediaList *list, gboolean repe
 static void
 parole_player_media_progressed_cb (ParoleGst *gst, const ParoleStream *stream, gint64 value, ParolePlayer *player)
 {
+	gchar pos_text[128];
 #ifdef DEBUG
     g_return_if_fail (value > 0);
 #endif
@@ -884,7 +906,6 @@ parole_player_media_progressed_cb (ParoleGst *gst, const ParoleStream *stream, g
     if ( !player->priv->user_seeking && player->priv->state == PAROLE_STATE_PLAYING )
     {
 	parole_player_change_range_value (player, value);
-    gchar pos_text[128];
     get_time_string (pos_text, value);
     gtk_label_set_text (GTK_LABEL (player->priv->label_elapsed), pos_text);
     }
@@ -1105,6 +1126,9 @@ parole_player_play_selected_row (ParolePlayer *player)
 static void
 parole_player_play_next (ParolePlayer *player, gboolean allow_shuffle)
 {
+	gboolean repeat, shuffle;
+    GtkTreeRowReference *row;
+
 	if ( player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD ||
 	 player->priv->current_media_type == PAROLE_MEDIA_TYPE_CDDA )
     {
@@ -1114,9 +1138,6 @@ parole_player_play_next (ParolePlayer *player, gboolean allow_shuffle)
 		parole_gst_next_cdda_track (PAROLE_GST(player->priv->gst));
 		return;
     }
-    gboolean repeat, shuffle;
-    
-    GtkTreeRowReference *row;
     
     g_object_get (G_OBJECT (player->priv->conf),
 		  "shuffle", &shuffle,
@@ -1151,6 +1172,8 @@ parole_player_play_next (ParolePlayer *player, gboolean allow_shuffle)
 static void
 parole_player_play_prev (ParolePlayer *player)
 {
+	GtkTreeRowReference *row;
+
 	if ( player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD ||
 	 player->priv->current_media_type == PAROLE_MEDIA_TYPE_CDDA )
     {
@@ -1160,7 +1183,6 @@ parole_player_play_prev (ParolePlayer *player)
 		parole_gst_prev_cdda_track (PAROLE_GST(player->priv->gst));
 		return;
     }
-    GtkTreeRowReference *row;
     
     if ( player->priv->row )
     {
@@ -1415,6 +1437,8 @@ parole_player_media_tag_cb (ParoleGst *gst, const ParoleStream *stream, ParolePl
 static void
 parole_player_buffering_cb (ParoleGst *gst, const ParoleStream *stream, gint percentage, ParolePlayer *player)
 {
+	gchar *buff;
+
     if ( percentage == 100 )
     {
 	player->priv->buffering = FALSE;
@@ -1430,8 +1454,6 @@ parole_player_buffering_cb (ParoleGst *gst, const ParoleStream *stream, gint per
 	if ( player->priv->state == PAROLE_STATE_PLAYING )
 	    parole_gst_pause (PAROLE_GST (player->priv->gst));
 	    
-    gchar *buff;
-    
     buff = g_strdup_printf ("%s (%d%%)", _("Buffering"), percentage);
     
     gtk_progress_bar_set_text (GTK_PROGRESS_BAR (player->priv->progressbar_buffering), buff);
@@ -1491,6 +1513,8 @@ parole_player_full_screen (ParolePlayer *player, gboolean fullscreen)
     static gint current_page = 0;
     GdkWindow *gdkwindow;
     
+    gboolean show_playlist;
+    
     if ( player->priv->full_screen == fullscreen )
 	return;
     
@@ -1502,7 +1526,7 @@ parole_player_full_screen (ParolePlayer *player, gboolean fullscreen)
 	gtk_widget_hide (player->priv->fs_window);
 	gtk_widget_show (player->priv->play_box);
 	gtk_widget_show (player->priv->menu_bar);
-	gboolean show_playlist = gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM(player->priv->show_hide_playlist) );
+	show_playlist = gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM(player->priv->show_hide_playlist) );
     gtk_widget_show (player->priv->playlist_nt);
 	parole_player_set_playlist_visible(player, show_playlist);
 	gtk_widget_show (player->priv->go_fs);
@@ -1557,7 +1581,7 @@ void parole_player_leave_fs_cb (GtkButton *button, ParolePlayer *player)
 static void
 parole_player_show_menu (ParolePlayer *player, guint button, guint activate_time)
 {
-    GtkWidget *menu, *mi, *img;
+    GtkWidget *menu, *mi;
     gboolean sensitive;
     
     player->priv->current_media_type = parole_gst_get_current_stream_type (PAROLE_GST (player->priv->gst));
@@ -2279,6 +2303,7 @@ parole_player_set_wm_opacity_hint (GtkWidget *widget)
 		     1);
 }
 
+static void
 parole_player_setup_multimedia_keys (ParolePlayer *player)
 {
     #ifdef HAVE_XF86_KEYSYM
@@ -2307,6 +2332,11 @@ parole_player_init (ParolePlayer *player)
     
     gboolean repeat, shuffle;
     
+    GtkWidget *infobar_contents;
+    GtkCellRenderer *cell, *sub_cell;
+    
+    GtkWidget *content_area;
+    
     player->priv = PAROLE_PLAYER_GET_PRIVATE (player);
 
     player->priv->client_id = NULL;
@@ -2428,13 +2458,13 @@ parole_player_init (ParolePlayer *player)
     player->priv->liststore_subtitles = GTK_LIST_STORE (gtk_builder_get_object (builder, "liststore_subtitles"));
     player->priv->audio_list = NULL;
     player->priv->subtitle_list = NULL;
-    GtkWidget *infobar_contents = GTK_WIDGET (gtk_builder_get_object( builder, "infobar_contents"));
+    infobar_contents = GTK_WIDGET (gtk_builder_get_object( builder, "infobar_contents"));
     
-    GtkCellRenderer * cell = gtk_cell_renderer_text_new();
+    cell = gtk_cell_renderer_text_new();
 	gtk_cell_layout_pack_start( GTK_CELL_LAYOUT( player->priv->combobox_audiotrack ), cell, TRUE );
 	gtk_cell_layout_set_attributes( GTK_CELL_LAYOUT( player->priv->combobox_audiotrack ), cell, "text", 0, NULL );
 	
-	GtkCellRenderer * sub_cell = gtk_cell_renderer_text_new();
+	sub_cell = gtk_cell_renderer_text_new();
 	gtk_cell_layout_pack_start( GTK_CELL_LAYOUT( player->priv->combobox_subtitles ), sub_cell, TRUE );
 	gtk_cell_layout_set_attributes( GTK_CELL_LAYOUT( player->priv->combobox_subtitles ), sub_cell, "text", 0, NULL );
 	
@@ -2442,7 +2472,7 @@ parole_player_init (ParolePlayer *player)
 	player->priv->infobar = gtk_info_bar_new ();
 	gtk_widget_set_no_show_all (player->priv->infobar, TRUE);
 
-	GtkWidget *content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (player->priv->infobar));
+	content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (player->priv->infobar));
 	gtk_widget_reparent (infobar_contents, content_area);
 	gtk_info_bar_add_button (GTK_INFO_BAR (player->priv->infobar),
 		                     GTK_STOCK_CLOSE, GTK_RESPONSE_OK);
@@ -2585,15 +2615,16 @@ void parole_player_play_uri_disc (ParolePlayer *player, const gchar *uri, const
     }
 }
 
-void parole_player_set_audiotrack_radio_menu_item_selected(ParolePlayer *player, gint index)
+void parole_player_set_audiotrack_radio_menu_item_selected(ParolePlayer *player, gint audio_index)
 {
 	GList *menu_items, *menu_iter;
+	gint counter = 0;
+	
 	menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
 	
-	gint counter = 0;
 	for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
 	{
-		if (counter == index) {
+		if (counter == audio_index) {
 			gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_iter->data), TRUE);
 			break;
 		}
@@ -2602,12 +2633,12 @@ void parole_player_set_audiotrack_radio_menu_item_selected(ParolePlayer *player,
 	g_list_free(menu_items);
 }
 
-void parole_player_set_subtitle_radio_menu_item_selected(ParolePlayer *player, gint index)
+void parole_player_set_subtitle_radio_menu_item_selected(ParolePlayer *player, gint sub_index)
 {
 	GList *menu_items, *menu_iter;
 	menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->subtitles_menu) );
 	
-	if (index <= 0)
+	if (sub_index <= 0)
 	{
 		gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_items->data), TRUE);
 	}
@@ -2616,7 +2647,7 @@ void parole_player_set_subtitle_radio_menu_item_selected(ParolePlayer *player, g
 		gint counter = -3;
 		for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
 		{
-			if (counter == index) {
+			if (counter == sub_index) {
 				gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_iter->data), TRUE);
 				break;
 			}
@@ -2629,11 +2660,12 @@ void parole_player_set_subtitle_radio_menu_item_selected(ParolePlayer *player, g
 void parole_player_audiotrack_radio_menu_item_changed_cb(GtkWidget *widget, ParolePlayer *player)
 {
 	gint radio_index;
-	
 	GList *menu_items, *menu_iter;
+	gint counter = 0;
+	gint combobox_index;
+	
 	menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
 	
-	gint counter = 0;
 	for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
 	{
 		if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu_iter->data)) == TRUE) {
@@ -2644,19 +2676,19 @@ void parole_player_audiotrack_radio_menu_item_changed_cb(GtkWidget *widget, Paro
 	}
 	g_list_free(menu_items);
 	
-	gint combobox_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_audiotrack));
+	combobox_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_audiotrack));
 	if (radio_index != combobox_index)
 	gtk_combo_box_set_active(GTK_COMBO_BOX(player->priv->combobox_audiotrack), radio_index);
 }
 
 void parole_player_subtitles_radio_menu_item_changed_cb(GtkWidget *widget, ParolePlayer *player)
 {
-	gint radio_index;
+	gint radio_index, combobox_index; 
+	gint counter = 0;
 	
 	GList *menu_items, *menu_iter;
 	menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->subtitles_menu) );
 	
-	gint counter = 0;
 	for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
 	{
 		if (counter == 0 || counter > 3)
@@ -2673,23 +2705,23 @@ void parole_player_subtitles_radio_menu_item_changed_cb(GtkWidget *widget, Parol
 	if (radio_index != 0)
 	radio_index -= 3;
 
-	gint combobox_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_subtitles));
+	combobox_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_subtitles));
 	if (radio_index != combobox_index)
 	gtk_combo_box_set_active(GTK_COMBO_BOX(player->priv->combobox_subtitles), radio_index);
 }
 
 void parole_player_combo_box_audiotrack_changed_cb(GtkWidget *widget, ParolePlayer *player)
 {
-	gint index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_audiotrack));
-	gst_set_current_audio_track(PAROLE_GST(player->priv->gst), index);
-	parole_player_set_audiotrack_radio_menu_item_selected(player, index);
+	gint audio_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_audiotrack));
+	gst_set_current_audio_track(PAROLE_GST(player->priv->gst), audio_index);
+	parole_player_set_audiotrack_radio_menu_item_selected(player, audio_index);
 }
 
 void parole_player_combo_box_subtitles_changed_cb(GtkWidget *widget, ParolePlayer *player)
 {
-	gint index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_subtitles));
-	gst_set_current_subtitle_track(PAROLE_GST(player->priv->gst), index);
-	parole_player_set_subtitle_radio_menu_item_selected(player, index);
+	gint sub_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_subtitles));
+	gst_set_current_subtitle_track(PAROLE_GST(player->priv->gst), sub_index);
+	parole_player_set_subtitle_radio_menu_item_selected(player, sub_index);
 }
 
 void parole_player_terminate (ParolePlayer *player)
diff --git a/src/parole-plugins-manager.c b/src/parole-plugins-manager.c
index ee4034d..7216d9b 100644
--- a/src/parole-plugins-manager.c
+++ b/src/parole-plugins-manager.c
@@ -374,7 +374,6 @@ static void
 parole_plugins_manager_show_plugins_pref (GtkWidget *widget, ParolePluginsManager *manager)
 {
     GtkBuilder *builder;
-    GtkWidget *site_box;
     GtkTreeSelection *sel;
     GtkTreePath *path;
     GtkTreeIter iter;


More information about the Xfce4-commits mailing list