Author: jannis Date: 2009-04-24 19:03:45 +0000 (Fri, 24 Apr 2009) New Revision: 29905
Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-dialogs.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c thunar/branches/migration-to-gio/thunar/thunar-progress-dialog.c thunar/branches/migration-to-gio/thunar/thunar-progress-dialog.h thunar/branches/migration-to-gio/thunar/thunar-standard-view.c thunar/branches/migration-to-gio/thunar/thunar-tree-view.c Log: * thunar/thunar-dialogs.c, thunar/thunar-progress-dialog.{c,h}, thunar/thunar-standard-view.c thunar/thunar-tree-view.c: Remove all references to ThunarVfsJob/ThunarVfsJobResponse from comments and source code. * thunar/thunar-io-jobs.c: Fix overwriting of a GError when cancelling the list_directory job. Modified: thunar/branches/migration-to-gio/ChangeLog =================================================================== --- thunar/branches/migration-to-gio/ChangeLog 2009-04-24 18:48:54 UTC (rev 29904) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-24 19:03:45 UTC (rev 29905) @@ -1,5 +1,14 @@ 2009-04-24 Jannis Pohlmann <jan...@xfce.org> + * thunar/thunar-dialogs.c, thunar/thunar-progress-dialog.{c,h}, + thunar/thunar-standard-view.c thunar/thunar-tree-view.c: Remove + all references to ThunarVfsJob/ThunarVfsJobResponse from comments and + source code. + * thunar/thunar-io-jobs.c: Fix overwriting of a GError when cancelling + the list_directory job. + +2009-04-24 Jannis Pohlmann <jan...@xfce.org> + * thunar/thunar-file.c: Implement thunar_file_get_group(), thunar_file_get_user() and thunar_file_get_emblem_names() based on GFile/GFileInfo. Modified: thunar/branches/migration-to-gio/thunar/thunar-dialogs.c =================================================================== --- thunar/branches/migration-to-gio/thunar/thunar-dialogs.c 2009-04-24 18:48:54 UTC (rev 29904) +++ thunar/branches/migration-to-gio/thunar/thunar-dialogs.c 2009-04-24 19:03:45 UTC (rev 29905) @@ -389,10 +389,10 @@ * @question : the question text. * @choices : possible responses. * - * Utility function to display a question dialog for the ThunarVfsJob::ask + * Utility function to display a question dialog for the ThunarJob::ask * signal. * - * Return value: the #ThunarVfsJobResponse. + * Return value: the #ThunarJobResponse. **/ ThunarJobResponse thunar_dialogs_show_job_ask (GtkWindow *parent, @@ -534,7 +534,7 @@ * Asks the user whether to replace the destination file with the * source file identified by @src_file. * - * Return value: the selected #ThunarVfsJobResponse. + * Return value: the selected #ThunarJobResponse. **/ ThunarJobResponse thunar_dialogs_show_job_ask_replace (GtkWindow *parent, @@ -707,10 +707,10 @@ /** * thunar_dialogs_show_job_error: * @parent : the parent #GtkWindow or %NULL. - * @error : the #GError provided by the #ThunarVfsJob. + * @error : the #GError provided by the #ThunarJob. * * Utility function to display a message dialog for the - * ThunarVfsJob::error signal. + * ThunarJob::error signal. **/ void thunar_dialogs_show_job_error (GtkWindow *parent, Modified: thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c =================================================================== --- thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c 2009-04-24 18:48:54 UTC (rev 29904) +++ thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c 2009-04-24 19:03:45 UTC (rev 29905) @@ -1024,12 +1024,16 @@ g_file_list_free (path_list); /* abort on errors or cancellation */ - thunar_job_set_error_if_cancelled (job, &err); if (G_UNLIKELY (err != NULL)) { g_propagate_error (error, err); return FALSE; } + else if (G_UNLIKELY (thunar_job_set_error_if_cancelled (job, &err))) + { + g_propagate_error (error, err); + return FALSE; + } /* check if we have any files to report */ if (G_LIKELY (file_list != NULL)) Modified: thunar/branches/migration-to-gio/thunar/thunar-progress-dialog.c =================================================================== --- thunar/branches/migration-to-gio/thunar/thunar-progress-dialog.c 2009-04-24 18:48:54 UTC (rev 29904) +++ thunar/branches/migration-to-gio/thunar/thunar-progress-dialog.c 2009-04-24 19:03:45 UTC (rev 29905) @@ -55,22 +55,22 @@ static ThunarJobResponse thunar_progress_dialog_ask (ThunarProgressDialog *dialog, const gchar *message, ThunarJobResponse choices, - gpointer *job); + ThunarJob *job); static ThunarJobResponse thunar_progress_dialog_ask_replace (ThunarProgressDialog *dialog, ThunarFile *src_file, ThunarFile *dst_file, - gpointer *job); + ThunarJob *job); static void thunar_progress_dialog_error (ThunarProgressDialog *dialog, GError *error, - gpointer *job); + ThunarJob *job); static void thunar_progress_dialog_finished (ThunarProgressDialog *dialog, - gpointer *job); + ThunarJob *job); static void thunar_progress_dialog_info_message (ThunarProgressDialog *dialog, const gchar *message, - gpointer *job); + ThunarJob *job); static void thunar_progress_dialog_percent (ThunarProgressDialog *dialog, gdouble percent, - gpointer *job); + ThunarJob *job); @@ -83,7 +83,7 @@ { GtkDialog __parent__; - gpointer job; + ThunarJob *job; GTimeVal start_time; GTimeVal last_update_time; @@ -147,13 +147,13 @@ /** * ThunarProgressDialog:job: * - * The #ThunarVfsJob or #ThunarJob, whose progress is displayed by - * this dialog, or %NULL if no job is set. + * The #ThunarJob, whose progress is displayed by this dialog, or + * %NULL if no job is set. **/ g_object_class_install_property (gobject_class, PROP_JOB, g_param_spec_object ("job", "job", "job", - G_TYPE_OBJECT, + THUNAR_TYPE_JOB, EXO_PARAM_READWRITE)); } @@ -273,11 +273,11 @@ thunar_progress_dialog_ask (ThunarProgressDialog *dialog, const gchar *message, ThunarJobResponse choices, - gpointer *job) + ThunarJob *job) { _thunar_return_val_if_fail (THUNAR_IS_PROGRESS_DIALOG (dialog), THUNAR_JOB_RESPONSE_CANCEL); _thunar_return_val_if_fail (g_utf8_validate (message, -1, NULL), THUNAR_JOB_RESPONSE_CANCEL); - _thunar_return_val_if_fail (THUNAR_VFS_IS_JOB (job) || THUNAR_IS_JOB (job), THUNAR_JOB_RESPONSE_CANCEL); + _thunar_return_val_if_fail (THUNAR_IS_JOB (job), THUNAR_JOB_RESPONSE_CANCEL); _thunar_return_val_if_fail (dialog->job == job, THUNAR_JOB_RESPONSE_CANCEL); /* be sure to display the progress dialog prior to opening the question dialog */ @@ -293,7 +293,7 @@ thunar_progress_dialog_ask_replace (ThunarProgressDialog *dialog, ThunarFile *src_file, ThunarFile *dst_file, - gpointer *job) + ThunarJob *job) { _thunar_return_val_if_fail (THUNAR_IS_PROGRESS_DIALOG (dialog), THUNAR_JOB_RESPONSE_CANCEL); _thunar_return_val_if_fail (THUNAR_IS_JOB (job), THUNAR_JOB_RESPONSE_CANCEL); @@ -313,11 +313,11 @@ static void thunar_progress_dialog_error (ThunarProgressDialog *dialog, GError *error, - gpointer *job) + ThunarJob *job) { _thunar_return_if_fail (THUNAR_IS_PROGRESS_DIALOG (dialog)); _thunar_return_if_fail (error != NULL && error->message != NULL); - _thunar_return_if_fail (THUNAR_VFS_IS_JOB (job) || THUNAR_IS_JOB (job)); + _thunar_return_if_fail (THUNAR_IS_JOB (job)); _thunar_return_if_fail (dialog->job == job); /* be sure to display the progress dialog prior to opening the error dialog */ @@ -331,10 +331,10 @@ static void thunar_progress_dialog_finished (ThunarProgressDialog *dialog, - gpointer *job) + ThunarJob *job) { _thunar_return_if_fail (THUNAR_IS_PROGRESS_DIALOG (dialog)); - _thunar_return_if_fail (THUNAR_VFS_IS_JOB (job) || THUNAR_IS_JOB (job)); + _thunar_return_if_fail (THUNAR_IS_JOB (job)); _thunar_return_if_fail (dialog->job == job); gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); @@ -345,11 +345,11 @@ static void thunar_progress_dialog_info_message (ThunarProgressDialog *dialog, const gchar *message, - gpointer *job) + ThunarJob *job) { _thunar_return_if_fail (THUNAR_IS_PROGRESS_DIALOG (dialog)); _thunar_return_if_fail (g_utf8_validate (message, -1, NULL)); - _thunar_return_if_fail (THUNAR_VFS_IS_JOB (job) || THUNAR_IS_JOB (job)); + _thunar_return_if_fail (THUNAR_IS_JOB (job)); _thunar_return_if_fail (dialog->job == job); gtk_label_set_text (GTK_LABEL (dialog->progress_label), message); @@ -370,7 +370,7 @@ static void thunar_progress_dialog_percent (ThunarProgressDialog *dialog, gdouble percent, - gpointer *job) + ThunarJob *job) { GTimeVal current_time; gulong remaining_time; @@ -379,7 +379,7 @@ _thunar_return_if_fail (THUNAR_IS_PROGRESS_DIALOG (dialog)); _thunar_return_if_fail (percent >= 0.0 && percent <= 100.0); - _thunar_return_if_fail (THUNAR_VFS_IS_JOB (job) || THUNAR_IS_JOB (job)); + _thunar_return_if_fail (THUNAR_IS_JOB (job)); _thunar_return_if_fail (dialog->job == job); gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (dialog->progress_bar), percent / 100.0); @@ -442,12 +442,7 @@ case GTK_RESPONSE_CLOSE: case GTK_RESPONSE_NO: if (G_LIKELY (THUNAR_PROGRESS_DIALOG (dialog)->job != NULL)) - { - if (THUNAR_VFS_IS_JOB (THUNAR_PROGRESS_DIALOG (dialog)->job)) - thunar_vfs_job_cancel (THUNAR_PROGRESS_DIALOG (dialog)->job); - else - thunar_job_cancel (THUNAR_PROGRESS_DIALOG (dialog)->job); - } + thunar_job_cancel (THUNAR_PROGRESS_DIALOG (dialog)->job); break; } @@ -474,7 +469,7 @@ /** * thunar_progress_dialog_new_with_job: - * @job : a #ThunarVfsJob, #ThunarJob or %NULL. + * @job : a #ThunarJob or %NULL. * * Allocates a new #ThunarProgressDialog and associates it with * the @job. @@ -482,9 +477,9 @@ * Return value: the newly allocated #ThunarProgressDialog. **/ GtkWidget* -thunar_progress_dialog_new_with_job (gpointer job) +thunar_progress_dialog_new_with_job (ThunarJob *job) { - _thunar_return_val_if_fail (job == NULL || THUNAR_VFS_IS_JOB (job) || THUNAR_IS_JOB (job), NULL); + _thunar_return_val_if_fail (job == NULL || THUNAR_IS_JOB (job), NULL); return g_object_new (THUNAR_TYPE_PROGRESS_DIALOG, "job", job, NULL); } @@ -494,12 +489,12 @@ * thunar_progress_dialog_get_job: * @dialog : a #ThunarProgressDialog. * - * Returns the #ThunarVfsJob or #ThunarJob associated with @dialog + * Returns the #ThunarJob associated with @dialog * or %NULL if no job is currently associated with @dialog. * * Return value: the job associated with @dialog or %NULL. **/ -gpointer +ThunarJob * thunar_progress_dialog_get_job (ThunarProgressDialog *dialog) { _thunar_return_val_if_fail (THUNAR_IS_PROGRESS_DIALOG (dialog), NULL); @@ -511,16 +506,16 @@ /** * thunar_progress_dialog_set_job: * @dialog : a #ThunarProgressDialog. - * @job : a #ThunarVfsJob, #ThunarJob or %NULL. + * @job : a #ThunarJob or %NULL. * * Associates @job with @dialog. **/ void thunar_progress_dialog_set_job (ThunarProgressDialog *dialog, - gpointer job) + ThunarJob *job) { _thunar_return_if_fail (THUNAR_IS_PROGRESS_DIALOG (dialog)); - _thunar_return_if_fail (job == NULL || THUNAR_VFS_IS_JOB (job) || THUNAR_IS_JOB (job)); + _thunar_return_if_fail (job == NULL || THUNAR_IS_JOB (job)); /* check if we're already on that job */ if (G_UNLIKELY (dialog->job == job)) Modified: thunar/branches/migration-to-gio/thunar/thunar-progress-dialog.h =================================================================== --- thunar/branches/migration-to-gio/thunar/thunar-progress-dialog.h 2009-04-24 18:48:54 UTC (rev 29904) +++ thunar/branches/migration-to-gio/thunar/thunar-progress-dialog.h 2009-04-24 19:03:45 UTC (rev 29905) @@ -38,11 +38,11 @@ GType thunar_progress_dialog_get_type (void) G_GNUC_CONST; GtkWidget *thunar_progress_dialog_new (void) G_GNUC_MALLOC; -GtkWidget *thunar_progress_dialog_new_with_job (gpointer job) G_GNUC_MALLOC; +GtkWidget *thunar_progress_dialog_new_with_job (ThunarJob *job) G_GNUC_MALLOC; -gpointer thunar_progress_dialog_get_job (ThunarProgressDialog *dialog); +ThunarJob *thunar_progress_dialog_get_job (ThunarProgressDialog *dialog); void thunar_progress_dialog_set_job (ThunarProgressDialog *dialog, - gpointer job); + ThunarJob *job); G_END_DECLS; Modified: thunar/branches/migration-to-gio/thunar/thunar-standard-view.c =================================================================== --- thunar/branches/migration-to-gio/thunar/thunar-standard-view.c 2009-04-24 18:48:54 UTC (rev 29904) +++ thunar/branches/migration-to-gio/thunar/thunar-standard-view.c 2009-04-24 19:03:45 UTC (rev 29905) @@ -305,7 +305,7 @@ GList *drop_file_list; /* the list of URIs that are contained in the drop data */ /* the "new-files" closure, which is used to select files whenever - * new files are created by a ThunarVfsJob associated with this view + * new files are created by a ThunarJob associated with this view */ GClosure *new_files_closure; Modified: thunar/branches/migration-to-gio/thunar/thunar-tree-view.c =================================================================== --- thunar/branches/migration-to-gio/thunar/thunar-tree-view.c 2009-04-24 18:48:54 UTC (rev 29904) +++ thunar/branches/migration-to-gio/thunar/thunar-tree-view.c 2009-04-24 19:03:45 UTC (rev 29905) @@ -151,7 +151,7 @@ static void thunar_tree_view_action_properties (ThunarTreeView *view); static void thunar_tree_view_action_unmount (ThunarTreeView *view); static GClosure *thunar_tree_view_new_files_closure (ThunarTreeView *view); -static void thunar_tree_view_new_files (ThunarVfsJob *job, +static void thunar_tree_view_new_files (ThunarJob *job, GList *path_list, ThunarTreeView *view); static gboolean thunar_tree_view_visible_func (ThunarTreeModel *model, @@ -1895,7 +1895,7 @@ static void -thunar_tree_view_new_files (ThunarVfsJob *job, +thunar_tree_view_new_files (ThunarJob *job, GList *path_list, ThunarTreeView *view) { _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits