Updating branch refs/heads/ochosi/comments to 487005d81704e15532dd9a6f19754dd1ce4cc0bf (commit) from f06ff6c539a8448495306348d3f93f25a2ebf8f0 (commit)
commit 487005d81704e15532dd9a6f19754dd1ce4cc0bf Author: Simon Steinbeiss <och...@xfce.org> Date: Fri Sep 21 00:35:02 2012 +0200 More comments src/parole-conf-dialog.c | 5 ++++- src/parole-disc.c | 10 +++++++++- src/parole-mediachooser.c | 7 ++++++- src/parole-medialist.c | 17 +++++++++++------ src/parole-open-location.c | 4 ++++ 5 files changed, 34 insertions(+), 9 deletions(-) diff --git a/src/parole-conf-dialog.c b/src/parole-conf-dialog.c index d86face..7eb1f4d 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..af50b6f 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) { @@ -421,7 +428,8 @@ parole_disc_init (ParoleDisc *disc) disc->priv->needs_update = TRUE; 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..8aa0571 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); @@ -203,7 +205,8 @@ parole_media_chooser_open_internal (ParoleMediaChooser *media_chooser) gtk_widget_hide( media_chooser->spinner ); 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..98c293f 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; @@ -776,9 +785,7 @@ parole_media_list_paths_to_row_list (GList *path_list, GtkTreeModel *model) } /** - * parole_media_list_remove_clicked_cb: - * - * + * Callback for the remove-from-playlist button **/ void parole_media_list_remove_clicked_cb (GtkButton *button, ParoleMediaList *list) @@ -873,8 +880,6 @@ parole_media_list_remove_clicked_cb (GtkButton *button, ParoleMediaList *list) /** * parole_media_list_row_activated_cb: - * - * **/ void parole_media_list_row_activated_cb (GtkTreeView *view, GtkTreePath *path, 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; _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits