[Xfce4-commits] <parole:master> Merged commit 487005d81704e15532dd9a6f19754dd1ce4cc0bf from ochosi/comments

Sean Davis noreply at xfce.org
Sun Nov 11 17:26:01 CET 2012


Updating branch refs/heads/master
         to c461c8089df43b54845ac7da45bd1bd01de7a0b1 (commit)
       from 198bf0cc40a8a4a956f3905801c91c0cfa57dc42 (commit)

commit c461c8089df43b54845ac7da45bd1bd01de7a0b1
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sun Nov 11 11:24:58 2012 -0500

    Merged commit 487005d81704e15532dd9a6f19754dd1ce4cc0bf from ochosi/comments

 src/parole-conf-dialog.c   |    5 ++++-
 src/parole-disc.c          |    8 ++++++++
 src/parole-mediachooser.c  |    5 +++++
 src/parole-medialist.c     |   17 +++++++++++------
 src/parole-open-location.c |    4 ++++
 5 files changed, 32 insertions(+), 7 deletions(-)

diff --git a/src/parole-conf-dialog.c b/src/parole-conf-dialog.c
index 173a64c..1afac29 100644
--- a/src/parole-conf-dialog.c
+++ b/src/parole-conf-dialog.c
@@ -185,6 +185,7 @@ void parole_conf_dialog_response_cb (GtkDialog *dialog, gint response_id, Parole
     }
 }
 
+/* Change subtitle encoding */
 void parole_conf_dialog_subtitle_encoding_changed_cb (GtkComboBox *widget, ParoleConfDialog *self)
 {
     g_object_set (G_OBJECT (self->priv->conf), 
@@ -367,6 +368,7 @@ parole_conf_dialog_set_default_vis_plugin (GtkTreeModel *model, GtkTreePath *pat
     return ret;
 }
 
+/* Load the default playlist settings */
 static void
 parole_conf_dialog_set_defaults_playlist (ParoleConfDialog  *self, GtkBuilder *builder)
 {
@@ -407,6 +409,7 @@ parole_conf_dialog_set_defaults_playlist (ParoleConfDialog  *self, GtkBuilder *b
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), option);
 }
 
+/* Load the multimedia-button default settings */
 static void
 parole_conf_dialog_set_defaults_general (ParoleConfDialog *self, GtkBuilder *builder)
 {
@@ -426,7 +429,7 @@ parole_conf_dialog_set_defaults_general (ParoleConfDialog *self, GtkBuilder *bui
     
 }
 
-/* Load the settings stored in the rc file */
+/* Load the rest of the settings stored in the rc file */
 static void
 parole_conf_dialog_set_defaults (ParoleConfDialog *self)
 {
diff --git a/src/parole-disc.c b/src/parole-disc.c
index 9e67839..e61977e 100644
--- a/src/parole-disc.c
+++ b/src/parole-disc.c
@@ -78,6 +78,7 @@ typedef struct
     
 } MountData;
 
+/* Free the mount-point */
 static void
 free_mount_data (gpointer data)
 {
@@ -104,6 +105,7 @@ parole_disc_media_activate_cb (GtkWidget *widget, ParoleDisc *disc)
     g_signal_emit (G_OBJECT (disc), signals [DISC_SELECTED], 0, data->uri, data->device);
 }
 
+/* Show the respective disc-item in the file menu */
 static void
 parole_disc_show_menu_item (ParoleDisc *disc, MountData *data, const gchar *label)
 {
@@ -148,6 +150,7 @@ parole_disc_show_menu_item (ParoleDisc *disc, MountData *data, const gchar *labe
 		      G_CALLBACK (parole_disc_media_activate_cb), disc);
 }
 
+/* Get data from the mount-point */
 static MountData *
 parole_disc_get_mount_data (ParoleDisc *disc, 
 			    const gchar *uri, 
@@ -186,6 +189,7 @@ parole_disc_add_mount_to_menu (ParoleDisc *disc, GMount *mount, const gchar *dev
 	
     content_type = g_content_type_guess_for_tree (file);
 
+    /* Determine the type of disc */
     for ( i = 0; content_type && content_type[i]; i++)
     {
 	TRACE ("Checking disc content type : %s", content_type[i]);
@@ -243,6 +247,7 @@ got_cdda:
     g_object_unref (file);
 }
 
+/* Check the state of the drive */
 static void
 parole_disc_check_cdrom (ParoleDisc *disc, GVolume *volume, const gchar *device)
 {
@@ -331,6 +336,7 @@ parole_disc_add_drive (ParoleDisc *disc, GDrive *drive, const gchar *device)
     g_list_free (list);
 }
 
+/* Get a list of available drives */
 static void
 parole_disc_get_drives (ParoleDisc *disc)
 {
@@ -408,6 +414,7 @@ parole_disc_class_init (ParoleDiscClass *klass)
     g_type_class_add_private (klass, sizeof (ParoleDiscPrivate));
 }
 
+/* Initialize the disc monitor */
 static void
 parole_disc_init (ParoleDisc *disc)
 {
@@ -422,6 +429,7 @@ parole_disc_init (ParoleDisc *disc)
     
     disc->priv->monitor = g_volume_monitor_get ();
     
+    /* Connect the various disc signals */
     g_signal_connect (G_OBJECT (disc->priv->monitor), "volume-added",
 		      G_CALLBACK (parole_disc_monitor_changed_cb), disc);
     
diff --git a/src/parole-mediachooser.c b/src/parole-mediachooser.c
index b55b941..44bd87e 100644
--- a/src/parole-mediachooser.c
+++ b/src/parole-mediachooser.c
@@ -100,6 +100,7 @@ media_chooser_folder_changed_cb (GtkWidget *widget, gpointer data)
     }
 }
 
+/* Add one or more files from the filechooser-widget to the playlist */
 static void
 parole_media_chooser_add (ParoleMediaChooser *chooser, GtkWidget *file_chooser)
 {
@@ -168,6 +169,7 @@ void parole_media_chooser_add_clicked (GtkWidget *widget, ParoleMediaChooser *ch
     parole_media_chooser_open (chooser);
 }
 
+/* Destroy the widget when close is clicked */
 void parole_media_chooser_close_clicked (GtkWidget *widget, ParoleMediaChooser *chooser)
 {
     gtk_widget_destroy (chooser->window);
@@ -204,6 +206,7 @@ parole_media_chooser_open_internal (ParoleMediaChooser *media_chooser)
     
     file_chooser = GTK_WIDGET (gtk_builder_get_object (builder, "filechooserwidget"));
     
+    /* Set filters for the filechooser */    
     filter = gtk_file_filter_new();
     gtk_file_filter_set_name( filter, _("Supported files") );
     gtk_file_filter_add_mime_type (GTK_FILE_FILTER (filter), "audio/*");
@@ -215,6 +218,7 @@ parole_media_chooser_open_internal (ParoleMediaChooser *media_chooser)
     gtk_file_filter_add_pattern ( all_files, "*");
     gtk_file_chooser_add_filter( GTK_FILE_CHOOSER(file_chooser), all_files );
 
+    /* Set the folder that is shown */
     folder = parole_rc_read_entry_string ("media-chooser-folder", PAROLE_RC_GROUP_GENERAL, NULL);
     
     if ( folder )
@@ -222,6 +226,7 @@ parole_media_chooser_open_internal (ParoleMediaChooser *media_chooser)
     
     gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (file_chooser), TRUE);
 
+    /* Get playlist-properties to load files accordingly */
     g_object_get (G_OBJECT (media_chooser->conf),
 		  "scan-recursive", &scan_recursive,
 		  "replace-playlist", &replace_playlist,
diff --git a/src/parole-medialist.c b/src/parole-medialist.c
index f90a350..ffb4009 100644
--- a/src/parole-medialist.c
+++ b/src/parole-medialist.c
@@ -66,6 +66,7 @@ typedef struct
     
 } ParolePlaylistSave;
 
+/* Playlist filetypes */
 static struct
 {
     ParolePlFormat format;
@@ -302,6 +303,7 @@ parole_media_list_files_open (ParoleMediaList *list, GSList *files, gboolean emi
     }
 }
 
+/* Callback to determine whether opened files should start playing immediately */
 static void
 parole_media_list_files_opened_cb (ParoleMediaChooser *chooser, 
 				   GSList *files, 
@@ -388,6 +390,7 @@ parole_media_list_get_files (ParoleMediaList *list)
     return files_list;
 }
 
+/* Callback when an item is dragged on the playlist-widget */
 void	parole_media_list_drag_data_received_cb (GtkWidget *widget,
 						 GdkDragContext *drag_context,
 						 gint x,
@@ -435,18 +438,21 @@ gboolean parole_media_list_key_press (GtkWidget *widget, GdkEventKey *ev, Parole
     return FALSE;
 }
 
+/* Callback for the add button */
 void
 parole_media_list_add_clicked_cb (GtkButton *button, ParoleMediaList *list)
 {
     parole_media_list_open_internal (list);
 }
 
+/* Callback for the clear button */
 void 
 parole_media_list_clear_clicked_cb (GtkButton *button, ParoleMediaList *list)
 {
 	parole_media_list_clear_list (list);
 }
 
+/* Callback for the repeat togglebutton */
 void
 parole_media_list_repeat_toggled_cb (GtkToggleButton *button, ParoleMediaList *list)
 {
@@ -457,6 +463,7 @@ parole_media_list_repeat_toggled_cb (GtkToggleButton *button, ParoleMediaList *l
     g_signal_emit (G_OBJECT (list), signals [REPEAT_TOGGLED], 0, toggled);
 }
 
+/* Callback for the shuffle togglebutton */
 void
 parole_media_list_shuffle_toggled_cb (GtkToggleButton *button, ParoleMediaList *list)
 {
@@ -510,6 +517,7 @@ parole_media_list_get_first_selected_row (ParoleMediaList *list)
     return row;
 }
 
+/* Callback to save the current playlist */
 void parole_media_list_save_playlist_cb (GtkButton *button, ParolePlaylistSave *data)
 {
     ParolePlFormat format = PAROLE_PL_FORMAT_UNKNOWN;
@@ -561,7 +569,7 @@ out:
     g_free (dirname);
 }
 
-
+/* Query to get the data to populate the tooltip */
 gboolean	parole_media_list_query_tooltip		(GtkWidget *widget,
 							 gint x,
 							 gint y,
@@ -649,6 +657,7 @@ void parole_media_list_format_cursor_changed_cb (GtkTreeView *view, ParolePlayli
     
 }
 
+/* Callback to save the current playlist */
 void parole_media_list_save_cb (GtkButton *button, ParoleMediaList *list)
 {
     ParolePlaylistSave *data;
@@ -775,11 +784,7 @@ parole_media_list_paths_to_row_list (GList *path_list, GtkTreeModel *model)
     return row_list;
 }
 
-/**
- * parole_media_list_remove_clicked_cb:
- * 
- * 
- **/
+/* Callback for the remove-from-playlist button */
 void
 parole_media_list_remove_clicked_cb (GtkButton *button, ParoleMediaList *list)
 {
diff --git a/src/parole-open-location.c b/src/parole-open-location.c
index c314046..7f973be 100644
--- a/src/parole-open-location.c
+++ b/src/parole-open-location.c
@@ -68,6 +68,7 @@ static guint signals [LAST_SIGNAL] = { 0 };
 
 G_DEFINE_TYPE (ParoleOpenLocation, parole_open_location, G_TYPE_OBJECT)
 
+/* Callback for the open button which passes on the location and closes the dialog */
 static void
 parole_open_location_response_cb (GtkDialog *dialog, gint response_id, ParoleOpenLocation *self)
 {
@@ -90,6 +91,7 @@ parole_open_location_response_cb (GtkDialog *dialog, gint response_id, ParoleOpe
 	gtk_widget_destroy (GTK_WIDGET (dialog));
 }
 
+/* Populate the history-popup */
 static GtkTreeModel *
 parole_open_location_get_completion_model (void)
 {
@@ -158,6 +160,7 @@ parole_open_location_finalize (GObject *object)
     G_OBJECT_CLASS (parole_open_location_parent_class)->finalize (object);
 }
 
+/* Clear the location history */
 static void
 parole_open_location_clear_history (GtkTreeModel *model)
 {
@@ -165,6 +168,7 @@ parole_open_location_clear_history (GtkTreeModel *model)
     gtk_list_store_clear (GTK_LIST_STORE (model));
 }
 
+/* Main function to open the "open location" dialog */
 ParoleOpenLocation *parole_open_location (GtkWidget *parent)
 {
     ParoleOpenLocation *self;


More information about the Xfce4-commits mailing list