[Xfce4-commits] r29853 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-20 01:02:32 + (Mon, 20 Apr 2009) New Revision: 29853 Added: thunar/branches/migration-to-gio/thunar/thunar-job.c thunar/branches/migration-to-gio/thunar/thunar-job.h Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/Makefile.am thunar/branches/migration-to-gio/thunar/thunar-enum-types.c thunar/branches/migration-to-gio/thunar/thunar-enum-types.h thunar/branches/migration-to-gio/thunar/thunar-marshal.list Log: * thunar/Makefile.am, thunar/thunar-enum-types.{c,h}, thunar/thunar-job.{c,h}, thunar/thunar-marshal.list: Add abstract class ThunarJob which is going to be an equivalent to ThunarVfsJob. The main difference is that ThunarJob uses GIOScheduler to handle the asynchronous execution of the job instead of managing worker threads on its own. It's not finished yet though. Add ThunarJobResponse enum type and new marshal functions for job signals. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-19 21:24:17 UTC (rev 29852) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-20 01:02:32 UTC (rev 29853) @@ -1,3 +1,14 @@ +2009-04-20 Jannis Pohlmann + + * thunar/Makefile.am, thunar/thunar-enum-types.{c,h}, + thunar/thunar-job.{c,h}, thunar/thunar-marshal.list: Add abstract + class ThunarJob which is going to be an equivalent to ThunarVfsJob. + The main difference is that ThunarJob uses GIOScheduler to handle + the asynchronous execution of the job instead of managing worker + threads on its own. It's not finished yet though. Add + ThunarJobResponse enum type and new marshal functions for job + signals. + 2009-04-19 Jannis Pohlmann * thunar/thunar-location-button.c: Use g_file_list_to_string() instead Modified: thunar/branches/migration-to-gio/thunar/Makefile.am === --- thunar/branches/migration-to-gio/thunar/Makefile.am 2009-04-19 21:24:17 UTC (rev 29852) +++ thunar/branches/migration-to-gio/thunar/Makefile.am 2009-04-20 01:02:32 UTC (rev 29853) @@ -94,6 +94,8 @@ thunar-icon-renderer.h \ thunar-icon-view.c \ thunar-icon-view.h \ + thunar-job.c\ + thunar-job.h\ thunar-launcher.c \ thunar-launcher.h \ thunar-launcher-ui.h\ Modified: thunar/branches/migration-to-gio/thunar/thunar-enum-types.c === --- thunar/branches/migration-to-gio/thunar/thunar-enum-types.c 2009-04-19 21:24:17 UTC (rev 29852) +++ thunar/branches/migration-to-gio/thunar/thunar-enum-types.c 2009-04-20 01:02:32 UTC (rev 29853) @@ -1,6 +1,7 @@ /* $Id$ */ /*- * Copyright (c) 2006-2007 Benedikt Meurer + * Copyright (c) 2009 Jannis Pohlmann * * 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 @@ -271,4 +272,27 @@ +GType +thunar_vfs_job_response_get_type (void) +{ + static GType type = G_TYPE_INVALID; + if (G_UNLIKELY (type == G_TYPE_INVALID)) +{ + static const GFlagsValue values[] = + { + { THUNAR_JOB_RESPONSE_YES, "THUNAR_JOB_RESPONSE_YES", "yes" }, + { THUNAR_JOB_RESPONSE_YES_ALL, "THUNAR_JOB_RESPONSE_YES_ALL", "yes-all" }, + { THUNAR_JOB_RESPONSE_NO, "THUNAR_JOB_RESPONSE_NO", "no" }, + { THUNAR_JOB_RESPONSE_CANCEL, "THUNAR_JOB_RESPONSE_CANCEL", "cancel" }, + { THUNAR_JOB_RESPONSE_NO_ALL, "THUNAR_JOB_RESPONSE_NO_ALL", "no-all" }, + { THUNAR_JOB_RESPONSE_RETRY, "THUNAR_JOB_RESPONSE_RETRY", "retry" }, + { 0, NULL, NULL } + }; + + type = g_flags_register_static (I_("ThunarJobResponse"), values); +} + + return type; +} + Modified: thunar/branches/migration-to-gio/thunar/thunar-enum-types.h === --- thunar/branches/migration-to-gio/thunar/thunar-enum-types.h 2009-04-19 21:24:17 UTC (rev 29852) +++ thunar/branches/migration-to-gio/thunar/thunar-enum-types
[Xfce4-commits] r29859 - xfce-utils/trunk/xfce4-about
Author: jannis Date: 2009-04-20 13:13:03 + (Mon, 20 Apr 2009) New Revision: 29859 Added: xfce-utils/trunk/xfce4-about/INFO.pt Modified: xfce-utils/trunk/xfce4-about/Makefile.am Log: Apply patch to add INFO.pt to xfce4-about. Thanks Mike. Added: xfce-utils/trunk/xfce4-about/INFO.pt === --- xfce-utils/trunk/xfce4-about/INFO.pt(rev 0) +++ xfce-utils/trunk/xfce4-about/INFO.pt2009-04-20 13:13:03 UTC (rev 29859) @@ -0,0 +1,41 @@ +Xfce 4 Desktop Environment +versão @VERSION@ + +Xfce é uma colecção de programas que juntos fornecem um ambiente +de trabalho completo. Os seguintes programas são parte do Xfce: + +o Gestor de janelas (xfwm4) + manipula o posicionamento das janelas no ecrã + +o Painel (xfce4-panel) + lançadores de programas, menus de contexto, relógio, troca de desktop e outros + +o Gestor de desktop (xfdesktop) + define uma cor de fundo ou imagem e fornece um menu quando clica no fundo + do ambiente de trabalho + +o Gestor de ficheiros (thunar) + rápido gestor de ficheiros + +o Gestor de sessão (xfce4-session) + restaura a sua sessão ao arrancar e permite desligar o computador + a partir do Xfce + +o Utilitários + xfprint4: imprime ficheiros + xfrun4: executa programas + + +Xfce 4 é também uma plataforma de desenvolvimento oferecendo diversas +bibliotecas, que ajudam os programadores a criar aplicações que se integram +bem no ambiente de trabalho. + +Components Xfce 4 são licenciados sob as licenças livres ou código aberto, GPL +ou BSDL para aplicações e LGPL ou BSDL para bibliotecas. Veja a documentação, +o código fonte ou o website xfce (http://www.xfce.org) para mais informação. + + +Agradecemos o seu interesse no Xfce. + +-- A Equipa de Desenvolvimento Xfce -- + Modified: xfce-utils/trunk/xfce4-about/Makefile.am === --- xfce-utils/trunk/xfce4-about/Makefile.am2009-04-20 12:59:02 UTC (rev 29858) +++ xfce-utils/trunk/xfce4-about/Makefile.am2009-04-20 13:13:03 UTC (rev 29859) @@ -13,6 +13,7 @@ INFO.fr \ INFO.it \ INFO.ja \ + INFO.pt \ INFO.ru \ INFO.uk \ INFO.vi \ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r29867 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-20 16:28:52 + (Mon, 20 Apr 2009) New Revision: 29867 Added: thunar/branches/migration-to-gio/thunar/thunar-deep-count-job.c thunar/branches/migration-to-gio/thunar/thunar-deep-count-job.h Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/Makefile.am thunar/branches/migration-to-gio/thunar/thunar-enum-types.h thunar/branches/migration-to-gio/thunar/thunar-job.c thunar/branches/migration-to-gio/thunar/thunar-job.h thunar/branches/migration-to-gio/thunar/thunar-size-label.c Log: * thunar/Makefile.am, thunar/thunar-deep-count-job.{c,h}: Add new class for computing the total size of a file/directory recursively while also counting the total number of files and directories. This implementation is almost equivalent to ThunarVfsDeepCountJob except that it is an implementation of ThunarJob and uses GIOScheduler for the asynchronous operation. * thunar/thunar-enum-types.h: Add missing public declaration of thunar_job_response_get_type(). * thunar/thunar-job.{c,h}: Add new functions thunar_job_get_cancellable() and thunar_job_set_error_if_cancelled(). Make thunar_job_emit() public so that it can be used in subclasses. Don't try to emit signals in thunar_job_finished() and thunar_job_error() using GIOScheduler because they are only emitted in thunar_job_async_ready() which is called from the GUI thread. * thunar/thunar-size-label.c: Drop all ThunarVFS references by replacing ThunarVfsDeepCountJob with ThunarDeepCountJob. Yay, it works! Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-20 16:09:03 UTC (rev 29866) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-20 16:28:52 UTC (rev 29867) @@ -1,5 +1,25 @@ 2009-04-20 Jannis Pohlmann + * thunar/Makefile.am, thunar/thunar-deep-count-job.{c,h}: Add new class + for computing the total size of a file/directory recursively while + also counting the total number of files and directories. This + implementation is almost equivalent to ThunarVfsDeepCountJob except + that it is an implementation of ThunarJob and uses GIOScheduler for + the asynchronous operation. + * thunar/thunar-enum-types.h: Add missing public declaration of + thunar_job_response_get_type(). + * thunar/thunar-job.{c,h}: Add new functions + thunar_job_get_cancellable() and thunar_job_set_error_if_cancelled(). + Make thunar_job_emit() public so that it can be used in subclasses. + Don't try to emit signals in thunar_job_finished() and + thunar_job_error() using GIOScheduler because they are only emitted + in thunar_job_async_ready() which is called from the GUI thread. + * thunar/thunar-size-label.c: Drop all ThunarVFS references by + replacing ThunarVfsDeepCountJob with ThunarDeepCountJob. Yay, it + works! + +2009-04-20 Jannis Pohlmann + * thunar/Makefile.am, thunar/thunar-enum-types.{c,h}, thunar/thunar-job.{c,h}, thunar/thunar-marshal.list: Add abstract class ThunarJob which is going to be an equivalent to ThunarVfsJob. Modified: thunar/branches/migration-to-gio/thunar/Makefile.am === --- thunar/branches/migration-to-gio/thunar/Makefile.am 2009-04-20 16:09:03 UTC (rev 29866) +++ thunar/branches/migration-to-gio/thunar/Makefile.am 2009-04-20 16:28:52 UTC (rev 29867) @@ -57,6 +57,8 @@ thunar-create-dialog.h \ thunar-debug.h \ thunar-debug.c \ + thunar-deep-count-job.h \ + thunar-deep-count-job.c \ thunar-details-view-ui.h\ thunar-details-view.c \ thunar-details-view.h \ Added: thunar/branches/migration-to-gio/thunar/thunar-deep-count-job.c === --- thunar/branches/migration-to-gio/thunar/thunar-deep-count-job.c (rev 0) +++ thunar/branches/migration-to-gio/thunar/thunar-deep-count-job.c 2009-04-20 16:28:52 UTC (rev 29867) @@ -0,0 +1,365 @@ +/* vi:set sw=2 sts=2 ts=2 et ai: */ +/*- + * Copyright (c) 2009 Jannis Pohlmann . + * + * 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 Fre
[Xfce4-commits] r29868 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-20 17:52:41 + (Mon, 20 Apr 2009) New Revision: 29868 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-chooser-dialog.c thunar/branches/migration-to-gio/thunar/thunar-deep-count-job.h thunar/branches/migration-to-gio/thunar/thunar-job.c thunar/branches/migration-to-gio/thunar/thunar-preferences.c thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c thunar/branches/migration-to-gio/thunar/thunar-size-label.c Log: * thunar/thunar-chooser-dialog.c, thunar/thunar-deep-count-job.c, thunar/thunar-job.c, thunar/thunar-preferences.c, thunar/thunar-shortcuts-model.c, thunar/thunar-size-label.c: Fix compiler warnings and errors. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-20 16:28:52 UTC (rev 29867) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-20 17:52:41 UTC (rev 29868) @@ -1,5 +1,12 @@ 2009-04-20 Jannis Pohlmann + * thunar/thunar-chooser-dialog.c, thunar/thunar-deep-count-job.c, + thunar/thunar-job.c, thunar/thunar-preferences.c, + thunar/thunar-shortcuts-model.c, thunar/thunar-size-label.c: Fix + compiler warnings and errors. + +2009-04-20 Jannis Pohlmann + * thunar/Makefile.am, thunar/thunar-deep-count-job.{c,h}: Add new class for computing the total size of a file/directory recursively while also counting the total number of files and directories. This Modified: thunar/branches/migration-to-gio/thunar/thunar-chooser-dialog.c === --- thunar/branches/migration-to-gio/thunar/thunar-chooser-dialog.c 2009-04-20 16:28:52 UTC (rev 29867) +++ thunar/branches/migration-to-gio/thunar/thunar-chooser-dialog.c 2009-04-20 17:52:41 UTC (rev 29868) @@ -656,13 +656,10 @@ static void thunar_chooser_dialog_update_header (ThunarChooserDialog *dialog) { - ThunarIconFactory *icon_factory; - GtkIconTheme *icon_theme; - const gchar *content_type; - const gchar *icon_name; - GIcon *icon; - gchar *description; - gchar *text; + const gchar *content_type; + GIcon *icon; + gchar *description; + gchar *text; _thunar_return_if_fail (THUNAR_IS_CHOOSER_DIALOG (dialog)); _thunar_return_if_fail (GTK_WIDGET_REALIZED (dialog)); Modified: thunar/branches/migration-to-gio/thunar/thunar-deep-count-job.h === --- thunar/branches/migration-to-gio/thunar/thunar-deep-count-job.h 2009-04-20 16:28:52 UTC (rev 29867) +++ thunar/branches/migration-to-gio/thunar/thunar-deep-count-job.h 2009-04-20 17:52:41 UTC (rev 29868) @@ -41,7 +41,7 @@ GType thunar_deep_count_job_get_type (void) G_GNUC_CONST; ThunarJob *thunar_deep_count_job_new (GFile *file, - GFileQueryInfoFlags flags); + GFileQueryInfoFlags flags) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; G_END_DECLS; Modified: thunar/branches/migration-to-gio/thunar/thunar-job.c === --- thunar/branches/migration-to-gio/thunar/thunar-job.c2009-04-20 16:28:52 UTC (rev 29867) +++ thunar/branches/migration-to-gio/thunar/thunar-job.c2009-04-20 17:52:41 UTC (rev 29868) @@ -64,6 +64,9 @@ static void thunar_job_init(ThunarJob *job); static void thunar_job_finalize(GObject*object); +static void _thunar_job_error (ThunarJob *job, +GError *error); +static void _thunar_job_finished (ThunarJob *job); static gboolean _thunar_job_finish (ThunarJob *job, GSimpleAsyncResult *result, GError**error); @@ -217,11 +220,11 @@ if (!_thunar_job_finish (job, G_SIMPLE_ASYNC_RESULT (result), &error)) { g_assert (error != NULL); - thunar_job_error (job, error); + _thunar_job_error (job, error); g_error_free (error); } - thunar_job_finished (job); + _thunar_job_finished (job); } @@ -368,6 +371,8 @@ data->signal_id, data->signal_detail, data->var_args); + + return FALSE; } @@ -414,9 +419,9 @@ -void -thunar_job_error (ThunarJob *job, - GError*error) +static void +_thunar_job_error (ThunarJob *job, + GError*error) { _thunar_return_if_fail (THUNA
[Xfce4-commits] r29869 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-20 18:07:26 + (Mon, 20 Apr 2009) New Revision: 29869 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-window.c Log: * thunar/thunar-window.c: Fix runtime error due to an NULL path being passed to g_file_new_for_path() in thunar_window_setup_user_dir_menu_entries(). Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-20 17:52:41 UTC (rev 29868) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-20 18:07:26 UTC (rev 29869) @@ -1,5 +1,11 @@ 2009-04-20 Jannis Pohlmann + * thunar/thunar-window.c: Fix runtime error due to an NULL path being + passed to g_file_new_for_path() in + thunar_window_setup_user_dir_menu_entries(). + +2009-04-20 Jannis Pohlmann + * thunar/thunar-chooser-dialog.c, thunar/thunar-deep-count-job.c, thunar/thunar-job.c, thunar/thunar-preferences.c, thunar/thunar-shortcuts-model.c, thunar/thunar-size-label.c: Fix Modified: thunar/branches/migration-to-gio/thunar/thunar-window.c === --- thunar/branches/migration-to-gio/thunar/thunar-window.c 2009-04-20 17:52:41 UTC (rev 29868) +++ thunar/branches/migration-to-gio/thunar/thunar-window.c 2009-04-20 18:07:26 UTC (rev 29869) @@ -655,11 +655,13 @@ /* special case: got NULL for the templates dir. Force it to ~/Templates */ if (G_UNLIKELY (path == NULL && i == G_USER_DIRECTORY_TEMPLATES)) dir = g_file_resolve_relative_path (home_dir, _thunar_user_directory_names[i]); + else if (path != NULL) +dir = g_file_new_for_path (path); else -dir = g_file_new_for_path (path); +continue; /* xdg user dirs pointing to $HOME must be considered disabled */ - if (G_LIKELY (!g_file_equal (dir, home_dir))) + if (G_LIKELY (path != NULL && !g_file_equal (dir, home_dir))) { /* menu entry label translation */ translation = dgettext (XDG_USER_DIRS_PACKAGE, (gchar *) _thunar_user_directory_names[i]); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r29874 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-21 10:08:08 + (Tue, 21 Apr 2009) New Revision: 29874 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-deep-count-job.c thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.h Log: * thunar/thunar-deep-count-job.c: Improve the error handling code in thunar_deep_count_job_execute(). * thunar/thunar-gio-extensions.{c,h}: Add G_TYPE_FILE_LIST macro and g_file_list_get_type() for a boxed GFile list type. Fix g_file_list_copy() to actually return the list copy and not the original. Don't set the original to NULL before iterating over it. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-20 21:22:31 UTC (rev 29873) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-21 10:08:08 UTC (rev 29874) @@ -1,3 +1,12 @@ +2009-04-21 Jannis Pohlmann + + * thunar/thunar-deep-count-job.c: Improve the error handling code in + thunar_deep_count_job_execute(). + * thunar/thunar-gio-extensions.{c,h}: Add G_TYPE_FILE_LIST macro and + g_file_list_get_type() for a boxed GFile list type. Fix + g_file_list_copy() to actually return the list copy and not the + original. Don't set the original to NULL before iterating over it. + 2009-04-20 Jannis Pohlmann * thunar/thunar-window.c: Fix runtime error due to an NULL path being Modified: thunar/branches/migration-to-gio/thunar/thunar-deep-count-job.c === --- thunar/branches/migration-to-gio/thunar/thunar-deep-count-job.c 2009-04-20 21:22:31 UTC (rev 29873) +++ thunar/branches/migration-to-gio/thunar/thunar-deep-count-job.c 2009-04-21 10:08:08 UTC (rev 29874) @@ -274,8 +274,7 @@ break; /* generate a GFile for the child */ - child = g_file_resolve_relative_path (file, -g_file_info_get_name (child_info)); + child = g_file_resolve_relative_path (file, g_file_info_get_name (child_info)); /* recurse unless the job was cancelled before */ if (!thunar_job_is_cancelled (job)) @@ -319,6 +318,7 @@ GError **error) { gboolean success; + GError *err = NULL; _thunar_return_val_if_fail (THUNAR_IS_JOB (job), FALSE); _thunar_return_val_if_fail (error == NULL || *error == NULL, FALSE); @@ -330,21 +330,29 @@ /* count files, directories and compute size of the job file */ success = thunar_deep_count_job_process (job, THUNAR_DEEP_COUNT_JOB (job)->file, - error); + &err); - /* avoid overwriting the error if the job was cancelled */ - if (*error != NULL && thunar_job_is_cancelled (job)) + if (!success) { - g_error_free (*error); - *error = NULL; + g_assert (err != NULL || thunar_job_is_cancelled (job)); + + /* set error if the job was cancelled. otherwise just propagate + * the results of the processing function */ + if (thunar_job_set_error_if_cancelled (job, error)) +{ + if (err != NULL) +g_error_free (err); +} + else +{ + if (err != NULL) +g_propagate_error (error, err); +} + + return FALSE; } - - /* set error if the job was cancelled. otherwise just propagate - * the results of the processing function */ - if (thunar_job_set_error_if_cancelled (job, error)) -return FALSE; else -return success; +return TRUE; } Modified: thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c === --- thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c 2009-04-20 21:22:31 UTC (rev 29873) +++ thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c 2009-04-21 10:08:08 UTC (rev 29874) @@ -198,10 +198,10 @@ GList *copy = NULL; GList *lp; - for (list = NULL, lp = g_list_last (list); lp != NULL; lp = lp->prev) + for (lp = g_list_last (list); lp != NULL; lp = lp->prev) copy = g_list_prepend (copy, g_object_ref (lp->data)); - return list; + return copy; } @@ -240,3 +240,20 @@ return buffer; } + + + +GType +g_file_list_get_type (void) +{ + static GType type = G_TYPE_INVALID; + + if (G_UNLIKELY (type == G_TYPE_INVALID)) +{ + type = g_boxed_type_register_static ("GFileList", +
[Xfce4-commits] r29875 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-21 11:22:26 + (Tue, 21 Apr 2009) New Revision: 29875 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c thunar/branches/migration-to-gio/thunar/thunar-job.c thunar/branches/migration-to-gio/thunar/thunar-job.h thunar/branches/migration-to-gio/thunar/thunar-progress-dialog.c thunar/branches/migration-to-gio/thunar/thunar-progress-dialog.h Log: * thunar/thunar-enum-types.c: Remove vfs_ from thunar_vfs_job_response_get_type(). * thunar/thunar-gio-extensions.c: Include exo.h for the I_() macro. * thunar/thunar-job.{c,h}: Add functions thunar_job_ask_overwrite(), thunar_job_info_message(), thunar_job_percent(), thunar_job_set_total_files() and thunar_job_processing_file(). Add signals "ask", "info-message" and "percent". * thunar/thunar-progress-dialog.{c,h}: Make ThunarProgressDialog work with both, ThunarVfsJob and ThunarJob by using a G_TYPE_OBJECT property and gpointer parameters. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-21 10:08:08 UTC (rev 29874) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-21 11:22:26 UTC (rev 29875) @@ -1,5 +1,18 @@ 2009-04-21 Jannis Pohlmann + * thunar/thunar-enum-types.c: Remove vfs_ from + thunar_vfs_job_response_get_type(). + * thunar/thunar-gio-extensions.c: Include exo.h for the I_() macro. + * thunar/thunar-job.{c,h}: Add functions thunar_job_ask_overwrite(), + thunar_job_info_message(), thunar_job_percent(), + thunar_job_set_total_files() and thunar_job_processing_file(). Add + signals "ask", "info-message" and "percent". + * thunar/thunar-progress-dialog.{c,h}: Make ThunarProgressDialog work + with both, ThunarVfsJob and ThunarJob by using a G_TYPE_OBJECT + property and gpointer parameters. + +2009-04-21 Jannis Pohlmann + * thunar/thunar-deep-count-job.c: Improve the error handling code in thunar_deep_count_job_execute(). * thunar/thunar-gio-extensions.{c,h}: Add G_TYPE_FILE_LIST macro and Modified: thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c === --- thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c 2009-04-21 10:08:08 UTC (rev 29874) +++ thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c 2009-04-21 11:22:26 UTC (rev 29875) @@ -23,6 +23,7 @@ #include +#include #include #include @@ -250,7 +251,7 @@ if (G_UNLIKELY (type == G_TYPE_INVALID)) { - type = g_boxed_type_register_static ("GFileList", + type = g_boxed_type_register_static (I_("GFileList"), (GBoxedCopyFunc) g_file_list_copy, (GBoxedFreeFunc) g_file_list_free); } Modified: thunar/branches/migration-to-gio/thunar/thunar-job.c === --- thunar/branches/migration-to-gio/thunar/thunar-job.c2009-04-21 10:08:08 UTC (rev 29874) +++ thunar/branches/migration-to-gio/thunar/thunar-job.c2009-04-21 11:22:26 UTC (rev 29875) @@ -80,9 +80,11 @@ struct _ThunarJobPrivate { - GIOSchedulerJob *scheduler_job; - GCancellable*cancellable; - guintrunning : 1; + ThunarJobResponse earlier_ask_overwrite_response; + GIOSchedulerJob *scheduler_job; + GCancellable *cancellable; + GList*total_files; + guint running : 1; }; struct _ThunarJobSyncSignalData @@ -121,6 +123,18 @@ +static gboolean +_thunar_job_ask_accumulator (GSignalInvocationHint *ihint, + GValue*return_accu, + const GValue *handler_return, + gpointer data) +{ + g_value_copy (handler_return, return_accu); + return FALSE; +} + + + static void thunar_job_class_init (ThunarJobClass *klass) { @@ -138,6 +152,27 @@ klass->execute = NULL; /** + * ThunarJob::ask: + * @job : a #ThunarJob. + * @message : question to display to the user. + * @choices : a combination of #ThunarJobResponses. + * + * The @message is garantied to contain valid UTF-8. + * + * Return value: the selected choice. + **/ + job_signals[ASK] = +g_signal_new (I_("ask"), + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_NO_HOOKS | G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ThunarJobClass, ask), + _thunar_job_ask_accumulator, NULL, + _thunar_marshal_FLAGS__S
[Xfce4-commits] r29876 - thunar/branches/migration-to-gio/thunar
Author: jannis Date: 2009-04-21 11:23:09 + (Tue, 21 Apr 2009) New Revision: 29876 Modified: thunar/branches/migration-to-gio/thunar/thunar-enum-types.c Log: Add thunar-enum-types.c which I forgot in the last commit. Modified: thunar/branches/migration-to-gio/thunar/thunar-enum-types.c === --- thunar/branches/migration-to-gio/thunar/thunar-enum-types.c 2009-04-21 11:22:26 UTC (rev 29875) +++ thunar/branches/migration-to-gio/thunar/thunar-enum-types.c 2009-04-21 11:23:09 UTC (rev 29876) @@ -273,7 +273,7 @@ GType -thunar_vfs_job_response_get_type (void) +thunar_job_response_get_type (void) { static GType type = G_TYPE_INVALID; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r29877 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-21 12:28:17 + (Tue, 21 Apr 2009) New Revision: 29877 Added: thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.h thunar/branches/migration-to-gio/thunar/thunar-simple-job.c thunar/branches/migration-to-gio/thunar/thunar-simple-job.h Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/Makefile.am thunar/branches/migration-to-gio/thunar/thunar-application.c thunar/branches/migration-to-gio/thunar/thunar-job.c thunar/branches/migration-to-gio/thunar/thunar-job.h thunar/branches/migration-to-gio/thunar/thunar-standard-view.c Log: * thunar/Makefile.am, thunar/thunar-io-jobs.{c,h}, thunar/thunar-simple.job.{c,h}: Add ThunarSimpleJob class which is equivalent to ThunarVfsSimpleJob. Add the first simple job by implementing thunar_io_job_create_files() as an equivalent to thunar_vfs_create_files(). The "new-files" signal is not implemented yet because it would break the new_files_closure. * thunar/thunar-application.c: Add JobLauncher function pointer type as an equivalent to Launcher. Add thunar_application_launch_job() as an equivalent to thunar_application_launch() based on ThunarJob instead of ThunarVfsJob. Modify creat_stub() according to this. Use thunar_application_launch_job() in thunar_application_creat(). * thunar/thunar-job.{c,h}: Implement thunar_job_ask_skip(). * thunar/thunar-standard-view.c: Pass a GFile list instaed of a ThunarVfsPath list to thunar_application_creat(). Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-21 11:23:09 UTC (rev 29876) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-21 12:28:17 UTC (rev 29877) @@ -1,5 +1,22 @@ 2009-04-21 Jannis Pohlmann + * thunar/Makefile.am, thunar/thunar-io-jobs.{c,h}, + thunar/thunar-simple.job.{c,h}: Add ThunarSimpleJob class which is + equivalent to ThunarVfsSimpleJob. Add the first simple job by + implementing thunar_io_job_create_files() as an equivalent to + thunar_vfs_create_files(). The "new-files" signal is not implemented + yet because it would break the new_files_closure. + * thunar/thunar-application.c: Add JobLauncher function pointer type + as an equivalent to Launcher. Add thunar_application_launch_job() as + an equivalent to thunar_application_launch() based on ThunarJob + instead of ThunarVfsJob. Modify creat_stub() according to this. Use + thunar_application_launch_job() in thunar_application_creat(). + * thunar/thunar-job.{c,h}: Implement thunar_job_ask_skip(). + * thunar/thunar-standard-view.c: Pass a GFile list instaed of a + ThunarVfsPath list to thunar_application_creat(). + +2009-04-21 Jannis Pohlmann + * thunar/thunar-enum-types.c: Remove vfs_ from thunar_vfs_job_response_get_type(). * thunar/thunar-gio-extensions.c: Include exo.h for the I_() macro. Modified: thunar/branches/migration-to-gio/thunar/Makefile.am === --- thunar/branches/migration-to-gio/thunar/Makefile.am 2009-04-21 11:23:09 UTC (rev 29876) +++ thunar/branches/migration-to-gio/thunar/Makefile.am 2009-04-21 12:28:17 UTC (rev 29877) @@ -96,6 +96,8 @@ thunar-icon-renderer.h \ thunar-icon-view.c \ thunar-icon-view.h \ + thunar-io-jobs.c\ + thunar-io-jobs.h\ thunar-job.c\ thunar-job.h\ thunar-launcher.c \ @@ -157,6 +159,8 @@ thunar-shortcuts-view.h \ thunar-side-pane.c \ thunar-side-pane.h \ + thunar-simple-job.c \ + thunar-simple-job.h \ thunar-size-label.c \ thunar-size-label.h \ thunar-standard-view.c \ Modified: thunar/branches/migration-to-gio/thunar/thunar-application.c === --- thunar/branches/migration-
[Xfce4-commits] r29878 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-21 13:33:08 + (Tue, 21 Apr 2009) New Revision: 29878 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-application.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.h thunar/branches/migration-to-gio/thunar/thunar-location-buttons.c thunar/branches/migration-to-gio/thunar/thunar-standard-view.c thunar/branches/migration-to-gio/thunar/thunar-tree-view.c Log: * thunar/thunar-application.c, thunar/thunar-io-jobs.{c,h}, thunar/thunar-location-buttons.c, thunar/thunar-standard-view.c, thunar/thunar-tree-view.c: Add new simple job thunar_io_jobs_make_directories(). Rename all I/O job functions from thunar_io_job_*() to thunar_io_jobs*(). Use the make directories job in thunar_application_mkdir() and modify mkdir_stub() according to this. Pass a GFile list to thunar_application_mkdir() in ThunarLocationButtons, ThunarStandardView and ThunarTreeView. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-21 12:28:17 UTC (rev 29877) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-21 13:33:08 UTC (rev 29878) @@ -1,5 +1,16 @@ 2009-04-21 Jannis Pohlmann + * thunar/thunar-application.c, thunar/thunar-io-jobs.{c,h}, + thunar/thunar-location-buttons.c, thunar/thunar-standard-view.c, + thunar/thunar-tree-view.c: Add new simple job + thunar_io_jobs_make_directories(). Rename all I/O job functions from + thunar_io_job_*() to thunar_io_jobs*(). Use the make directories job + in thunar_application_mkdir() and modify mkdir_stub() according to + this. Pass a GFile list to thunar_application_mkdir() in + ThunarLocationButtons, ThunarStandardView and ThunarTreeView. + +2009-04-21 Jannis Pohlmann + * thunar/Makefile.am, thunar/thunar-io-jobs.{c,h}, thunar/thunar-simple.job.{c,h}: Add ThunarSimpleJob class which is equivalent to ThunarVfsSimpleJob. Add the first simple job by Modified: thunar/branches/migration-to-gio/thunar/thunar-application.c === --- thunar/branches/migration-to-gio/thunar/thunar-application.c 2009-04-21 12:28:17 UTC (rev 29877) +++ thunar/branches/migration-to-gio/thunar/thunar-application.c 2009-04-21 13:33:08 UTC (rev 29878) @@ -1491,7 +1491,7 @@ creat_stub (GList *source_path_list, GList *target_path_list) { - return thunar_io_job_create_files (source_path_list); + return thunar_io_jobs_create_files (source_path_list); } @@ -1526,12 +1526,11 @@ -static ThunarVfsJob* -mkdir_stub (GList *source_path_list, -GList *target_path_list, -GError **error) +static ThunarJob* +mkdir_stub (GList *source_path_list, +GList *target_path_list) { - return thunar_vfs_make_directories (source_path_list, error); + return thunar_io_jobs_make_directories (source_path_list); } @@ -1559,9 +1558,9 @@ _thunar_return_if_fail (THUNAR_IS_APPLICATION (application)); /* launch the operation */ - thunar_application_launch (application, parent, "stock_folder", - _("Creating directories..."), mkdir_stub, - path_list, path_list, new_files_closure); + thunar_application_launch_job (application, parent, "stock_folder", + _("Creating directories..."), mkdir_stub, + path_list, path_list, new_files_closure); } Modified: thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c === --- thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c2009-04-21 12:28:17 UTC (rev 29877) +++ thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c2009-04-21 13:33:08 UTC (rev 29878) @@ -32,7 +32,7 @@ static gboolean -_thunar_io_job_create (ThunarJob *job, +_thunar_io_jobs_create (ThunarJob *job, GValueArray *param_values, GError **error) { @@ -128,7 +128,7 @@ { /* determine display name of the file */ basename = g_file_get_basename (lp->data); - display_name = g_filename_display_basename (lp->data); + display_name = g_filename_display_basename (basename); g_free (basename); /* ask the user whether to skip/retry this path (cancels the job if not) */ @@ -136,6 +136,9 @@ display_name, err->message); g_free (display_name); + g_error_free (err);
[Xfce4-commits] r29883 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-22 00:49:04 + (Wed, 22 Apr 2009) New Revision: 29883 Added: thunar/branches/migration-to-gio/thunar/thunar-io-scan-directory.c thunar/branches/migration-to-gio/thunar/thunar-io-scan-directory.h Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/Makefile.am thunar/branches/migration-to-gio/thunar/thunar-application.c thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.h thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.h thunar/branches/migration-to-gio/thunar/thunar-job.c thunar/branches/migration-to-gio/thunar/thunar-simple-job.c Log: * thunar/Makefile.am, thunar/thunar-io-scan-directory.{c,h}: Port _thunar_vfs_info_scan_directory() to GIO and rename it to thunar_io_scan_directory(). * thunar/thunar-application.c, thunar/thunar-io-jobs.{c,h}: Implement thunar_io_jobs_unlink_files() as an equivalent to thunar_vfs_jobs_unlink_files(). Use it in unlink_stub() and modify thunar_application_unlink_files() and hunar_application_empty_trash() to use thunar_application_job_launch() and GFile lists. * thunar/thunar-gio-extensions.{c,h}: Add g_file_list_prepend(). * thunar/thunar-job.c: Don't treat cancellation as an error for now. * thunar/thunar-simple-job.c: Use g_clear_error() instead of g_error_free() in thunar_simple_job_execute(). Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-21 21:43:11 UTC (rev 29882) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-22 00:49:04 UTC (rev 29883) @@ -1,3 +1,19 @@ +2009-04-22 Jannis Pohlmann + + * thunar/Makefile.am, thunar/thunar-io-scan-directory.{c,h}: Port + _thunar_vfs_info_scan_directory() to GIO and rename it to + thunar_io_scan_directory(). + * thunar/thunar-application.c, thunar/thunar-io-jobs.{c,h}: Implement + thunar_io_jobs_unlink_files() as an equivalent to + thunar_vfs_jobs_unlink_files(). Use it in unlink_stub() and modify + thunar_application_unlink_files() and + hunar_application_empty_trash() to use + thunar_application_job_launch() and GFile lists. + * thunar/thunar-gio-extensions.{c,h}: Add g_file_list_prepend(). + * thunar/thunar-job.c: Don't treat cancellation as an error for now. + * thunar/thunar-simple-job.c: Use g_clear_error() instead of + g_error_free() in thunar_simple_job_execute(). + 2009-04-21 Jannis Pohlmann * thunar/thunar-application.c, thunar/thunar-io-jobs.{c,h}, Modified: thunar/branches/migration-to-gio/thunar/Makefile.am === --- thunar/branches/migration-to-gio/thunar/Makefile.am 2009-04-21 21:43:11 UTC (rev 29882) +++ thunar/branches/migration-to-gio/thunar/Makefile.am 2009-04-22 00:49:04 UTC (rev 29883) @@ -98,6 +98,8 @@ thunar-icon-view.h \ thunar-io-jobs.c\ thunar-io-jobs.h\ + thunar-io-scan-directory.c \ + thunar-io-scan-directory.h \ thunar-job.c\ thunar-job.h\ thunar-launcher.c \ Modified: thunar/branches/migration-to-gio/thunar/thunar-application.c === --- thunar/branches/migration-to-gio/thunar/thunar-application.c 2009-04-21 21:43:11 UTC (rev 29882) +++ thunar/branches/migration-to-gio/thunar/thunar-application.c 2009-04-22 00:49:04 UTC (rev 29883) @@ -1365,12 +1365,11 @@ -static ThunarVfsJob* -unlink_stub (GList *source_path_list, - GList *target_path_list, - GError **error) +static ThunarJob* +unlink_stub (GList *source_path_list, + GList *target_path_list) { - return thunar_vfs_unlink_files (source_path_list, error); + return thunar_io_jobs_unlink_files (source_path_list); } @@ -1414,11 +1413,7 @@ for (lp = g_list_last (file_list); lp != NULL; lp = lp->prev, ++n_path_list) { /* prepend the path to the path list */ - path_list = thunar_vfs_path_list_prepend (path_list, thunar_file_get_path (lp->data)); - - /* check if the file is not a local file */ - if (!thunar_file_is_local (lp->data)) -permanently = TRUE; + path_list =
[Xfce4-commits] r29895 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-23 19:10:14 + (Thu, 23 Apr 2009) New Revision: 29895 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-application.h Log: * thunar/thunar-application.h: Fix thunar_appliation_link_into() declaration and rename a few parameters. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-23 18:57:21 UTC (rev 29894) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-23 19:10:14 UTC (rev 29895) @@ -1,5 +1,10 @@ 2009-04-23 Jannis Pohlmann + * thunar/thunar-application.h: Fix thunar_appliation_link_into() + declaration and rename a few parameters. + +2009-04-23 Jannis Pohlmann + * thunar/Makefile.am, thunar/thunar-io-jobs-util.{c,h}: Add new files for I/O job utility functions. Right now there's only one new function called thunar_io_jobs_util_next_duplicate_file() which Modified: thunar/branches/migration-to-gio/thunar/thunar-application.h === --- thunar/branches/migration-to-gio/thunar/thunar-application.h 2009-04-23 18:57:21 UTC (rev 29894) +++ thunar/branches/migration-to-gio/thunar/thunar-application.h 2009-04-23 19:10:14 UTC (rev 29895) @@ -82,8 +82,8 @@ void thunar_application_link_into (ThunarApplication *application, gpointer parent, - GList *source_path_list, - ThunarVfsPath *target_path, + GList *source_file_list, + GFile *target_file, GClosure *new_files_closure); void thunar_application_move_into (ThunarApplication *application, @@ -98,12 +98,12 @@ void thunar_application_creat (ThunarApplication *application, gpointer parent, - GList *path_list, + GList *file_list, GClosure *new_files_closure); void thunar_application_mkdir (ThunarApplication *application, gpointer parent, - GList *path_list, + GList *file_list, GClosure *new_files_closure); void thunar_application_empty_trash (ThunarApplication *application, ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r29896 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-23 20:00:34 + (Thu, 23 Apr 2009) New Revision: 29896 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-application.c thunar/branches/migration-to-gio/thunar/thunar-application.h thunar/branches/migration-to-gio/thunar/thunar-dbus-service.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.h thunar/branches/migration-to-gio/thunar/thunar-standard-view.c Log: * thunar/thunar-application.{c,h}, thunar/thunar-dbus-service.c, thunar/thunar-io-jobs.{c,h},: Add new job thunar_io_jobs_trash_files() and a new function thunar_application_trash() which are used in thunar_dbus_service_move_to_trash(), thunar_application_move_into() and thunar_application_unlink() to move files into the trash. * thunar/thunar-standard-view.c: Use GFiles for the drag file list. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-23 19:10:14 UTC (rev 29895) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-23 20:00:34 UTC (rev 29896) @@ -1,5 +1,15 @@ 2009-04-23 Jannis Pohlmann + * thunar/thunar-application.{c,h}, thunar/thunar-dbus-service.c, + thunar/thunar-io-jobs.{c,h},: Add new job + thunar_io_jobs_trash_files() and a new function + thunar_application_trash() which are used in + thunar_dbus_service_move_to_trash(), thunar_application_move_into() + and thunar_application_unlink() to move files into the trash. + * thunar/thunar-standard-view.c: Use GFiles for the drag file list. + +2009-04-23 Jannis Pohlmann + * thunar/thunar-application.h: Fix thunar_appliation_link_into() declaration and rename a few parameters. Modified: thunar/branches/migration-to-gio/thunar/thunar-application.c === --- thunar/branches/migration-to-gio/thunar/thunar-application.c 2009-04-23 19:10:14 UTC (rev 29895) +++ thunar/branches/migration-to-gio/thunar/thunar-application.c 2009-04-23 20:00:34 UTC (rev 29896) @@ -1226,31 +1226,23 @@ GFile *target_file, GClosure *new_files_closure) { - const gchar *icon; - const gchar *text; - _thunar_return_if_fail (parent == NULL || GDK_IS_SCREEN (parent) || GTK_IS_WIDGET (parent)); _thunar_return_if_fail (THUNAR_IS_APPLICATION (application)); _thunar_return_if_fail (target_file != NULL); - - /* determine the appropriate message text and the icon based on the target_path */ - /* TODO we can remove this once we have thunar_application_trash() */ - if (g_file_is_trashed (target_file)) + + /* launch the appropriate operation depending on the target file */ + if (g_file_is_trashed (target_file)) { - icon = "gnome-fs-trash-full"; - text = _("Moving files into the trash..."); + thunar_application_trash (application, parent, source_file_list); } else { - icon = "stock_folder-move"; - text = _("Moving files..."); + thunar_application_collect_and_launch (application, parent, + "stock_folder-move", _("Moving files..."), + thunar_io_jobs_move_files, + source_file_list, target_file, + new_files_closure); } - - /* launch the operation */ - thunar_application_collect_and_launch (application, parent, icon, text, - thunar_io_jobs_move_files, - source_file_list, target_file, - new_files_closure); } @@ -1286,7 +1278,6 @@ GtkWindow *window; GdkScreen *screen; gbooleanpermanently; - GFile *path; GList *path_list = NULL; GList *lp; gchar *message; @@ -1361,10 +1352,7 @@ else { /* launch the "Move to Trash" operation */ - /* TODO Use thunar_application_trash() here */ - path = g_file_new_for_trash (); - thunar_application_move_into (application, parent, path_list, path, NULL); - g_object_unref (path); + thunar_application_trash (application, parent, path_list); } /* release the path list */ @@ -1373,6 +1361,31 @@ +static ThunarJob * +trash_stub (GList *source_file_list, +GList *target_file_list) +{ + return thunar_io_jobs_trash_files (source_file_list); +} + + + +void +thunar_application_trash (ThunarApplication *application, +
[Xfce4-commits] r29897 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-23 20:31:23 + (Thu, 23 Apr 2009) New Revision: 29897 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-application.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c thunar/branches/migration-to-gio/thunar/thunar-job.c thunar/branches/migration-to-gio/thunar/thunar-job.h thunar/branches/migration-to-gio/thunar/thunar-standard-view.c thunar/branches/migration-to-gio/thunar/thunar-transfer-job.c thunar/branches/migration-to-gio/thunar/thunar-tree-view.c Log: * thunar/thunar-application.c, thunar/thunar-job.{c,h}, thunar/thunar-io-jobs.c, thunar/thunar-transfer-job.c, thunar/thunar-standard-view.c, thunar/thunar-tree-view.c: Implement and connect to the "new-files" signal again. Update ThunarStandardView and ThunarTreeView to use a GFile list for the new_files_closure. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-23 20:00:34 UTC (rev 29896) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-23 20:31:23 UTC (rev 29897) @@ -1,5 +1,14 @@ 2009-04-23 Jannis Pohlmann + * thunar/thunar-application.c, thunar/thunar-job.{c,h}, + thunar/thunar-io-jobs.c, thunar/thunar-transfer-job.c, + thunar/thunar-standard-view.c, thunar/thunar-tree-view.c: Implement + and connect to the "new-files" signal again. Update + ThunarStandardView and ThunarTreeView to use a GFile list for the + new_files_closure. + +2009-04-23 Jannis Pohlmann + * thunar/thunar-application.{c,h}, thunar/thunar-dbus-service.c, thunar/thunar-io-jobs.{c,h},: Add new job thunar_io_jobs_trash_files() and a new function Modified: thunar/branches/migration-to-gio/thunar/thunar-application.c === --- thunar/branches/migration-to-gio/thunar/thunar-application.c 2009-04-23 20:00:34 UTC (rev 29896) +++ thunar/branches/migration-to-gio/thunar/thunar-application.c 2009-04-23 20:31:23 UTC (rev 29897) @@ -420,10 +420,9 @@ /* try to allocate a new job for the operation */ job = (*launcher) (source_file_list, target_file_list); - /* TODO connect the "new-files" closure (if any) + /* connect the "new-files" closure (if any) */ if (G_LIKELY (new_files_closure != NULL)) -g_signal_connect_closure (G_OBJECT (job), "new-files", new_files_closure, FALSE); - */ +g_signal_connect_closure (job, "new-files", new_files_closure, FALSE); /* allocate a progress dialog for the job */ dialog = g_object_new (THUNAR_TYPE_PROGRESS_DIALOG, Modified: thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c === --- thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c2009-04-23 20:00:34 UTC (rev 29896) +++ thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c2009-04-23 20:31:23 UTC (rev 29897) @@ -203,9 +203,8 @@ if (G_UNLIKELY (thunar_job_is_cancelled (job))) return FALSE; - /* TODO emit the "new-files" signal with the given file list + /* emit the "new-files" signal with the given file list */ thunar_job_new_files (job, file_list); - */ return TRUE; } @@ -338,10 +337,9 @@ if (G_UNLIKELY (thunar_job_is_cancelled (job))) return FALSE; - /* TODO emit the "new-files" signal with the given file list + /* emit the "new-files" signal with the given file list */ thunar_job_new_files (job, file_list); - */ - + return TRUE; } @@ -595,9 +593,7 @@ } else { - /* TODO thunar_job_new_files (job, new_files_list); - */ g_file_list_free (new_files_list); return TRUE; } Modified: thunar/branches/migration-to-gio/thunar/thunar-job.c === --- thunar/branches/migration-to-gio/thunar/thunar-job.c2009-04-23 20:00:34 UTC (rev 29896) +++ thunar/branches/migration-to-gio/thunar/thunar-job.c2009-04-23 20:31:23 UTC (rev 29897) @@ -249,6 +249,23 @@ G_TYPE_NONE, 1, G_TYPE_STRING); /** + * ThunarJob::new-files: + * @job : a #ThunarJob. + * @file_list : a list of #GFiles that were created by @job. + * + * This signal is emitted by the @job right before the @job is terminated + * and informs the application about the list of created files in @file_list. + * @file_list contains only the toplevel file items, that were specified by + * the application on creation of the @job. + **/ + job_signals[NEW_FILES] = +g_signal_new (I_("new-files"), + G_TYPE_FROM_CLASS (kl
[Xfce4-commits] r29898 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-23 20:39:59 + (Thu, 23 Apr 2009) New Revision: 29898 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-dialogs.c Log: * thunar/thunar-dialogs.c: Use more fine-grained labels for files, directories and links in thunar_dialogs_show_job_ask_replace(). Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-23 20:31:23 UTC (rev 29897) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-23 20:39:59 UTC (rev 29898) @@ -1,5 +1,10 @@ 2009-04-23 Jannis Pohlmann + * thunar/thunar-dialogs.c: Use more fine-grained labels for files, + directories and links in thunar_dialogs_show_job_ask_replace(). + +2009-04-23 Jannis Pohlmann + * thunar/thunar-application.c, thunar/thunar-job.{c,h}, thunar/thunar-io-jobs.c, thunar/thunar-transfer-job.c, thunar/thunar-standard-view.c, thunar/thunar-tree-view.c: Implement Modified: thunar/branches/migration-to-gio/thunar/thunar-dialogs.c === --- thunar/branches/migration-to-gio/thunar/thunar-dialogs.c2009-04-23 20:31:23 UTC (rev 29897) +++ thunar/branches/migration-to-gio/thunar/thunar-dialogs.c2009-04-23 20:39:59 UTC (rev 29898) @@ -608,11 +608,17 @@ text = g_strdup_printf (_("This folder already contains a symbolic link \"%s\"."), thunar_file_get_display_name (dst_file)); } + else if (thunar_file_is_directory (dst_file)) +{ + text = g_strdup_printf (_("This folder already contains a folder \"%s\"."), + thunar_file_get_display_name (dst_file)); +} else -{ +{ text = g_strdup_printf (_("This folder already contains a file \"%s\"."), thunar_file_get_display_name (dst_file)); } + label = gtk_label_new (text); gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f); gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_big ()); @@ -622,6 +628,8 @@ if (thunar_file_is_symlink (dst_file)) text = g_strdup_printf (Q_("ReplaceDialogPart1|Do you want to replace the link")); + else if (thunar_file_is_directory (dst_file)) +text = g_strdup_printf (Q_("ReplaceDialogPart1|Do you want to replace the existing folder")); else text = g_strdup_printf (Q_("ReplaceDialogPart1|Do you want to replace the existing file")); @@ -649,7 +657,13 @@ g_free (date_string); g_free (text); - text = g_strdup_printf (Q_("ReplaceDialogPart2|with the following file?")); + if (thunar_file_is_symlink (src_file)) +text = g_strdup_printf (Q_("ReplaceDialogPart2|with the following link?")); + else if (thunar_file_is_directory (src_file)) +text = g_strdup_printf (Q_("ReplaceDialogPart2|with the following folder?")); + else +text = g_strdup_printf (Q_("ReplaceDialogPart2|with the following file?")); + label = gtk_label_new (text); gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f); gtk_table_attach (GTK_TABLE (table), label, 1, 3, 3, 4, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r29899 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-23 23:04:58 + (Thu, 23 Apr 2009) New Revision: 29899 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-application.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.h thunar/branches/migration-to-gio/thunar/thunar-job.c thunar/branches/migration-to-gio/thunar/thunar-job.h thunar/branches/migration-to-gio/thunar/thunar-transfer-job.c Log: * thunar/thunar-application, thunar/thunar-io-jobs.{c,h}, thunar/thunar-job.{c,h}, thunar/thunar-transfer-job.c: Re-implement thunar_application_restore_files() based on a new job called thunar_io_jobs_restore_files(). Modify ThunarTransferJob so that it checks whether the parent directory of the original path exists and otherwise tries to create it (with user interaction). Add new function thunar_job_ask_create() to ThunarJob. ThunarApplication is now almost ThunarVFS free. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-23 20:39:59 UTC (rev 29898) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-23 23:04:58 UTC (rev 29899) @@ -1,3 +1,14 @@ +2009-04-24 Jannis Pohlmann + + * thunar/thunar-application, thunar/thunar-io-jobs.{c,h}, + thunar/thunar-job.{c,h}, thunar/thunar-transfer-job.c: Re-implement + thunar_application_restore_files() based on a new job called + thunar_io_jobs_restore_files(). Modify ThunarTransferJob so that it + checks whether the parent directory of the original path exists and + otherwise tries to create it (with user interaction). Add new + function thunar_job_ask_create() to ThunarJob. ThunarApplication is + now almost ThunarVFS free. + 2009-04-23 Jannis Pohlmann * thunar/thunar-dialogs.c: Use more fine-grained labels for files, Modified: thunar/branches/migration-to-gio/thunar/thunar-application.c === --- thunar/branches/migration-to-gio/thunar/thunar-application.c 2009-04-23 20:39:59 UTC (rev 29898) +++ thunar/branches/migration-to-gio/thunar/thunar-application.c 2009-04-23 23:04:58 UTC (rev 29899) @@ -1550,29 +1550,20 @@ GList *trash_file_list, GClosure *new_files_closure) { -#if 0 - ThunarVfsPath *target_path; - const gchar *original_path; - GtkWidget *dialog; - GtkWindow *window; - GdkScreen *screen; - GError*err = NULL; - GList *source_path_list = NULL; - GList *target_path_list = NULL; - GList *lp; - gchar *original_dir; - gchar *display_name; - gint response = GTK_RESPONSE_YES; + const gchar *original_uri; + GError *err = NULL; + GFile *target_path; + GList *source_path_list = NULL; + GList *target_path_list = NULL; + GList *lp; _thunar_return_if_fail (parent == NULL || GDK_IS_SCREEN (parent) || GTK_IS_WIDGET (parent)); _thunar_return_if_fail (THUNAR_IS_APPLICATION (application)); - /* determine the target paths for all files */ - for (lp = trash_file_list; err == NULL && lp != NULL && response == GTK_RESPONSE_YES; lp = lp->next) + for (lp = trash_file_list; lp != NULL; lp = lp->next) { - /* determine the original path for the file */ - original_path = thunar_file_get_original_path (lp->data); - if (G_UNLIKELY (original_path == NULL)) + original_uri = thunar_file_get_original_path (lp->data); + if (G_UNLIKELY (original_uri == NULL)) { /* no OriginalPath, impossible to continue */ g_set_error (&err, G_FILE_ERROR, G_FILE_ERROR_INVAL, @@ -1581,89 +1572,33 @@ break; } - /* determine the target path for the OriginalPath */ - target_path = thunar_vfs_path_new (original_path, &err); - if (G_UNLIKELY (target_path == NULL)) -{ - /* invalid OriginalPath, cannot continue */ - break; -} + /* TODO we need to distinguish between URIs and paths here */ + target_path = g_file_new_for_commandline_arg (original_uri); - /* determine the directory of the original path */ - original_dir = g_path_get_dirname (original_path); - if (!g_file_test (original_dir, G_FILE_TEST_IS_DIR)) -{ - /* parse the parent pointer */ - screen = thunar_util_parse_parent (parent, &window); + source_path_list = g_file_list_append (source_path_list, thunar_file_get_file (lp->data)); + target_path_list = g_file_list_append (target_path_list, target_path); - /* ask th
[Xfce4-commits] r29902 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-24 15:26:31 + (Fri, 24 Apr 2009) New Revision: 29902 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-enum-types.c thunar/branches/migration-to-gio/thunar/thunar-enum-types.h thunar/branches/migration-to-gio/thunar/thunar-file.h thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.h thunar/branches/migration-to-gio/thunar/thunar-permissions-chooser.c Log: * thunar/thunar-enum-types.{c,h}, thunar/thunar-file.h: Move ThunarFileMode into the enum types file. Add THUNAR_TYPE_FILE_MODE macro and thunar_file_mode_get_type() function which registers a flags type for file modes. * thunar/thunar-io-jobs.{c,h}: Add new jobs thunar_io_jobs_change_group() and thunar_io_jobs_change_mode(). * thunar/thunar-permissions-chooser.c: Migrate the permissions chooser to the new jobs. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-24 11:48:30 UTC (rev 29901) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-24 15:26:31 UTC (rev 29902) @@ -1,5 +1,16 @@ 2009-04-24 Jannis Pohlmann + * thunar/thunar-enum-types.{c,h}, thunar/thunar-file.h: Move + ThunarFileMode into the enum types file. Add THUNAR_TYPE_FILE_MODE + macro and thunar_file_mode_get_type() function which registers a + flags type for file modes. + * thunar/thunar-io-jobs.{c,h}: Add new jobs + thunar_io_jobs_change_group() and thunar_io_jobs_change_mode(). + * thunar/thunar-permissions-chooser.c: Migrate the permissions chooser + to the new jobs. + +2009-04-24 Jannis Pohlmann + * thunar/thunar-application, thunar/thunar-io-jobs.{c,h}, thunar/thunar-job.{c,h}, thunar/thunar-transfer-job.c: Re-implement thunar_application_restore_files() based on a new job called Modified: thunar/branches/migration-to-gio/thunar/thunar-enum-types.c === --- thunar/branches/migration-to-gio/thunar/thunar-enum-types.c 2009-04-24 11:48:30 UTC (rev 29901) +++ thunar/branches/migration-to-gio/thunar/thunar-enum-types.c 2009-04-24 15:26:31 UTC (rev 29902) @@ -296,3 +296,36 @@ return type; } + + +GType +thunar_file_mode_get_type (void) +{ + static GType type = G_TYPE_INVALID; + + if (type == G_TYPE_INVALID) +{ + static const GFlagsValue values[] = + { + { THUNAR_FILE_MODE_SUID, "THUNAR_FILE_MODE_SUID", "suid" }, + { THUNAR_FILE_MODE_SGID, "THUNAR_FILE_MODE_SGID", "sgid" }, + { THUNAR_FILE_MODE_STICKY,"THUNAR_FILE_MODE_STICKY", "sticky"}, + { THUNAR_FILE_MODE_USR_ALL, "THUNAR_FILE_MODE_USR_ALL", "usr-all" }, + { THUNAR_FILE_MODE_USR_READ, "THUNAR_FILE_MODE_USR_READ", "usr-read" }, + { THUNAR_FILE_MODE_USR_WRITE, "THUNAR_FILE_MODE_USR_WRITE", "usr-write" }, + { THUNAR_FILE_MODE_USR_EXEC, "THUNAR_FILE_MODE_USR_EXEC", "usr-exec" }, + { THUNAR_FILE_MODE_GRP_ALL, "THUNAR_FILE_MODE_GRP_ALL", "grp-all" }, + { THUNAR_FILE_MODE_GRP_READ, "THUNAR_FILE_MODE_GRP_READ", "grp-read" }, + { THUNAR_FILE_MODE_GRP_WRITE, "THUNAR_FILE_MODE_GRP_WRITE", "grp-write" }, + { THUNAR_FILE_MODE_GRP_EXEC, "THUNAR_FILE_MODE_GRP_EXEC", "grp-exec" }, + { THUNAR_FILE_MODE_OTH_ALL, "THUNAR_FILE_MODE_OTH_ALL", "oth-all" }, + { THUNAR_FILE_MODE_OTH_READ, "THUNAR_FILE_MODE_OTH_READ", "oth-read" }, + { THUNAR_FILE_MODE_OTH_WRITE, "THUNAR_FILE_MODE_OTH_WRITE", "oth-write" }, + { THUNAR_FILE_MODE_OTH_EXEC, "THUNAR_FILE_MODE_OTH_EXEC", "oth-exec" }, + { 0, NULL, NULL } + }; + + type = g_flags_register_static ("ThunarFileMode", values); +} + return type; +} Modified: thunar/branches/migration-to-gio/thunar/thunar-enum-types.h === --- thunar/branches/migration-to-gio/thunar/thunar-enum-types.h 2009-04-24 11:48:30 UTC (rev 29901) +++ thunar/branches/migration-to-gio/thunar/thunar-enum-types.h 2009-04-24 15:26:31 UTC (rev 29902) @@ -261,6 +261,35 @@ GType thunar_job_response_get_type (void) G_GNUC_CONST G_GNUC_INTERNAL;
[Xfce4-commits] r29903 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-24 16:36:08 + (Fri, 24 Apr 2009) New Revision: 29903 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-folder.c Log: * thunar/thunar-folder.c: Add "corresponding-file" property for the ThunarFile member of ThunarFolder. Monitor folders using GFileMonitor instead of ThunarVfsMonitor. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-24 15:26:31 UTC (rev 29902) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-24 16:36:08 UTC (rev 29903) @@ -1,5 +1,11 @@ 2009-04-24 Jannis Pohlmann + * thunar/thunar-folder.c: Add "corresponding-file" property for the + ThunarFile member of ThunarFolder. Monitor folders using + GFileMonitor instead of ThunarVfsMonitor. + +2009-04-24 Jannis Pohlmann + * thunar/thunar-enum-types.{c,h}, thunar/thunar-file.h: Move ThunarFileMode into the enum types file. Add THUNAR_TYPE_FILE_MODE macro and thunar_file_mode_get_type() function which registers a Modified: thunar/branches/migration-to-gio/thunar/thunar-folder.c === --- thunar/branches/migration-to-gio/thunar/thunar-folder.c 2009-04-24 15:26:31 UTC (rev 29902) +++ thunar/branches/migration-to-gio/thunar/thunar-folder.c 2009-04-24 16:36:08 UTC (rev 29903) @@ -32,6 +32,7 @@ enum { PROP_0, + PROP_CORRESPONDING_FILE, PROP_LOADING, }; @@ -53,6 +54,10 @@ guint prop_id, GValue *value, GParamSpec *pspec); +static void thunar_folder_set_property(GObject *object, + guint prop_uid, + const GValue *value, + GParamSpec *pspec); static void thunar_folder_error (ThunarVfsJob *job, GError *error, ThunarFolder *folder); @@ -67,11 +72,10 @@ static void thunar_folder_file_destroyed (ThunarFileMonitor *file_monitor, ThunarFile *file, ThunarFolder *folder); -static void thunar_folder_monitor (ThunarVfsMonitor *monitor, - ThunarVfsMonitorHandle *handle, - ThunarVfsMonitorEvent event, - ThunarVfsPath *handle_path, - ThunarVfsPath *event_path, +static void thunar_folder_monitor (GFileMonitor *monitor, + GFile *file, + GFile *other_file, + GFileMonitorEvent event_type, gpointer user_data); @@ -101,8 +105,7 @@ ThunarFileMonitor *file_monitor; - ThunarVfsMonitor *monitor; - ThunarVfsMonitorHandle *handle; + GFileMonitor *monitor; }; @@ -153,8 +156,24 @@ gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = thunar_folder_finalize; gobject_class->get_property = thunar_folder_get_property; + gobject_class->set_property = thunar_folder_set_property; /** + * ThunarFolder::corresponding-file: + * + * The #ThunarFile referring to the #ThunarFolder. + **/ + g_object_class_install_property (gobject_class, + PROP_CORRESPONDING_FILE, + g_param_spec_object ("corresponding-file", +"corresponding-file", +"corresponding-file", +THUNAR_TYPE_FILE, +G_PARAM_READABLE +
[Xfce4-commits] r29904 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-24 18:48:54 + (Fri, 24 Apr 2009) New Revision: 29904 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c thunar/branches/migration-to-gio/thunar/thunar-folder.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.h thunar/branches/migration-to-gio/thunar/thunar-job.c thunar/branches/migration-to-gio/thunar/thunar-job.h Log: * thunar/thunar-file.c: Implement thunar_file_get_group(), thunar_file_get_user() and thunar_file_get_emblem_names() based on GFile/GFileInfo. * thunar/thunar-folder.c, thunar/thunar-io-jobs.{c,h}, thunar/thunar-job.{c,h}: Add new "files-ready" signal to ThunarJob which is emitted when a list of ThunarFiles is ready. Also add a new function called thunar_job_files_ready() which emits the signal. Implement a new job thunar_io_jobs_list_directory() as an equivalent to thunar_vfs_listdir(), using the new "files-ready" signal. Update ThunarJob to use "files-ready" instead of "infos-ready". For the first time in a while you can open the trash again without crashing Thunar. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-24 16:36:08 UTC (rev 29903) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-24 18:48:54 UTC (rev 29904) @@ -1,5 +1,20 @@ 2009-04-24 Jannis Pohlmann + * thunar/thunar-file.c: Implement thunar_file_get_group(), + thunar_file_get_user() and thunar_file_get_emblem_names() based on + GFile/GFileInfo. + * thunar/thunar-folder.c, thunar/thunar-io-jobs.{c,h}, + thunar/thunar-job.{c,h}: Add new "files-ready" signal to ThunarJob + which is emitted when a list of ThunarFiles is ready. Also add a new + function called thunar_job_files_ready() which emits the signal. + Implement a new job thunar_io_jobs_list_directory() as an equivalent + to thunar_vfs_listdir(), using the new "files-ready" signal. Update + ThunarJob to use "files-ready" instead of "infos-ready". For the + first time in a while you can open the trash again without crashing + Thunar. + +2009-04-24 Jannis Pohlmann + * thunar/thunar-folder.c: Add "corresponding-file" property for the ThunarFile member of ThunarFolder. Monitor folders using GFileMonitor instead of ThunarVfsMonitor. Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-04-24 16:36:08 UTC (rev 29903) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-04-24 18:48:54 UTC (rev 29904) @@ -123,10 +123,10 @@ static ThunarUserManager *user_manager; -static guint32effective_user_id; static ThunarMetafile*metafile; static GObjectClass *thunar_file_parent_class; -static GHashTable*file_cache; +static GHashTable*file_cache; /* TODO Make the cache thread safe! */ +static guint32effective_user_id; static GQuark thunar_file_thumb_path_quark; static GQuark thunar_file_watch_count_quark; static GQuark thunar_file_emblem_names_quark; @@ -1427,8 +1427,15 @@ ThunarGroup* thunar_file_get_group (const ThunarFile *file) { + guint32 gid; + _thunar_return_val_if_fail (THUNAR_IS_FILE (file), NULL); - return thunar_user_manager_get_group_by_id (user_manager, file->info->gid); + + /* TODO what are we going to do on non-UNIX systems? */ + gid = g_file_info_get_attribute_uint32 (file->ginfo, + G_FILE_ATTRIBUTE_UNIX_GID); + + return thunar_user_manager_get_group_by_id (user_manager, gid); } @@ -1449,8 +1456,14 @@ ThunarUser* thunar_file_get_user (const ThunarFile *file) { + guint32 uid; _thunar_return_val_if_fail (THUNAR_IS_FILE (file), NULL); - return thunar_user_manager_get_user_by_id (user_manager, file->info->uid); + + /* TODO what are we going to do on non-UNIX systems? */ + uid = g_file_info_get_attribute_uint32 (file->ginfo, + G_FILE_ATTRIBUTE_UNIX_UID); + + return thunar_user_manager_get_user_by_id (user_manager, uid); } @@ -2036,10 +2049,10 @@ GList* thunar_file_get_emblem_names (ThunarFile *file) { - const ThunarVfsInfo *info = file->info; - const gchar *emblem_string; - gchar **emblem_names; - GList *emblems = NULL; + const gchar *emblem_string; + guint32 uid; + gchar **emblem_names; + GL
[Xfce4-commits] r29905 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-24 19:03:45 + (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 + * 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 + * 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.c2009-04-24 18:48:54 UTC (rev 29904) +++ thunar/branches/migration-to-gio/thunar/thunar-dialogs.c2009-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.c2009-04-24 18:48:54 UTC (rev 29904) +++ thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c2009-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); + T
[Xfce4-commits] r29906 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-24 19:06:04 + (Fri, 24 Apr 2009) New Revision: 29906 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-tree-view.c Log: * thunar/thunar-tree-view.c: Add missing include statement for thunar-job.h. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-24 19:03:45 UTC (rev 29905) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-24 19:06:04 UTC (rev 29906) @@ -1,5 +1,10 @@ 2009-04-24 Jannis Pohlmann + * thunar/thunar-tree-view.c: Add missing include statement for + thunar-job.h. + +2009-04-24 Jannis Pohlmann + * 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 Modified: thunar/branches/migration-to-gio/thunar/thunar-tree-view.c === --- thunar/branches/migration-to-gio/thunar/thunar-tree-view.c 2009-04-24 19:03:45 UTC (rev 29905) +++ thunar/branches/migration-to-gio/thunar/thunar-tree-view.c 2009-04-24 19:06:04 UTC (rev 29906) @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r29908 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-27 14:17:51 + (Mon, 27 Apr 2009) New Revision: 29908 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-application.c thunar/branches/migration-to-gio/thunar/thunar-io-scan-directory.c Log: * thunar/thunar-application.c: Use GVolumeMonitor instead of ThunarVfsVolumeManager. Connect to the "drive-connected", "drive-disconnected" and "drive-eject-button" signals and determine the device UDIs using g_drive_get_identifier(). Rename thunar_application_volman_device_added(), thunar_application_volman_device_removed(), thunar_application_volman_device_eject() to thunar_application_drive_connected(), thunar_application_drive_disconnected() and thunar_application_drive_eject(). ThunarApplication is now ThunarVFS-free! * thunar/thunar-io-scan-directory.c: Avoid segfault when cancelling the job and trying to free the error. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-25 13:38:46 UTC (rev 29907) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-27 14:17:51 UTC (rev 29908) @@ -1,3 +1,19 @@ +2009-04-27 Jannis Pohlmann + + * thunar/thunar-application.c: Use GVolumeMonitor instead of + ThunarVfsVolumeManager. Connect to the "drive-connected", + "drive-disconnected" and "drive-eject-button" signals and determine + the device UDIs using g_drive_get_identifier(). Rename + thunar_application_volman_device_added(), + thunar_application_volman_device_removed(), + thunar_application_volman_device_eject() to + thunar_application_drive_connected(), + thunar_application_drive_disconnected() and + thunar_application_drive_eject(). ThunarApplication is now + ThunarVFS-free! + * thunar/thunar-io-scan-directory.c: Avoid segfault when cancelling the + job and trying to free the error. + 2009-04-24 Jannis Pohlmann * thunar/thunar-tree-view.c: Add missing include statement for Modified: thunar/branches/migration-to-gio/thunar/thunar-application.c === --- thunar/branches/migration-to-gio/thunar/thunar-application.c 2009-04-25 13:38:46 UTC (rev 29907) +++ thunar/branches/migration-to-gio/thunar/thunar-application.c 2009-04-27 14:17:51 UTC (rev 29908) @@ -97,14 +97,14 @@ GdkScreen *screen); static void thunar_application_window_destroyed (GtkWidget *window, ThunarApplication *application); -static void thunar_application_volman_device_added (ThunarVfsVolumeManager *volume_manager, - const gchar *udi, +static void thunar_application_drive_connected(GVolumeMonitor *volume_monitor, + GDrive *drive, ThunarApplication *application); -static void thunar_application_volman_device_removed (ThunarVfsVolumeManager *volume_manager, - const gchar *udi, +static void thunar_application_drive_disconnected (GVolumeMonitor *volume_monitor, + GDrive *drive, ThunarApplication *application); -static void thunar_application_volman_device_eject (ThunarVfsVolumeManager *volume_manager, - const gchar *udi, +static void thunar_application_drive_eject(GVolumeMonitor *volume_monitor, + GDrive *drive, ThunarApplication *application); static gboolean thunar_application_volman_idle(gpointer user_data); static void thunar_application_volman_idle_destroy(gpointer user_data); @@ -133,11 +133,11 @@ guint show_dialogs_timer_id; - /* the volume manager support */ - ThunarVfsVolumeManager *volman; - GSList *volman_udis; - guint volman_idle_id; - guint volman_watch_id; + GVolumeMonitor*volum
[Xfce4-commits] r29909 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-27 14:34:41 + (Mon, 27 Apr 2009) New Revision: 29909 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-preferences-dialog.c Log: * thunar/thunar-preferences-dialog.c: Always assume we have volume management. Remove the ThunarVfsVolumeManager reference here. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-27 14:17:51 UTC (rev 29908) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-27 14:34:41 UTC (rev 29909) @@ -1,5 +1,10 @@ 2009-04-27 Jannis Pohlmann + * thunar/thunar-preferences-dialog.c: Always assume we have volume + management. Remove the ThunarVfsVolumeManager reference here. + +2009-04-27 Jannis Pohlmann + * thunar/thunar-application.c: Use GVolumeMonitor instead of ThunarVfsVolumeManager. Connect to the "drive-connected", "drive-disconnected" and "drive-eject-button" signals and determine Modified: thunar/branches/migration-to-gio/thunar/thunar-preferences-dialog.c === --- thunar/branches/migration-to-gio/thunar/thunar-preferences-dialog.c 2009-04-27 14:17:51 UTC (rev 29908) +++ thunar/branches/migration-to-gio/thunar/thunar-preferences-dialog.c 2009-04-27 14:34:41 UTC (rev 29909) @@ -199,23 +199,21 @@ static void thunar_preferences_dialog_init (ThunarPreferencesDialog *dialog) { - ThunarVfsVolumeManager *volume_manager; - ThunarDateStyle date_style; - GtkAdjustment *adjustment; - GtkWidget *notebook; - GtkWidget *button; - GtkWidget *align; - GtkWidget *combo; - GtkWidget *frame; - GtkWidget *image; - GtkWidget *label; - GtkWidget *range; - GtkWidget *table; - GtkWidget *hbox; - GtkWidget *ibox; - GtkWidget *vbox; - gchar *path; - gchar *date; + ThunarDateStyle date_style; + GtkAdjustment *adjustment; + GtkWidget *notebook; + GtkWidget *button; + GtkWidget *align; + GtkWidget *combo; + GtkWidget *frame; + GtkWidget *label; + GtkWidget *range; + GtkWidget *table; + GtkWidget *hbox; + GtkWidget *ibox; + GtkWidget *vbox; + gchar *path; + gchar *date; /* grab a reference on the preferences */ dialog->preferences = thunar_preferences_get (); @@ -615,52 +613,26 @@ gtk_container_add (GTK_CONTAINER (frame), table); gtk_widget_show (table); - /* determine the active volume manager */ - volume_manager = thunar_vfs_volume_manager_get_default (); - /* check if "thunar-volman" is found */ path = g_find_program_in_path ("thunar-volman"); - /* check if we lack volume management support and should warn the user */ - if (g_signal_lookup ("device-added", G_OBJECT_TYPE (volume_manager)) == 0 || path == NULL) -{ - /* add a warning telling the user that volume management is not available */ - image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DND); - gtk_misc_set_alignment (GTK_MISC (image), 0.5f, 0.5f); - gtk_table_attach (GTK_TABLE (table), image, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (image); + /* add check button to enable/disable auto mounting */ + button = gtk_check_button_new_with_mnemonic (_("Enable _Volume Management")); + exo_mutual_binding_new (G_OBJECT (dialog->preferences), "misc-volume-management", G_OBJECT (button), "active"); + gtk_table_attach (GTK_TABLE (table), button, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (button); - label = gtk_label_new ((path == NULL) - ? _("Install the \"thunar-volman\" package to use\nthe volume management support in Thunar.") - : _("Build thunar-vfs with HAL support to use\nthe volume management support in Thunar.")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f); - gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (label); + label = sexy_url_label_new (); + gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f); + exo_binding_new (G_OBJECT (button), "active", G_OBJECT (label), "sensitive"); + g_signal_connect_swapped (G_OBJECT (label), "url-activated", G_CALLBACK (thunar_preferences_dialog_configure), dialog); + /* TRANSLATORS: Make sure you place the ...-link on the first line, otherwise the user will be unable to click on it */ + sexy_url_label_set_markup (SEXY_URL_LABEL (label)
[Xfce4-commits] r29910 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-27 14:41:42 + (Mon, 27 Apr 2009) New Revision: 29910 Added: thunar/branches/migration-to-gio/thunar/thunar-io-jobs-util.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs-util.h Modified: thunar/branches/migration-to-gio/ChangeLog Log: * thunar/thunar-io-jobs-util.{c,h}: Add missing files. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-27 14:34:41 UTC (rev 29909) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-27 14:41:42 UTC (rev 29910) @@ -1,5 +1,9 @@ 2009-04-27 Jannis Pohlmann + * thunar/thunar-io-jobs-util.{c,h}: Add missing files. + +2009-04-27 Jannis Pohlmann + * thunar/thunar-preferences-dialog.c: Always assume we have volume management. Remove the ThunarVfsVolumeManager reference here. Added: thunar/branches/migration-to-gio/thunar/thunar-io-jobs-util.c === --- thunar/branches/migration-to-gio/thunar/thunar-io-jobs-util.c (rev 0) +++ thunar/branches/migration-to-gio/thunar/thunar-io-jobs-util.c 2009-04-27 14:41:42 UTC (rev 29910) @@ -0,0 +1,139 @@ +/* vi:set et ai sw=2 sts=2 ts=2: */ +/*- + * Copyright (c) 2009 Jannis Pohlmann + * + * 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 +#endif + +#include + +#include +#include +#include + + + +static const gchar *duplicate_names[4][2] = +{ + /* Copy/link name for n <= 3 */ + { N_("copy of %s"), N_("link to %s"), }, + { N_("another copy of %s"), N_("another link to %s"), }, + { N_("third copy of %s"), N_("third link to %s"), }, + + /* Fallback copy/link name for n >= 4 */ + { N_("%uth copy of %s"),N_("%uth link to %s"),}, +}; + + + +/** + * thunar_io_jobs_util_next_duplicate_file: + * @job : a #ThunarTransferJob. + * @file : the source #GFile. + * @type : the operation type (copy or link). + * @n : the @nth copy/link to create the #GFile for. + * @error : return location for errors or %NULL. + * + * Determines the #GFile for the next copy/link of/to @file. + * + * Copies of a file called X are named: + * n = 1: "copy of X" + * n = 2: "another copy of X" + * n = 3: "third copy of X" + * n >= 4: "@nth copy of X" + * + * Links follow the same naming scheme, except that they use + * "link to X" instead of "copy of X". + * + * If there are errors or the job was cancelled, the return value + * will be %NULL and @error will be set. + * + * Return value: the #GFile referencing the @nth copy or link + * of @file or %NULL on error/cancellation. + **/ +GFile * +thunar_io_jobs_util_next_duplicate_file (ThunarJob *job, + GFile *file, + gboolean copy, + gint n, + GError **error) +{ + GFileInfo *info; + GError*err = NULL; + GFile *duplicate_file = NULL; + GFile *parent_file = NULL; + gchar *display_name; + gint type_index; + gint name_index; + + _thunar_return_val_if_fail (THUNAR_IS_JOB (job), NULL); + _thunar_return_val_if_fail (G_IS_FILE (file), NULL); + _thunar_return_val_if_fail (0 < n, NULL); + _thunar_return_val_if_fail (error == NULL || *error == NULL, NULL); + _thunar_return_val_if_fail (!g_file_is_root (file), NULL); + + /* abort on cancellation */ + if (thunar_job_set_error_if_cancelled (job, error)) +return NULL; + + /* query the source file info / display name */ + info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME, +G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, +thunar_job_get_cancellable (job), &err); + + /* abort on error */ + if (info == NULL) +{ + g_propagate_error (error, err); + return NULL; +} + + /* determine the type index (copy = 0, link = 1) */ + type_index = (copy ?
[Xfce4-commits] r29911 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-28 16:45:32 + (Tue, 28 Apr 2009) New Revision: 29911 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c thunar/branches/migration-to-gio/thunar/thunar-file.h thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.h Log: * thunar/thunar-file.{c,h}: Make the ThunarFile cache somewhat thread-safe. * thunar/thunar-gio-extensions.{c,h}: Add new functions g_volume_is_removable() and g_volume_is_mounted(). Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-27 14:41:42 UTC (rev 29910) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-28 16:45:32 UTC (rev 29911) @@ -1,3 +1,10 @@ +2009-04-28 Jannis Pohlmann + + * thunar/thunar-file.{c,h}: Make the ThunarFile cache somewhat + thread-safe. + * thunar/thunar-gio-extensions.{c,h}: Add new functions + g_volume_is_removable() and g_volume_is_mounted(). + 2009-04-27 Jannis Pohlmann * thunar/thunar-io-jobs-util.{c,h}: Add missing files. Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-04-27 14:41:42 UTC (rev 29910) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-04-28 16:45:32 UTC (rev 29911) @@ -122,6 +122,10 @@ +G_LOCK_DEFINE_STATIC (file_cache_mutex); + + + static ThunarUserManager *user_manager; static ThunarMetafile*metafile; static GObjectClass *thunar_file_parent_class; @@ -189,8 +193,13 @@ static void thunar_file_atexit (void) { + G_LOCK (file_cache_mutex); + if (file_cache == NULL || g_hash_table_size (file_cache) == 0) -return; +{ + G_UNLOCK (file_cache_mutex); + return; +} g_print ("--- Leaked a total of %u ThunarFile objects:\n", g_hash_table_size (file_cache)); @@ -198,6 +207,8 @@ g_hash_table_foreach (file_cache, thunar_file_atexit_foreach, NULL); g_print ("\n"); + + G_UNLOCK (file_cache_mutex); } #endif @@ -303,7 +314,9 @@ #endif /* drop the entry from the cache */ + G_LOCK (file_cache_mutex); g_hash_table_remove (file_cache, file->gfile); + G_UNLOCK (file_cache_mutex); /* drop a reference on the metadata if we own one */ if ((file->flags & THUNAR_FILE_OWNS_METAFILE_REFERENCE) != 0) @@ -537,9 +550,12 @@ case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: thunar_file_reload (file); break; + +case G_FILE_MONITOR_EVENT_PRE_UNMOUNT: case G_FILE_MONITOR_EVENT_DELETED: thunar_file_destroy (file); break; + default: break; } @@ -627,7 +643,9 @@ thunar_file_load (file, NULL, error); /* insert the file into the cache */ + G_LOCK (file_cache_mutex); g_hash_table_insert (file_cache, g_object_ref (file->gfile), file); + G_UNLOCK (file_cache_mutex); } return file; @@ -706,7 +724,9 @@ thunar_file_load (file, NULL, NULL); /* insert the file into the cache */ + G_LOCK (file_cache_mutex); g_hash_table_insert (file_cache, g_object_ref (file->gfile), file); + G_UNLOCK (file_cache_mutex); } g_object_unref (gfile); @@ -1088,12 +1108,16 @@ THUNAR_FILE_SET_WATCH_COUNT (file, watch_count); } + G_LOCK (file_cache_mutex); + /* drop the previous entry from the cache */ g_hash_table_remove (file_cache, previous_file); /* insert the new entry */ g_hash_table_insert (file_cache, g_object_ref (file->gfile), file); + G_UNLOCK (file_cache_mutex); + /* tell the associated folder that the file was renamed */ thunarx_file_info_renamed (THUNARX_FILE_INFO (file)); @@ -2382,7 +2406,7 @@ if (++watch_count == 1) { /* create a file or directory monitor */ - file->monitor = g_file_monitor (file->gfile, G_FILE_MONITOR_NONE, NULL, NULL); + file->monitor = g_file_monitor (file->gfile, G_FILE_MONITOR_WATCH_MOUNTS, NULL, NULL); if (G_LIKELY (file->monitor != NULL)) { /* make sure the pointer is set to NULL once the monitor is destroyed */ @@ -2519,6 +2543,8 @@ /* release our reference */ g_object_unref (G_OBJECT (file)); + + g_debug ("thunar_file_destroy: file is object: %d", G_IS_OBJECT (file)); } } @@ -2725,8 +2751,12 @@ ThunarFile * thunar_file_cache_lookup (const GFile *file) { + ThunarFile *cached_file; + _thunar_return_val_if_fail (G_IS_FILE (file), NULL); + G_LOCK (file_cache_mutex); + /* allocate the ThunarFile cache on-dem
[Xfce4-commits] r29912 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-28 19:55:34 + (Tue, 28 Apr 2009) New Revision: 29912 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-folder.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c thunar/branches/migration-to-gio/thunar/thunar-io-scan-directory.c thunar/branches/migration-to-gio/thunar/thunar-job.c thunar/branches/migration-to-gio/thunar/thunar-window.c Log: * thunar/thunar-io-jobs.c, thunar/thunar-io-scan-directory.c: Improve error handling. Use thunar_file_list_free() instead of iterating over the ThunarFile list manually. Make sure to release the GFileEnumerator in thunar_io_scan_directory(), otherwise unmounting volumes fails due to open file descriptors. * thunar/thunar-job.c: Cancel jobs in thunar_job_finalize() before destroying the GCancellable. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-28 16:45:32 UTC (rev 29911) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-28 19:55:34 UTC (rev 29912) @@ -1,5 +1,15 @@ 2009-04-28 Jannis Pohlmann + * thunar/thunar-io-jobs.c, thunar/thunar-io-scan-directory.c: Improve + error handling. Use thunar_file_list_free() instead of iterating over + the ThunarFile list manually. Make sure to release the + GFileEnumerator in thunar_io_scan_directory(), otherwise unmounting + volumes fails due to open file descriptors. + * thunar/thunar-job.c: Cancel jobs in thunar_job_finalize() before + destroying the GCancellable. + +2009-04-28 Jannis Pohlmann + * thunar/thunar-file.{c,h}: Make the ThunarFile cache somewhat thread-safe. * thunar/thunar-gio-extensions.{c,h}: Add new functions Modified: thunar/branches/migration-to-gio/thunar/thunar-folder.c === --- thunar/branches/migration-to-gio/thunar/thunar-folder.c 2009-04-28 16:45:32 UTC (rev 29911) +++ thunar/branches/migration-to-gio/thunar/thunar-folder.c 2009-04-28 19:55:34 UTC (rev 29912) @@ -261,14 +261,14 @@ ThunarFolder *folder = THUNAR_FOLDER (object); /* disconnect from the ThunarFileMonitor instance */ - g_signal_handlers_disconnect_matched (G_OBJECT (folder->file_monitor), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, folder); - g_object_unref (G_OBJECT (folder->file_monitor)); + g_signal_handlers_disconnect_matched (folder->file_monitor, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, folder); + g_object_unref (folder->file_monitor); /* disconnect from the file alteration monitor */ if (G_LIKELY (folder->monitor != NULL)) { g_file_monitor_cancel (folder->monitor); - g_object_unref (G_OBJECT (folder->monitor)); + g_object_unref (folder->monitor); } /* cancel the pending job (if any) */ @@ -276,7 +276,7 @@ { g_signal_handlers_disconnect_matched (folder->job, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, folder); thunar_job_cancel (folder->job); - g_object_unref (G_OBJECT (folder->job)); + g_object_unref (folder->job); } /* disconnect from the corresponding file */ @@ -730,7 +730,7 @@ /* disconnect from the job */ g_signal_handlers_disconnect_matched (folder->job, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, folder); thunar_job_cancel (THUNAR_JOB (folder->job)); - g_object_unref (G_OBJECT (folder->job)); + g_object_unref (folder->job); } /* disconnect from the file alteration monitor */ Modified: thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c === --- thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c2009-04-28 16:45:32 UTC (rev 29911) +++ thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c2009-04-28 19:55:34 UTC (rev 29912) @@ -999,6 +999,9 @@ _thunar_return_val_if_fail (param_values->n_values == 1, FALSE); _thunar_return_val_if_fail (error == NULL || *error == NULL, FALSE); + if (thunar_job_set_error_if_cancelled (job, error)) +return FALSE; + /* determine the directory to list */ directory = g_value_get_object (g_value_array_get_nth (param_values, 0)); @@ -1043,13 +1046,15 @@ { /* none of the handlers took over the file list, so it's up to us * to destroy it */ - g_list_foreach (file_list, (GFunc) g_object_unref, NULL); - g_list_free (file_list); + thunar_file_list_free (file_list); } } - /* check if there were any errors */ - if (err != NULL) + /* there should be no errors here */ + _thunar_assert (err == NULL); + + /* propagate cancellation error */ + if (thunar_job_set_error_if_cancelled
[Xfce4-commits] r29914 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-29 16:24:19 + (Wed, 29 Apr 2009) New Revision: 29914 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c Log: * thunar/thunar-shortcuts-model.c: In thunar_shortcuts_model_init() don't increase the reference counter on the volumes, otherwise we'd leak them here. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-29 07:42:23 UTC (rev 29913) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-29 16:24:19 UTC (rev 29914) @@ -1,5 +1,11 @@ 2009-04-29 Jannis Pohlmann + * thunar/thunar-shortcuts-model.c: In thunar_shortcuts_model_init() + don't increase the reference counter on the volumes, otherwise we'd + leak them here. + +2009-04-29 Jannis Pohlmann + * thunar/thunar-gio-extensions.{c,h}: Add new function g_volume_is_present() which checks whether the GDrive of a volume has media or not. Modified: thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c === --- thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c 2009-04-29 07:42:23 UTC (rev 29913) +++ thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c 2009-04-29 16:24:19 UTC (rev 29914) @@ -366,7 +366,7 @@ */ shortcut = _thunar_slice_new0 (ThunarShortcut); shortcut->type = THUNAR_SHORTCUT_REMOVABLE_MEDIA; - shortcut->volume = g_object_ref (volume); + shortcut->volume = volume; /* link the shortcut to the list */ thunar_shortcuts_model_add_shortcut (model, shortcut, path); @@ -376,10 +376,10 @@ { /* schedule the volume for later checking, not removable or * there's no medium present */ - model->hidden_volumes = g_list_prepend (model->hidden_volumes, - g_object_ref (volume)); + model->hidden_volumes = g_list_prepend (model->hidden_volumes, volume); } } + g_list_free (volumes); /* prepend the row separator */ shortcut = _thunar_slice_new0 (ThunarShortcut); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r29915 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-29 16:28:21 + (Wed, 29 Apr 2009) New Revision: 29915 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c Log: * thunar/thunar-shortcuts-view.c: Avoid segfaults due to an invalid GtkTreeSelection being used in thunar_shortcuts_view_open_selection() and thunar_shortcuts_view_open_selection_in_new_window(). This can happen when the shortcuts view is essentially being destroyed but a reference to it is still being kept for the mount/unmount/eject handler. Increase the reference counter before passing the view to asynchronous mount/unmount/eject functions and release the reference in the handler. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-29 16:24:19 UTC (rev 29914) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-29 16:28:21 UTC (rev 29915) @@ -1,5 +1,16 @@ 2009-04-29 Jannis Pohlmann + * thunar/thunar-shortcuts-view.c: Avoid segfaults due to an invalid + GtkTreeSelection being used in thunar_shortcuts_view_open_selection() + and thunar_shortcuts_view_open_selection_in_new_window(). This can + happen when the shortcuts view is essentially being destroyed but a + reference to it is still being kept for the mount/unmount/eject + handler. Increase the reference counter before passing the view to + asynchronous mount/unmount/eject functions and release the reference + in the handler. + +2009-04-29 Jannis Pohlmann + * thunar/thunar-shortcuts-model.c: In thunar_shortcuts_model_init() don't increase the reference counter on the volumes, otherwise we'd leak them here. Modified: thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c === --- thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c 2009-04-29 16:24:19 UTC (rev 29914) +++ thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c 2009-04-29 16:28:21 UTC (rev 29915) @@ -1267,6 +1267,12 @@ /* determine the selected item */ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view)); + + /* avoid dealing with invalid selections (may occur when the mount_finish() + * handler is called and the shortcuts view has been hidden already) */ + if (!GTK_IS_TREE_SELECTION (selection)) +return; + if (gtk_tree_selection_get_selected (selection, &model, &iter)) { /* determine the file for the shortcut at the given tree iterator */ @@ -1327,6 +1333,12 @@ /* determine the selected item */ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view)); + + /* avoid dealing with invalid selections (may occur when the mount_finish() + * handler is called and the shortcuts view has been hidden already) */ + if (!GTK_IS_TREE_SELECTION (selection)) +return; + if (gtk_tree_selection_get_selected (selection, &model, &iter)) { /* determine the volume for the shortcut at the given tree iterator */ @@ -1392,6 +1404,8 @@ g_error_free (error); } } + + g_object_unref (view); } @@ -1427,6 +1441,8 @@ g_error_free (error); } } + + g_object_unref (view); } @@ -1437,7 +1453,6 @@ GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; - GtkWidget*window; GVolume *volume; GMount *mount; @@ -1451,15 +1466,13 @@ gtk_tree_model_get (model, &iter, THUNAR_SHORTCUTS_MODEL_COLUMN_VOLUME, &volume, -1); if (G_UNLIKELY (volume != NULL)) { - /* determine the toplevel window */ - window = gtk_widget_get_toplevel (GTK_WIDGET (view)); - /* determine what the appropriate method is: eject or unmount */ if (g_volume_can_eject (volume)) { /* try to to eject the volume asynchronously */ g_volume_eject (volume, G_MOUNT_UNMOUNT_NONE, NULL, - thunar_shortcuts_view_eject_finish, view); + thunar_shortcuts_view_eject_finish, + g_object_ref (view)); } else { @@ -1469,7 +1482,8 @@ { /* the volume is mounted, try to unmount the mount */ g_mount_unmount (mount, G_MOUNT_UNMOUNT_NONE, NULL, - thunar_shortcuts_view_unmount_finish, view); + thunar_shortcuts_view_unmount_finish, + g_object_ref (view)); /* release the mount */ g_object_unref (mount); @@ -1511,8 +1
[Xfce4-commits] r29917 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-30 01:11:53 + (Thu, 30 Apr 2009) New Revision: 29917 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-application.c thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c thunar/branches/migration-to-gio/thunar/thunar-location-entry.c Log: * thunar/thunar-application.c: Replace "hal-udi" with G_VOLUME_IDENTIFIER_KIND_HAL_UDI. * thunar/thunar-gio-extensions.c: Change g_volume_is_removable() so that it returns TRUE for almost all volumes. I feel that something is very wrong in GHalVolumeManager ... * thunar/thunar-location-entry.c: Replace ThunarVfsVolume with GVolume. Mount+open launcher entry items asynchronously when activated. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-29 16:28:31 UTC (rev 29916) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-30 01:11:53 UTC (rev 29917) @@ -1,3 +1,14 @@ +2009-04-30 Jannis Pohlmann + + * thunar/thunar-application.c: Replace "hal-udi" with + G_VOLUME_IDENTIFIER_KIND_HAL_UDI. + * thunar/thunar-gio-extensions.c: Change g_volume_is_removable() so + that it returns TRUE for almost all volumes. I feel that something is + very wrong in GHalVolumeManager ... + * thunar/thunar-location-entry.c: Replace ThunarVfsVolume with + GVolume. Mount+open launcher entry items asynchronously when + activated. + 2009-04-29 Jannis Pohlmann * thunar/thunar-tree-model.c, thunar/thunar-tree-view.c: Rewrite the Modified: thunar/branches/migration-to-gio/thunar/thunar-application.c === --- thunar/branches/migration-to-gio/thunar/thunar-application.c 2009-04-29 16:28:31 UTC (rev 29916) +++ thunar/branches/migration-to-gio/thunar/thunar-application.c 2009-04-30 01:11:53 UTC (rev 29917) @@ -516,7 +516,7 @@ _thunar_return_if_fail (THUNAR_IS_APPLICATION (application)); /* determine the HAL UDI for this drive */ - udi = g_drive_get_identifier (drive, "hal-udi"); + udi = g_drive_get_identifier (drive, G_VOLUME_IDENTIFIER_KIND_HAL_UDI); /* check if we have a UDI */ if (G_LIKELY (udi != NULL)) @@ -553,7 +553,7 @@ _thunar_return_if_fail (THUNAR_IS_APPLICATION (application)); /* determine the HAL UDI for this drive */ - udi = g_drive_get_identifier (drive, "hal-udi"); + udi = g_drive_get_identifier (drive, G_VOLUME_IDENTIFIER_KIND_HAL_UDI); /* check if we have a UDI */ if (G_LIKELY (udi != NULL)) @@ -592,7 +592,7 @@ _thunar_return_if_fail (THUNAR_IS_APPLICATION (application)); /* determine the HAL UDI for this device */ - udi = g_drive_get_identifier (drive, "hal-udi"); + udi = g_drive_get_identifier (drive, G_VOLUME_IDENTIFIER_KIND_HAL_UDI); /* check if we have a UDI */ if (G_LIKELY (udi != NULL)) Modified: thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c === --- thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c 2009-04-29 16:28:31 UTC (rev 29916) +++ thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c 2009-04-30 01:11:53 UTC (rev 29917) @@ -274,7 +274,10 @@ g_volume_is_removable (GVolume *volume) { gboolean can_eject = FALSE; + gboolean can_mount = FALSE; gboolean can_unmount = FALSE; + gboolean is_removable = FALSE; + GDrive *drive; GMount *mount; _thunar_return_val_if_fail (G_IS_VOLUME (volume), FALSE); @@ -282,6 +285,17 @@ /* check if the volume can be ejected */ can_eject = g_volume_can_eject (volume); + /* determine the drive for the volume */ + drive = g_volume_get_drive (volume); + if (drive != NULL) +{ + /*check if the drive media can be removed */ + is_removable = g_drive_is_media_removable (drive); + + /* release the drive */ + g_object_unref (drive); +} + /* determine the mount for the volume (if it is mounted at all) */ mount = g_volume_get_mount (volume); if (mount != NULL) @@ -293,7 +307,10 @@ g_object_unref (mount); } - return can_eject || can_unmount; + /* determine whether the device can be mounted */ + can_mount = g_volume_can_mount (volume); + + return can_eject || can_unmount || is_removable || can_mount; } Modified: thunar/branches/migration-to-gio/thunar/thunar-location-entry.c === --- thunar/branches/migration-to-gio/thunar/thunar-location-entry.c 2009-04-29 16:28:31 UTC (rev 29916) +++ thunar/branches/migration-to-gio/thunar/thunar-location-entry.c 2009-04-30 01:11:53 UTC (rev 29917) @@ -497,15 +497,16 @@ {
[Xfce4-commits] r29919 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-30 13:04:36 + (Thu, 30 Apr 2009) New Revision: 29919 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c thunar/branches/migration-to-gio/thunar/thunar-file.h thunar/branches/migration-to-gio/thunar/thunar-location-entry.c thunar/branches/migration-to-gio/thunar/thunar-properties-dialog.c Log: * thunar/thunar-file.{c,h}, thunar/thunar-properties-dialog.c: Re-implement thunar_file_get_volume() around g_file_find_enclosing_mount(). Ideally this would be asynchronous but for now it'll stay the old way. Remove the ThunarVfsVolumeManager member from the properties dialog. We only need thunar_file_get_volume() here now. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-30 06:50:14 UTC (rev 29918) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-30 13:04:36 UTC (rev 29919) @@ -1,5 +1,14 @@ 2009-04-30 Jannis Pohlmann + * thunar/thunar-file.{c,h}, thunar/thunar-properties-dialog.c: + Re-implement thunar_file_get_volume() around + g_file_find_enclosing_mount(). Ideally this would be asynchronous + but for now it'll stay the old way. Remove the + ThunarVfsVolumeManager member from the properties dialog. We only + need thunar_file_get_volume() here now. + +2009-04-30 Jannis Pohlmann + * thunar/thunar-application.c: Replace "hal-udi" with G_VOLUME_IDENTIFIER_KIND_HAL_UDI. * thunar/thunar-gio-extensions.c: Change g_volume_is_removable() so Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-04-30 06:50:14 UTC (rev 29918) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-04-30 13:04:36 UTC (rev 29919) @@ -1414,23 +1414,30 @@ /** * thunar_file_get_volume: * @file : a #ThunarFile instance. - * @volume_manager : the #ThunarVfsVolumeManager to use for the volume lookup. * - * Attempts to determine the #ThunarVfsVolume on which @file is located - * using the given @volume_manager. If @file cannot determine it's volume, - * then %NULL will be returned. Else a #ThunarVfsVolume instance is returned, - * which is owned by @volume_manager and thereby the caller must not free - * the returned object. + * Attempts to determine the #GVolume on which @file is located. If @file cannot + * determine it's volume, then %NULL will be returned. Else a #GVolume instance + * is returned which has to be released by the caller using g_object_unref(). * - * Return value: the #ThunarVfsVolume for @file in @volume_manager or %NULL. + * Return value: the #GVolume for @file or %NULL. **/ -ThunarVfsVolume* -thunar_file_get_volume (const ThunarFile *file, -ThunarVfsVolumeManager *volume_manager) +GVolume* +thunar_file_get_volume (const ThunarFile *file) { + GVolume *volume = NULL; + GMount *mount; + _thunar_return_val_if_fail (THUNAR_IS_FILE (file), NULL); - _thunar_return_val_if_fail (THUNAR_VFS_IS_VOLUME_MANAGER (volume_manager), NULL); - return thunar_vfs_volume_manager_get_volume_by_info (volume_manager, file->info); + + /* TODO make this function call asynchronous */ + mount = g_file_find_enclosing_mount (file->gfile, NULL, NULL); + if (mount != NULL) +{ + volume = g_mount_get_volume (mount); + g_object_unref (mount); +} + + return volume; } Modified: thunar/branches/migration-to-gio/thunar/thunar-file.h === --- thunar/branches/migration-to-gio/thunar/thunar-file.h 2009-04-30 06:50:14 UTC (rev 29918) +++ thunar/branches/migration-to-gio/thunar/thunar-file.h 2009-04-30 13:04:36 UTC (rev 29919) @@ -165,8 +165,7 @@ gchar*thunar_file_get_mode_string (const ThunarFile *file) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; gchar*thunar_file_get_size_string (const ThunarFile *file) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; -ThunarVfsVolume *thunar_file_get_volume (const ThunarFile *file, -ThunarVfsVolumeManager *volume_manager); +GVolume *thunar_file_get_volume (const ThunarFile *file); ThunarGroup *thunar_file_get_group(const ThunarFile *file); ThunarUser *thunar_file_get_user (const ThunarFile *file); Modified: thunar/branches/migration-to-gio/thunar/thunar-location-entry.c === --- thunar/branches/migration-to-gio/thunar/thunar-location-entry
[Xfce4-commits] r29920 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-30 13:07:11 + (Thu, 30 Apr 2009) New Revision: 29920 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-util.c thunar/branches/migration-to-gio/thunar/thunar-util.h Log: * thunar/thunar-util.{c,h}: Replace ThunarVfsFileTime with guint64. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-30 13:04:36 UTC (rev 29919) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-30 13:07:11 UTC (rev 29920) @@ -1,5 +1,9 @@ 2009-04-30 Jannis Pohlmann + * thunar/thunar-util.{c,h}: Replace ThunarVfsFileTime with guint64. + +2009-04-30 Jannis Pohlmann + * thunar/thunar-file.{c,h}, thunar/thunar-properties-dialog.c: Re-implement thunar_file_get_volume() around g_file_find_enclosing_mount(). Ideally this would be asynchronous Modified: thunar/branches/migration-to-gio/thunar/thunar-util.c === --- thunar/branches/migration-to-gio/thunar/thunar-util.c 2009-04-30 13:04:36 UTC (rev 29919) +++ thunar/branches/migration-to-gio/thunar/thunar-util.c 2009-04-30 13:07:11 UTC (rev 29920) @@ -158,7 +158,7 @@ /** * thunar_util_humanize_file_time: - * @file_time : a #ThunarVfsFileTime. + * @file_time : a #guint64 timestamp. * @date_format : the #ThunarDateFormat used to humanize the @file_time. * * Returns a human readable date representation of the specified @@ -169,8 +169,8 @@ * according to the @date_format. **/ gchar* -thunar_util_humanize_file_time (ThunarVfsFileTime file_time, -ThunarDateStyle date_style) +thunar_util_humanize_file_time (guint64 file_time, +ThunarDateStyle date_style) { const gchar *date_format; struct tm *tfile; Modified: thunar/branches/migration-to-gio/thunar/thunar-util.h === --- thunar/branches/migration-to-gio/thunar/thunar-util.h 2009-04-30 13:04:36 UTC (rev 29919) +++ thunar/branches/migration-to-gio/thunar/thunar-util.h 2009-04-30 13:07:11 UTC (rev 29920) @@ -21,24 +21,22 @@ #ifndef __THUNAR_UTIL_H__ #define __THUNAR_UTIL_H__ -#include - #include G_BEGIN_DECLS; gboolean thunar_util_looks_like_an_uri (const gchar *string) G_GNUC_INTERNAL G_GNUC_WARN_UNUSED_RESULT; -gchar *thunar_util_expand_filename(const gchar *filename, - GError **error); +gchar *thunar_util_expand_filename(const gchar*filename, + GError**error); -gchar *thunar_util_humanize_file_time (ThunarVfsFileTime file_time, - ThunarDateStyle date_style) G_GNUC_INTERNAL G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; +gchar *thunar_util_humanize_file_time (guint64 file_time, + ThunarDateStyle date_style) G_GNUC_INTERNAL G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; -GdkScreen *thunar_util_parse_parent (gpointer parent, - GtkWindow **window_return) G_GNUC_INTERNAL G_GNUC_WARN_UNUSED_RESULT; +GdkScreen *thunar_util_parse_parent (gpointerparent, + GtkWindow **window_return) G_GNUC_INTERNAL G_GNUC_WARN_UNUSED_RESULT; -time_t thunar_util_time_from_rfc3339 (const gchar *date_string) G_GNUC_INTERNAL G_GNUC_WARN_UNUSED_RESULT; +time_t thunar_util_time_from_rfc3339 (const gchar*date_string) G_GNUC_INTERNAL G_GNUC_WARN_UNUSED_RESULT; G_END_DECLS; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r29921 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-04-30 13:52:42 + (Thu, 30 Apr 2009) New Revision: 29921 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-abstract-icon-view.c thunar/branches/migration-to-gio/thunar/thunar-debug.c thunar/branches/migration-to-gio/thunar/thunar-details-view.c thunar/branches/migration-to-gio/thunar/thunar-dialogs.c thunar/branches/migration-to-gio/thunar/thunar-file.h thunar/branches/migration-to-gio/thunar/thunar-gtk-extensions.c thunar/branches/migration-to-gio/thunar/thunar-path-entry.c thunar/branches/migration-to-gio/thunar/thunar-preferences-dialog.c thunar/branches/migration-to-gio/thunar/thunar-standard-view.c thunar/branches/migration-to-gio/thunar/thunar-templates-action.c thunar/branches/migration-to-gio/thunar/thunar-text-renderer.c thunar/branches/migration-to-gio/thunar/thunar-tree-view.c thunar/branches/migration-to-gio/thunar/thunar-util.c thunar/branches/migration-to-gio/thunar/thunar-util.h thunar/branches/migration-to-gio/thunar/thunar-window.c Log: * thunar/*.c: Remove all occurances of GLIB_CHECK_VERSION() and GTK_CHECK_VERSION() because we depend on much more recent GLib/GTK+ versions now anyway. * thunar/thnuar-file.{c,h}, thunar/thunar-util.{c,h}: Actually, time_t instead of guint64 is the correct type to use (fixes the previous commit). * thunar/thunar-window.c: Implement thunar_window_directory_destroy() around g_file_find_enclosing_mount(). I'm not 100% happy with this implementation but it'll do for now. Open the home directory if the new directory cannot be determined. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-30 13:07:11 UTC (rev 29920) +++ thunar/branches/migration-to-gio/ChangeLog 2009-04-30 13:52:42 UTC (rev 29921) @@ -1,5 +1,18 @@ 2009-04-30 Jannis Pohlmann + * thunar/*.c: Remove all occurances of GLIB_CHECK_VERSION() and + GTK_CHECK_VERSION() because we depend on much more recent GLib/GTK+ + versions now anyway. + * thunar/thnuar-file.{c,h}, thunar/thunar-util.{c,h}: Actually, time_t + instead of guint64 is the correct type to use (fixes the previous + commit). + * thunar/thunar-window.c: Implement thunar_window_directory_destroy() + around g_file_find_enclosing_mount(). I'm not 100% happy with this + implementation but it'll do for now. Open the home directory if the + new directory cannot be determined. + +2009-04-30 Jannis Pohlmann + * thunar/thunar-util.{c,h}: Replace ThunarVfsFileTime with guint64. 2009-04-30 Jannis Pohlmann Modified: thunar/branches/migration-to-gio/thunar/thunar-abstract-icon-view.c === --- thunar/branches/migration-to-gio/thunar/thunar-abstract-icon-view.c 2009-04-30 13:07:11 UTC (rev 29920) +++ thunar/branches/migration-to-gio/thunar/thunar-abstract-icon-view.c 2009-04-30 13:52:42 UTC (rev 29921) @@ -642,10 +642,8 @@ GtkAction *action = NULL; GdkPixbuf *stock_icon = NULL; gchar *stock_id; -#if GTK_CHECK_VERSION(2,7,1) GdkColorbg; cairo_t*cr; -#endif _thunar_return_val_if_fail (EXO_IS_ICON_VIEW (view), FALSE); _thunar_return_val_if_fail (THUNAR_IS_ABSTRACT_ICON_VIEW (abstract_icon_view), FALSE); @@ -654,7 +652,6 @@ _thunar_return_val_if_fail (abstract_icon_view->priv->gesture_release_id > 0, FALSE); /* shade the abstract_icon view content while performing mouse gestures */ -#if GTK_CHECK_VERSION(2,7,1) cr = gdk_cairo_create (event->window); bg = GTK_WIDGET (view)->style->base[GTK_STATE_NORMAL]; cairo_set_source_rgba (cr, bg.red / 65535.0, bg.green / 65535.0, bg.blue / 65535.0, 0.7); @@ -662,7 +659,6 @@ cairo_clip (cr); cairo_paint (cr); cairo_destroy (cr); -#endif /* determine the gesture action */ action = thunar_abstract_icon_view_gesture_action (abstract_icon_view); Modified: thunar/branches/migration-to-gio/thunar/thunar-debug.c === --- thunar/branches/migration-to-gio/thunar/thunar-debug.c 2009-04-30 13:07:11 UTC (rev 29920) +++ thunar/branches/migration-to-gio/thunar/thunar-debug.c 2009-04-30 13:52:42 UTC (rev 29921) @@ -30,11 +30,7 @@ #include -#if GLIB_CHECK_VERSION(2,8,0) #include -#else -#define g_access(filename, mode) access((filename),(mode)) -#endif Modified: thunar/branches/migration-to-gio/thunar/thunar-details-view.c === --- thunar/branches/migration-to-gio/thunar/thunar-details-view.c 2009-04-30 13:07:11 UTC (rev 29920) +++ thunar/branches/migrati
[Xfce4-commits] r29922 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-05-01 00:14:51 + (Fri, 01 May 2009) New Revision: 29922 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c thunar/branches/migration-to-gio/thunar/thunar-file.h thunar/branches/migration-to-gio/thunar/thunar-launcher.c thunar/branches/migration-to-gio/thunar/thunar-standard-view.c thunar/branches/migration-to-gio/thunar/thunar-util.c thunar/branches/migration-to-gio/thunar/thunar-util.h Log: * thunar/thunar-file.{c,h}, thnuar/thunar-standard-view.c, thunar/thunar-util.{c,h}: Do it right this time by using guint64 and GFileInfo instead of the ThunarVfsMimeInfo to determine the access/changed/modified time. Update thunar_util_humanize_file_time() to reflect this. * thunar/thunar-standard-view.c: Rewrite tsv_reload_directory() based on GFileMonitor. * thunar/thunar-launcher.c: Use GVolumeMonitor/GVolume for the volume send-to actions. Another class free of ThunarVFS. * thunar/thunar-file.{c,h}, thunar/thunar-util.{c,h}: Do it right this time by using guint64 and GFileInfo instead of the ThunarVfsMimeInfo to determine the access/changed/modified time. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-04-30 13:52:42 UTC (rev 29921) +++ thunar/branches/migration-to-gio/ChangeLog 2009-05-01 00:14:51 UTC (rev 29922) @@ -1,5 +1,23 @@ +2009-05-01 Jannis Pohlmann + + * thunar/thunar-file.{c,h}, thnuar/thunar-standard-view.c, + thunar/thunar-util.{c,h}: Do it right this time by using guint64 and + GFileInfo instead of the ThunarVfsMimeInfo to determine the + access/changed/modified time. Update + thunar_util_humanize_file_time() to reflect this. + * thunar/thunar-standard-view.c: Rewrite tsv_reload_directory() + based on GFileMonitor. + * thunar/thunar-launcher.c: Use GVolumeMonitor/GVolume for the volume + send-to actions. Another class free of ThunarVFS. + 2009-04-30 Jannis Pohlmann + * thunar/thunar-file.{c,h}, thunar/thunar-util.{c,h}: Do it right this + time by using guint64 and GFileInfo instead of the ThunarVfsMimeInfo + to determine the access/changed/modified time. + +2009-04-30 Jannis Pohlmann + * thunar/*.c: Remove all occurances of GLIB_CHECK_VERSION() and GTK_CHECK_VERSION() because we depend on much more recent GLib/GTK+ versions now anyway. Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-04-30 13:52:42 UTC (rev 29921) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-05-01 00:14:51 UTC (rev 29922) @@ -1285,21 +1285,31 @@ * * Return value: the time for @file of the given @date_type. **/ -ThunarVfsFileTime +guint64 thunar_file_get_date (const ThunarFile *file, ThunarFileDateType date_type) { + const gchar *attribute; + _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE); + _thunar_return_val_if_fail (G_IS_FILE_INFO (file->ginfo), FALSE); switch (date_type) { -case THUNAR_FILE_DATE_ACCESSED: return file->info->atime; -case THUNAR_FILE_DATE_CHANGED: return file->info->ctime; -case THUNAR_FILE_DATE_MODIFIED: return file->info->mtime; -default:_thunar_assert_not_reached (); +case THUNAR_FILE_DATE_ACCESSED: + attribute = G_FILE_ATTRIBUTE_TIME_ACCESS; + break; +case THUNAR_FILE_DATE_CHANGED: + attribute = G_FILE_ATTRIBUTE_TIME_CHANGED; + break; +case THUNAR_FILE_DATE_MODIFIED: + attribute = G_FILE_ATTRIBUTE_TIME_MODIFIED; + break; +default: + _thunar_assert_not_reached (); } - return (ThunarVfsFileTime) -1; + return g_file_info_get_attribute_uint64 (file->ginfo, attribute); } Modified: thunar/branches/migration-to-gio/thunar/thunar-file.h === --- thunar/branches/migration-to-gio/thunar/thunar-file.h 2009-04-30 13:52:42 UTC (rev 29921) +++ thunar/branches/migration-to-gio/thunar/thunar-file.h 2009-05-01 00:14:51 UTC (rev 29922) @@ -156,7 +156,7 @@ const gchar *thunar_file_get_display_name (const ThunarFile *file); -time_tthunar_file_get_date (const ThunarFile *file, +guint64 thunar_file_get_date (const ThunarFile *file, ThunarFileDateType date_type); gchar*thunar_file_get_date_string (const ThunarFile *file, Modified: thunar/branches
[Xfce4-commits] r29923 - thunar/branches/migration-to-gio
Author: jannis Date: 2009-05-01 00:20:23 + (Fri, 01 May 2009) New Revision: 29923 Modified: thunar/branches/migration-to-gio/ChangeLog Log: Erm, yeah. Remove duplicate ChangeLog entry. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-05-01 00:14:51 UTC (rev 29922) +++ thunar/branches/migration-to-gio/ChangeLog 2009-05-01 00:20:23 UTC (rev 29923) @@ -12,12 +12,6 @@ 2009-04-30 Jannis Pohlmann - * thunar/thunar-file.{c,h}, thunar/thunar-util.{c,h}: Do it right this - time by using guint64 and GFileInfo instead of the ThunarVfsMimeInfo - to determine the access/changed/modified time. - -2009-04-30 Jannis Pohlmann - * thunar/*.c: Remove all occurances of GLIB_CHECK_VERSION() and GTK_CHECK_VERSION() because we depend on much more recent GLib/GTK+ versions now anyway. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r29927 - in libexo/trunk: . docs/reference docs/reference/tmpl exo
Author: jannis Date: 2009-05-05 21:39:22 + (Tue, 05 May 2009) New Revision: 29927 Added: libexo/trunk/docs/reference/tmpl/exo-job.sgml libexo/trunk/docs/reference/tmpl/exo-simple-job.sgml Modified: libexo/trunk/ChangeLog libexo/trunk/configure.in.in libexo/trunk/docs/reference/exo-docs.sgml libexo/trunk/docs/reference/exo-sections.txt libexo/trunk/exo/exo-job.c libexo/trunk/exo/exo-simple-job.c Log: * configure.in.in: Add hint that we'll need to update library version information before the next release, due to the added APIs. * docs/reference/exo-docs.sgml, docs/reference/tmpl/exo-simple-job.sgml, docs/reference/tmpl/exo-job.sgml, docs/reference/exo-sections.txt: Add new section for ExoJob and ExoSimpleJob. * exo/exo-job.c, exo/exo-simple-job.c: Improve the API documentation and associate class methods with the signals of ExoJob. They come from Thunar and can be used to wrap threaded/asynchronous operations with objects that support signals and subclassing. Modified: libexo/trunk/ChangeLog === --- libexo/trunk/ChangeLog 2009-05-05 20:07:22 UTC (rev 29926) +++ libexo/trunk/ChangeLog 2009-05-05 21:39:22 UTC (rev 29927) @@ -1,9 +1,20 @@ 2009-05-05 Jannis Pohlmann + * configure.in.in: Add hint that we'll need to update library version + information before the next release, due to the added APIs. + * docs/reference/exo-docs.sgml, + docs/reference/tmpl/exo-simple-job.sgml, + docs/reference/tmpl/exo-job.sgml, docs/reference/exo-sections.txt: + Add new section for ExoJob and ExoSimpleJob. + * exo/exo-job.c, exo/exo-simple-job.c: Improve the API documentation + and associate class methods with the signals of ExoJob. + +2009-05-05 Jannis Pohlmann + * docs/reference/exo.types, exo/Makefile.am, exo/exo-job.{c,h}, exo/exo-simple-job.{c,h}, exo/exo.h: Add ExoJob and ExoSimpleJob. - They come from Thunar and can be used to wrap threaded/asynchronous - operations with objects that support signals and subclassing. + They come from Thunar and can be used to wrap threaded/asynchronous + operations with objects that support signals and subclassing. 2009-04-13 Jannis Pohlmann Modified: libexo/trunk/configure.in.in === --- libexo/trunk/configure.in.in2009-05-05 20:07:22 UTC (rev 29926) +++ libexo/trunk/configure.in.in2009-05-05 21:39:22 UTC (rev 29927) @@ -9,7 +9,7 @@ dnl *** dnl *** Version information *** dnl *** -m4_define([libexo_verinfo], [5:0:5]) +m4_define([libexo_verinfo], [5:0:5]) dnl Needs to be set to [6:0:6] before the next release! m4_define([libexo_version_major], [0]) m4_define([libexo_version_minor], [3]) m4_define([libexo_version_micro], [101]) Modified: libexo/trunk/docs/reference/exo-docs.sgml === --- libexo/trunk/docs/reference/exo-docs.sgml 2009-05-05 20:07:22 UTC (rev 29926) +++ libexo/trunk/docs/reference/exo-docs.sgml 2009-05-05 21:39:22 UTC (rev 29927) @@ -12,6 +12,8 @@ + + @@ -50,6 +52,11 @@ os-cillation e.K. + + 2009 + Xfce Development Team + + Permission is granted to copy, distribute and/or modify this document @@ -72,6 +79,13 @@ Software developer + +Jannis + Pohlmann + + jan...@xfce.org + + @@ -254,6 +268,22 @@ &exo-cell-renderer-icon; + +Framework for threaded/asynchronous jobs + + + ExoJob provides a simple way to deal with threaded/asynchronous operations (called jobs here). + It can be used to wrap any kind of blocking function calls like file operations or web service communication. It can be + subclassed to add additional signals for progress information or password requests. + ExoSimpleJob is useful in situations where you don't need additional signals. It takes + a ExoSimpleJobFunc callback and creates a job so one doesn't have to subclass + ExoJob just to execute a single function asynchronously. + + +&exo-job; +&exo-simple-job; + + Extensions to existing frameworks Modified: libexo/trunk/docs/reference/exo-sections.txt === --- libexo/trunk/docs/reference/exo-sections.txt2009-05-05 20:07:22 UTC (rev 29926) +++ libexo/trunk/docs/reference/exo-sections.txt2009-05-05 21:39:22 UTC (rev 29927) @@ -327,6 +327,53 @@ +exo-job +ExoJob +ExoJob +exo_job_launch +exo_
[Xfce4-commits] r29929 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-05-07 16:42:51 + (Thu, 07 May 2009) New Revision: 29929 Added: thunar/branches/migration-to-gio/thunar/thunar-misc-jobs.c thunar/branches/migration-to-gio/thunar/thunar-misc-jobs.h Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/Makefile.am thunar/branches/migration-to-gio/thunar/thunar-create-dialog.h thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.h thunar/branches/migration-to-gio/thunar/thunar-standard-view.c thunar/branches/migration-to-gio/thunar/thunar-templates-action.c Log: * Makefile.am, thunar/thunar-misc-jobs.{c,h}: Add new file for miscellaneous jobs. Add new job thunar_misc_jobs_load_template_files() which recursively loads all template files/directories as ThunarFile objects from G_USER_DIRECTORY_TEMPLATES. * thunar/thunar-gio-extensions.{c,h}: Add new method g_file_new_for_user_special_dir() which creates a GFile for a GUserDirectory and falls back to $HOME (so it's ignored later) if the special dir is not set. * thunar/thunar-create-dialog.h, thunar/thunar-standard-view.c, thunar/thunar-templates-action.c: Migrate ThunarTemplatesAction away from ThunarVFS. Use ThunarFile instead of ThunarVfsInfo for the "create-template" signal. Load the templates menu using thunar_misc_jobs_load_template_files(). Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-05-05 22:12:08 UTC (rev 29928) +++ thunar/branches/migration-to-gio/ChangeLog 2009-05-07 16:42:51 UTC (rev 29929) @@ -1,3 +1,20 @@ +2009-05-07 Jannis Pohlmann + + * Makefile.am, thunar/thunar-misc-jobs.{c,h}: Add new file for + miscellaneous jobs. Add new job + thunar_misc_jobs_load_template_files() which recursively loads all + template files/directories as ThunarFile objects from + G_USER_DIRECTORY_TEMPLATES. + * thunar/thunar-gio-extensions.{c,h}: Add new method + g_file_new_for_user_special_dir() which creates a GFile for a + GUserDirectory and falls back to $HOME (so it's ignored later) if + the special dir is not set. + * thunar/thunar-create-dialog.h, thunar/thunar-standard-view.c, + thunar/thunar-templates-action.c: Migrate ThunarTemplatesAction away + from ThunarVFS. Use ThunarFile instead of ThunarVfsInfo for the + "create-template" signal. Load the templates menu using + thunar_misc_jobs_load_template_files(). + 2009-05-05 Jannis Pohlmann * configure.in.in: Depend on exo-0.3.101svn-r29926 for ExoJob. Modified: thunar/branches/migration-to-gio/thunar/Makefile.am === --- thunar/branches/migration-to-gio/thunar/Makefile.am 2009-05-05 22:12:08 UTC (rev 29928) +++ thunar/branches/migration-to-gio/thunar/Makefile.am 2009-05-07 16:42:51 UTC (rev 29929) @@ -122,6 +122,8 @@ thunar-location-entry.h \ thunar-metafile.c \ thunar-metafile.h \ + thunar-misc-jobs.c \ + thunar-misc-jobs.h \ thunar-navigator.c \ thunar-navigator.h \ thunar-pango-extensions.c \ Modified: thunar/branches/migration-to-gio/thunar/thunar-create-dialog.h === --- thunar/branches/migration-to-gio/thunar/thunar-create-dialog.h 2009-05-05 22:12:08 UTC (rev 29928) +++ thunar/branches/migration-to-gio/thunar/thunar-create-dialog.h 2009-05-07 16:42:51 UTC (rev 29929) @@ -21,7 +21,7 @@ #ifndef __THUNAR_CREATE_DIALOG_H__ #define __THUNAR_CREATE_DIALOG_H__ -#include +#include G_BEGIN_DECLS; Modified: thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c === --- thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c 2009-05-05 22:12:08 UTC (rev 29928) +++ thunar/branches/migration-to-gio/thunar/thunar-gio-extensions.c 2009-05-07 16:42:51 UTC (rev 29929) @@ -63,6 +63,22 @@ +GFile * +g_file_new_for_user_special_dir (GUserDirectory dir) +{ + const gchar *path; + + _thunar_return_val_if_fail (dir >= 0 && dir < G_USER_N_DIRECTORIES, NULL); + + path = g_get_user_special_dir (dir); + if (path == NULL) +path = xfce_get_homed
[Xfce4-commits] r29948 - in libexo/trunk: . docs/reference docs/reference/tmpl exo
Author: jannis Date: 2009-05-11 22:48:08 + (Mon, 11 May 2009) New Revision: 29948 Modified: libexo/trunk/ChangeLog libexo/trunk/docs/reference/exo-open.xml libexo/trunk/docs/reference/exo-sections.txt libexo/trunk/docs/reference/tmpl/exo-job.sgml libexo/trunk/exo/exo-job.c libexo/trunk/exo/exo-job.h Log: * docs/reference/exo-sections.txt, docs/reference/tmpl/exo-job.sgml: Update sections. * docs/reference/exo-open.xml: Fix typo spotted by Yves-Alexis. * exo/exo-job.{c,h}: Add new function exo_job_send_to_mainloop() which is a simple wrapper around g_io_scheduler_job_send_to_mainloop(). I don't want to expose any the GIO scheduling internals. Modified: libexo/trunk/ChangeLog === --- libexo/trunk/ChangeLog 2009-05-11 21:38:30 UTC (rev 29947) +++ libexo/trunk/ChangeLog 2009-05-11 22:48:08 UTC (rev 29948) @@ -1,3 +1,12 @@ +2009-05-12 Jannis Pohlmann + + * docs/reference/exo-sections.txt, docs/reference/tmpl/exo-job.sgml: + Update sections. + * docs/reference/exo-open.xml: Fix typo spotted by Yves-Alexis. + * exo/exo-job.{c,h}: Add new function exo_job_send_to_mainloop() which + is a simple wrapper around g_io_scheduler_job_send_to_mainloop(). I + don't want to expose any the GIO scheduling internals. + 2009-05-11 Nick Schermer * exo/exo-job.c, exo/exo-cell-renderer-icon.c: Fix compiler warnings. Modified: libexo/trunk/docs/reference/exo-open.xml === --- libexo/trunk/docs/reference/exo-open.xml2009-05-11 21:38:30 UTC (rev 29947) +++ libexo/trunk/docs/reference/exo-open.xml2009-05-11 22:48:08 UTC (rev 29948) @@ -73,7 +73,7 @@ When using the --launch option and this option is specified as well, the application will - be run in the given directory. This is primarly useful when running the preferred + be run in the given directory. This is primarily useful when running the preferred TerminalEmulator from another application and you want the command in the terminal window to be run in a specific directory. Modified: libexo/trunk/docs/reference/exo-sections.txt === --- libexo/trunk/docs/reference/exo-sections.txt2009-05-11 21:38:30 UTC (rev 29947) +++ libexo/trunk/docs/reference/exo-sections.txt2009-05-11 22:48:08 UTC (rev 29948) @@ -338,6 +338,7 @@ exo_job_emit exo_job_info_message exo_job_percent +exo_job_send_to_mainloop ExoJobPrivate ExoJobClass Modified: libexo/trunk/docs/reference/tmpl/exo-job.sgml === --- libexo/trunk/docs/reference/tmpl/exo-job.sgml 2009-05-11 21:38:30 UTC (rev 29947) +++ libexo/trunk/docs/reference/tmpl/exo-job.sgml 2009-05-11 22:48:08 UTC (rev 29948) @@ -138,3 +138,15 @@ @percent: + + + + + +...@job: +...@func: +...@user_data: +...@destroy_notify: +...@returns: + + Modified: libexo/trunk/exo/exo-job.c === --- libexo/trunk/exo/exo-job.c 2009-05-11 21:38:30 UTC (rev 29947) +++ libexo/trunk/exo/exo-job.c 2009-05-11 22:48:08 UTC (rev 29948) @@ -631,3 +631,17 @@ exo_job_emit (job, job_signals[PERCENT], 0, percent); } + + + +gboolean +exo_job_send_to_mainloop (ExoJob*job, + GSourceFuncfunc, + gpointer user_data, + GDestroyNotify destroy_notify) +{ + _exo_return_val_if_fail (EXO_IS_JOB (job), FALSE); + + return g_io_scheduler_job_send_to_mainloop (job->priv->scheduler_job, func, user_data, + destroy_notify); +} Modified: libexo/trunk/exo/exo-job.h === --- libexo/trunk/exo/exo-job.h 2009-05-11 21:38:30 UTC (rev 29947) +++ libexo/trunk/exo/exo-job.h 2009-05-11 22:48:08 UTC (rev 29948) @@ -68,21 +68,25 @@ GType exo_job_get_type (void) G_GNUC_CONST; -ExoJob *exo_job_launch (ExoJob *job); -voidexo_job_cancel (ExoJob *job); -gbooleanexo_job_is_cancelled (const ExoJob *job); -GCancellable *exo_job_get_cancellable(const ExoJob *job); -gbooleanexo_job_set_error_if_cancelled (ExoJob *job, -GError **error); -voidexo_job_emit (ExoJob *job, -guint signal_id, -GQuarksignal_detail, +ExoJob
[Xfce4-commits] r29949 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-05-11 23:23:08 + (Mon, 11 May 2009) New Revision: 29949 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/configure.in.in thunar/branches/migration-to-gio/thunar/thunar-dialogs.c thunar/branches/migration-to-gio/thunar/thunar-dialogs.h thunar/branches/migration-to-gio/thunar/thunar-file.c thunar/branches/migration-to-gio/thunar/thunar-file.h thunar/branches/migration-to-gio/thunar/thunar-io-jobs.c thunar/branches/migration-to-gio/thunar/thunar-io-jobs.h thunar/branches/migration-to-gio/thunar/thunar-properties-dialog.c thunar/branches/migration-to-gio/thunar/thunar-renamer-progress.c thunar/branches/migration-to-gio/thunar/thunar-simple-job.c thunar/branches/migration-to-gio/thunar/thunar-simple-job.h thunar/branches/migration-to-gio/thunar/thunar-standard-view.c thunar/branches/migration-to-gio/thunar/thunar-tree-view.c Log: * configure.in.in: Depend on libexo-0.3.101svn-r29948 for exo_job_send_to_mainloop(). * thunar/thunar-dialogs.{c,h}, thunar/thunar-io-jobs.{c,h}, thunar/thunar-dialogs.{c,h}, thunar/thunar-properties-dialog.c, thunar/thunar-standard-view.c, thunar/thunar-tree-view.c: Add new simple job thunar_io_jobs_rename_file() which renames a ThunarFile asynchronously. Make us of it in thunar_dialogs_show_rename_file() which now launches and returns the rename job instead of calling thunar_file_rename() directly. Update ThunarPropertiesDialog, ThunarStandardView and ThunarTreeView to handle the error/finished signals and destroy the job when it's finished. * thunar/thunar-file.{c,h}: Add a GCancellable parameter and a boolean parameter called "called_from_job". The latter is used to disable the thunarx_file_info_renamed() and thunar_file_changed() calls. The rename job is responsible to call these in the mainloop of the application after the rename has succeeded. * thunar/thunar-simple-job.{c,h}: Add new function thunar_simple_job_get_param_values() which returns the GValueArray created from the parameters passed to thunar_simple_job_launch(). Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-05-11 22:48:08 UTC (rev 29948) +++ thunar/branches/migration-to-gio/ChangeLog 2009-05-11 23:23:08 UTC (rev 29949) @@ -1,3 +1,25 @@ +2009-05-12 Jannis Pohlmann + + * configure.in.in: Depend on libexo-0.3.101svn-r29948 for + exo_job_send_to_mainloop(). + * thunar/thunar-dialogs.{c,h}, thunar/thunar-io-jobs.{c,h}, + thunar/thunar-dialogs.{c,h}, thunar/thunar-properties-dialog.c, + thunar/thunar-standard-view.c, thunar/thunar-tree-view.c: Add new + simple job thunar_io_jobs_rename_file() which renames a ThunarFile + asynchronously. Make us of it in thunar_dialogs_show_rename_file() + which now launches and returns the rename job instead of calling + thunar_file_rename() directly. Update ThunarPropertiesDialog, + ThunarStandardView and ThunarTreeView to handle the error/finished + signals and destroy the job when it's finished. + * thunar/thunar-file.{c,h}: Add a GCancellable parameter and a boolean + parameter called "called_from_job". The latter is used to disable + the thunarx_file_info_renamed() and thunar_file_changed() calls. The + rename job is responsible to call these in the mainloop of the + application after the rename has succeeded. + * thunar/thunar-simple-job.{c,h}: Add new function + thunar_simple_job_get_param_values() which returns the GValueArray + created from the parameters passed to thunar_simple_job_launch(). + 2009-05-11 Jannis Pohlmann * thunar/Makefile.am, thunar/thunar-exec.{c,h}: Import thunar_exec_*() Modified: thunar/branches/migration-to-gio/configure.in.in === --- thunar/branches/migration-to-gio/configure.in.in2009-05-11 22:48:08 UTC (rev 29948) +++ thunar/branches/migration-to-gio/configure.in.in2009-05-11 23:23:08 UTC (rev 29949) @@ -159,7 +159,7 @@ dnl *** dnl *** Check for required packages *** dnl *** -XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.101svn-r29926]) +XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.101svn-r29948]) XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.16.0]) XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.16.0]) XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.16.0]) Modified: thunar/branches/migration-to-gio/thunar/thunar-dialogs.c === --- thunar/branches/migration-
[Xfce4-commits] r29955 - libexo/branches
Author: jannis Date: 2009-05-14 14:24:16 + (Thu, 14 May 2009) New Revision: 29955 Added: libexo/branches/exo-thumbnailers/ Log: Create branch exo-thumbnailers ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r29956 - in libexo/trunk: . exo-thumbnailers
Author: jannis Date: 2009-05-14 14:42:26 + (Thu, 14 May 2009) New Revision: 29956 Added: libexo/trunk/exo-thumbnailers/ libexo/trunk/exo-thumbnailers/Makefile.am libexo/trunk/exo-thumbnailers/exo-generic-thumbnailer.c libexo/trunk/exo-thumbnailers/exo-generic-thumbnailer.h libexo/trunk/exo-thumbnailers/exo-thumbnailer-service-dbus.xml libexo/trunk/exo-thumbnailers/exo-thumbnailer-service-main.c libexo/trunk/exo-thumbnailers/exo-thumbnailer-service.c libexo/trunk/exo-thumbnailers/exo-thumbnailer-service.h libexo/trunk/exo-thumbnailers/org.xfce.ExoThumbnailer.service.in Modified: libexo/trunk/AUTHORS libexo/trunk/ChangeLog libexo/trunk/Makefile.am libexo/trunk/configure.in.in Log: * configure.in.in, Makefile.am, exo-thumbnailers/Makefile.am, exo-thumbnailers/exo-generic-thumbnailer.{c,h}, exo-thumbnailers/exo-thumbnailer-service-dbus.xml, exo-thumbnailers/exu-thumbnailer-service-main.c, exo-thumbnailers/exo-thumbnailer-service.{c,h}: Initial import of a raw skeleton for the implementation of the Thumbnailer Specification. ExoGenericThumbnailer implements org.freedesktop.thumbnailer.Generic and ExoThumbnailerService is the D-Bus service that establishes the D-Bus connection and makes sure the thumbnailer service always runs only once. There seems to be something wrong right now, though. I can't get the service to be recognized by D-Bus properly at all ... Modified: libexo/trunk/AUTHORS === --- libexo/trunk/AUTHORS2009-05-14 14:24:16 UTC (rev 29955) +++ libexo/trunk/AUTHORS2009-05-14 14:42:26 UTC (rev 29956) @@ -1,4 +1,5 @@ Benedikt Meurer +Jannis Pohlmann Parts of this library are based on code from libegg, Gtk+, the GNOME project and the ROX Filer. Modified: libexo/trunk/ChangeLog === --- libexo/trunk/ChangeLog 2009-05-14 14:24:16 UTC (rev 29955) +++ libexo/trunk/ChangeLog 2009-05-14 14:42:26 UTC (rev 29956) @@ -1,3 +1,17 @@ +2009-05-14 Jannis Pohlmann + + * configure.in.in, Makefile.am, exo-thumbnailers/Makefile.am, + exo-thumbnailers/exo-generic-thumbnailer.{c,h}, + exo-thumbnailers/exo-thumbnailer-service-dbus.xml, + exo-thumbnailers/exu-thumbnailer-service-main.c, + exo-thumbnailers/exo-thumbnailer-service.{c,h}: Initial import of a + raw skeleton for the implementation of the Thumbnailer Specification. + ExoGenericThumbnailer implements org.freedesktop.thumbnailer.Generic and + ExoThumbnailerService is the D-Bus service that establishes the D-Bus + connection and makes sure the thumbnailer service always runs only once. + There seems to be something wrong right now, though. I can't get the + service to be recognized by D-Bus properly at all ... + 2009-05-12 Jannis Pohlmann * docs/reference/exo-sections.txt, docs/reference/tmpl/exo-job.sgml: Modified: libexo/trunk/Makefile.am === --- libexo/trunk/Makefile.am2009-05-14 14:24:16 UTC (rev 29955) +++ libexo/trunk/Makefile.am2009-05-14 14:42:26 UTC (rev 29956) @@ -18,6 +18,7 @@ exo-mount \ $(EXO_MOUNT_NOTIFY_SUBDIR) \ exo-open\ + exo-thumbnailers\ docs\ icons \ pixmaps \ Modified: libexo/trunk/configure.in.in === --- libexo/trunk/configure.in.in2009-05-14 14:24:16 UTC (rev 29955) +++ libexo/trunk/configure.in.in2009-05-14 14:42:26 UTC (rev 29956) @@ -146,6 +146,8 @@ dnl *** dnl *** Check for required packages *** dnl *** +XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.0.0]) +XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.72]) XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.16.0]) XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.16.0]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0]) @@ -426,6 +428,7 @@ exo-mount-notify/Makefile exo-open/Makefile exo-support/Makefile +exo-thumbnailers/Makefile icons/Makefile icons/24x24/Makefile icons/48x48/Makefile Added: libexo/trunk/exo-thumbnailers/Makefile.am === --- libexo/trunk/exo-thumbnailers/Makefile.am (rev 0) +++ libexo/trunk/exo-thumbnailers/Makefile.am 2009-05-14 14:42:2
[Xfce4-commits] r29957 - in libexo/branches/exo-thumbnailers: . docs/manual/es docs/manual/id docs/manual/it docs/manual/pt_BR docs/manual/tr exo-thumbnailers
Author: jannis Date: 2009-05-14 14:58:16 + (Thu, 14 May 2009) New Revision: 29957 Added: libexo/branches/exo-thumbnailers/exo-thumbnailers/ libexo/branches/exo-thumbnailers/exo-thumbnailers/Makefile.am libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-generic-thumbnailer.c libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-generic-thumbnailer.h libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-thumbnailer-service-dbus.xml libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-thumbnailer-service-main.c libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-thumbnailer-service.c libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-thumbnailer-service.h libexo/branches/exo-thumbnailers/exo-thumbnailers/org.xfce.ExoThumbnailer.service.in Removed: libexo/branches/exo-thumbnailers/exo-thumbnailers/Makefile.am libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-generic-thumbnailer.c libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-generic-thumbnailer.h libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-thumbnailer-service-dbus.xml libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-thumbnailer-service-main.c libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-thumbnailer-service.c libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-thumbnailer-service.h libexo/branches/exo-thumbnailers/exo-thumbnailers/org.xfce.ExoThumbnailer.service.in Modified: libexo/branches/exo-thumbnailers/ libexo/branches/exo-thumbnailers/AUTHORS libexo/branches/exo-thumbnailers/ChangeLog libexo/branches/exo-thumbnailers/Makefile.am libexo/branches/exo-thumbnailers/configure.in.in libexo/branches/exo-thumbnailers/docs/manual/es/ libexo/branches/exo-thumbnailers/docs/manual/id/ libexo/branches/exo-thumbnailers/docs/manual/it/ libexo/branches/exo-thumbnailers/docs/manual/pt_BR/ libexo/branches/exo-thumbnailers/docs/manual/tr/ Log: Err. I really want this in the branch, not in trunk. Property changes on: libexo/branches/exo-thumbnailers ___ Added: svn:mergeinfo + /libexo/trunk:29956 Modified: libexo/branches/exo-thumbnailers/AUTHORS === --- libexo/branches/exo-thumbnailers/AUTHORS2009-05-14 14:42:26 UTC (rev 29956) +++ libexo/branches/exo-thumbnailers/AUTHORS2009-05-14 14:58:16 UTC (rev 29957) @@ -1,4 +1,5 @@ Benedikt Meurer +Jannis Pohlmann Parts of this library are based on code from libegg, Gtk+, the GNOME project and the ROX Filer. Modified: libexo/branches/exo-thumbnailers/ChangeLog === --- libexo/branches/exo-thumbnailers/ChangeLog 2009-05-14 14:42:26 UTC (rev 29956) +++ libexo/branches/exo-thumbnailers/ChangeLog 2009-05-14 14:58:16 UTC (rev 29957) @@ -1,3 +1,17 @@ +2009-05-14 Jannis Pohlmann + + * configure.in.in, Makefile.am, exo-thumbnailers/Makefile.am, + exo-thumbnailers/exo-generic-thumbnailer.{c,h}, + exo-thumbnailers/exo-thumbnailer-service-dbus.xml, + exo-thumbnailers/exu-thumbnailer-service-main.c, + exo-thumbnailers/exo-thumbnailer-service.{c,h}: Initial import of a + raw skeleton for the implementation of the Thumbnailer Specification. + ExoGenericThumbnailer implements org.freedesktop.thumbnailer.Generic and + ExoThumbnailerService is the D-Bus service that establishes the D-Bus + connection and makes sure the thumbnailer service always runs only once. + There seems to be something wrong right now, though. I can't get the + service to be recognized by D-Bus properly at all ... + 2009-05-12 Jannis Pohlmann * docs/reference/exo-sections.txt, docs/reference/tmpl/exo-job.sgml: Modified: libexo/branches/exo-thumbnailers/Makefile.am === --- libexo/branches/exo-thumbnailers/Makefile.am2009-05-14 14:42:26 UTC (rev 29956) +++ libexo/branches/exo-thumbnailers/Makefile.am2009-05-14 14:58:16 UTC (rev 29957) @@ -18,6 +18,7 @@ exo-mount \ $(EXO_MOUNT_NOTIFY_SUBDIR) \ exo-open\ + exo-thumbnailers\ docs\ icons \ pixmaps \ Modified: libexo/branches/exo-thumbnailers/configure.in.in === --- libexo/branches/exo-thumbnailers/configure.in.in2009-05-14 14:42:26 UTC (rev 29956) +++ libexo/branches/exo-thumbnailers/configure.in.in20
[Xfce4-commits] r29958 - in libexo/trunk: . docs/manual/es docs/manual/id docs/manual/it docs/manual/pt_BR docs/manual/tr
Author: jannis Date: 2009-05-14 14:59:24 + (Thu, 14 May 2009) New Revision: 29958 Removed: libexo/trunk/exo-thumbnailers/ Modified: libexo/trunk/AUTHORS libexo/trunk/ChangeLog libexo/trunk/Makefile.am libexo/trunk/configure.in.in libexo/trunk/docs/manual/es/ libexo/trunk/docs/manual/id/ libexo/trunk/docs/manual/it/ libexo/trunk/docs/manual/pt_BR/ libexo/trunk/docs/manual/tr/ Log: Remove the branch code from trunk again. Modified: libexo/trunk/AUTHORS === --- libexo/trunk/AUTHORS2009-05-14 14:58:16 UTC (rev 29957) +++ libexo/trunk/AUTHORS2009-05-14 14:59:24 UTC (rev 29958) @@ -1,5 +1,4 @@ Benedikt Meurer -Jannis Pohlmann Parts of this library are based on code from libegg, Gtk+, the GNOME project and the ROX Filer. Modified: libexo/trunk/ChangeLog === --- libexo/trunk/ChangeLog 2009-05-14 14:58:16 UTC (rev 29957) +++ libexo/trunk/ChangeLog 2009-05-14 14:59:24 UTC (rev 29958) @@ -1,17 +1,3 @@ -2009-05-14 Jannis Pohlmann - - * configure.in.in, Makefile.am, exo-thumbnailers/Makefile.am, - exo-thumbnailers/exo-generic-thumbnailer.{c,h}, - exo-thumbnailers/exo-thumbnailer-service-dbus.xml, - exo-thumbnailers/exu-thumbnailer-service-main.c, - exo-thumbnailers/exo-thumbnailer-service.{c,h}: Initial import of a - raw skeleton for the implementation of the Thumbnailer Specification. - ExoGenericThumbnailer implements org.freedesktop.thumbnailer.Generic and - ExoThumbnailerService is the D-Bus service that establishes the D-Bus - connection and makes sure the thumbnailer service always runs only once. - There seems to be something wrong right now, though. I can't get the - service to be recognized by D-Bus properly at all ... - 2009-05-12 Jannis Pohlmann * docs/reference/exo-sections.txt, docs/reference/tmpl/exo-job.sgml: Modified: libexo/trunk/Makefile.am === --- libexo/trunk/Makefile.am2009-05-14 14:58:16 UTC (rev 29957) +++ libexo/trunk/Makefile.am2009-05-14 14:59:24 UTC (rev 29958) @@ -18,7 +18,6 @@ exo-mount \ $(EXO_MOUNT_NOTIFY_SUBDIR) \ exo-open\ - exo-thumbnailers\ docs\ icons \ pixmaps \ Modified: libexo/trunk/configure.in.in === --- libexo/trunk/configure.in.in2009-05-14 14:58:16 UTC (rev 29957) +++ libexo/trunk/configure.in.in2009-05-14 14:59:24 UTC (rev 29958) @@ -146,8 +146,6 @@ dnl *** dnl *** Check for required packages *** dnl *** -XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.0.0]) -XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.72]) XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.16.0]) XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.16.0]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0]) @@ -428,7 +426,6 @@ exo-mount-notify/Makefile exo-open/Makefile exo-support/Makefile -exo-thumbnailers/Makefile icons/Makefile icons/24x24/Makefile icons/48x48/Makefile Property changes on: libexo/trunk/docs/manual/es ___ Deleted: svn:mergeinfo - Property changes on: libexo/trunk/docs/manual/id ___ Deleted: svn:mergeinfo - Property changes on: libexo/trunk/docs/manual/it ___ Deleted: svn:mergeinfo - Property changes on: libexo/trunk/docs/manual/pt_BR ___ Deleted: svn:mergeinfo - Property changes on: libexo/trunk/docs/manual/tr ___ Deleted: svn:mergeinfo - ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r29959 - in libexo/branches/exo-thumbnailers: . exo-thumbnailers
Author: jannis Date: 2009-05-14 20:04:43 + (Thu, 14 May 2009) New Revision: 29959 Added: libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-thumbnailer-marshal.list Modified: libexo/branches/exo-thumbnailers/ChangeLog libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-generic-thumbnailer.c libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-generic-thumbnailer.h libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-thumbnailer-service-dbus.xml libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-thumbnailer-service.c Log: * exo-thumbnailers/Makefile.am, exo-thumbnailers/exo-generic-thumbnailer.{c,h}, exo-thumbnailers/exo-thumbnailer-marshal.list, exo-thumbnailers/exo-thumbnailer-service-dbus.xml, exo-thumbnailers/exo-thumbnailer-service.c, exo-thumbnailers/org.xfce.ExoThumbnailer.service.in: Add exo-thumbnailer-marshal.list. Implement the Generic API of the thumbnail management D-Bus specification in the generic thumbnailer. It doesn't do anything yet but at least it is properly recognized as a service now and responds to all D-Bus methods defined in the spec. Modified: libexo/branches/exo-thumbnailers/ChangeLog === --- libexo/branches/exo-thumbnailers/ChangeLog 2009-05-14 14:59:24 UTC (rev 29958) +++ libexo/branches/exo-thumbnailers/ChangeLog 2009-05-14 20:04:43 UTC (rev 29959) @@ -1,5 +1,18 @@ 2009-05-14 Jannis Pohlmann + * exo-thumbnailers/Makefile.am, + exo-thumbnailers/exo-generic-thumbnailer.{c,h}, + exo-thumbnailers/exo-thumbnailer-marshal.list, + exo-thumbnailers/exo-thumbnailer-service-dbus.xml, + exo-thumbnailers/exo-thumbnailer-service.c, + exo-thumbnailers/org.xfce.ExoThumbnailer.service.in: Add + exo-thumbnailer-marshal.list. Implement the Generic API of the + thumbnail management D-Bus specification in the generic thumbnailer. + It doesn't do anything yet but at least it is properly recognized as + a service now and responds to all D-Bus methods defined in the spec. + +2009-05-14 Jannis Pohlmann + * configure.in.in, Makefile.am, exo-thumbnailers/Makefile.am, exo-thumbnailers/exo-generic-thumbnailer.{c,h}, exo-thumbnailers/exo-thumbnailer-service-dbus.xml, Modified: libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-generic-thumbnailer.c === --- libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-generic-thumbnailer.c 2009-05-14 14:59:24 UTC (rev 29958) +++ libexo/branches/exo-thumbnailers/exo-thumbnailers/exo-generic-thumbnailer.c 2009-05-14 20:04:43 UTC (rev 29959) @@ -25,6 +25,8 @@ #include #include +#include +#include #include #include @@ -34,6 +36,18 @@ +/* Signal identifiers */ +enum +{ + READY, + STARTED, + FINISHED, + ERROR, + LAST_SIGNAL, +}; + + + /* Property identifiers */ enum { @@ -60,6 +74,18 @@ struct _ExoGenericThumbnailerClass { GObjectClass __parent__; + + void (*ready)(ExoGenericThumbnailer *thumbnailer, +const gchar **uris); + void (*started) (ExoGenericThumbnailer *thumbnailer, +guint32handle); + void (*finished) (ExoGenericThumbnailer *thumbnailer, +guint32handle); + void (*error)(ExoGenericThumbnailer *thumbnailer, +guint32handle, +const gchar **failed_uris, +gint error_code, +const gchar *message); }; struct _ExoGenericThumbnailer @@ -77,6 +103,7 @@ static GObjectClass *exo_generic_thumbnailer_parent_class = NULL; +static gint thumbnailer_signals[LAST_SIGNAL]; @@ -117,6 +144,48 @@ gobject_class->get_property = exo_generic_thumbnailer_get_property; gobject_class->set_property = exo_generic_thumbnailer_set_property; + thumbnailer_signals[READY] = g_signal_new ("ready", + EXO_TYPE_GENERIC_THUMBNAILER, + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ExoGenericThumbnailerClass, ready), + NULL, NULL, + g_cclosure_marshal_VOID__BOXED, + G_TYPE_NONE, + 1, + G_TYPE_STRV); + + thumbnailer_signals[STARTED] = g_signal_new ("started", + EXO_TYPE_GENERIC_THUMBNAILER, + G_SIGNAL_RUN_LAST, +
[Xfce4-commits] r29960 - in libexo/branches/exo-thumbnailers: . exo-thumbnailers
Author: jannis Date: 2009-05-14 20:08:45 + (Thu, 14 May 2009) New Revision: 29960 Modified: libexo/branches/exo-thumbnailers/ChangeLog libexo/branches/exo-thumbnailers/exo-thumbnailers/Makefile.am Log: * exo-thumbnailers/Makefile.am: Add the missing Makefile.am. Modified: libexo/branches/exo-thumbnailers/ChangeLog === --- libexo/branches/exo-thumbnailers/ChangeLog 2009-05-14 20:04:43 UTC (rev 29959) +++ libexo/branches/exo-thumbnailers/ChangeLog 2009-05-14 20:08:45 UTC (rev 29960) @@ -1,5 +1,9 @@ 2009-05-14 Jannis Pohlmann + * exo-thumbnailers/Makefile.am: Add the missing Makefile.am. + +2009-05-14 Jannis Pohlmann + * exo-thumbnailers/Makefile.am, exo-thumbnailers/exo-generic-thumbnailer.{c,h}, exo-thumbnailers/exo-thumbnailer-marshal.list, Modified: libexo/branches/exo-thumbnailers/exo-thumbnailers/Makefile.am === --- libexo/branches/exo-thumbnailers/exo-thumbnailers/Makefile.am 2009-05-14 20:04:43 UTC (rev 29959) +++ libexo/branches/exo-thumbnailers/exo-thumbnailers/Makefile.am 2009-05-14 20:08:45 UTC (rev 29960) @@ -7,6 +7,8 @@ exo-thumbnailer-service exo_thumbnailer_service_built_sources = \ + exo-thumbnailer-marshal.c \ + exo-thumbnailer-marshal.h \ exo-generic-thumbnailer-dbus-bindings.h exo_thumbnailer_service_SOURCES = \ @@ -62,11 +64,30 @@ if MAINTAINER_MODE DISTCLEANFILES = \ + stamp-exo-thumbnailer-marshal.h \ $(exo_thumbnailer_service_built_sources) BUILT_SOURCES = \ $(exo_thumbnailer_service_built_sources) +exo-thumbnailer-marshal.h: stamp-exo-thumbnailer-marshal.h + @true + +stamp-exo-thumbnailer-marshal.h: exo-thumbnailer-marshal.list Makefile + ( cd $(srcdir) && glib-genmarshal \ + --prefix=_exo_thumbnailer_marshal \ + --header exo-thumbnailer-marshal.list ) >> xgen-emh \ + && ( cmp -s xgen-emh exo-thumbnailer-marshal.h || cp xgen-emh exo-thumbnailer-marshal.h ) \ + && rm -f xgen-emh \ + && echo timestamp > $(@F) + +exo-thumbnailer-marshal.c: exo-thumbnailer-marshal.list Makefile + ( cd $(srcdir) && glib-genmarshal \ + --prefix=_exo_thumbnailer_marshal \ + --body exo-thumbnailer-marshal.list ) >> xgen-emc \ + && cp xgen-emc exo-thumbnailer-marshal.c \ + && rm -f xgen-emc + exo-generic-thumbnailer-dbus-bindings.h: exo-thumbnailer-service-dbus.xml Makefile dbus-binding-tool --mode=glib-server --prefix=exo_generic_thumbnailer $< > $@ endif ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r29961 - in libexo/branches/exo-thumbnailers: . docs/reference docs/reference/tmpl exo
Author: jannis Date: 2009-05-15 01:00:30 + (Fri, 15 May 2009) New Revision: 29961 Added: libexo/branches/exo-thumbnailers/docs/reference/tmpl/exo-thumbnailer.sgml libexo/branches/exo-thumbnailers/exo/exo-thumbnailer.c libexo/branches/exo-thumbnailers/exo/exo-thumbnailer.h Modified: libexo/branches/exo-thumbnailers/ChangeLog libexo/branches/exo-thumbnailers/docs/reference/exo-docs.sgml libexo/branches/exo-thumbnailers/docs/reference/exo-sections.txt libexo/branches/exo-thumbnailers/docs/reference/exo.types libexo/branches/exo-thumbnailers/exo/Makefile.am libexo/branches/exo-thumbnailers/exo/exo.h Log: * docs/reference/exo-docs.sgml, docs/reference/exo-sections.txt, docs/reference/exo.types, docs/reference/tmpl/exo-thumbnailer.sgml: Add API docs section for ExoThumbnailer. * exo/Makefile.am, exo/exo-thumbnailer.{c,h}, exo/exo.h: Add client-side implementation of the thumbnail management D-Bus specification. Just as the server side, it doesn't do anything yet. Modified: libexo/branches/exo-thumbnailers/ChangeLog === --- libexo/branches/exo-thumbnailers/ChangeLog 2009-05-14 20:08:45 UTC (rev 29960) +++ libexo/branches/exo-thumbnailers/ChangeLog 2009-05-15 01:00:30 UTC (rev 29961) @@ -1,3 +1,12 @@ +2009-05-15 Jannis Pohlmann + + * docs/reference/exo-docs.sgml, docs/reference/exo-sections.txt, + docs/reference/exo.types, docs/reference/tmpl/exo-thumbnailer.sgml: + Add API docs section for ExoThumbnailer. + * exo/Makefile.am, exo/exo-thumbnailer.{c,h}, exo/exo.h: Add + client-side implementation of the thumbnail management D-Bus + specification. Just as the server side, it doesn't do anything yet. + 2009-05-14 Jannis Pohlmann * exo-thumbnailers/Makefile.am: Add the missing Makefile.am. Modified: libexo/branches/exo-thumbnailers/docs/reference/exo-docs.sgml === --- libexo/branches/exo-thumbnailers/docs/reference/exo-docs.sgml 2009-05-14 20:08:45 UTC (rev 29960) +++ libexo/branches/exo-thumbnailers/docs/reference/exo-docs.sgml 2009-05-15 01:00:30 UTC (rev 29961) @@ -14,6 +14,7 @@ + @@ -105,6 +106,24 @@ + D-Bus + + + TODO + + + + + + D-Bus GLib Bindings + + + TODO + + + + + GLib @@ -284,6 +303,16 @@ &exo-simple-job; + +Thumbnail Management + + + TODO + + +&exo-thumbnailer; + + Extensions to existing frameworks Modified: libexo/branches/exo-thumbnailers/docs/reference/exo-sections.txt === --- libexo/branches/exo-thumbnailers/docs/reference/exo-sections.txt 2009-05-14 20:08:45 UTC (rev 29960) +++ libexo/branches/exo-thumbnailers/docs/reference/exo-sections.txt 2009-05-15 01:00:30 UTC (rev 29961) @@ -375,6 +375,37 @@ +exo-thumbnailer +ExoThumbnailer +ExoThumbnailer +exo_thumbnailer_get_default +exo_thumbnailer_queue +exo_thumbnailer_queue_uri +exo_thumbnailer_unqueue +exo_thumbnailer_unqueue_list +exo_thumbnailer_move +exo_thumbnailer_move_uri +exo_thumbnailer_copy +exo_thumbnailer_copy_uri +exo_thumbnailer_delete +exo_thumbnailer_delete_uri +exo_thumbnailer_cleanup + +ExoThumbnailerPrivate +ExoThumbnailerClass +EXO_TYPE_THUMBNAILER +EXO_THUMBNAILER +EXO_THUMBNAILER_CLASS +EXO_IS_THUMBNAILER +EXO_IS_THUMBNAILER_CLASS +EXO_THUMBNAILER_GET_CLASS + +exo_thumbnailer_get_type + + + + + exo-gdk-pixbuf-extensions Extensions to gdk-pixbuf exo_gdk_pixbuf_colorize Modified: libexo/branches/exo-thumbnailers/docs/reference/exo.types === --- libexo/branches/exo-thumbnailers/docs/reference/exo.types 2009-05-14 20:08:45 UTC (rev 29960) +++ libexo/branches/exo-thumbnailers/docs/reference/exo.types 2009-05-15 01:00:30 UTC (rev 29961) @@ -17,6 +17,8 @@ exo_job_get_type exo_simple_job_get_type +exo_thumbnailer_get_type + exo_xsession_client_get_type exo_md5_digest_get_type exo_mount_point_get_type Added: libexo/branches/exo-thumbnailers/docs/reference/tmpl/exo-thumbnailer.sgml === --- libexo/branches/exo-thumbnailers/docs/reference/tmpl/exo-thumbnailer.sgml (rev 0) +++ libexo/branches/exo-thumbnailers/docs/reference/tmpl/exo-thumbnailer.sgml 2009-05-15 01:00:30 UTC (rev 29961) @@ -0,0 +1,142 @@ + +ExoThumbnailer + + + + + + + + + + + + + + + + + + + + + + + + + + + + +...@error: +...@returns: + + + + + + + +...@thumbnailer: +...@uris: +...@mime_hints: +...@returns: + + + + + + + +...@thum
[Xfce4-commits] r29986 - in xfce4-mixer/trunk: . panel-plugin
Author: jannis Date: 2009-05-28 14:41:40 + (Thu, 28 May 2009) New Revision: 29986 Modified: xfce4-mixer/trunk/ChangeLog xfce4-mixer/trunk/panel-plugin/xfce-volume-button.c Log: * panel-plugin/xfce-volume-button.c: Set the page size to 0 which allows the volume to be changed up to 100% instead of just 90% (bug #5243). Conflicts: ChangeLog Modified: xfce4-mixer/trunk/ChangeLog === --- xfce4-mixer/trunk/ChangeLog 2009-05-28 13:50:28 UTC (rev 29985) +++ xfce4-mixer/trunk/ChangeLog 2009-05-28 14:41:40 UTC (rev 29986) @@ -1,3 +1,9 @@ +2009-05-28 Jannis Pohlmann + + * panel-plugin/xfce-volume-button.c: Set the page size to 0 which + allows the volume to be changed up to 100% instead of just 90% (bug + #5243). + 2009-04-18 Stephan Arts * == Xfce 4.6.1 Released == Modified: xfce4-mixer/trunk/panel-plugin/xfce-volume-button.c === --- xfce4-mixer/trunk/panel-plugin/xfce-volume-button.c 2009-05-28 13:50:28 UTC (rev 29985) +++ xfce4-mixer/trunk/panel-plugin/xfce-volume-button.c 2009-05-28 14:41:40 UTC (rev 29986) @@ -202,7 +202,7 @@ button->pixbufs = g_new0 (GdkPixbuf*, G_N_ELEMENTS (icons)-1); /* Create adjustment for the button (from 0.0 to 1.0 in 5% steps) */ - button->adjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.05, 0.05, 0.1); + button->adjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.05, 0.05, 0.0); /* Create a new scaled image for the button icon */ button->image = xfce_scaled_image_new (); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30002 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-12 01:09:47 + (Fri, 12 Jun 2009) New Revision: 30002 Added: thunar/branches/migration-to-gio/thunar/thunar-thumbnailer-manager-dbus.xml Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/Makefile.am thunar/branches/migration-to-gio/thunar/thunar-thumbnailer.c thunar/branches/migration-to-gio/thunar/thunar-thumbnailer.h Log: * thunar/Makefile.am, thunar/thunar-thumbnailer-manager-dbus.xml: Add XML D-Bus information for the org.freedesktop.thumbnails.Manager interface. * thunar/thunar-thumbnailer.{c,h}: Start implementing the client side of the org.freedesktop.thumbnails.Manager interface. Add new method thunar_thumbnailer_file_is_supported() which requests the supported content types from the thumbnailer manager on demand and checks if the content type of a ThunarFile is a subtype of any of these. Use this in thunar_thumbnailer_queue_files() and thunar_thumbnailer_queue_file() to filter out files which are not supported by the thumbnailer anyway. Make queue requests fail when there are no supported files in the request. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-12 00:21:23 UTC (rev 30001) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-12 01:09:47 UTC (rev 30002) @@ -1,5 +1,20 @@ 2009-06-12 Jannis Pohlmann + * thunar/Makefile.am, thunar/thunar-thumbnailer-manager-dbus.xml: Add + XML D-Bus information for the org.freedesktop.thumbnails.Manager + interface. + * thunar/thunar-thumbnailer.{c,h}: Start implementing the client side + of the org.freedesktop.thumbnails.Manager interface. Add new method + thunar_thumbnailer_file_is_supported() which requests the supported + content types from the thumbnailer manager on demand and checks if + the content type of a ThunarFile is a subtype of any of these. Use + this in thunar_thumbnailer_queue_files() and + thunar_thumbnailer_queue_file() to filter out files which + are not supported by the thumbnailer anyway. Make queue requests + fail when there are no supported files in the request. + +2009-06-12 Jannis Pohlmann + * Makefile.am, thunar/thunar-image.{c,h}, thunar/thunar-thumbnailer-dbus.xml, thunar/thunar-thumbnailer.{c,h}: Add two new classes ThunarImage and ThunarThumbnailer. ThunarImage Modified: thunar/branches/migration-to-gio/thunar/Makefile.am === --- thunar/branches/migration-to-gio/thunar/Makefile.am 2009-06-12 00:21:23 UTC (rev 30001) +++ thunar/branches/migration-to-gio/thunar/Makefile.am 2009-06-12 01:09:47 UTC (rev 30002) @@ -248,14 +248,16 @@ if HAVE_DBUS thunar_built_sources += \ thunar-dbus-service-infos.h \ - thunar-thumbnailer-proxy.h + thunar-thumbnailer-proxy.h \ + thunar-thumbnailer-manager-proxy.h thunar_dbus_sources = \ thunar-dbus-client.c\ thunar-dbus-client.h\ thunar-dbus-service.c \ thunar-dbus-service.h \ - thunar-thumbnailer-proxy.h + thunar-thumbnailer-proxy.h \ + thunar-thumbnailer-manager-proxy.h Thunar_CFLAGS += \ -DDBUS_API_SUBJECT_TO_CHANGE\ @@ -330,6 +332,12 @@ $(srcdir)/thunar-thumbnailer-dbus.xml > thunar-thumbnailer-proxy.h \ && sed -i -e 's/org_freedesktop_thumbnails_Thumbnailer/thunar_thumbnailer_proxy/g' \ thunar-thumbnailer-proxy.h + +thunar-thumbnailer-manager-proxy.h: $(srcdir)/thunar-thumbnailer-manager-dbus.xml Makefile + dbus-binding-tool --mode=glib-client \ + $(srcdir)/thunar-thumbnailer-manager-dbus.xml > thunar-thumbnailer-manager-proxy.h \ + && sed -i -e 's/org_freedesktop_thumbnails_Manager/thunar_thumbnailer_manager_proxy/g' \ + thunar-thumbnailer-manager-proxy.h endif thunar-throbber-fallback.c: $(srcdir)/thunar-throbber-fallback.png Makefile Added: thunar/branches/migration-to-gio/thunar/thunar-thumbnailer-manager-dbus.xml === --- thunar/branches/migration-to-gio/thunar/thunar-thumbnailer-manager-dbus.xml
[Xfce4-commits] r30017 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-14 22:58:11 + (Sun, 14 Jun 2009) New Revision: 30017 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c thunar/branches/migration-to-gio/thunar/thunar-file.h Log: * thunar/thunar-file.{c,h}: Emit a ThunarFileMonitor "file-changed" signal whenever the thumbnail state of a ThunarFile is changed. This helps all components in refreshing their file information and possibly update the file icon. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-14 01:00:40 UTC (rev 30016) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-14 22:58:11 UTC (rev 30017) @@ -1,3 +1,10 @@ +2009-06-14 Jannis Pohlmann + + * thunar/thunar-file.{c,h}: Emit a ThunarFileMonitor "file-changed" + signal whenever the thumbnail state of a ThunarFile is changed. This + helps all components in refreshing their file information and + possibly update the file icon. + 2009-06-12 Jannis Pohlmann * thunar/Makefile.am, thunar/thunar-thumbnailer-manager-dbus.xml: Add Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-14 01:00:40 UTC (rev 30016) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-14 22:58:11 UTC (rev 30017) @@ -458,6 +458,8 @@ static void thunar_file_info_changed (ThunarxFileInfo *file_info) { + thunar_file_set_thumb_state (THUNAR_FILE (file_info), THUNAR_FILE_THUMB_STATE_UNKNOWN); + /* tell the file monitor that this file changed */ thunar_file_monitor_file_changed (THUNAR_FILE (file_info)); } @@ -836,7 +838,12 @@ g_free (uri); } + /* set thumb state to unknown */ + file->flags = +(file->flags & ~THUNAR_FILE_THUMB_STATE_MASK) | THUNAR_FILE_THUMB_STATE_UNKNOWN; + /* determine thumbnail path */ + /* TODO monitor the thumbnail path for changes */ uri = g_file_get_uri (file->gfile); md5_hash = g_compute_checksum_for_string (G_CHECKSUM_MD5, uri, -1); basename = g_strdup_printf ("%s.png", md5_hash); @@ -2448,6 +2455,31 @@ /** + * thunar_file_set_thumb_state: + * @file: a #ThunarFile. + * @thumb_state : the new #ThunarFileThumbState. + * + * Sets the #ThunarFileThumbState for @file to @thumb_state. + * This will cause a "file-changed" signal to be emitted from + * #ThunarFileMonitor. + **/ +void +thunar_file_set_thumb_state (ThunarFile *file, + ThunarFileThumbState state) +{ + _thunar_return_if_fail (THUNAR_IS_FILE (file)); + + /* set the new thumbnail state */ + file->flags = (file->flags & ~THUNAR_FILE_THUMB_STATE_MASK) | (state); + + /* notify others of this change, so that all components can update + * their file information */ + thunar_file_monitor_file_changed (file); +} + + + +/** * thunar_file_get_custom_icon: * @file : a #ThunarFile instance. * Modified: thunar/branches/migration-to-gio/thunar/thunar-file.h === --- thunar/branches/migration-to-gio/thunar/thunar-file.h 2009-06-14 01:00:40 UTC (rev 30016) +++ thunar/branches/migration-to-gio/thunar/thunar-file.h 2009-06-14 22:58:11 UTC (rev 30017) @@ -217,6 +217,9 @@ const gchar *custom_icon, GError **error); +const gchar *thunar_file_get_thumbnail_path(const ThunarFile *file); +void thunar_file_set_thumb_state (ThunarFile *file, +ThunarFileThumbState state); GIcon*thunar_file_get_preview_icon (const ThunarFile *file); gchar*thunar_file_get_icon_name(const ThunarFile *file, ThunarFileIconState icon_state, @@ -249,7 +252,6 @@ GList*thunar_file_list_to_g_file_list(GList *file_list); gboolean thunar_file_is_desktop (const ThunarFile *file); -const gchar *thunar_file_get_thumbnail_path (const ThunarFile *file); /** * thunar_file_is_root: @@ -335,21 +337,6 @@ #define thunar_file_get_thumb_state(file) (THUNAR_FILE ((file))->flags & THUNAR_FILE_THUMB_STATE_MASK) /** - * thunar_file_set_thumb_state: - * @file: a #ThunarFile. - * @thumb_state : the new #ThunarFileThumbState. - * - * Sets the #ThunarFileThumbState for @file - * to @thumb_state. This method is intended - * to be used by #ThunarIconFacto
[Xfce4-commits] r30024 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-15 20:06:18 + (Mon, 15 Jun 2009) New Revision: 30024 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c thunar/branches/migration-to-gio/thunar/thunar-file.h Log: * thunar/thunar-file.{c,h}: Add new boolean method thunar_file_is_thumbnail() which returns TRUE if, and only if a file resides in $HOME/.thumbnails/. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-15 18:19:53 UTC (rev 30023) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-15 20:06:18 UTC (rev 30024) @@ -1,5 +1,11 @@ 2009-06-15 Jannis Pohlmann + * thunar/thunar-file.{c,h}: Add new boolean method + thunar_file_is_thumbnail() which returns TRUE if, and only if + a file resides in $HOME/.thumbnails/. + +2009-06-15 Jannis Pohlmann + * thunar/thunar-icon-factory.c: Rewrite the file icon loading process once again, this time based on the also rewritten ThunarThumbnailer. We first assume no thumbnail exists and use the default icon for the Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-15 18:19:53 UTC (rev 30023) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-15 20:06:18 UTC (rev 30024) @@ -727,8 +727,10 @@ GError **error) { GKeyFile *key_file; + GFile*thumbnail_dir; gchar*basename; gchar*md5_hash; + gchar*thumbnail_dir_path; gchar*uri; _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE); @@ -786,9 +788,26 @@ file->basename = g_file_get_basename (file->gfile); _thunar_assert (file->basename != NULL); - /* determine the custom icon name for .desktop files */ - if (thunar_file_is_desktop_file (file)) + /* assume all files are not thumbnails themselves */ + file->is_thumbnail = FALSE; + + /* create a GFile for the $HOME/.thumbnails/ directory */ + thumbnail_dir_path = g_build_filename (xfce_get_homedir (), ".thumbnails", NULL); + thumbnail_dir = g_file_new_for_path (thumbnail_dir_path); + + /* check if this file is a thumbnail */ + if (g_file_has_prefix (file->gfile, thumbnail_dir)) { + /* remember that this file is a thumbnail */ + file->is_thumbnail = TRUE; + + /* use the filename as custom icon name for thumbnails */ + file->custom_icon_name = g_file_get_path (file->gfile); +} + else if (thunar_file_is_desktop_file (file)) +{ + /* determine the custom icon name for .desktop files */ + /* query a key file for the .desktop file */ key_file = g_file_query_key_file (file->gfile, cancellable, NULL); if (key_file != NULL) @@ -826,6 +845,10 @@ file->custom_icon_name = NULL; } + /* free $HOME/.thumbnails/ GFile and path */ + g_object_unref (thumbnail_dir); + g_free (thumbnail_dir_path); + /* determine the display name */ if (file->info != NULL) { @@ -2454,6 +2477,15 @@ +gboolean +thunar_file_is_thumbnail (const ThunarFile *file) +{ + _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE); + return file->is_thumbnail; +} + + + /** * thunar_file_set_thumb_state: * @file: a #ThunarFile. Modified: thunar/branches/migration-to-gio/thunar/thunar-file.h === --- thunar/branches/migration-to-gio/thunar/thunar-file.h 2009-06-15 18:19:53 UTC (rev 30023) +++ thunar/branches/migration-to-gio/thunar/thunar-file.h 2009-06-15 20:06:18 UTC (rev 30024) @@ -124,6 +124,7 @@ gchar *basename; gchar *thumbnail_path; guint flags; + guint is_thumbnail : 1; }; GType thunar_file_get_type (void) G_GNUC_CONST; @@ -218,6 +219,7 @@ GError **error); const gchar *thunar_file_get_thumbnail_path(const ThunarFile *file); +gboolean thunar_file_is_thumbnail (const ThunarFile *file); void thunar_file_set_thumb_state (ThunarFile *file, ThunarFileThumbState state); GIcon*thunar_file_get_preview_icon (const ThunarFile *file); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30025 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-15 20:06:36 + (Mon, 15 Jun 2009) New Revision: 30025 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-icon-factory.c Log: * thunar/thunar-icon-factory.c: Drop the ThunarVfsThumbFactory reference. Don't cache SVGs. The number of SVGs we need to load that are not ThunarFiles is relatively small, I don't think we need to cache them. ThunarThumbnailer takes care of the ThunarFiles that are SVGs. Always try to load thumbnails for files, even though their thumbnail state is not ready. Don't use the loading icon. Together, this reduces flicker when switching folders. ThunarIconFactory is now ThunarVFS-free. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-15 20:06:18 UTC (rev 30024) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-15 20:06:36 UTC (rev 30025) @@ -1,5 +1,16 @@ 2009-06-15 Jannis Pohlmann + * thunar/thunar-icon-factory.c: Drop the ThunarVfsThumbFactory + reference. Don't cache SVGs. The number of SVGs we need to load that + are not ThunarFiles is relatively small, I don't think we need to + cache them. ThunarThumbnailer takes care of the ThunarFiles that are + SVGs. Always try to load thumbnails for files, even though their + thumbnail state is not ready. Don't use the loading icon. Together, + this reduces flicker when switching folders. ThunarIconFactory is + now ThunarVFS-free. + +2009-06-15 Jannis Pohlmann + * thunar/thunar-file.{c,h}: Add new boolean method thunar_file_is_thumbnail() which returns TRUE if, and only if a file resides in $HOME/.thumbnails/. Modified: thunar/branches/migration-to-gio/thunar/thunar-icon-factory.c === --- thunar/branches/migration-to-gio/thunar/thunar-icon-factory.c 2009-06-15 20:06:18 UTC (rev 30024) +++ thunar/branches/migration-to-gio/thunar/thunar-icon-factory.c 2009-06-15 20:06:36 UTC (rev 30025) @@ -107,24 +107,23 @@ { GObject __parent__; - ThunarVfsThumbFactory*thumbnail_factory; - ThunarThumbnailer*thumbnailer; + ThunarThumbnailer *thumbnailer; - ThunarPreferences*preferences; + ThunarPreferences *preferences; - GdkPixbuf*recently[MAX_RECENTLY]; /* ring buffer */ - guint recently_pos;/* insert position */ + GdkPixbuf *recently[MAX_RECENTLY]; /* ring buffer */ + guint recently_pos;/* insert position */ - GHashTable *icon_cache; + GHashTable*icon_cache; - GtkIconTheme *icon_theme; + GtkIconTheme *icon_theme; - gboolean show_thumbnails; + gboolean show_thumbnails; - gint changed_idle_id; - gint sweep_timer_id; + gint changed_idle_id; + gint sweep_timer_id; - gulongchanged_hook_id; + gulong changed_hook_id; }; struct _ThunarIconKey @@ -241,11 +240,6 @@ /* allocate the hash table for the icon cache */ factory->icon_cache = g_hash_table_new_full (thunar_icon_key_hash, thunar_icon_key_equal, g_free, g_object_unref); - /* allocate the thumbnail factory */ - factory->thumbnail_factory = thunar_vfs_thumb_factory_new ((THUNAR_THUMBNAIL_SIZE > 128) -? THUNAR_VFS_THUMB_SIZE_LARGE -: THUNAR_VFS_THUMB_SIZE_NORMAL); - /* create a new thumbnailer */ factory->thumbnailer = thunar_thumbnailer_new (); } @@ -286,9 +280,6 @@ /* clear the icon cache hash table */ g_hash_table_destroy (factory->icon_cache); - /* disconnect from the thumbnail factory */ - g_object_unref (G_OBJECT (factory->thumbnail_factory)); - /* release the thumbnailer */ g_object_unref (G_OBJECT (factory->thumbnailer)); @@ -540,14 +531,18 @@ { ThunarIconKey lookup_key; ThunarIconKey *key; +#if 0 ThunarVfsPath *path; ThunarVfsInfo *info; const gchar *filename; +#endif GtkIconInfo *icon_info; GdkPixbuf *pixbuf = NULL; +#if 0 GdkPixbuf *scaled; GError*err = NULL; gchar *thumbnail; +#endif _thunar_return_val_if_fail (THUNAR_IS_ICON_FACTORY (factory), NULL); _thunar_return_val_if_fail (name != NULL && *name != '\0', NULL); @@ -572,68 +567,9 @@ icon_info = gtk_icon_theme_lookup_icon (factory->icon_theme, name, size, 0); if (G_LIKELY (icon_info != NULL)) { - /* check if we have
[Xfce4-commits] r30026 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-15 20:06:54 + (Mon, 15 Jun 2009) New Revision: 30026 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-thumbnailer.c Log: * thunar/thunar-thumbnailer.c: Don't queue files that are part of an already queued thumbnailer request or a ready idle struct. This dramatically reduces the amount of D-Bus messages being sent. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-15 20:06:36 UTC (rev 30025) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-15 20:06:54 UTC (rev 30026) @@ -1,5 +1,11 @@ 2009-06-15 Jannis Pohlmann + * thunar/thunar-thumbnailer.c: Don't queue files that are part of an + already queued thumbnailer request or a ready idle struct. This + dramatically reduces the amount of D-Bus messages being sent. + +2009-06-15 Jannis Pohlmann + * thunar/thunar-icon-factory.c: Drop the ThunarVfsThumbFactory reference. Don't cache SVGs. The number of SVGs we need to load that are not ThunarFiles is relatively small, I don't think we need to Modified: thunar/branches/migration-to-gio/thunar/thunar-thumbnailer.c === --- thunar/branches/migration-to-gio/thunar/thunar-thumbnailer.c 2009-06-15 20:06:36 UTC (rev 30025) +++ thunar/branches/migration-to-gio/thunar/thunar-thumbnailer.c 2009-06-15 20:06:54 UTC (rev 30026) @@ -792,6 +792,89 @@ +static gboolean +thunar_thumbnailer_file_is_queued (ThunarThumbnailer *thumbnailer, + ThunarFile*file) +{ + gboolean is_queued = FALSE; + GList *values; + GList *lp; + gchar **uris; + gchar *uri; + guintn; + + /* get a list with all URI arrays of already queued requests */ + values = g_hash_table_get_values (thumbnailer->request_uris_mapping); + + /* if we have none, the file cannot be queued ... or can it? ;) */ + if (values == NULL) +return FALSE; + + /* determine the URI for this file */ + uri = thunar_file_dup_uri (file); + + /* iterate over all URI arrays */ + for (lp = values; !is_queued && lp != NULL; lp = lp->next) +{ + uris = lp->data; + + /* check if the file is included in the URI array of the current request */ + for (n = 0; !is_queued && uris != NULL && uris[n] != NULL; ++n) +if (g_utf8_collate (uri, uris[n]) == 0) + is_queued = TRUE; +} + + /* free the file URI */ + g_free (uri); + + /* free the URI array list */ + g_list_free (values); + + return is_queued; +} + + + +static gboolean +thunar_thumbnailer_file_is_ready (ThunarThumbnailer *thumbnailer, + ThunarFile*file) +{ + ThunarThumbnailerIdle *idle; + gboolean is_ready = FALSE; + GList *lp; + gchar *uri; + guint n; + + /* determine the URI or this file */ + uri = thunar_file_dup_uri (file); + + /* iterate over all idle structs */ + for (lp = thumbnailer->idles; !is_ready && lp != NULL; lp = lp->next) +{ + /* skip invalid idles */ + if (lp->data != NULL) +continue; + + idle = lp->data; + + /* skip non-ready idles and idles without any URIs */ + if (idle->type != THUNAR_THUMBNAILER_IDLE_READY || idle->data.uris == NULL) +continue; + + /* check if the file is included in this ready idle */ + for (n = 0; !is_ready && idle->data.uris[n] != NULL; ++n) +if (g_utf8_collate (uri, idle->data.uris[n]) == 0) + is_ready = TRUE; +} + + /* free the file URI */ + g_free (uri); + + return is_ready; +} + + + static void thunar_thumbnailer_call_free (ThunarThumbnailerCall *call) { @@ -899,6 +982,18 @@ n_supported += 1; } + /* remove all files from the supported list for which we have pending requests */ + for (lp = supported_files; lp != NULL; lp = lp->next) +{ + /* check queued requests and ready idle structs */ + if (thunar_thumbnailer_file_is_queued (thumbnailer, lp->data) + || thunar_thumbnailer_file_is_ready (thumbnailer, lp->data)) +{ + /* remove the link if the file is present in either of the above */ + supported_files = g_list_delete_link (supported_files, lp); +} +} + g_mutex_lock (thumbnailer->lock); /* check if we have any supported files */ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30027 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-15 23:37:41 + (Mon, 15 Jun 2009) New Revision: 30027 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-icon-factory.c Log: * thunar/thunar-icon-factory.c: Remove commented code. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-15 20:06:54 UTC (rev 30026) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-15 23:37:41 UTC (rev 30027) @@ -1,3 +1,7 @@ +2009-06-16 Jannis Pohlmann + + * thunar/thunar-icon-factory.c: Remove commented code. + 2009-06-15 Jannis Pohlmann * thunar/thunar-thumbnailer.c: Don't queue files that are part of an Modified: thunar/branches/migration-to-gio/thunar/thunar-icon-factory.c === --- thunar/branches/migration-to-gio/thunar/thunar-icon-factory.c 2009-06-15 20:06:54 UTC (rev 30026) +++ thunar/branches/migration-to-gio/thunar/thunar-icon-factory.c 2009-06-15 23:37:41 UTC (rev 30027) @@ -531,18 +531,8 @@ { ThunarIconKey lookup_key; ThunarIconKey *key; -#if 0 - ThunarVfsPath *path; - ThunarVfsInfo *info; - const gchar *filename; -#endif GtkIconInfo *icon_info; GdkPixbuf *pixbuf = NULL; -#if 0 - GdkPixbuf *scaled; - GError*err = NULL; - gchar *thumbnail; -#endif _thunar_return_val_if_fail (THUNAR_IS_ICON_FACTORY (factory), NULL); _thunar_return_val_if_fail (name != NULL && *name != '\0', NULL); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30028 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-15 23:38:03 + (Mon, 15 Jun 2009) New Revision: 30028 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c Log: * thunar/thunar-file.c: Use S_ISCHR, S_ISSOCK, S_ISFIFO and S_ISBLK to generate the first character of mode strings for special/unknown file types because we don't have THUNAR_VFS_FILE_TYPE_SOCKET etc. anymore. There will be no replacements for THUNAR_VFS_FILE_TYPE_PORT and THUNAR_VFS_FILE_TYPE_DOOR for now. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-15 23:37:41 UTC (rev 30027) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-15 23:38:03 UTC (rev 30028) @@ -1,5 +1,13 @@ 2009-06-16 Jannis Pohlmann + * thunar/thunar-file.c: Use S_ISCHR, S_ISSOCK, S_ISFIFO and S_ISBLK to + generate the first character of mode strings for special/unknown + file types because we don't have THUNAR_VFS_FILE_TYPE_SOCKET etc. + anymore. There will be no replacements for THUNAR_VFS_FILE_TYPE_PORT + and THUNAR_VFS_FILE_TYPE_DOOR for now. + +2009-06-16 Jannis Pohlmann + * thunar/thunar-icon-factory.c: Remove commented code. 2009-06-15 Jannis Pohlmann Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-15 23:37:41 UTC (rev 30027) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-15 23:38:03 UTC (rev 30028) @@ -26,6 +26,10 @@ #include #endif +#ifdef HAVE_SYS_STAT_H +#include +#endif + #ifdef HAVE_ERRNO_H #include #endif @@ -1507,25 +1511,26 @@ text = g_new (gchar, 11); /* file type */ + /* TODO earlier versions of Thunar had 'P' for ports and + * 'D' for doors. Do we still need those? */ switch (kind) { -#if 0 /* TODO */ -case THUNAR_VFS_FILE_TYPE_PORT: text[0] = 'P'; break; -case THUNAR_VFS_FILE_TYPE_DOOR: text[0] = 'D'; break; -case THUNAR_VFS_FILE_TYPE_SOCKET: text[0] = 's'; break; -#endif case G_FILE_TYPE_SYMBOLIC_LINK: text[0] = 'l'; break; case G_FILE_TYPE_REGULAR: text[0] = '-'; break; -#if 0 /* TODO */ -case THUNAR_VFS_FILE_TYPE_BLOCKDEV: text[0] = 'b'; break; -#endif case G_FILE_TYPE_DIRECTORY: text[0] = 'd'; break; -#if 0 /* TODO */ -case THUNAR_VFS_FILE_TYPE_CHARDEV:text[0] = 'c'; break; -case THUNAR_VFS_FILE_TYPE_FIFO: text[0] = 'f'; break; -#endif +case G_FILE_TYPE_SPECIAL: case G_FILE_TYPE_UNKNOWN: -default: text[0] = ' '; break; +default: + if (S_ISCHR (mode)) +text[0] = 'c'; + else if (S_ISSOCK (mode)) +text[0] = 's'; + else if (S_ISFIFO (mode)) +text[0] = 'f'; + else if (S_ISBLK (mode)) +text[0] = 'b'; + else +text[0] = ' '; } /* permission flags */ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30029 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-15 23:38:26 + (Mon, 15 Jun 2009) New Revision: 30029 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-renamer-model.c Log: * thunar/thunar-renamer-model.c: Remove the ThunarVfsInfo member of ThunarRenamerModelItem. Always invalidate and update the item/row when the ThunarFile changes (unless the model is frozen of course). ThunarRenamerModel is now ThunarVFS-free. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-15 23:38:03 UTC (rev 30028) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-15 23:38:26 UTC (rev 30029) @@ -1,5 +1,12 @@ 2009-06-16 Jannis Pohlmann + * thunar/thunar-renamer-model.c: Remove the ThunarVfsInfo member of + ThunarRenamerModelItem. Always invalidate and update the item/row + when the ThunarFile changes (unless the model is frozen of course). + ThunarRenamerModel is now ThunarVFS-free. + +2009-06-16 Jannis Pohlmann + * thunar/thunar-file.c: Use S_ISCHR, S_ISSOCK, S_ISFIFO and S_ISBLK to generate the first character of mode strings for special/unknown file types because we don't have THUNAR_VFS_FILE_TYPE_SOCKET etc. Modified: thunar/branches/migration-to-gio/thunar/thunar-renamer-model.c === --- thunar/branches/migration-to-gio/thunar/thunar-renamer-model.c 2009-06-15 23:38:03 UTC (rev 30028) +++ thunar/branches/migration-to-gio/thunar/thunar-renamer-model.c 2009-06-15 23:38:26 UTC (rev 30029) @@ -159,12 +159,11 @@ struct _ThunarRenamerModelItem { - ThunarVfsInfo *info; - ThunarFile*file; - gchar *name; - guint changed : 1; /* if the file changed */ - guint conflict : 1; /* if the item conflicts with another item */ - guint dirty : 1;/* if the item must be updated */ + ThunarFile *file; + gchar *name; + guint changed : 1; /* if the file changed */ + guint conflict : 1; /* if the item conflicts with another item */ + guint dirty : 1;/* if the item must be updated */ }; @@ -631,7 +630,6 @@ ThunarFileMonitor *file_monitor) { ThunarRenamerModelItem *item; - ThunarVfsInfo *info; GtkTreePath*path; GtkTreeIter iter; GList *lp; @@ -647,26 +645,17 @@ { /* check if the file changed on disk */ item = THUNAR_RENAMER_MODEL_ITEM (lp->data); -info = thunarx_file_info_get_vfs_info (THUNARX_FILE_INFO (file)); -if (info == NULL || !thunar_vfs_info_matches (item->info, info)) + +/* check if we're frozen */ +if (G_LIKELY (!renamer_model->frozen)) { -/* connect to the new info */ -thunar_vfs_info_unref (item->info); -item->info = info; +/* the file changed */ +THUNAR_RENAMER_MODEL_ITEM (lp->data)->changed = TRUE; -/* check if we're frozen */ -if (G_LIKELY (!renamer_model->frozen)) - { -/* the file changed */ -THUNAR_RENAMER_MODEL_ITEM (lp->data)->changed = TRUE; - -/* invalidate the item */ -thunar_renamer_model_invalidate_item (renamer_model, lp->data); -break; - } +/* invalidate the item */ +thunar_renamer_model_invalidate_item (renamer_model, lp->data); +break; } -else - thunar_vfs_info_unref (info); /* determine the iter for the item */ GTK_TREE_ITER_INIT (iter, renamer_model->stamp, lp); @@ -1009,7 +998,6 @@ ThunarRenamerModelItem *item; item = _thunar_slice_new0 (ThunarRenamerModelItem); - item->info = thunarx_file_info_get_vfs_info (THUNARX_FILE_INFO (file)); item->file = g_object_ref (G_OBJECT (file)); item->dirty = TRUE; @@ -1022,7 +1010,6 @@ thunar_renamer_model_item_free (ThunarRenamerModelItem *item) { g_object_unref (G_OBJECT (item->file)); - thunar_vfs_info_unref (item->info); g_free (item->name); _thunar_slice_free (ThunarRenamerModelItem, item); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30032 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-16 10:15:06 + (Tue, 16 Jun 2009) New Revision: 30032 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-path-entry.c Log: * thunar/thunar-path-entry.c: Display the local path only for native files. If there is no path, use the URI. Always use the URI for non-native files. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-16 00:00:40 UTC (rev 30031) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-16 10:15:06 UTC (rev 30032) @@ -1,5 +1,11 @@ 2009-06-16 Jannis Pohlmann + * thunar/thunar-path-entry.c: Display the local path only for native + files. If there is no path, use the URI. Always use the URI for + non-native files. + +2009-06-16 Jannis Pohlmann + * thunar/thunar-renamer-model.c: Remove the ThunarVfsInfo member of ThunarRenamerModelItem. Always invalidate and update the item/row when the ThunarFile changes (unless the model is frozen of course). Modified: thunar/branches/migration-to-gio/thunar/thunar-path-entry.c === --- thunar/branches/migration-to-gio/thunar/thunar-path-entry.c 2009-06-16 00:00:40 UTC (rev 30031) +++ thunar/branches/migration-to-gio/thunar/thunar-path-entry.c 2009-06-16 10:15:06 UTC (rev 30032) @@ -1413,10 +1413,21 @@ } else { - /* try absolute path, fallback to URI if not a local file */ - text = g_file_get_path (file); - if (text == NULL) -text = g_file_get_uri (file); + /* check if the file is native to the platform */ + if (g_file_is_native (file)) +{ + /* it is, try the local path first */ + text = g_file_get_path (file); + + /* if there is no local path, use the URI (which always works) */ + if (text == NULL) +text = g_file_get_uri (file); +} + else +{ + /* not a native file, use the URI */ + text = g_file_get_uri (file); +} } /* setup the entry text */ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30033 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-16 17:50:39 + (Tue, 16 Jun 2009) New Revision: 30033 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c Log: * thunar/thunar-file.c: In thunar_file_reload(), always reload the file first, before checking if it still exists and needs to be destroyed. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-16 10:15:06 UTC (rev 30032) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-16 17:50:39 UTC (rev 30033) @@ -1,5 +1,11 @@ 2009-06-16 Jannis Pohlmann + * thunar/thunar-file.c: In thunar_file_reload(), always reload the + file first, before checking if it still exists and needs to be + destroyed. + +2009-06-16 Jannis Pohlmann + * thunar/thunar-path-entry.c: Display the local path only for native files. If there is no path, use the URI. Always use the URI for non-native files. Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-16 10:15:06 UTC (rev 30032) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-16 17:50:39 UTC (rev 30033) @@ -2786,25 +2786,18 @@ { _thunar_return_if_fail (THUNAR_IS_FILE (file)); - if (!g_file_query_exists (file->gfile, NULL)) + thunar_file_load (file, NULL, NULL); + + /* destroy the file if we cannot query any file information */ + if (file->info == NULL) { - /* the file is no longer present */ thunar_file_destroy (file); + return; } - else -{ - thunar_file_load (file, NULL, NULL); - /* destroy the file if we cannot query any file information */ - if (file->info == NULL) -{ - thunar_file_destroy (file); - return; -} - - /* ... and tell others */ - thunar_file_changed (file); -} + /* ... and tell others */ + thunar_file_changed (file); + } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30034 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-16 17:50:46 + (Tue, 16 Jun 2009) New Revision: 30034 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-location-entry.c Log: * thunar/thunar-location-entry.c: Split thunar_location_entry_activate() up into two functions, thunar_location_entry_activate() an thunar_location_entry_activate_finished(). Use g_file_mount_enclosing_volume() to make sure the volume is mounted before we switch to the new directory or launch the file. Remote machine browsing, here we come! Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-16 17:50:39 UTC (rev 30033) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-16 17:50:46 UTC (rev 30034) @@ -1,5 +1,15 @@ 2009-06-16 Jannis Pohlmann + * thunar/thunar-location-entry.c: Split + thunar_location_entry_activate() up into two functions, + thunar_location_entry_activate() an + thunar_location_entry_activate_finished(). Use + g_file_mount_enclosing_volume() to make sure the volume is mounted + before we switch to the new directory or launch the file. Remote + machine browsing, here we come! + +2009-06-16 Jannis Pohlmann + * thunar/thunar-file.c: In thunar_file_reload(), always reload the file first, before checking if it still exists and needs to be destroyed. Modified: thunar/branches/migration-to-gio/thunar/thunar-location-entry.c === --- thunar/branches/migration-to-gio/thunar/thunar-location-entry.c 2009-06-16 17:50:39 UTC (rev 30033) +++ thunar/branches/migration-to-gio/thunar/thunar-location-entry.c 2009-06-16 17:50:46 UTC (rev 30034) @@ -400,11 +400,93 @@ static void +thunar_location_entry_activate_finish (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + ThunarLocationEntry *location_entry = THUNAR_LOCATION_ENTRY (user_data); + ThunarFile *file; + GError *error = NULL; + + _thunar_return_if_fail (G_IS_FILE (object)); + _thunar_return_if_fail (G_IS_ASYNC_RESULT (result)); + _thunar_return_if_fail (THUNAR_IS_LOCATION_ENTRY (location_entry)); + + /* get the file the path entry currently refers to. We expect the file + * to be the same as the one the path entry had when we started this + * mount operation */ + file = thunar_path_entry_get_current_file (THUNAR_PATH_ENTRY (location_entry->path_entry)); + + /* finish mounting the volume */ + if (!g_file_mount_enclosing_volume_finish (G_FILE (object), result, &error)) +{ + /* ignore already mounted errors */ + if (error->domain == G_IO_ERROR && error->code == G_IO_ERROR_ALREADY_MOUNTED) +g_clear_error (&error); +} + + /* check if mounting succeeded */ + if (error == NULL) +{ + /* check if we have a current file at all */ + if (file != NULL) +{ + /* if the file is unknown we reload it, assuming that it was unknown due to + * its volume not being mounted before */ + if (thunar_file_get_kind (file) == G_FILE_TYPE_UNKNOWN) +thunar_file_reload (file); + + /* check if we have a new directory or a file to launch */ + if (thunar_file_is_directory (file)) +{ + /* open the new directory */ + thunar_navigator_change_directory (THUNAR_NAVIGATOR (location_entry), file); +} + else +{ + /* try to launch the selected file */ + thunar_file_launch (file, location_entry->path_entry, &error); + + /* be sure to reset the current file of the path entry */ + if (G_LIKELY (location_entry->current_directory != NULL)) +{ + thunar_path_entry_set_current_file (THUNAR_PATH_ENTRY (location_entry->path_entry), + location_entry->current_directory); +} +} +} +} + else +{ + /* check if we have a file at all */ + if (file != NULL) +{ + /* display an error explaining why we couldn't open/mount the file */ + thunar_dialogs_show_error (location_entry->path_entry, + error, _("Failed to launch \"%s\""), + thunar_file_get_display_name (file)); +} + + /* free the error */ + g_error_free (error); +} + + /* release the reference on the location entry */ + g_object_unref (location_entry); +} + + + + + +static
[Xfce4-commits] r30037 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-16 23:28:53 + (Tue, 16 Jun 2009) New Revision: 30037 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/main.c thunar/branches/migration-to-gio/thunar/thunar-application.c thunar/branches/migration-to-gio/thunar/thunar-application.h Log: * thunar/main.c, thunar/thunar-application.{c,h}: thunar_application_process_filenames() now works asynchronously because it might have to mount the enclosing volumes of one of the filenames first (which is only possible asynchronously). Add new method thunar_application_is_processing() which returns whether ThunarApplication is still busy processing filenames or not. In main(), always enter the main loop but schedule an idle source to repeatedly check whether ThunarApplication has finished processing the command line arguments. Once this is the case, exit if there are no open Thunar windows. All in all, this gives us about the same behaviour main() had before, except that it the application might exit with a short delay. The result: Calling "thunar " from the shell works now! Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-16 19:34:50 UTC (rev 30036) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-16 23:28:53 UTC (rev 30037) @@ -1,3 +1,19 @@ +2009-06-17 Jannis Pohlmann + + * thunar/main.c, thunar/thunar-application.{c,h}: + thunar_application_process_filenames() now works asynchronously + because it might have to mount the enclosing volumes of one of the + filenames first (which is only possible asynchronously). Add new + method thunar_application_is_processing() which returns whether + ThunarApplication is still busy processing filenames or not. In + main(), always enter the main loop but schedule an idle source to + repeatedly check whether ThunarApplication has finished processing + the command line arguments. Once this is the case, exit if there are + no open Thunar windows. All in all, this gives us about the same + behaviour main() had before, except that it the application might + exit with a short delay. The result: Calling "thunar " + from the shell works now! + 2009-06-16 Jannis Pohlmann * thunar/thunar-location-entry.c: Split Modified: thunar/branches/migration-to-gio/thunar/main.c === --- thunar/branches/migration-to-gio/thunar/main.c 2009-06-16 19:34:50 UTC (rev 30036) +++ thunar/branches/migration-to-gio/thunar/main.c 2009-06-16 23:28:53 UTC (rev 30037) @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -74,12 +75,43 @@ +static gboolean +thunar_delayed_exit_check (gpointer user_data) +{ + ThunarApplication *application = user_data; + + _thunar_return_val_if_fail (THUNAR_IS_APPLICATION (application), FALSE); + + /* call this function again later if the application is still processing the + * command line arguments */ + if (thunar_application_is_processing (application)) +return TRUE; + + /* the application has processed all command line arguments. don't call + * this function again if it could load at least one of them */ + if (thunar_application_has_windows (application)) +{ + return FALSE; +} + else +{ + /* no command line arguments opened in Thunar, exit now */ + gtk_main_quit (); + + /* don't call this function again */ + return FALSE; +} + +} + + + int main (int argc, char **argv) { ThunarSessionClient *session_client; #ifdef HAVE_DBUS - ThunarDBusService *dbus_service; + ThunarDBusService *dbus_service = NULL; #endif ThunarApplication *application; GError *error = NULL; @@ -241,22 +273,31 @@ /* connect to the session manager */ session_client = thunar_session_client_new (opt_sm_client_id); - /* do not enter the main loop, unless we have atleast one window or we are in daemon mode */ - if (thunar_application_has_windows (application) || thunar_application_get_daemon (application)) + /* check if the application should run as a daemon */ + if (thunar_application_get_daemon (application)) { - /* attach the D-BUS service */ #ifdef HAVE_DBUS + /* attach the D-Bus service */ dbus_service = g_object_new (THUNAR_TYPE_DBUS_SERVICE, NULL); #endif +} + else +{ + /* processing the command line arguments is done asynchronously. Thus, we + * schedule an idle source which repeatedly checks whether we are done + * processing. Once we're done, it'll make the application qui
[Xfce4-commits] r30038 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-17 00:13:08 + (Wed, 17 Jun 2009) New Revision: 30038 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c thunar/branches/migration-to-gio/thunar/thunar-file.h Log: * thunar/thunar-file.c: Refactor thunar_file_load() and thunar_file_get() a bit. For now, thunar_file_load() will always return successful, even if the GFileInfo cannot be loaded. This is because we want ThunarFiles for remote URIs that are not yet mounted. To compensate for that, there's a new method thunar_file_exists() which returns TRUE iff the ThunarFile exists. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-16 23:28:53 UTC (rev 30037) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-17 00:13:08 UTC (rev 30038) @@ -1,5 +1,14 @@ 2009-06-17 Jannis Pohlmann + * thunar/thunar-file.c: Refactor thunar_file_load() and + thunar_file_get() a bit. For now, thunar_file_load() will always + return successful, even if the GFileInfo cannot be loaded. This is + because we want ThunarFiles for remote URIs that are not yet + mounted. To compensate for that, there's a new method + thunar_file_exists() which returns TRUE iff the ThunarFile exists. + +2009-06-17 Jannis Pohlmann + * thunar/main.c, thunar/thunar-application.{c,h}: thunar_application_process_filenames() now works asynchronously because it might have to mount the enclosing volumes of one of the Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-16 23:28:53 UTC (rev 30037) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-17 00:13:08 UTC (rev 30038) @@ -631,7 +631,9 @@ * @file : a #GFile. * @error : return location for errors. * - * Looks up the #ThunarFile referred to by @file. + * Looks up the #ThunarFile referred to by @file. This function may return a + * ThunarFile even though the file doesn't actually exist. This is the case + * with remote URIs (like SFTP) for instance, if they are not mounted. * * The caller is responsible to call g_object_unref() * when done with the returned object. @@ -665,12 +667,21 @@ file->display_name = NULL; file->basename = NULL; - thunar_file_load (file, NULL, error); + if (thunar_file_load (file, NULL, error)) +{ + /* insert the file into the cache */ + G_LOCK (file_cache_mutex); + g_hash_table_insert (file_cache, g_object_ref (file->gfile), file); + G_UNLOCK (file_cache_mutex); +} + else +{ + /* failed loading, destroy the file */ + g_object_unref (file); - /* insert the file into the cache */ - G_LOCK (file_cache_mutex); - g_hash_table_insert (file_cache, g_object_ref (file->gfile), file); - G_UNLOCK (file_cache_mutex); + /* make sure we return NULL */ + file = NULL; +} } return file; @@ -774,10 +785,10 @@ /* query a new file info */ file->info = g_file_query_info (file->gfile, - THUNAR_FILE_G_FILE_INFO_NAMESPACE, - G_FILE_QUERY_INFO_NONE, - cancellable, - error); + THUNAR_FILE_G_FILE_INFO_NAMESPACE, + G_FILE_QUERY_INFO_NONE, + cancellable, + NULL); /* query a new filesystem info */ file->filesystem_info = g_file_query_filesystem_info (file->gfile, @@ -880,7 +891,7 @@ g_free (md5_hash); g_free (uri); - return (file->info != NULL); + return TRUE; } /** @@ -1864,6 +1875,15 @@ +gboolean +thunar_file_exists (const ThunarFile *file) +{ + _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE); + return (file->info != NULL); +} + + + /** * thunar_file_is_directory: * @file : a #ThunarFile instance. Modified: thunar/branches/migration-to-gio/thunar/thunar-file.h === --- thunar/branches/migration-to-gio/thunar/thunar-file.h 2009-06-16 23:28:53 UTC (rev 30037) +++ thunar/branches/migration-to-gio/thunar/thunar-file.h 2009-06-17 00:13:08 UTC (rev 30038) @@ -187,6 +187,7 @@ ThunarFileModethunar_file_get_mode (const ThunarFile *file); gboolean thunar_file_get_free_space (const ThunarFile *file, guint64
[Xfce4-commits] r30039 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-17 00:13:13 + (Wed, 17 Jun 2009) New Revision: 30039 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c Log: * thunar/thunar-shortcuts-view.c: Don't request context menu items from Thunarx for files which don't exist. Reported by Nick. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-17 00:13:08 UTC (rev 30038) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-17 00:13:13 UTC (rev 30039) @@ -1,5 +1,10 @@ 2009-06-17 Jannis Pohlmann + * thunar/thunar-shortcuts-view.c: Don't request context menu items + from Thunarx for files which don't exist. Reported by Nick. + +2009-06-17 Jannis Pohlmann + * thunar/thunar-file.c: Refactor thunar_file_load() and thunar_file_get() a bit. For now, thunar_file_load() will always return successful, even if the GFileInfo cannot be loaded. This is Modified: thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c === --- thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c 2009-06-17 00:13:08 UTC (rev 30038) +++ thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c 2009-06-17 00:13:13 UTC (rev 30039) @@ -875,7 +875,7 @@ } /* create provider menu items if there is a non-trashed file */ - if (G_LIKELY (file != NULL && !thunar_file_is_trashed (file))) + if (G_LIKELY (file != NULL && thunar_file_exists (file) && !thunar_file_is_trashed (file))) { /* load the menu providers from the provider factory */ providers = thunarx_provider_factory_list_providers (view->provider_factory, THUNARX_TYPE_MENU_PROVIDER); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30040 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-17 00:27:48 + (Wed, 17 Jun 2009) New Revision: 30040 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-thumbnailer.c Log: * thunar/thunar-thumbnailer.c: Make all D-Bus related code only available when D-Bus is installed at compile time. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-17 00:13:13 UTC (rev 30039) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-17 00:27:48 UTC (rev 30040) @@ -1,5 +1,10 @@ 2009-06-17 Jannis Pohlmann + * thunar/thunar-thumbnailer.c: Make all D-Bus related code only + available when D-Bus is installed at compile time. + +2009-06-17 Jannis Pohlmann + * thunar/thunar-shortcuts-view.c: Don't request context menu items from Thunarx for files which don't exist. Reported by Nick. Modified: thunar/branches/migration-to-gio/thunar/thunar-thumbnailer.c === --- thunar/branches/migration-to-gio/thunar/thunar-thumbnailer.c 2009-06-17 00:13:13 UTC (rev 30039) +++ thunar/branches/migration-to-gio/thunar/thunar-thumbnailer.c 2009-06-17 00:27:48 UTC (rev 30040) @@ -22,17 +22,21 @@ #include #endif +#ifdef HAVE_DBUS #include #include +#include +#include +#endif + #include #include #include -#include -#include +#if HAVE_DBUS typedef enum { THUNAR_THUMBNAILER_IDLE_ERROR, @@ -44,14 +48,16 @@ typedef struct _ThunarThumbnailerCall ThunarThumbnailerCall; typedef struct _ThunarThumbnailerIdle ThunarThumbnailerIdle; +#endif +static void thunar_thumbnailer_finalize (GObject *object); +#ifdef HAVE_DBUS static void thunar_thumbnailer_init_thumbnailer_proxy (ThunarThumbnailer *thumbnailer, DBusGConnection *connection); static void thunar_thumbnailer_init_manager_proxy (ThunarThumbnailer *thumbnailer, DBusGConnection *connection); -static void thunar_thumbnailer_finalize (GObject *object); static gboolean thunar_thumbnailer_file_is_supported (ThunarThumbnailer *thumbnailer, ThunarFile *file); static void thunar_thumbnailer_thumbnailer_finished (DBusGProxy *proxy, @@ -77,6 +83,7 @@ static gboolean thunar_thumbnailer_started_idle (gpointer user_data); static void thunar_thumbnailer_call_free (ThunarThumbnailerCall *call); static void thunar_thumbnailer_idle_free (gpointer data); +#endif @@ -89,6 +96,7 @@ { GObject __parent__; +#ifdef HAVE_DBUS /* proxies to communicate with D-Bus services */ DBusGProxy *manager_proxy; DBusGProxy *thumbnailer_proxy; @@ -115,8 +123,10 @@ /* IDs of idle functions */ GList *idles; +#endif }; +#ifdef HAVE_DBUS struct _ThunarThumbnailerCall { ThunarThumbnailer *thumbnailer; @@ -135,12 +145,15 @@ gpointerrequest; } data; }; +#endif +#ifdef HAVE_DBUS static DBusGProxy *thunar_thumbnailer_manager_proxy; static DBusGProxy *thunar_thumbnailer_proxy; static DBusGProxy *thunar_manager_proxy; +#endif @@ -162,6 +175,7 @@ static void thunar_thumbnailer_init (ThunarThumbnailer *thumbnailer) { +#ifdef HAVE_DBUS DBusGConnection *connection; thumbnailer->lock = g_mutex_new (); @@ -194,11 +208,92 @@ /* release the D-Bus connection if we have one */ if (connection != NULL) dbus_g_connection_unref (connection); +#endif } static void +thunar_thumbnailer_finalize (GObject *object) +{ +#ifdef HAVE_DBUS + ThunarThumbnailerIdle *idle; + ThunarThumbnailer *thumbnailer = THUNAR_THUMBNAILER (object); + GList *list; + GList *lp; + + /* acquire the thumbnailer lock */ + g_mutex_lock (thumbnailer->lock); + + /* abort all pending idle functions */ + for (lp = thumbnailer->idles; lp != NULL; lp = lp->next) +{ + idle = lp->data; + g_source_remove (idle->id); +} + + /* free the idle list */ + g_list_free (thumbnailer->idles); + + if (thumbnailer->manager_proxy != NULL) +{ + /* disconnect from the manager proxy */ + g_signal_handlers_disconnect_matched (thumbnailer->manager_proxy, +G_SIGNAL_MATCH_DATA, 0, 0, +NULL, NULL, thumbnailer); + + /* release the manager proxy */ + g_object_unref (thumbnailer->manager_proxy); +} + + if (thumbnailer->thumbnailer
[Xfce4-commits] r30041 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-17 17:57:30 + (Wed, 17 Jun 2009) New Revision: 30041 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c thunar/branches/migration-to-gio/thunar/thunar-file.h Log: * thunar/thunar-file.{c,h}: Add new boolean is_mounted member to ThunarFile. It is FALSE iff the GFileInfo of the file couldn't be loaded due to G_IO_ERROR_NO_MOUNTED. Return TRUE from thunar_file_load() only when the file info could be loaded or the file is not mounted yet. Use the path instead of the file:// URI for the display name of local files. Add new method thunar_file_is_mounted(). Add support for GFileIcons in thunar_file_get_icon_name() by returning the path to the icon filename if the file has a GFileIcon. Call thunar_file_reload() instead of thunar_file_destroy() on G_FILE_MONITOR_EVENT_DELETED and G_FILE_MONITOR_EVEN_PRE_UNMOUNT. The reload function will then destroy the file if it doesn't exist anymore. Not mounted files will not be destroyed though. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-17 00:27:48 UTC (rev 30040) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-17 17:57:30 UTC (rev 30041) @@ -1,5 +1,21 @@ 2009-06-17 Jannis Pohlmann + * thunar/thunar-file.{c,h}: Add new boolean is_mounted member to + ThunarFile. It is FALSE iff the GFileInfo of the file couldn't be + loaded due to G_IO_ERROR_NO_MOUNTED. Return TRUE from + thunar_file_load() only when the file info could be loaded or the + file is not mounted yet. Use the path instead of the file:// URI for + the display name of local files. Add new method + thunar_file_is_mounted(). Add support for GFileIcons in + thunar_file_get_icon_name() by returning the path to the icon + filename if the file has a GFileIcon. Call thunar_file_reload() + instead of thunar_file_destroy() on G_FILE_MONITOR_EVENT_DELETED and + G_FILE_MONITOR_EVEN_PRE_UNMOUNT. The reload function will then + destroy the file if it doesn't exist anymore. Not mounted files will + not be destroyed though. + +2009-06-17 Jannis Pohlmann + * thunar/thunar-thumbnailer.c: Make all D-Bus related code only available when D-Bus is installed at compile time. Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-17 00:27:48 UTC (rev 30040) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-17 17:57:30 UTC (rev 30041) @@ -591,7 +591,7 @@ case G_FILE_MONITOR_EVENT_PRE_UNMOUNT: case G_FILE_MONITOR_EVENT_DELETED: - thunar_file_destroy (file); + thunar_file_reload (file); break; default: @@ -742,11 +742,12 @@ GError **error) { GKeyFile *key_file; + GError *err = NULL; GFile*thumbnail_dir; gchar*basename; gchar*md5_hash; gchar*thumbnail_dir_path; - gchar*uri; + gchar*uri = NULL; _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE); _thunar_return_val_if_fail (error == NULL || *error == NULL, FALSE); @@ -783,13 +784,25 @@ /* free thumbnail path */ g_free (file->thumbnail_path); + /* assume the file is mounted by default */ + file->is_mounted = TRUE; + /* query a new file info */ file->info = g_file_query_info (file->gfile, THUNAR_FILE_G_FILE_INFO_NAMESPACE, G_FILE_QUERY_INFO_NONE, cancellable, - NULL); + &err); + if (err != NULL) +{ + if (err->domain == G_IO_ERROR && err->code == G_IO_ERROR_NOT_MOUNTED) +{ + file->is_mounted = FALSE; + g_clear_error (&err); +} +} + /* query a new filesystem info */ file->filesystem_info = g_file_query_filesystem_info (file->gfile, THUNAR_FILE_G_FILE_INFO_FILESYSTEM_NAMESPACE, @@ -871,7 +884,17 @@ } else { - uri = g_file_get_uri (file->gfile); + if (g_file_is_native (file->gfile)) +{ + uri = g_file_get_path (file->gfile); + if (uri == NULL) +uri = g_file_get_uri (file->gfile); +} + else +{ + uri = g_file_get_uri (file->gfile); +} + file->display_name = g_filename_display_name (uri); g_free (uri);
[Xfce4-commits] r30042 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-17 17:57:37 + (Wed, 17 Jun 2009) New Revision: 30042 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-location-entry.c Log: * thunar/thunar-location-entry.c: Check if files are mounted before mounting their volumes asynchronously. If they are, just open them directly. Rework the code a bit, add a new private method thunar_location_entry_open_or_launch(). Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-17 17:57:30 UTC (rev 30041) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-17 17:57:37 UTC (rev 30042) @@ -1,5 +1,12 @@ 2009-06-17 Jannis Pohlmann + * thunar/thunar-location-entry.c: Check if files are mounted before + mounting their volumes asynchronously. If they are, just open them + directly. Rework the code a bit, add a new private method + thunar_location_entry_open_or_launch(). + +2009-06-17 Jannis Pohlmann + * thunar/thunar-file.{c,h}: Add new boolean is_mounted member to ThunarFile. It is FALSE iff the GFileInfo of the file couldn't be loaded due to G_IO_ERROR_NO_MOUNTED. Return TRUE from Modified: thunar/branches/migration-to-gio/thunar/thunar-location-entry.c === --- thunar/branches/migration-to-gio/thunar/thunar-location-entry.c 2009-06-17 17:57:30 UTC (rev 30041) +++ thunar/branches/migration-to-gio/thunar/thunar-location-entry.c 2009-06-17 17:57:37 UTC (rev 30042) @@ -36,6 +36,10 @@ +typedef struct _ActivateData ActivateData; + + + /* Property identifiers */ enum { @@ -99,8 +103,14 @@ GtkWidget *path_entry; }; +struct _ActivateData +{ + ThunarLocationEntry *location_entry; + ThunarFile *file; +}; + static GObjectClass *thunar_location_entry_parent_class; @@ -400,79 +410,106 @@ static void +thunar_location_entry_open_or_launch (ThunarLocationEntry *location_entry, + ThunarFile *file) +{ + GError *error = NULL; + + _thunar_return_if_fail (THUNAR_IS_LOCATION_ENTRY (location_entry)); + _thunar_return_if_fail (THUNAR_IS_FILE (file)); + + /* check if the file is mounted */ + if (thunar_file_is_mounted (file)) +{ + /* check if we have a new directory or a file to launch */ + if (thunar_file_is_directory (file)) +{ + /* open the new directory */ + thunar_navigator_change_directory (THUNAR_NAVIGATOR (location_entry), file); +} + else +{ + /* try to launch the selected file */ + thunar_file_launch (file, location_entry->path_entry, &error); + + /* be sure to reset the current file of the path entry */ + if (G_LIKELY (location_entry->current_directory != NULL)) +{ + thunar_path_entry_set_current_file (THUNAR_PATH_ENTRY (location_entry->path_entry), + location_entry->current_directory); +} +} +} + else +{ + g_set_error (&error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND, _("File does not exist")); +} + + /* check if we need to display an error dialog */ + if (error != NULL) +{ + thunar_dialogs_show_error (location_entry->path_entry, error, + _("Failed to open \"%s\""), + thunar_file_get_display_name (file)); + g_error_free (error); +} +} + + + +static void thunar_location_entry_activate_finish (GObject *object, GAsyncResult *result, gpointer user_data) { - ThunarLocationEntry *location_entry = THUNAR_LOCATION_ENTRY (user_data); - ThunarFile *file; - GError *error = NULL; + ActivateData *data = user_data; + GError *error = NULL; _thunar_return_if_fail (G_IS_FILE (object)); _thunar_return_if_fail (G_IS_ASYNC_RESULT (result)); - _thunar_return_if_fail (THUNAR_IS_LOCATION_ENTRY (location_entry)); + _thunar_return_if_fail (data != NULL); + _thunar_return_if_fail (THUNAR_IS_LOCATION_ENTRY (data->location_entry)); + _thunar_return_if_fail (THUNAR_IS_FILE (data->file)); - /* get the file the path entry currently refers to. We expect the file - * to be the same as the one the path entry had when we started this - * mount operation */ - file = thunar_path_entry_get_current_file (THUNAR_PATH_ENTRY (location_entry->path_entry)); - /* finish mounting the volume */ if (!g_file_mount_enclosing_volume_finish (G_FILE (object), result, &error)) { - /* ignore already mounted errors */ - if (er
[Xfce4-commits] r30043 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-17 17:57:41 + (Wed, 17 Jun 2009) New Revision: 30043 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-window.c Log: * thunar/thunar-window.c: Split thunar_window_start_open_location() up into three functions and load unmounted files asynchronously. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-17 17:57:37 UTC (rev 30042) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-17 17:57:41 UTC (rev 30043) @@ -1,5 +1,10 @@ 2009-06-17 Jannis Pohlmann + * thunar/thunar-window.c: Split thunar_window_start_open_location() + up into three functions and load unmounted files asynchronously. + +2009-06-17 Jannis Pohlmann + * thunar/thunar-location-entry.c: Check if files are mounted before mounting their volumes asynchronously. If they are, just open them directly. Rework the code a bit, add a new private method Modified: thunar/branches/migration-to-gio/thunar/thunar-window.c === --- thunar/branches/migration-to-gio/thunar/thunar-window.c 2009-06-17 17:57:37 UTC (rev 30042) +++ thunar/branches/migration-to-gio/thunar/thunar-window.c 2009-06-17 17:57:41 UTC (rev 30043) @@ -62,6 +62,11 @@ #include + +typedef struct _MountData MountData; + + + /* Property identifiers */ enum { @@ -279,8 +284,14 @@ GType toggle_sidepane_type; }; +struct _MountData +{ + ThunarWindow *window; + ThunarFile *file; +}; + static GtkActionEntry action_entries[] = { { "file-menu", NULL, N_ ("_File"), NULL, }, @@ -1408,12 +1419,107 @@ static void +thunar_window_open_or_launch (ThunarWindow *window, + ThunarFile *file) +{ + GError *error = NULL; + + _thunar_return_if_fail (THUNAR_IS_WINDOW (window)); + _thunar_return_if_fail (THUNAR_IS_FILE (file)); + + if (thunar_file_is_mounted (file)) +{ + if (thunar_file_is_directory (file)) +{ + /* open the new directory */ + thunar_window_set_current_directory (window, file); +} + else +{ + /* try to launch the selected file */ + if (!thunar_file_launch (file, window, &error)) +{ + thunar_dialogs_show_error (window, error, _("Failed to launch \"%s\""), + thunar_file_get_display_name (file)); + g_error_free (error); +} +} +} + else +{ + g_set_error (&error, G_IO_ERROR, G_IO_ERROR_NOT_MOUNTED, _("Mounting failed")); + thunar_dialogs_show_error (window, error, _("Failed to open \"%s\""), + thunar_file_get_display_name (file)); + g_error_free (error); +} +} + + + +static void +thunar_window_open_async_finish (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + MountData *data = user_data; + GError*error = NULL; + + _thunar_return_if_fail (G_IS_FILE (object)); + _thunar_return_if_fail (G_IS_ASYNC_RESULT (result)); + _thunar_return_if_fail (data != NULL); + _thunar_return_if_fail (THUNAR_IS_WINDOW (data->window)); + _thunar_return_if_fail (THUNAR_IS_FILE (data->file)); + + /* finish mounting the enclosing volume */ + if (!g_file_mount_enclosing_volume_finish (G_FILE (object), result, &error)) +{ + if (error->domain == G_IO_ERROR) +{ + /* ignore already mounted and not supported errors */ + if (error->code == G_IO_ERROR_ALREADY_MOUNTED + || error->code == G_IO_ERROR_NOT_SUPPORTED) +{ + g_clear_error (&error); +} +} +} + + /* check if mounting succeeded */ + if (error == NULL) +{ + /* reload the file if it wasn't mounted previously */ + if (!thunar_file_is_mounted (data->file)) +thunar_file_reload (data->file); + + /* now try to open the file */ + thunar_window_open_or_launch (data->window, data->file); +} + else +{ + /* show the error dialog */ + thunar_dialogs_show_error (data->window, error, _("Failed to open \"%s\""), + thunar_file_get_display_name (data->file)); + + /* free the error */ + g_error_free (error); +} + + /* free the mount data */ + g_object_unref (data->file); + g_object_unref (data->window); + _thunar_slice_free (MountData, data); +} + + + +static void thunar_window_start_open_location (ThunarWindow *window, const gchar
[Xfce4-commits] r30044 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-17 17:57:46 + (Wed, 17 Jun 2009) New Revision: 30044 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c Log: * thunar/thunar-shortcuts-model.c: Minor code reorganization. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-17 17:57:41 UTC (rev 30043) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-17 17:57:46 UTC (rev 30044) @@ -1,5 +1,9 @@ 2009-06-17 Jannis Pohlmann + * thunar/thunar-shortcuts-model.c: Minor code reorganization. + +2009-06-17 Jannis Pohlmann + * thunar/thunar-window.c: Split thunar_window_start_open_location() up into three functions and load unmounted files asynchronously. Modified: thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c === --- thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c 2009-06-17 17:57:41 UTC (rev 30043) +++ thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c 2009-06-17 17:57:46 UTC (rev 30044) @@ -882,21 +882,22 @@ continue; /* make sure the file refers to a directory */ - if (G_UNLIKELY (!thunar_file_is_directory (file))) + if (G_UNLIKELY (thunar_file_is_directory (file))) { - g_object_unref (G_OBJECT (file)); - continue; + /* create the shortcut entry */ + shortcut = _thunar_slice_new0 (ThunarShortcut); + shortcut->type = THUNAR_SHORTCUT_USER_DEFINED; + shortcut->file = file; + shortcut->name = (*name != '\0') ? g_strdup (name) : NULL; + + /* append the shortcut to the list */ + thunar_shortcuts_model_add_shortcut (model, shortcut, path); + gtk_tree_path_next (path); } - - /* create the shortcut entry */ - shortcut = _thunar_slice_new0 (ThunarShortcut); - shortcut->type = THUNAR_SHORTCUT_USER_DEFINED; - shortcut->file = file; - shortcut->name = (*name != '\0') ? g_strdup (name) : NULL; - - /* append the shortcut to the list */ - thunar_shortcuts_model_add_shortcut (model, shortcut, path); - gtk_tree_path_next (path); + else +{ + g_object_unref (file); +} } /* clean up */ @@ -1113,10 +1114,10 @@ _thunar_return_if_fail (THUNAR_IS_FILE (file)); _thunar_return_if_fail (THUNAR_IS_SHORTCUTS_MODEL (model)); - /* check if the file still refers to a directory, else we cannot keep - * it on the shortcuts list, and so we'll treat it like the file - * was destroyed (and thereby removed) - */ + /* check if the file still refers to a directory or a not mounted URI, + * otherwise we cannot keep it on the shortcuts list, and so we'll treat + * it like the file was destroyed (and thereby removed) */ + if (G_UNLIKELY (!thunar_file_is_directory (file))) { thunar_shortcuts_model_file_destroy (file, model); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30045 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-17 17:57:51 + (Wed, 17 Jun 2009) New Revision: 30045 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c Log: * thunar/thunar-shortcuts-view.c: Rework mounting and mounting + open. Also make opening items other than volumes work asynchronously. To do that, first check if the file to be opened is mounted already. If that's the case, open it directly. If not, mount the enclosing volume asynchronously and open the file in the mount callback. This works for opening in the same or a new window. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-17 17:57:46 UTC (rev 30044) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-17 17:57:51 UTC (rev 30045) @@ -1,5 +1,14 @@ 2009-06-17 Jannis Pohlmann + * thunar/thunar-shortcuts-view.c: Rework mounting and mounting + open. + Also make opening items other than volumes work asynchronously. To + do that, first check if the file to be opened is mounted already. If + that's the case, open it directly. If not, mount the enclosing + volume asynchronously and open the file in the mount callback. This + works for opening in the same or a new window. + +2009-06-17 Jannis Pohlmann + * thunar/thunar-shortcuts-model.c: Minor code reorganization. 2009-06-17 Jannis Pohlmann Modified: thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c === --- thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c 2009-06-17 17:57:46 UTC (rev 30044) +++ thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c 2009-06-17 17:57:51 UTC (rev 30045) @@ -45,6 +45,10 @@ +typedef struct _MountData MountData; + + + /* Identifiers for signals */ enum { @@ -119,15 +123,14 @@ static void thunar_shortcuts_view_drop_uri_list (ThunarShortcutsView *view, GList*path_list, GtkTreePath *dst_path); -static void thunar_shortcuts_view_open (ThunarShortcutsView *view); -static void thunar_shortcuts_view_open_selection (ThunarShortcutsView *view); -static void thunar_shortcuts_view_open_in_new_window (ThunarShortcutsView *view); -static void thunar_shortcuts_view_open_selection_in_new_window (ThunarShortcutsView *view); +static void thunar_shortcuts_view_open_clicked (ThunarShortcutsView *view); +static void thunar_shortcuts_view_open (ThunarShortcutsView *view, + gboolean new_window, + gboolean mount_only); +static void thunar_shortcuts_view_open_in_new_window_clicked (ThunarShortcutsView *view); static void thunar_shortcuts_view_empty_trash (ThunarShortcutsView *view); static void thunar_shortcuts_view_eject (ThunarShortcutsView *view); static void thunar_shortcuts_view_mount_clicked (ThunarShortcutsView *view); -static void thunar_shortcuts_view_mount (ThunarShortcutsView *view, - gboolean open_in_new_window); static gboolean thunar_shortcuts_view_separator_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data); @@ -164,8 +167,17 @@ gint queue_resize_signal_id; }; +struct _MountData +{ + ThunarShortcutsView *view; + ThunarFile *file; + GVolume *volume; + guintnew_window : 1; + guintmount_only : 1; +}; + /* Target types for dragging from the shortcuts view */ static const GtkTargetEntry drag_targets[] = { { "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, GTK_TREE_MODEL_ROW }, @@ -416,9 +428,9 @@ { /* check if we should simply open or open in new window */ if (G_LIKELY (event->button == 1)) -thunar_shortcuts_view_open (view); +thunar_shortcuts_view_open (view, FALSE, FALSE);
[Xfce4-commits] r30046 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-19 15:34:00 + (Fri, 19 Jun 2009) New Revision: 30046 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c thunar/branches/migration-to-gio/thunar/thunar-location-button.c Log: * thunar/thunar-file.c: Use special icon names for root folders other than trash://: "disk-harddrive" for the local root and "folder-remote" for root folders on other machines. * thunar/thunar-location-button.c: Show a label even for the local root, just to be more consistent. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-17 17:57:51 UTC (rev 30045) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-19 15:34:00 UTC (rev 30046) @@ -1,5 +1,13 @@ 2009-06-17 Jannis Pohlmann + * thunar/thunar-file.c: Use special icon names for root folders other + than trash://: "disk-harddrive" for the local root and + "folder-remote" for root folders on other machines. + * thunar/thunar-location-button.c: Show a label even for the local + root, just to be more consistent. + +2009-06-17 Jannis Pohlmann + * thunar/thunar-shortcuts-view.c: Rework mounting and mounting + open. Also make opening items other than volumes work asynchronously. To do that, first check if the file to be opened is mounted already. If Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-17 17:57:51 UTC (rev 30045) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-19 15:34:00 UTC (rev 30046) @@ -2633,6 +2633,16 @@ _thunar_return_val_if_fail (THUNAR_IS_FILE (file), NULL); _thunar_return_val_if_fail (GTK_IS_ICON_THEME (icon_theme), NULL); + /* root folders have special icons */ + if (thunar_file_is_root (file) && !thunar_file_is_trashed (file)) +{ + /* use disk icon for / and a remote folder icon for remote roots */ + if (thunar_file_is_local (file)) +return g_strdup ("drive-harddisk"); + else +return g_strdup ("folder-remote"); +} + if (file->info == NULL) return NULL; @@ -2679,9 +2689,9 @@ } /* check if we have an accept icon for the icon we found */ - if (icon_name != NULL && - (g_str_equal (icon_name, "inode-directory") - || g_str_equal (icon_name, "folder"))) + if (icon_name != NULL + && (g_str_equal (icon_name, "inode-directory") + || g_str_equal (icon_name, "folder"))) { if (icon_state == THUNAR_FILE_ICON_STATE_DROP) { Modified: thunar/branches/migration-to-gio/thunar/thunar-location-button.c === --- thunar/branches/migration-to-gio/thunar/thunar-location-button.c 2009-06-17 17:57:51 UTC (rev 30045) +++ thunar/branches/migration-to-gio/thunar/thunar-location-button.c 2009-06-19 15:34:00 UTC (rev 30046) @@ -467,18 +467,9 @@ /* determine the icon theme for the widget */ icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (location_button))); - /* the label is hidden for the file system root */ - if (thunar_file_is_local (file) && thunar_file_is_root (file)) -{ - /* hide the label widget */ - gtk_widget_hide (location_button->label); -} - else -{ - /* update and show the label widget */ - gtk_label_set_text (GTK_LABEL (location_button->label), thunar_file_get_display_name (file)); - gtk_widget_show (location_button->label); -} + /* update and show the label widget */ + gtk_label_set_text (GTK_LABEL (location_button->label), thunar_file_get_display_name (file)); + gtk_widget_show (location_button->label); /* the image is only visible for certain special paths */ if (thunar_file_is_home (file) || thunar_file_is_desktop (file) || thunar_file_is_root (file)) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30047 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-19 15:34:06 + (Fri, 19 Jun 2009) New Revision: 30047 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c thunar/branches/migration-to-gio/thunar/thunar-file.h Log: * thunar/thunar-file.{c,h}: Add "mountable::*" namespace to the file info attributes we request from the GFileInfo. In thunar_file_load(), check for type G_FILE_TYPE_MOUNTABLE and set is_mounted to FALSE if its G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT is TRUE. Add function thunar_file_get_target_location() which returns a GFile for the target location of a file of type G_FILE_TYPE_SHORTCUT or G_FILE_TYPE_MOUNTABLE and otherwise returns NULL. Don't assume all files have a content type - shortcuts and mountables don't. Work around this in thunar_file_is_desktop_file() and thunar_file_list_get_applications(). Check if we have a GFileInfo before querying the original path in thunar_file_get_original_path(). Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-19 15:34:00 UTC (rev 30046) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-19 15:34:06 UTC (rev 30047) @@ -1,3 +1,18 @@ +2009-06-19 Jannis Pohlmann + + * thunar/thunar-file.{c,h}: Add "mountable::*" namespace to the file + info attributes we request from the GFileInfo. In + thunar_file_load(), check for type G_FILE_TYPE_MOUNTABLE and set + is_mounted to FALSE if its G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT is + TRUE. Add function thunar_file_get_target_location() which returns + a GFile for the target location of a file of type + G_FILE_TYPE_SHORTCUT or G_FILE_TYPE_MOUNTABLE and otherwise returns + NULL. Don't assume all files have a content type - shortcuts and + mountables don't. Work around this in thunar_file_is_desktop_file() + and thunar_file_list_get_applications(). Check if we have a + GFileInfo before querying the original path in + thunar_file_get_original_path(). + 2009-06-17 Jannis Pohlmann * thunar/thunar-file.c: Use special icon names for root folders other Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-19 15:34:00 UTC (rev 30046) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-19 15:34:06 UTC (rev 30047) @@ -68,12 +68,13 @@ /* File attribute namespaces being used */ #define THUNAR_FILE_G_FILE_INFO_NAMESPACE \ + "access::*," \ + "mountable::*," \ + "preview::*," \ "standard::*," \ - "unix::*," \ - "access::*," \ "time::*," \ "thumbnail::*," \ - "preview::*" + "unix::*" #define THUNAR_FILE_G_FILE_INFO_FILESYSTEM_NAMESPACE \ "filesystem::*" @@ -577,7 +578,7 @@ ThunarFile *file; _thunar_return_if_fail (G_IS_FILE (path)); - + file = thunar_file_cache_lookup (path); if (G_LIKELY (file != NULL)) { @@ -791,11 +792,19 @@ file->info = g_file_query_info (file->gfile, THUNAR_FILE_G_FILE_INFO_NAMESPACE, G_FILE_QUERY_INFO_NONE, - cancellable, - &err); + cancellable, &err); - if (err != NULL) + if (err == NULL) { + if (g_file_info_get_file_type (file->info) == G_FILE_TYPE_MOUNTABLE) +{ + file->is_mounted = +!g_file_info_get_attribute_boolean (file->info, + G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT); +} +} + else +{ if (err->domain == G_IO_ERROR && err->code == G_IO_ERROR_NOT_MOUNTED) { file->is_mounted = FALSE; @@ -1854,6 +1863,24 @@ +GFile * +thunar_file_get_target_location (const ThunarFile *file) +{ + const gchar *uri; + + _thunar_return_val_if_fail (THUNAR_IS_FILE (file), NULL); + + if (file->info == NULL) +return g_object_ref (file->gfile); + + uri = g_file_info_get_attribute_string (file->info, + G_FILE_ATTRIBUTE_STANDARD_TARGET_URI); + + return (uri != NULL) ? g_file_new_for_uri (uri) : NULL; +} + + + /** * thunar_file_get_mode: * @file : a #ThunarFile instance. @@ -2169,13 +2196,21 @@ gboolean thunar_file_is_desktop_file (const ThunarFile *file) { + const gchar *content_type; + gboolean is_desktop_file = FALSE; + _thunar_r
[Xfce4-commits] r30048 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-19 15:34:11 + (Fri, 19 Jun 2009) New Revision: 30048 Added: thunar/branches/migration-to-gio/thunar/thunar-browser.c thunar/branches/migration-to-gio/thunar/thunar-browser.h Modified: thunar/branches/migration-to-gio/ChangeLog Log: * thunar/thunar-browser.{c,h}: Add a new interface with two convenience functions for browsing (possibly not yet mounted or resolved) volumes and files. thunar_browser_poke_file() can be used to asynchronously resolve shortcuts, mount mountables or enclosing volumes. When finished, the ThunarBrowserPokeFileFunc callback is called with the source and target file. thunar_browser_poke_volume() mounts volumes on demand and resolves the mount point and passes it to the ThunarBrowsePokeVolumeFunc callback. Both functions are possibly asynchronous. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-19 15:34:06 UTC (rev 30047) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-19 15:34:11 UTC (rev 30048) @@ -1,5 +1,17 @@ 2009-06-19 Jannis Pohlmann + * thunar/thunar-browser.{c,h}: Add a new interface with two + convenience functions for browsing (possibly not yet mounted or + resolved) volumes and files. thunar_browser_poke_file() can be used + to asynchronously resolve shortcuts, mount mountables or enclosing + volumes. When finished, the ThunarBrowserPokeFileFunc callback is + called with the source and target file. thunar_browser_poke_volume() + mounts volumes on demand and resolves the mount point and passes it + to the ThunarBrowsePokeVolumeFunc callback. Both functions are + possibly asynchronous. + +2009-06-19 Jannis Pohlmann + * thunar/thunar-file.{c,h}: Add "mountable::*" namespace to the file info attributes we request from the GFileInfo. In thunar_file_load(), check for type G_FILE_TYPE_MOUNTABLE and set Added: thunar/branches/migration-to-gio/thunar/thunar-browser.c === --- thunar/branches/migration-to-gio/thunar/thunar-browser.c (rev 0) +++ thunar/branches/migration-to-gio/thunar/thunar-browser.c2009-06-19 15:34:11 UTC (rev 30048) @@ -0,0 +1,549 @@ +/* vi:set et ai sw=2 sts=2 ts=2: */ +/*- + * Copyright (c) 2009 Jannis Pohlmann + * + * 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 +#endif + +#include + +#include +#include +#include +#include + + + +typedef struct _PokeFileData PokeFileData; +typedef struct _PokeVolumeData PokeVolumeData; + +struct _PokeFileData +{ + ThunarBrowser*browser; + ThunarFile *source; + ThunarFile *file; + ThunarBrowserPokeFileFunc func; + gpointer user_data; +}; + +struct _PokeVolumeData +{ + ThunarBrowser *browser; + GVolume*volume; + ThunarFile *mount_point; + ThunarBrowserPokeVolumeFunc func; + gpointeruser_data; +}; + + + +GType +thunar_browser_get_type (void) +{ + static GType type = G_TYPE_INVALID; + + if (G_UNLIKELY (type == G_TYPE_INVALID)) +{ + type = g_type_register_static_simple (G_TYPE_INTERFACE, +"ThunarBrowser", +sizeof (ThunarBrowserIface), +NULL, +0, +NULL, +0); + + g_type_interface_add_prerequisite (type, G_TYPE_OBJECT); +} + + return type; +} + + + +static PokeFileData * +thunar_browser_poke_file_data_new (ThunarBrowser*browser, + ThunarFile *source, + ThunarFile *file, + ThunarBrowserPokeFileFunc func, + gpointer
[Xfce4-commits] r30049 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-19 15:34:16 + (Fri, 19 Jun 2009) New Revision: 30049 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c Log: * thunar/thunar-shortcuts-view.c: Dramatically simplify the way directories and volumes are mounted and opened by deriving from ThunarBrowser and calling thunar_browser_poke_file() and thunar_browser_poke_volume() to resolve directories and volumes before opening them. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-19 15:34:11 UTC (rev 30048) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-19 15:34:16 UTC (rev 30049) @@ -1,5 +1,13 @@ 2009-06-19 Jannis Pohlmann + * thunar/thunar-shortcuts-view.c: Dramatically simplify the way + directories and volumes are mounted and opened by deriving from + ThunarBrowser and calling thunar_browser_poke_file() and + thunar_browser_poke_volume() to resolve directories and volumes + before opening them. + +2009-06-19 Jannis Pohlmann + * thunar/thunar-browser.{c,h}: Add a new interface with two convenience functions for browsing (possibly not yet mounted or resolved) volumes and files. thunar_browser_poke_file() can be used Modified: thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c === --- thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c 2009-06-19 15:34:11 UTC (rev 30048) +++ thunar/branches/migration-to-gio/thunar/thunar-shortcuts-view.c 2009-06-19 15:34:16 UTC (rev 30049) @@ -33,6 +33,7 @@ #endif #include +#include #include #include #include @@ -45,10 +46,6 @@ -typedef struct _MountData MountData; - - - /* Identifiers for signals */ enum { @@ -65,8 +62,6 @@ -static void thunar_shortcuts_view_class_init (ThunarShortcutsViewClass *klass); -static void thunar_shortcuts_view_init (ThunarShortcutsView *view); static void thunar_shortcuts_view_finalize (GObject *object); static gboolean thunar_shortcuts_view_button_press_event (GtkWidget*widget, GdkEventButton *event); @@ -125,12 +120,11 @@ GtkTreePath *dst_path); static void thunar_shortcuts_view_open_clicked (ThunarShortcutsView *view); static void thunar_shortcuts_view_open (ThunarShortcutsView *view, - gboolean new_window, - gboolean mount_only); + gboolean new_window); static void thunar_shortcuts_view_open_in_new_window_clicked (ThunarShortcutsView *view); static void thunar_shortcuts_view_empty_trash (ThunarShortcutsView *view); static void thunar_shortcuts_view_eject (ThunarShortcutsView *view); -static void thunar_shortcuts_view_mount_clicked (ThunarShortcutsView *view); +static void thunar_shortcuts_view_mount (ThunarShortcutsView *view); static gboolean thunar_shortcuts_view_separator_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data); @@ -167,17 +161,8 @@ gint queue_resize_signal_id; }; -struct _MountData -{ - ThunarShortcutsView *view; - ThunarFile *file; - GVolume *volume; - guintnew_window : 1; - guintmount_only : 1; -}; - /* Target types for dragging from the shortcuts view */ static const GtkTargetEntry drag_targets[] = { { "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, GTK_TREE_MODEL_ROW }, @@ -191,40 +176,15 @@ -static GObjectClass *thunar_shortcuts_view_parent_class; -static guint view_signals[LAST_SIGNAL]; +static guint view_signals[LAST_SIGNAL]; -GType -thunar_shortcuts_view_get_type (void) -{ - static GType type = G_TYPE_INVALID; +G_DEFINE_TYPE_WITH_CODE (ThunarShortcutsView, thunar_shortcuts_view, GTK_TYPE
[Xfce4-commits] r30050 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-19 15:34:20 + (Fri, 19 Jun 2009) New Revision: 30050 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-location-entry.c Log: * thunar/thunar-location-entry.c: Simplify the activate code by deriving from ThunarBrowser and using the poke functions to mount volumes or resolve files asynchronously and on demand. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-19 15:34:16 UTC (rev 30049) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-19 15:34:20 UTC (rev 30050) @@ -1,5 +1,11 @@ 2009-06-19 Jannis Pohlmann + * thunar/thunar-location-entry.c: Simplify the activate code by + deriving from ThunarBrowser and using the poke functions to mount + volumes or resolve files asynchronously and on demand. + +2009-06-19 Jannis Pohlmann + * thunar/thunar-shortcuts-view.c: Dramatically simplify the way directories and volumes are mounted and opened by deriving from ThunarBrowser and calling thunar_browser_poke_file() and Modified: thunar/branches/migration-to-gio/thunar/thunar-location-entry.c === --- thunar/branches/migration-to-gio/thunar/thunar-location-entry.c 2009-06-19 15:34:16 UTC (rev 30049) +++ thunar/branches/migration-to-gio/thunar/thunar-location-entry.c 2009-06-19 15:34:20 UTC (rev 30050) @@ -24,6 +24,7 @@ #include +#include #include #include #include @@ -36,10 +37,6 @@ -typedef struct _ActivateData ActivateData; - - - /* Property identifiers */ enum { @@ -103,14 +100,8 @@ GtkWidget *path_entry; }; -struct _ActivateData -{ - ThunarLocationEntry *location_entry; - ThunarFile *file; -}; - static GObjectClass *thunar_location_entry_parent_class; @@ -136,6 +127,13 @@ NULL, }; + static const GInterfaceInfo browser_info = + { +NULL, +NULL, +NULL, + }; + static const GInterfaceInfo component_info = { (GInterfaceInitFunc) thunar_location_entry_component_init, @@ -158,6 +156,7 @@ }; type = g_type_register_static (GTK_TYPE_HBOX, I_("ThunarLocationEntry"), &info, 0); + g_type_add_interface_static (type, THUNAR_TYPE_BROWSER, &browser_info); g_type_add_interface_static (type, THUNAR_TYPE_NAVIGATOR, &navigator_info); g_type_add_interface_static (type, THUNAR_TYPE_COMPONENT, &component_info); g_type_add_interface_static (type, THUNAR_TYPE_LOCATION_BAR, &location_bar_info); @@ -458,58 +457,28 @@ static void -thunar_location_entry_activate_finish (GObject *object, - GAsyncResult *result, - gpointer user_data) +thunar_location_entry_poke_file_finish (ThunarBrowser *browser, +ThunarFile*file, +ThunarFile*target_file, +GError*error, +gpointer ignored) { - ActivateData *data = user_data; - GError *error = NULL; + _thunar_return_if_fail (THUNAR_IS_LOCATION_ENTRY (browser)); + _thunar_return_if_fail (THUNAR_IS_FILE (file)); - _thunar_return_if_fail (G_IS_FILE (object)); - _thunar_return_if_fail (G_IS_ASYNC_RESULT (result)); - _thunar_return_if_fail (data != NULL); - _thunar_return_if_fail (THUNAR_IS_LOCATION_ENTRY (data->location_entry)); - _thunar_return_if_fail (THUNAR_IS_FILE (data->file)); - - /* finish mounting the volume */ - if (!g_file_mount_enclosing_volume_finish (G_FILE (object), result, &error)) -{ - if (error->domain == G_IO_ERROR) -{ - /* ignore already mounted and unsupported errors */ - if (error->code == G_IO_ERROR_ALREADY_MOUNTED - || error->code == G_IO_ERROR_NOT_SUPPORTED) -{ - g_clear_error (&error); -} -} -} - - /* check if mounting succeeded */ if (error == NULL) { - /* reload the file if it wasn't mounted before */ - if (!thunar_file_is_mounted (data->file)) -thunar_file_reload (data->file); - - /* we then try to open or launch it */ - thunar_location_entry_open_or_launch (data->location_entry, data->file); + /* try to open or launch the target file */ + thunar_location_entry_open_or_launch (THUNAR_LOCATION_ENTRY (browser), +target_file); } else { /* display an error explaining why we couldn't open/mount the file */ - thunar_dialogs_show_error (data->location_entry-
[Xfce4-commits] r30051 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-19 15:34:25 + (Fri, 19 Jun 2009) New Revision: 30051 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-path-entry.c Log: * thunar/thunar-path-entry.c: Unescape URIs before displaying them. This is to make sure we don't see things like "%20" in the location bar/dialog. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-19 15:34:20 UTC (rev 30050) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-19 15:34:25 UTC (rev 30051) @@ -1,5 +1,11 @@ 2009-06-19 Jannis Pohlmann + * thunar/thunar-path-entry.c: Unescape URIs before displaying them. + This is to make sure we don't see things like "%20" in the location + bar/dialog. + +2009-06-19 Jannis Pohlmann + * thunar/thunar-location-entry.c: Simplify the activate code by deriving from ThunarBrowser and using the poke functions to mount volumes or resolve files asynchronously and on demand. Modified: thunar/branches/migration-to-gio/thunar/thunar-path-entry.c === --- thunar/branches/migration-to-gio/thunar/thunar-path-entry.c 2009-06-19 15:34:20 UTC (rev 30050) +++ thunar/branches/migration-to-gio/thunar/thunar-path-entry.c 2009-06-19 15:34:25 UTC (rev 30051) @@ -1401,6 +1401,7 @@ { GFile *file; gchar *text; + gchar *unescaped; _thunar_return_if_fail (THUNAR_IS_PATH_ENTRY (path_entry)); _thunar_return_if_fail (current_file == NULL || THUNAR_IS_FILE (current_file)); @@ -1430,10 +1431,13 @@ } } - /* setup the entry text */ - gtk_entry_set_text (GTK_ENTRY (path_entry), text); + unescaped = g_uri_unescape_string (text, NULL); g_free (text); + /* setup the entry text */ + gtk_entry_set_text (GTK_ENTRY (path_entry), unescaped); + g_free (unescaped); + gtk_editable_set_position (GTK_EDITABLE (path_entry), -1); gtk_widget_queue_draw (GTK_WIDGET (path_entry)); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30052 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-19 15:34:30 + (Fri, 19 Jun 2009) New Revision: 30052 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-launcher.c Log: * thunar/thunar-launcher.c: Derive from ThunarBrowser and use the poke file function to resolve/mount/open the selected file, if there is only one selected. Still need to work on selections of more files. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-19 15:34:25 UTC (rev 30051) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-19 15:34:30 UTC (rev 30052) @@ -1,5 +1,11 @@ 2009-06-19 Jannis Pohlmann + * thunar/thunar-launcher.c: Derive from ThunarBrowser and use the poke + file function to resolve/mount/open the selected file, if there is + only one selected. Still need to work on selections of more files. + +2009-06-19 Jannis Pohlmann + * thunar/thunar-path-entry.c: Unescape URIs before displaying them. This is to make sure we don't see things like "%20" in the location bar/dialog. Modified: thunar/branches/migration-to-gio/thunar/thunar-launcher.c === --- thunar/branches/migration-to-gio/thunar/thunar-launcher.c 2009-06-19 15:34:25 UTC (rev 30051) +++ thunar/branches/migration-to-gio/thunar/thunar-launcher.c 2009-06-19 15:34:30 UTC (rev 30052) @@ -30,6 +30,7 @@ #endif #include +#include #include #include #include @@ -106,6 +107,7 @@ GtkWidget *widget); static gboolean thunar_launcher_sendto_idle(gpointer user_data); static void thunar_launcher_sendto_idle_destroy(gpointer user_data); +static void thunar_launcher_mount_data_free (ThunarLauncherMountData *data); @@ -183,6 +185,13 @@ NULL, }; + static const GInterfaceInfo browser_info = + { +NULL, +NULL, +NULL + }; + static const GInterfaceInfo component_info = { (GInterfaceInitFunc) thunar_launcher_component_init, @@ -198,6 +207,7 @@ }; type = g_type_register_static (G_TYPE_OBJECT, I_("ThunarLauncher"), &info, 0); + g_type_add_interface_static (type, THUNAR_TYPE_BROWSER, &browser_info); g_type_add_interface_static (type, THUNAR_TYPE_NAVIGATOR, &navigator_info); g_type_add_interface_static (type, THUNAR_TYPE_COMPONENT, &component_info); } @@ -1021,11 +1031,67 @@ static void +thunar_launcher_open_file (ThunarLauncher *launcher, + ThunarFile *file) +{ + GList files; + + _thunar_return_if_fail (THUNAR_IS_LAUNCHER (launcher)); + _thunar_return_if_fail (THUNAR_IS_FILE (file)); + + files.data = file; + files.next = NULL; + files.prev = NULL; + + if (thunar_file_is_directory (file)) +{ + /* check if we're in a regular view (i.e. current_directory is set) */ + if (G_LIKELY (launcher->current_directory != NULL)) +{ + /* we want to open one directory, so just emit "change-directory" here */ + thunar_navigator_change_directory (THUNAR_NAVIGATOR (launcher), file); +} + else +{ + /* open the selected directories in new windows */ + thunar_launcher_open_windows (launcher, &files); +} +} + else +{ + /* try to open all files using their default applications */ + thunar_launcher_open_files (launcher, &files); +} +} + + + +static void +thunar_launcher_poke_file_finish (ThunarBrowser *browser, + ThunarFile*file, + ThunarFile*target_file, + GError*error, + gpointer ignored) +{ + if (error == NULL) +{ + thunar_launcher_open_file (THUNAR_LAUNCHER (browser), target_file); +} + else +{ + thunar_dialogs_show_error (THUNAR_LAUNCHER (browser)->widget, error, + _("Failed to open \"%s\""), + thunar_file_get_display_name (file)); +} +} + + + +static void thunar_launcher_action_open (GtkAction *action, ThunarLauncher *launcher) { GAppInfo *app_info; - GdkScreen *screen; gboolean executable = TRUE; GList *selected_paths; GList *directories = NULL; @@ -1035,9 +1101,6 @@ _thunar_return_if_fail (GTK_IS_ACTION (action)); _thunar_return_if_fail (THUNAR_IS_LAUNCHER (launcher)); - /* determine the screen on which
[Xfce4-commits] r30053 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-19 17:05:02 + (Fri, 19 Jun 2009) New Revision: 30053 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/Makefile.am Log: * thunar/Makefile.am: Add missing entries for thunar-browser.{c,h}. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-19 15:34:30 UTC (rev 30052) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-19 17:05:02 UTC (rev 30053) @@ -1,5 +1,9 @@ 2009-06-19 Jannis Pohlmann + * thunar/Makefile.am: Add missing entries for thunar-browser.{c,h}. + +2009-06-19 Jannis Pohlmann + * thunar/thunar-launcher.c: Derive from ThunarBrowser and use the poke file function to resolve/mount/open the selected file, if there is only one selected. Still need to work on selections of more files. Modified: thunar/branches/migration-to-gio/thunar/Makefile.am === --- thunar/branches/migration-to-gio/thunar/Makefile.am 2009-06-19 15:34:30 UTC (rev 30052) +++ thunar/branches/migration-to-gio/thunar/Makefile.am 2009-06-19 17:05:02 UTC (rev 30053) @@ -38,6 +38,8 @@ thunar-abstract-icon-view.h \ thunar-application.c\ thunar-application.h\ + thunar-browser.c\ + thunar-browser.h\ thunar-chooser-button.c \ thunar-chooser-button.h \ thunar-chooser-dialog.c \ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30054 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-19 17:05:07 + (Fri, 19 Jun 2009) New Revision: 30054 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c Log: * thunar/thunar-file.c: Assume the file is read- and writable if it has no G_FILE_ATTRIBUTE_ACCESS_CAN_READ or G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE attribute. This usually is the case with shortcuts and mountables. This change removes all those irritating emblems when browsing computer://, network:// and smb://. Only show the "drive-harddisk" icon for local root directories (this should only be the filesystem root, not media or anything). Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-19 17:05:02 UTC (rev 30053) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-19 17:05:07 UTC (rev 30054) @@ -1,5 +1,15 @@ 2009-06-19 Jannis Pohlmann + * thunar/thunar-file.c: Assume the file is read- and writable if it + has no G_FILE_ATTRIBUTE_ACCESS_CAN_READ or + G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE attribute. This usually is the + case with shortcuts and mountables. This change removes all those + irritating emblems when browsing computer://, network:// and smb://. + Only show the "drive-harddisk" icon for local root directories (this + should only be the filesystem root, not media or anything). + +2009-06-19 Jannis Pohlmann + * thunar/Makefile.am: Add missing entries for thunar-browser.{c,h}. 2009-06-19 Jannis Pohlmann Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-19 17:05:02 UTC (rev 30053) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-19 17:05:07 UTC (rev 30054) @@ -2074,6 +2074,9 @@ if (file->info == NULL) return FALSE; + if (!g_file_info_has_attribute (file->info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ)) +return TRUE; + return g_file_info_get_attribute_boolean (file->info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ); } @@ -2097,6 +2100,9 @@ if (file->info == NULL) return FALSE; + if (!g_file_info_has_attribute (file->info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE)) +return TRUE; + return g_file_info_get_attribute_boolean (file->info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE); } @@ -2674,14 +2680,12 @@ _thunar_return_val_if_fail (THUNAR_IS_FILE (file), NULL); _thunar_return_val_if_fail (GTK_IS_ICON_THEME (icon_theme), NULL); - /* root folders have special icons */ - if (thunar_file_is_root (file) && !thunar_file_is_trashed (file)) + /* the system root folder has a special icon */ + if (thunar_file_is_root (file) + && thunar_file_is_local (file) + && thunar_file_is_directory (file)) { - /* use disk icon for / and a remote folder icon for remote roots */ - if (thunar_file_is_local (file)) -return g_strdup ("drive-harddisk"); - else -return g_strdup ("folder-remote"); + return g_strdup ("drive-harddisk"); } if (file->info == NULL) @@ -2696,10 +2700,8 @@ g_object_get (icon, "names", &themed_icon_names, NULL); for (i = 0; icon_name == NULL && themed_icon_names[i] != NULL; ++i) -{ - if (gtk_icon_theme_has_icon (icon_theme, themed_icon_names[i])) -icon_name = g_strdup (themed_icon_names[i]); -} +if (gtk_icon_theme_has_icon (icon_theme, themed_icon_names[i])) + icon_name = g_strdup (themed_icon_names[i]); g_strfreev (themed_icon_names); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30055 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-19 17:05:11 + (Fri, 19 Jun 2009) New Revision: 30055 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-list-model.c Log: * thunar/thunar-list-model.c: Fix thunar_list_model_get_value() and thunar_list_model_get_statusbar_text() for files without content type. Use special statusbar texts for mountables and shortcuts. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-19 17:05:07 UTC (rev 30054) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-19 17:05:11 UTC (rev 30055) @@ -1,5 +1,11 @@ 2009-06-19 Jannis Pohlmann + * thunar/thunar-list-model.c: Fix thunar_list_model_get_value() and + thunar_list_model_get_statusbar_text() for files without content + type. Use special statusbar texts for mountables and shortcuts. + +2009-06-19 Jannis Pohlmann + * thunar/thunar-file.c: Assume the file is read- and writable if it has no G_FILE_ATTRIBUTE_ACCESS_CAN_READ or G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE attribute. This usually is the Modified: thunar/branches/migration-to-gio/thunar/thunar-list-model.c === --- thunar/branches/migration-to-gio/thunar/thunar-list-model.c 2009-06-19 17:05:07 UTC (rev 30054) +++ thunar/branches/migration-to-gio/thunar/thunar-list-model.c 2009-06-19 17:05:11 UTC (rev 30055) @@ -695,9 +695,10 @@ GValue *value) { ThunarGroup *group; - ThunarUser *user; + const gchar *content_type; const gchar *name; const gchar *real_name; + ThunarUser *user; ThunarFile *file; gchar *str; @@ -777,7 +778,11 @@ if (G_UNLIKELY (thunar_file_is_symlink (file))) g_value_take_string (value, g_strdup_printf (_("link to %s"), thunar_file_get_symlink_target (file))); else -g_value_take_string (value, g_content_type_get_description (thunar_file_get_content_type (file))); +{ + content_type = thunar_file_get_content_type (file); + if (content_type != NULL) +g_value_take_string (value, g_content_type_get_description (content_type)); +} break; case THUNAR_COLUMN_FILE: @@ -2213,6 +2218,7 @@ thunar_list_model_get_statusbar_text (ThunarListModel *store, GList *selected_items) { + const gchar *content_type; const gchar *original_path; GtkTreeIter iter; ThunarFile *file; @@ -2281,10 +2287,14 @@ /* get the file for the given iter */ file = THUNAR_FILE (G_SLIST (iter.user_data)->data); + + /* determine the content type of the file */ + content_type = thunar_file_get_content_type (file); /* calculate the text to be displayed */ size_string = thunar_file_get_size_string (file); - if (G_UNLIKELY (g_str_equal (thunar_file_get_content_type (file), "inode/symlink"))) + + if (G_UNLIKELY (content_type != NULL && g_str_equal (content_type, "inode/symlink"))) { text = g_strdup_printf (_("\"%s\" broken link"), thunar_file_get_display_name (file)); } @@ -2293,6 +2303,14 @@ text = g_strdup_printf (_("\"%s\" (%s) link to %s"), thunar_file_get_display_name (file), size_string, thunar_file_get_symlink_target (file)); } + else if (G_UNLIKELY (thunar_file_get_kind (file) == G_FILE_TYPE_SHORTCUT)) +{ + text = g_strdup_printf (_("\"%s\" shortcut"), thunar_file_get_display_name (file)); +} + else if (G_UNLIKELY (thunar_file_get_kind (file) == G_FILE_TYPE_MOUNTABLE)) +{ + text = g_strdup_printf (_("\"%s\" mountable"), thunar_file_get_display_name (file)); +} else { gchar *description; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30060 - thunar-vfs/trunk
Author: jannis Date: 2009-06-20 02:06:48 + (Sat, 20 Jun 2009) New Revision: 30060 Removed: thunar-vfs/trunk/tdb/ Modified: thunar-vfs/trunk/AUTHORS thunar-vfs/trunk/ChangeLog Log: * AUTHORS, tdb: Remove tdb because it's not part of thunar-vfs. Modified: thunar-vfs/trunk/AUTHORS === --- thunar-vfs/trunk/AUTHORS2009-06-20 02:03:30 UTC (rev 30059) +++ thunar-vfs/trunk/AUTHORS2009-06-20 02:06:48 UTC (rev 30060) @@ -1,10 +1,3 @@ Benedikt Meurer Jannis Pohlmann Jeffs Franks - -The tdb library, which is included with the Thunar distribution, was originally -written as part of the Samba suite. My understanding is that the majority of -the code was written by Andrew Trigell with the help of -Paul "Rusty" Russell . Luke Kenneth Casson Leighton - also contributed a few patches. Sorted freelist merge code -added by Jeremy Allison . Modified: thunar-vfs/trunk/ChangeLog === --- thunar-vfs/trunk/ChangeLog 2009-06-20 02:03:30 UTC (rev 30059) +++ thunar-vfs/trunk/ChangeLog 2009-06-20 02:06:48 UTC (rev 30060) @@ -1,5 +1,9 @@ 2009-06-20 Jannis Pohlmann + * AUTHORS, tdb: Remove tdb because it's not part of thunar-vfs. + +2009-06-20 Jannis Pohlmann + * configure.in.in, thunar-vfs/Makefile.am: Remove docs/papers/Makefile from the configure script and use THUNAR_VFS_VERINFO instead of THUNAR_VERINFO in the makefile. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30063 - in thunar/branches/migration-to-gio: . docs/reference
Author: jannis Date: 2009-06-20 02:44:21 + (Sat, 20 Jun 2009) New Revision: 30063 Removed: thunar/branches/migration-to-gio/docs/reference/thunar-vfs/ thunar/branches/migration-to-gio/tests/ thunar/branches/migration-to-gio/thunar-vfs/ Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/Makefile.am thunar/branches/migration-to-gio/configure.in.in Log: * configure.in.in, Makefile.am, tests/: Remove test folder which only tests thunar-vfs anyway. * docs/reference/thunar-vfs/, thunar-vfs/: Remove empty folders. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-20 02:36:55 UTC (rev 30062) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-20 02:44:21 UTC (rev 30063) @@ -1,5 +1,11 @@ 2009-06-20 Jannis Pohlmann + * configure.in.in, Makefile.am, tests/: Remove test folder which only + tests thunar-vfs anyway. + * docs/reference/thunar-vfs/, thunar-vfs/: Remove empty folders. + +2009-06-20 Jannis Pohlmann + * configure.in.in: Add header and function checks required for tdb. 2009-06-20 Jannis Pohlmann Modified: thunar/branches/migration-to-gio/Makefile.am === --- thunar/branches/migration-to-gio/Makefile.am2009-06-20 02:36:55 UTC (rev 30062) +++ thunar/branches/migration-to-gio/Makefile.am2009-06-20 02:44:21 UTC (rev 30063) @@ -8,7 +8,6 @@ tdb \ thunarx \ thunar \ - tests \ docs\ examples\ plugins Modified: thunar/branches/migration-to-gio/configure.in.in === --- thunar/branches/migration-to-gio/configure.in.in2009-06-20 02:36:55 UTC (rev 30062) +++ thunar/branches/migration-to-gio/configure.in.in2009-06-20 02:44:21 UTC (rev 30063) @@ -397,8 +397,6 @@ po-doc/Makefile tdb/Makefile tdb/tdbconfig.h -tests/Makefile -tests/data/Makefile thunar/Makefile thunarx/Makefile thunarx/thunarx-2.pc ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30064 - in thunar/branches/migration-to-gio: . docs/reference/thunarx
Author: jannis Date: 2009-06-20 02:53:37 + (Sat, 20 Jun 2009) New Revision: 30064 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/docs/reference/thunarx/Makefile.am Log: * docs/reference/thunarx/Makefile.am: Use THUNARX_VERSION_API instead of THUNAR_VERSION_API. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-20 02:44:21 UTC (rev 30063) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-20 02:53:37 UTC (rev 30064) @@ -1,5 +1,10 @@ 2009-06-20 Jannis Pohlmann + * docs/reference/thunarx/Makefile.am: Use THUNARX_VERSION_API instead + of THUNAR_VERSION_API. + +2009-06-20 Jannis Pohlmann + * configure.in.in, Makefile.am, tests/: Remove test folder which only tests thunar-vfs anyway. * docs/reference/thunar-vfs/, thunar-vfs/: Remove empty folders. Modified: thunar/branches/migration-to-gio/docs/reference/thunarx/Makefile.am === --- thunar/branches/migration-to-gio/docs/reference/thunarx/Makefile.am 2009-06-20 02:44:21 UTC (rev 30063) +++ thunar/branches/migration-to-gio/docs/reference/thunarx/Makefile.am 2009-06-20 02:53:37 UTC (rev 30064) @@ -52,7 +52,7 @@ $(GTK_CFLAGS) GTKDOC_LIBS = \ - $(top_builddir)/thunarx/libthunarx-$(THUNAR_VERSION_API).la + $(top_builddir)/thunarx/libthunarx-$(THUNARX_VERSION_API).la include $(top_srcdir)/gtk-doc.make ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30067 - in thunar-vfs/trunk: . po
Author: jannis Date: 2009-06-20 10:13:02 + (Sat, 20 Jun 2009) New Revision: 30067 Removed: thunar-vfs/trunk/po-doc/ Modified: thunar-vfs/trunk/ChangeLog thunar-vfs/trunk/Makefile.am thunar-vfs/trunk/configure.in.in thunar-vfs/trunk/po/POTFILES.in Log: * POTFILES.in: Remove all files that don't exist in this package. * Makefile.am, configure.in.in, po-doc/: Remove this folder as it only contains documentation for Thunar, not for thunar-vfs. Modified: thunar-vfs/trunk/ChangeLog === --- thunar-vfs/trunk/ChangeLog 2009-06-20 03:07:01 UTC (rev 30066) +++ thunar-vfs/trunk/ChangeLog 2009-06-20 10:13:02 UTC (rev 30067) @@ -1,5 +1,11 @@ 2009-06-20 Jannis Pohlmann + * POTFILES.in: Remove all files that don't exist in this package. + * Makefile.am, configure.in.in, po-doc/: Remove this folder as it only + contains documentation for Thunar, not for thunar-vfs. + +2009-06-20 Jannis Pohlmann + * AUTHORS, tdb: Remove tdb because it's not part of thunar-vfs. 2009-06-20 Jannis Pohlmann Modified: thunar-vfs/trunk/Makefile.am === --- thunar-vfs/trunk/Makefile.am2009-06-20 03:07:01 UTC (rev 30066) +++ thunar-vfs/trunk/Makefile.am2009-06-20 10:13:02 UTC (rev 30067) @@ -2,7 +2,6 @@ SUBDIRS = \ po \ - po-doc \ thunar-vfs \ tests \ docs Modified: thunar-vfs/trunk/configure.in.in === --- thunar-vfs/trunk/configure.in.in2009-06-20 03:07:01 UTC (rev 30066) +++ thunar-vfs/trunk/configure.in.in2009-06-20 10:13:02 UTC (rev 30067) @@ -391,7 +391,6 @@ docs/reference/thunar-vfs/Makefile docs/reference/thunar-vfs/version.xml po/Makefile.in -po-doc/Makefile tests/Makefile tests/data/Makefile thunar-vfs/Makefile Modified: thunar-vfs/trunk/po/POTFILES.in === --- thunar-vfs/trunk/po/POTFILES.in 2009-06-20 03:07:01 UTC (rev 30066) +++ thunar-vfs/trunk/po/POTFILES.in 2009-06-20 10:13:02 UTC (rev 30067) @@ -38,121 +38,3 @@ thunar-vfs/thunar-vfs-volume-none.c thunar-vfs/thunar-vfs-volume.c thunar-vfs/thunar-vfs.c - -thunar/main.c -thunar/thunar-abstract-dialog.c -thunar/thunar-abstract-icon-view.c -thunar/thunar-application.c -thunar/thunar-chooser-button.c -thunar/thunar-chooser-dialog.c -thunar/thunar-chooser-model.c -thunar/thunar-clipboard-manager.c -thunar/thunar-column-editor.c -thunar/thunar-column-model.c -thunar/thunar-compact-view.c -thunar/thunar-component.c -thunar/thunar-create-dialog.c -thunar/thunar-dbus-client.c -thunar/thunar-dbus-service.c -thunar/thunar-debug.c -thunar/thunar-details-view.c -thunar/thunar-dialogs.c -thunar/thunar-dnd.c -thunar/thunar-emblem-chooser.c -thunar/thunar-enum-types.c -thunar/thunar-file-monitor.c -thunar/thunar-file.c -thunar/thunar-folder.c -thunar/thunar-gdk-extensions.c -thunar/thunar-gobject-extensions.c -thunar/thunar-gtk-extensions.c -thunar/thunar-history-action.c -thunar/thunar-history.c -thunar/thunar-ice.c -thunar/thunar-icon-factory.c -thunar/thunar-icon-renderer.c -thunar/thunar-icon-view.c -thunar/thunar-launcher.c -thunar/thunar-list-model.c -thunar/thunar-location-bar.c -thunar/thunar-location-button.c -thunar/thunar-location-buttons.c -thunar/thunar-location-dialog.c -thunar/thunar-location-entry.c -thunar/thunar-metafile.c -thunar/thunar-navigator.c -thunar/thunar-pango-extensions.c -thunar/thunar-path-entry.c -thunar/thunar-permissions-chooser.c -thunar/thunar-preferences-dialog.c -thunar/thunar-preferences.c -thunar/thunar-progress-dialog.c -thunar/thunar-properties-dialog.c -thunar/thunar-renamer-dialog.c -thunar/thunar-renamer-model.c -thunar/thunar-renamer-pair.c -thunar/thunar-renamer-progress.c -thunar/thunar-sendto-model.c -thunar/thunar-session-client.c -thunar/thunar-settings.desktop.in -thunar/thunar-shortcuts-icon-renderer.c -thunar/thunar-shortcuts-model.c -thunar/thunar-shortcuts-pane.c -thunar/thunar-shortcuts-view.c -thunar/thunar-side-pane.c -thunar/thunar-size-label.c -thunar/thunar-standard-view.c -thunar/thunar-statusbar.c -thunar/thunar-stock.c -thunar/thunar-templates-action.c -thunar/thunar-text-renderer.c -thunar/thunar-throbber.c -thunar/thunar-thumbnail-generator.c -thunar/thunar-trash-action.c -thunar/thunar-tree-model.c -thunar/thunar-tree-pane.c -thunar/thunar-tree-view.c -thunar/thunar-util.c -thunar/thunar-view.c -thunar/thunar-window.c - -thunarx/thunarx-property-page.c -thunarx/thunarx-provider-plugin.c -thunarx/th
[Xfce4-commits] r30068 - in thunar-vfs/trunk: . docs/reference/thunar-vfs tests
Author: jannis Date: 2009-06-20 11:05:44 + (Sat, 20 Jun 2009) New Revision: 30068 Modified: thunar-vfs/trunk/ChangeLog thunar-vfs/trunk/docs/reference/thunar-vfs/Makefile.am thunar-vfs/trunk/tests/Makefile.am Log: * docs/reference/thunar-vfs/Makefile.am, tests/Makefile.am: Use THUNAR_VFS_VERSION_API instead of THUNAR_VERSION_API. Modified: thunar-vfs/trunk/ChangeLog === --- thunar-vfs/trunk/ChangeLog 2009-06-20 10:13:02 UTC (rev 30067) +++ thunar-vfs/trunk/ChangeLog 2009-06-20 11:05:44 UTC (rev 30068) @@ -1,5 +1,10 @@ 2009-06-20 Jannis Pohlmann + * docs/reference/thunar-vfs/Makefile.am, tests/Makefile.am: Use + THUNAR_VFS_VERSION_API instead of THUNAR_VERSION_API. + +2009-06-20 Jannis Pohlmann + * POTFILES.in: Remove all files that don't exist in this package. * Makefile.am, configure.in.in, po-doc/: Remove this folder as it only contains documentation for Thunar, not for thunar-vfs. Modified: thunar-vfs/trunk/docs/reference/thunar-vfs/Makefile.am === --- thunar-vfs/trunk/docs/reference/thunar-vfs/Makefile.am 2009-06-20 10:13:02 UTC (rev 30067) +++ thunar-vfs/trunk/docs/reference/thunar-vfs/Makefile.am 2009-06-20 11:05:44 UTC (rev 30068) @@ -56,7 +56,7 @@ GTKDOC_LIBS = \ $(EXO_LIBS) \ $(GTHREAD_LIBS) \ - $(top_builddir)/thunar-vfs/libthunar-vfs-$(THUNAR_VERSION_API).la + $(top_builddir)/thunar-vfs/libthunar-vfs-$(THUNAR_VFS_VERSION_API).la include $(top_srcdir)/gtk-doc.make Modified: thunar-vfs/trunk/tests/Makefile.am === --- thunar-vfs/trunk/tests/Makefile.am 2009-06-20 10:13:02 UTC (rev 30067) +++ thunar-vfs/trunk/tests/Makefile.am 2009-06-20 11:05:44 UTC (rev 30068) @@ -20,11 +20,11 @@ test-thunar-vfs-path.c test_thunar_vfs_path_DEPENDENCIES =\ - $(top_builddir)/thunar-vfs/libthunar-vfs-$(THUNAR_VERSION_API).la + $(top_builddir)/thunar-vfs/libthunar-vfs-$(THUNAR_VFS_VERSION_API).la test_thunar_vfs_path_LDADD = \ $(GTHREAD_LIBS) \ - $(top_builddir)/thunar-vfs/libthunar-vfs-$(THUNAR_VERSION_API).la + $(top_builddir)/thunar-vfs/libthunar-vfs-$(THUNAR_VFS_VERSION_API).la clean-local: rm -f *.core core core.* ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30056 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-06-19 19:45:24 + (Fri, 19 Jun 2009) New Revision: 30056 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c thunar/branches/migration-to-gio/thunar/thunar-window.c Log: * thunar/thunar-file.c: Nothing really. * thunar/thunar-window.c: Derive from ThunarBrowser and use thunar_browser_poke_file() to resolve/mount files when the location dialog is activated. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-19 17:05:11 UTC (rev 30055) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-19 19:45:24 UTC (rev 30056) @@ -1,5 +1,12 @@ 2009-06-19 Jannis Pohlmann + * thunar/thunar-file.c: Nothing really. + * thunar/thunar-window.c: Derive from ThunarBrowser and use + thunar_browser_poke_file() to resolve/mount files when the location + dialog is activated. + +2009-06-19 Jannis Pohlmann + * thunar/thunar-list-model.c: Fix thunar_list_model_get_value() and thunar_list_model_get_statusbar_text() for files without content type. Use special statusbar texts for mountables and shortcuts. Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-19 17:05:11 UTC (rev 30055) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-19 19:45:24 UTC (rev 30056) @@ -2439,9 +2439,9 @@ */ if (!thunar_file_is_readable (file) || (thunar_file_is_directory (file) -&& thunar_file_denies_access_permission (file, THUNAR_FILE_MODE_USR_EXEC, - THUNAR_FILE_MODE_GRP_EXEC, - THUNAR_FILE_MODE_OTH_EXEC))) + && thunar_file_denies_access_permission (file, THUNAR_FILE_MODE_USR_EXEC, + THUNAR_FILE_MODE_GRP_EXEC, + THUNAR_FILE_MODE_OTH_EXEC))) { emblems = g_list_prepend (emblems, THUNAR_FILE_EMBLEM_NAME_CANT_READ); } Modified: thunar/branches/migration-to-gio/thunar/thunar-window.c === --- thunar/branches/migration-to-gio/thunar/thunar-window.c 2009-06-19 17:05:11 UTC (rev 30055) +++ thunar/branches/migration-to-gio/thunar/thunar-window.c 2009-06-19 19:45:24 UTC (rev 30056) @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -63,10 +64,6 @@ -typedef struct _MountData MountData; - - - /* Property identifiers */ enum { @@ -284,14 +281,8 @@ GType toggle_sidepane_type; }; -struct _MountData -{ - ThunarWindow *window; - ThunarFile *file; -}; - static GtkActionEntry action_entries[] = { { "file-menu", NULL, N_ ("_File"), NULL, }, @@ -338,40 +329,15 @@ -static GObjectClass *thunar_window_parent_class; -static guint window_signals[LAST_SIGNAL]; +static guint window_signals[LAST_SIGNAL]; -GType -thunar_window_get_type (void) -{ - static GType type = G_TYPE_INVALID; +G_DEFINE_TYPE_WITH_CODE (ThunarWindow, thunar_window, GTK_TYPE_WINDOW, + G_IMPLEMENT_INTERFACE (THUNAR_TYPE_BROWSER, NULL)); - if (G_UNLIKELY (type == G_TYPE_INVALID)) -{ - static const GTypeInfo info = - { -sizeof (ThunarWindowClass), -NULL, -NULL, -(GClassInitFunc) thunar_window_class_init, -NULL, -NULL, -sizeof (ThunarWindow), -0, -(GInstanceInitFunc) thunar_window_init, -NULL, - }; - type = g_type_register_static (GTK_TYPE_WINDOW, I_("ThunarWindow"), &info, 0); -} - return type; -} - - - static void thunar_window_class_init (ThunarWindowClass *klass) { @@ -379,9 +345,6 @@ GtkBindingSet *binding_set; GObjectClass *gobject_class; - /* determine the parent type class */ - thunar_window_parent_class = g_type_class_peek_parent (klass); - gobject_class = G_OBJECT_CLASS (klass); gobject_class->dispose = thunar_window_dispose; gobject_class->finalize = thunar_window_finalize; @@ -1427,87 +1390,45 @@ _thunar_return_if_fail (THUNAR_IS_WINDOW (window)); _thunar_return_if_fail (THUNAR_IS_FILE (file)); - if (thunar_file_is_mounted (file)) + if (thunar_file_is_directory (file)) { - if (thunar_file_is_directory (file)) -{ - /* open the new directory */ - thunar_window_set_current_directory (window, file); -} - else -{ - /* try to launch the selected file */
[Xfce4-commits] r30066 - in thunar/branches/migration-to-gio: . po
Author: jannis Date: 2009-06-20 03:07:01 + (Sat, 20 Jun 2009) New Revision: 30066 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/po/POTFILES.in Log: * po/POTFILES.in: Add thunar-settings.desktop.in. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-20 03:01:00 UTC (rev 30065) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-20 03:07:01 UTC (rev 30066) @@ -1,5 +1,9 @@ 2009-06-20 Jannis Pohlmann + * po/POTFILES.in: Add thunar-settings.desktop.in. + +2009-06-20 Jannis Pohlmann + * po/POTFILES.in: Remove thunar-vfs source files, update those of Thunar itself. Modified: thunar/branches/migration-to-gio/po/POTFILES.in === --- thunar/branches/migration-to-gio/po/POTFILES.in 2009-06-20 03:01:00 UTC (rev 30065) +++ thunar/branches/migration-to-gio/po/POTFILES.in 2009-06-20 03:07:01 UTC (rev 30066) @@ -133,3 +133,4 @@ Thunar.desktop.in.in Thunar-bulk-rename.desktop.in.in Thunar-folder-handler.desktop.in.in +thunar/thunar-settings.desktop.in ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30061 - in thunar/branches/migration-to-gio: . docs/reference docs/reference/thunar-vfs docs/reference/thunar-vfs/tmpl thunar-vfs
/configure.in.in thunar/branches/migration-to-gio/docs/reference/Makefile.am Log: * Remove thunar-vfs. There might be some pieces left which will be cleaned up next. Update the list of functions and headers the configure script checks because a lot of them were only required for thunar-vfs. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-20 02:06:48 UTC (rev 30060) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-20 02:26:54 UTC (rev 30061) @@ -1,5 +1,12 @@ 2009-06-20 Jannis Pohlmann + * Remove thunar-vfs. There might be some pieces left which will be + cleaned up next. Update the list of functions and headers the + configure script checks because a lot of them were only required for + thunar-vfs. + +2009-06-20 Jannis Pohlmann + * Makefile.am, configure.in.in, plugins/, thunarx/, thunar/: thunarx-1 is dead, long live thunarx-2. thunarx-2 introduces three new functions: thunarx_file_info_get_file_info() which returns the Modified: thunar/branches/migration-to-gio/Makefile.am === --- thunar/branches/migration-to-gio/Makefile.am2009-06-20 02:06:48 UTC (rev 30060) +++ thunar/branches/migration-to-gio/Makefile.am2009-06-20 02:26:54 UTC (rev 30061) @@ -7,7 +7,6 @@ po-doc \ tdb \ thunarx \ - thunar-vfs \ thunar \ tests \ docs\ Modified: thunar/branches/migration-to-gio/acinclude.m4 === --- thunar/branches/migration-to-gio/acinclude.m4 2009-06-20 02:06:48 UTC (rev 30060) +++ thunar/branches/migration-to-gio/acinclude.m4 2009-06-20 02:26:54 UTC (rev 30061) @@ -112,159 +112,3 @@ fi fi ]) - - -dnl # BM_THUNAR_VFS_MONITOR_IMPL() -dnl # -dnl # Determine the file system monitoring to use for -dnl # thunar-vfs. -dnl # -dnl # Sets LIBFAM_CFLAGS and LIBFAM_LIBS and defines -dnl # HAVE_FAM_H and HAVE_LIBFAM if FAM/Gamin were -dnl # found. -dnl # -dnl # Sets $ac_bm_thunar_vfs_monitor_impl to "FAM", -dnl # "Gamin" or "none". -dnl # -AC_DEFUN([BM_THUNAR_VFS_MONITOR_IMPL], -[ -LIBFAM_CFLAGS="" -LIBFAM_LIBS="" -have_libfam=no -ac_bm_thunar_vfs_monitor_impl="none" -XDT_CHECK_PACKAGE([LIBFAM], [gamin], [0.1.0], -[ - have_libfam=yes - ac_bm_thunar_vfs_monitor_impl="Gamin" -], -[ - dnl Fallback to a generic FAM check - AC_CHECK_HEADERS([fam.h], - [ -AC_CHECK_LIB([fam], [FAMOpen], -[ - have_libfam="yes" LIBFAM_LIBS="-lfam" - ac_bm_thunar_vfs_monitor_impl="FAM" -]) - ]) -]) -if test x"$have_libfam" = x"yes"; then - dnl Define appropriate symbols - AC_DEFINE([HAVE_FAM_H], [1], [Define to 1 if you have the header file.]) - AC_DEFINE([HAVE_LIBFAM], [1], [Define to 1 if the File Alteration Monitor is available.]) - - dnl Check for FAMNoExists (currently Gamin only) - save_LIBS="$LIBS" - LIBS="$LIBS $LIBFAM_LIBS" - AC_CHECK_FUNCS([FAMNoExists]) - LIBS="$save_LIBS" -fi -AC_SUBST([LIBFAM_CFLAGS]) -AC_SUBST([LIBFAM_LIBS]) -]) - - - -dnl # BM_THUNAR_VFS_OS_IMPL() -dnl # -dnl # Determine the operating system support to use -dnl # for thunar-vfs. -dnl # -dnl # Sets ac_bm_thunar_vfs_os_impl to "bsd" or "generic" and -dnl # defines the automake conditional THUNAR_VFS_OS_IMPL_BSD. -dnl # -AC_DEFUN([BM_THUNAR_VFS_OS_IMPL], -[ - dnl # Auto-detect target operating system support - AC_MSG_CHECKING([for operating system support]) - case "$target_os" in - dragonfly*|freebsd*|netbsd*|openbsd*|darwin*) -dnl # The BSD Family is fully supported -ac_bm_thunar_vfs_os_impl=bsd -;; - - *) -dnl # Otherwise fallback to generic OS support -ac_bm_thunar_vfs_os_impl=generic - esac - AC_MSG_RESULT([$ac_bm_thunar_vfs_os_impl]) - - dnl # Set automake conditionals appropriately - AM_CONDITIONAL([THUNAR_VFS_OS_IMPL_BSD], [test x"$ac_bm_thunar_vfs_os_impl" = x"bsd"]) -]) - - - -dnl # BM_THUNAR_VFS_VOLUME_IMPL() -dnl # -dnl # Determines the volume manager implementation to -dnl # use for thunar-vfs. -dnl # -dnl # Sets ac_bm_thunar_vfs_volume_impl to "freebsd", -dnl # "hal" or "none". -dnl # -AC_DEFU
[Xfce4-commits] r30059 - in thunar-vfs/trunk: . thunar-vfs
Author: jannis Date: 2009-06-20 02:03:30 + (Sat, 20 Jun 2009) New Revision: 30059 Modified: thunar-vfs/trunk/ChangeLog thunar-vfs/trunk/configure.in.in thunar-vfs/trunk/thunar-vfs/Makefile.am Log: * configure.in.in, thunar-vfs/Makefile.am: Remove docs/papers/Makefile from the configure script and use THUNAR_VFS_VERINFO instead of THUNAR_VERINFO in the makefile. Modified: thunar-vfs/trunk/ChangeLog === --- thunar-vfs/trunk/ChangeLog 2009-06-20 01:53:28 UTC (rev 30058) +++ thunar-vfs/trunk/ChangeLog 2009-06-20 02:03:30 UTC (rev 30059) @@ -1,5 +1,11 @@ 2009-06-20 Jannis Pohlmann + * configure.in.in, thunar-vfs/Makefile.am: Remove docs/papers/Makefile + from the configure script and use THUNAR_VFS_VERINFO instead of + THUNAR_VERINFO in the makefile. + +2009-06-20 Jannis Pohlmann + * Create separate repository for thunar-vfs, as in the future, it will no longer be part of Thunar any more. Instead, there will be a separate thunar-vfs package for compatiblity reasons. As soon as the Modified: thunar-vfs/trunk/configure.in.in === --- thunar-vfs/trunk/configure.in.in2009-06-20 01:53:28 UTC (rev 30058) +++ thunar-vfs/trunk/configure.in.in2009-06-20 02:03:30 UTC (rev 30059) @@ -387,7 +387,6 @@ AC_OUTPUT([ Makefile docs/Makefile -docs/papers/Makefile docs/reference/Makefile docs/reference/thunar-vfs/Makefile docs/reference/thunar-vfs/version.xml Modified: thunar-vfs/trunk/thunar-vfs/Makefile.am === --- thunar-vfs/trunk/thunar-vfs/Makefile.am 2009-06-20 01:53:28 UTC (rev 30058) +++ thunar-vfs/trunk/thunar-vfs/Makefile.am 2009-06-20 02:03:30 UTC (rev 30059) @@ -140,7 +140,7 @@ libthunar_vfs_1_la_LDFLAGS = \ -export-dynamic \ -export-symbols-regex "^[^_].*" \ - -version-info $(THUNAR_VERINFO) \ + -version-info $(THUNAR_VFS_VERINFO) \ $(PLATFORM_LDFLAGS) libthunar_vfs_1_la_LIBADD =\ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30065 - in thunar/branches/migration-to-gio: . po
Author: jannis Date: 2009-06-20 03:01:00 + (Sat, 20 Jun 2009) New Revision: 30065 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/po/POTFILES.in Log: * po/POTFILES.in: Remove thunar-vfs source files, update those of Thunar itself. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-20 02:53:37 UTC (rev 30064) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-20 03:01:00 UTC (rev 30065) @@ -1,5 +1,10 @@ 2009-06-20 Jannis Pohlmann + * po/POTFILES.in: Remove thunar-vfs source files, update those of + Thunar itself. + +2009-06-20 Jannis Pohlmann + * docs/reference/thunarx/Makefile.am: Use THUNARX_VERSION_API instead of THUNAR_VERSION_API. Modified: thunar/branches/migration-to-gio/po/POTFILES.in === --- thunar/branches/migration-to-gio/po/POTFILES.in 2009-06-20 02:53:37 UTC (rev 30064) +++ thunar/branches/migration-to-gio/po/POTFILES.in 2009-06-20 03:01:00 UTC (rev 30065) @@ -1,48 +1,9 @@ -thunar-vfs/thunar-vfs-config.c -thunar-vfs/thunar-vfs-deep-count-job.c -thunar-vfs/thunar-vfs-exec.c -thunar-vfs/thunar-vfs-info.c -thunar-vfs/thunar-vfs-interactive-job.c -thunar-vfs/thunar-vfs-io-jobs.c -thunar-vfs/thunar-vfs-io-local-xfer.c -thunar-vfs/thunar-vfs-io-local.c -thunar-vfs/thunar-vfs-io-ops.c -thunar-vfs/thunar-vfs-io-scandir.c -thunar-vfs/thunar-vfs-io-trash.c -thunar-vfs/thunar-vfs-job.c -thunar-vfs/thunar-vfs-mime-action.c -thunar-vfs/thunar-vfs-mime-application.c -thunar-vfs/thunar-vfs-mime-cache.c -thunar-vfs/thunar-vfs-mime-cleaner.c -thunar-vfs/thunar-vfs-mime-database.c -thunar-vfs/thunar-vfs-mime-handler.c -thunar-vfs/thunar-vfs-mime-info.c -thunar-vfs/thunar-vfs-mime-legacy.c -thunar-vfs/thunar-vfs-mime-parser.c -thunar-vfs/thunar-vfs-mime-provider.c -thunar-vfs/thunar-vfs-mime-sniffer.c -thunar-vfs/thunar-vfs-monitor.c -thunar-vfs/thunar-vfs-os-bsd.c -thunar-vfs/thunar-vfs-os-generic.c -thunar-vfs/thunar-vfs-path.c -thunar-vfs/thunar-vfs-private.c -thunar-vfs/thunar-vfs-simple-job.c -thunar-vfs/thunar-vfs-thumb-jpeg.c -thunar-vfs/thunar-vfs-thumb.c -thunar-vfs/thunar-vfs-transfer-job.c -thunar-vfs/thunar-vfs-user.c -thunar-vfs/thunar-vfs-util.c -thunar-vfs/thunar-vfs-volume-freebsd.c -thunar-vfs/thunar-vfs-volume-hal.c -thunar-vfs/thunar-vfs-volume-manager.c -thunar-vfs/thunar-vfs-volume-none.c -thunar-vfs/thunar-vfs-volume.c -thunar-vfs/thunar-vfs.c - thunar/main.c +thunar/sexy-url-label.c thunar/thunar-abstract-dialog.c thunar/thunar-abstract-icon-view.c thunar/thunar-application.c +thunar/thunar-browser.c thunar/thunar-chooser-button.c thunar/thunar-chooser-dialog.c thunar/thunar-chooser-model.c @@ -55,15 +16,18 @@ thunar/thunar-dbus-client.c thunar/thunar-dbus-service.c thunar/thunar-debug.c +thunar/thunar-deep-count-job.c thunar/thunar-details-view.c thunar/thunar-dialogs.c thunar/thunar-dnd.c thunar/thunar-emblem-chooser.c thunar/thunar-enum-types.c -thunar/thunar-file-monitor.c +thunar/thunar-exec.c thunar/thunar-file.c +thunar/thunar-file-monitor.c thunar/thunar-folder.c thunar/thunar-gdk-extensions.c +thunar/thunar-gio-extensions.c thunar/thunar-gobject-extensions.c thunar/thunar-gtk-extensions.c thunar/thunar-history-action.c @@ -72,6 +36,11 @@ thunar/thunar-icon-factory.c thunar/thunar-icon-renderer.c thunar/thunar-icon-view.c +thunar/thunar-image.c +thunar/thunar-io-jobs.c +thunar/thunar-io-jobs-util.c +thunar/thunar-io-scan-directory.c +thunar/thunar-job.c thunar/thunar-launcher.c thunar/thunar-list-model.c thunar/thunar-location-bar.c @@ -79,13 +48,15 @@ thunar/thunar-location-buttons.c thunar/thunar-location-dialog.c thunar/thunar-location-entry.c +thunar/thunar-marshal.c thunar/thunar-metafile.c +thunar/thunar-misc-jobs.c thunar/thunar-navigator.c thunar/thunar-pango-extensions.c thunar/thunar-path-entry.c thunar/thunar-permissions-chooser.c -thunar/thunar-preferences-dialog.c thunar/thunar-preferences.c +thunar/thunar-preferences-dialog.c thunar/thunar-progress-dialog.c thunar/thunar-properties-dialog.c thunar/thunar-renamer-dialog.c @@ -94,12 +65,12 @@ thunar/thunar-renamer-progress.c thunar/thunar-sendto-model.c thunar/thunar-session-client.c -thunar/thunar-settings.desktop.in thunar/thunar-shortcuts-icon-renderer.c thunar/thunar-shortcuts-model.c thunar/thunar-shortcuts-pane.c thunar/thunar-shortcuts-view.c thunar/thunar-side-pane.c +thunar/thunar-simple-job.c thunar/thunar-size-label.c thunar/thunar-standard-view.c thunar/thunar-statusbar.c @@ -107,14 +78,20 @@ thunar/thunar-templates-action.c thunar/thunar-text-renderer.c thunar/thunar-throbber.c -thunar/thunar-thumbnail-generator.c +thunar/thunar-throbber-fallback.c +thunar/thunar-thumbnailer.c +thunar/thunar-thumbnail-frame.c +thunar/thunar-transfer-job.c
[Xfce4-commits] r30062 - thunar/branches/migration-to-gio
Author: jannis Date: 2009-06-20 02:36:55 + (Sat, 20 Jun 2009) New Revision: 30062 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/configure.in.in Log: * configure.in.in: Add header and function checks required for tdb. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-06-20 02:26:54 UTC (rev 30061) +++ thunar/branches/migration-to-gio/ChangeLog 2009-06-20 02:36:55 UTC (rev 30062) @@ -1,5 +1,9 @@ 2009-06-20 Jannis Pohlmann + * configure.in.in: Add header and function checks required for tdb. + +2009-06-20 Jannis Pohlmann + * Remove thunar-vfs. There might be some pieces left which will be cleaned up next. Update the list of functions and headers the configure script checks because a lot of them were only required for Modified: thunar/branches/migration-to-gio/configure.in.in === --- thunar/branches/migration-to-gio/configure.in.in2009-06-20 02:26:54 UTC (rev 30061) +++ thunar/branches/migration-to-gio/configure.in.in2009-06-20 02:36:55 UTC (rev 30062) @@ -113,15 +113,17 @@ dnl ** dnl *** Check for standard headers *** dnl ** -AC_CHECK_HEADERS([errno.h fcntl.h grp.h limits.h locale.h memory.h paths.h \ - pwd.h signal.h stdarg.h stdlib.h string.h sys/stat.h time.h]) +AC_CHECK_HEADERS([ctype.h errno.h fcntl.h grp.h limits.h locale.h memory.h \ + paths.h pwd.h sched.h signal.h stdarg.h stdlib.h string.h \ + sys/mman.h sys/stat.h sys/time.h sys/types.h sys/uio.h \ + sys/wait.h time.h]) dnl dnl *** Check for standard functions *** dnl AC_FUNC_MMAP() -AC_CHECK_FUNCS([localeconv mkdtemp setgroupent setpassent strcoll \ -strlcpy strptime symlink]) +AC_CHECK_FUNCS([localeconv mkdtemp pread pwrite sched_yield setgroupent \ +setpassent strcoll strlcpy strptime symlink]) dnl ** dnl *** Check for i18n support *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30069 - thunar/branches
Author: jannis Date: 2009-06-22 11:36:06 + (Mon, 22 Jun 2009) New Revision: 30069 Removed: thunar/branches/port-to-gio/ Log: Remote port-to-gio branch, which was the first less well-planned attempt to migrate to GIO. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30071 - libxfce4util/trunk
Author: jannis Date: 2009-06-23 03:39:03 + (Tue, 23 Jun 2009) New Revision: 30071 Modified: libxfce4util/trunk/INSTALL Log: Update INSTALL file. Modified: libxfce4util/trunk/INSTALL === --- libxfce4util/trunk/INSTALL 2009-06-22 22:14:44 UTC (rev 30070) +++ libxfce4util/trunk/INSTALL 2009-06-23 03:39:03 UTC (rev 30071) @@ -2,15 +2,15 @@ * Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007 Free Software Foundation, Inc. +2006, 2007, 2008 Free Software Foundation, Inc. -This file is free documentation; the Free Software Foundation gives + This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation == -Briefly, the shell commands `./configure; make; make install' should + Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. @@ -73,9 +73,9 @@ Compilers and Options = -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here @@ -88,7 +88,7 @@ Compiling For Multiple Architectures -You can compile the package for more than one kind of computer at the + You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run @@ -100,10 +100,24 @@ installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + Installation Names == -By default, `make install' installs the package's commands under + By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. @@ -126,7 +140,7 @@ Optional Features = -Some packages pay attention to `--enable-FEATURE' options to + Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -138,14 +152,36 @@ you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. +Particular systems +== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + Specifying the System Type == -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the + There may be some features `c
[Xfce4-commits] r30072 - libxfcegui4/trunk/libxfcegui4
Author: jannis Date: 2009-06-23 04:01:56 + (Tue, 23 Jun 2009) New Revision: 30072 Modified: libxfcegui4/trunk/libxfcegui4/session-client.c Log: Fix compile error related to disconnect() when libSM is not available. Modified: libxfcegui4/trunk/libxfcegui4/session-client.c === --- libxfcegui4/trunk/libxfcegui4/session-client.c 2009-06-23 03:39:03 UTC (rev 30071) +++ libxfcegui4/trunk/libxfcegui4/session-client.c 2009-06-23 04:01:56 UTC (rev 30072) @@ -837,9 +837,11 @@ /* session_client->data; */ /* session_client->session_connection; */ +#ifdef HAVE_LIBSM if (session_client->current_state != SESSION_CLIENT_DISCONNECTED) { disconnect(session_client); } +#endif /* HAVE_LIBSM */ g_free(session_client->client_id); g_free(session_client->given_client_id); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30073 - terminal/trunk
Author: jannis Date: 2009-06-23 04:04:14 + (Tue, 23 Jun 2009) New Revision: 30073 Modified: terminal/trunk/ChangeLog terminal/trunk/INSTALL Log: * INSTALL: Update INSTALL file. Modified: terminal/trunk/ChangeLog === --- terminal/trunk/ChangeLog2009-06-23 04:01:56 UTC (rev 30072) +++ terminal/trunk/ChangeLog2009-06-23 04:04:14 UTC (rev 30073) @@ -1,3 +1,7 @@ +2009-06-23 Jannis Pohlmann + + * INSTALL: Update INSTALL file. + 2009-04-19 Stephan Arts * == Released 0.2.12 == Modified: terminal/trunk/INSTALL === --- terminal/trunk/INSTALL 2009-06-23 04:01:56 UTC (rev 30072) +++ terminal/trunk/INSTALL 2009-06-23 04:04:14 UTC (rev 30073) @@ -2,15 +2,15 @@ * Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007 Free Software Foundation, Inc. +2006, 2007, 2008 Free Software Foundation, Inc. -This file is free documentation; the Free Software Foundation gives + This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation == -Briefly, the shell commands `./configure; make; make install' should + Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. @@ -73,9 +73,9 @@ Compilers and Options = -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here @@ -88,7 +88,7 @@ Compiling For Multiple Architectures -You can compile the package for more than one kind of computer at the + You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run @@ -100,10 +100,24 @@ installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + Installation Names == -By default, `make install' installs the package's commands under + By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. @@ -126,7 +140,7 @@ Optional Features = -Some packages pay attention to `--enable-FEATURE' options to + Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -138,14 +152,36 @@ you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. +Particular systems +== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +p
[Xfce4-commits] r30074 - xfce-utils/trunk/xfrun
Author: jannis Date: 2009-06-23 04:24:18 + (Tue, 23 Jun 2009) New Revision: 30074 Modified: xfce-utils/trunk/xfrun/xfrun-dbus.c xfce-utils/trunk/xfrun/xfrun-dialog.c Log: Fix various small compile errors. Modified: xfce-utils/trunk/xfrun/xfrun-dbus.c === --- xfce-utils/trunk/xfrun/xfrun-dbus.c 2009-06-23 04:04:14 UTC (rev 30073) +++ xfce-utils/trunk/xfrun/xfrun-dbus.c 2009-06-23 04:24:18 UTC (rev 30074) @@ -209,7 +209,7 @@ /* server registration */ static gboolean -xfrun_register_dbus_service() +xfrun_register_dbus_service(void) { static const struct DBusObjectPathVTable vtable = { NULL, @@ -297,7 +297,7 @@ /* send quit message */ static void -xfrun_send_quit() +xfrun_send_quit(void) { DBusConnection *connection; DBusMessage *method, *result; Modified: xfce-utils/trunk/xfrun/xfrun-dialog.c === --- xfce-utils/trunk/xfrun/xfrun-dialog.c 2009-06-23 04:04:14 UTC (rev 30073) +++ xfce-utils/trunk/xfrun/xfrun-dialog.c 2009-06-23 04:24:18 UTC (rev 30074) @@ -77,9 +77,6 @@ XFRUN_N_COLS, }; -static void xfrun_dialog_class_init(XfrunDialogClass *klass); -static void xfrun_dialog_init(XfrunDialog *dialog); - static void xfrun_dialog_set_property(GObject *object, guint property_id, const GValue *value, @@ -340,7 +337,7 @@ } static gchar ** -xfrun_get_histfile_content() +xfrun_get_histfile_content(void) { gchar **lines = NULL, *histfile, *contents = NULL; gsize length = 0; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30126 - xfce-utils/trunk/scripts
Author: jannis Date: 2009-06-29 13:22:08 + (Mon, 29 Jun 2009) New Revision: 30126 Modified: xfce-utils/trunk/scripts/Makefile.am Log: Remove duplicate Makefile.am entry for xfterm4. Modified: xfce-utils/trunk/scripts/Makefile.am === --- xfce-utils/trunk/scripts/Makefile.am2009-06-29 09:04:52 UTC (rev 30125) +++ xfce-utils/trunk/scripts/Makefile.am2009-06-29 13:22:08 UTC (rev 30126) @@ -5,7 +5,6 @@ bin_SCRIPTS= \ $(scripts) \ - xfterm4 \ xfbrowser4 \ startxfce4 \ xfhelp4 ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30127 - in xfwm4/trunk: . themes/daloa themes/default themes/default-4.6 themes/kokodi
Author: jannis Date: 2009-06-29 13:28:45 + (Mon, 29 Jun 2009) New Revision: 30127 Modified: xfwm4/trunk/ChangeLog xfwm4/trunk/themes/daloa/Makefile.am xfwm4/trunk/themes/default-4.6/Makefile.am xfwm4/trunk/themes/default/Makefile.am xfwm4/trunk/themes/kokodi/Makefile.am Log: * themes/daloa/Makefile.am, themes/default-4.6/Makefile.am, themes/default/Makefile.am, themes/kokodi/Makefile.am: Remove duplicate hide-pressed.png entries from Makefile.am. Modified: xfwm4/trunk/ChangeLog === --- xfwm4/trunk/ChangeLog 2009-06-29 13:22:08 UTC (rev 30126) +++ xfwm4/trunk/ChangeLog 2009-06-29 13:28:45 UTC (rev 30127) @@ -1,3 +1,9 @@ +2009-06-29 jannis + + * themes/daloa/Makefile.am, themes/default-4.6/Makefile.am, + themes/default/Makefile.am, themes/kokodi/Makefile.am: Remove + duplicate hide-pressed.png entries from Makefile.am. + 2009-05-22 olivier * frame.c, tabwin.c: Fix mixed RTL/LTR text not rendering properly in title and tabwin Modified: xfwm4/trunk/themes/daloa/Makefile.am === --- xfwm4/trunk/themes/daloa/Makefile.am2009-06-29 13:22:08 UTC (rev 30126) +++ xfwm4/trunk/themes/daloa/Makefile.am2009-06-29 13:28:45 UTC (rev 30127) @@ -14,7 +14,6 @@ hide-active.png \ hide-inactive.png \ hide-pressed.png\ - hide-pressed.png\ hide-prelight.png \ left-active.png \ left-inactive.png \ Modified: xfwm4/trunk/themes/default/Makefile.am === --- xfwm4/trunk/themes/default/Makefile.am 2009-06-29 13:22:08 UTC (rev 30126) +++ xfwm4/trunk/themes/default/Makefile.am 2009-06-29 13:28:45 UTC (rev 30127) @@ -15,7 +15,6 @@ hide-inactive.png \ hide-prelight.png \ hide-pressed.png\ - hide-pressed.png\ left-active.png \ left-inactive.png \ maximize-active.png \ Modified: xfwm4/trunk/themes/default-4.6/Makefile.am === --- xfwm4/trunk/themes/default-4.6/Makefile.am 2009-06-29 13:22:08 UTC (rev 30126) +++ xfwm4/trunk/themes/default-4.6/Makefile.am 2009-06-29 13:28:45 UTC (rev 30127) @@ -15,7 +15,6 @@ hide-inactive.png \ hide-prelight.png \ hide-pressed.png\ - hide-pressed.png\ left-active.png \ left-inactive.png \ maximize-active.png \ Modified: xfwm4/trunk/themes/kokodi/Makefile.am === --- xfwm4/trunk/themes/kokodi/Makefile.am 2009-06-29 13:22:08 UTC (rev 30126) +++ xfwm4/trunk/themes/kokodi/Makefile.am 2009-06-29 13:28:45 UTC (rev 30127) @@ -15,7 +15,6 @@ hide-inactive.png \ hide-prelight.png \ hide-pressed.png\ - hide-pressed.png\ left-active.png \ left-inactive.png \ maximize-active.png \ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30225 - in xfce4-appfinder/trunk: . src
Author: jannis Date: 2009-07-09 00:01:32 + (Thu, 09 Jul 2009) New Revision: 30225 Modified: xfce4-appfinder/trunk/ChangeLog xfce4-appfinder/trunk/src/xfce-appfinder-window.c Log: * src/xfce-appfinder-window.c: Don't use startup notification for now. As we use exo-open to launch desktop entries, people usually end up with annoying waiting cursors and a lot of temporary exo-open items in the taskbar. Add tooltips showing the categories and command for each item in the tree view (original patch by J?\195?\169r?\195?\180me Guelfucci). Use "launch" instead of "execute" in the GUI (patch by J?\195?\169r?\195?\180me Guelfucci, fixes bug #4968). Add support for searching the Exec field of desktop entries (original patch by J?\195?\169r?\195?\180me Guelfucci, fixes bug #4969). Modified: xfce4-appfinder/trunk/ChangeLog === --- xfce4-appfinder/trunk/ChangeLog 2009-07-08 17:58:57 UTC (rev 30224) +++ xfce4-appfinder/trunk/ChangeLog 2009-07-09 00:01:32 UTC (rev 30225) @@ -1,3 +1,14 @@ +2009-07-09 Jannis Pohlmann + + * src/xfce-appfinder-window.c: Don't use startup notification for now. + As we use exo-open to launch desktop entries, people usually end up + with annoying waiting cursors and a lot of temporary exo-open items + in the taskbar. Add tooltips showing the categories and command for + each item in the tree view (original patch by Jérôme Guelfucci). Use + "launch" instead of "execute" in the GUI (patch by Jérôme Guelfucci, + fixes bug #4968). Add support for searching the Exec field of desktop + entries (original patch by Jérôme Guelfucci, fixes bug #4969). + 2009-04-09 Stephan Arts * == 46.1 Released! == Modified: xfce4-appfinder/trunk/src/xfce-appfinder-window.c === --- xfce4-appfinder/trunk/src/xfce-appfinder-window.c 2009-07-08 17:58:57 UTC (rev 30224) +++ xfce4-appfinder/trunk/src/xfce-appfinder-window.c 2009-07-09 00:01:32 UTC (rev 30225) @@ -53,6 +53,7 @@ #define TEXT_COLUMN 1 #define CATEGORY_COLUMN 2 #define ITEM_COLUMN 3 +#define TOOLTIP_COLUMN 4 @@ -264,6 +265,7 @@ GtkWidget *label; GtkWidget *alignment; GtkWidget *scrollwin; + GtkWidget *execute_image; gchar *text; gint width; gint height; @@ -358,13 +360,15 @@ gtk_container_add (GTK_CONTAINER (hbox1), scrollwin); gtk_widget_show (scrollwin); - window->list_store = gtk_list_store_new (4, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, XFCE_TYPE_MENU_ITEM); + window->list_store = +gtk_list_store_new (5, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, XFCE_TYPE_MENU_ITEM, G_TYPE_STRING); window->filter = gtk_tree_model_filter_new (GTK_TREE_MODEL (window->list_store), NULL); gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (window->filter), _xfce_appfinder_window_visible_func, window, NULL); window->tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (window->filter)); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (window->tree_view), FALSE); + gtk_tree_view_set_tooltip_column (GTK_TREE_VIEW (window->tree_view), TOOLTIP_COLUMN); g_signal_connect (window->tree_view, "cursor-changed", G_CALLBACK (_xfce_appfinder_window_cursor_changed), window); g_signal_connect_swapped (window->tree_view, "row-activated", G_CALLBACK (_xfce_appfinder_window_execute), window); g_signal_connect (window->tree_view, "drag-data-get", G_CALLBACK (_xfce_appfinder_window_drag_data_get), window); @@ -387,7 +391,7 @@ gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, TRUE, 0); gtk_widget_show (hbox2); - check_button = gtk_check_button_new_with_mnemonic (_("C_lose after execute")); + check_button = gtk_check_button_new_with_mnemonic (_("C_lose after launch")); gtk_box_pack_start (GTK_BOX (hbox2), check_button, FALSE, TRUE, 0); gtk_widget_show (check_button); @@ -400,7 +404,9 @@ gtk_container_add (GTK_CONTAINER (hbox2), bbox); gtk_widget_show (bbox); - window->execute_button = gtk_button_new_from_stock (GTK_STOCK_EXECUTE); + window->execute_button = gtk_button_new_with_mnemonic (_("Launch")); + execute_image = gtk_image_new_from_stock (GTK_STOCK_EXECUTE, GTK_ICON_SIZE_BUTTON); + gtk_button_set_image (GTK_BUTTON (window->execute_button), execute_image); GTK_WIDGET_SET_FLAGS (window->execute_button, GTK_CAN_DEFAULT); gtk_button_set_focus_on_click (GTK_BUTTON (window->execute_button), FALSE); gtk_widget_set_sensitive (window->execute_button, FALSE); @@ -784,7 +790,7 @@ screen = xfce_gdk_display_l
[Xfce4-commits] r30228 - in xfce4-appfinder/trunk: . src
Author: jannis Date: 2009-07-09 10:40:14 + (Thu, 09 Jul 2009) New Revision: 30228 Modified: xfce4-appfinder/trunk/ChangeLog xfce4-appfinder/trunk/src/xfce-appfinder-window.c Log: * src/xfce-appfinder-window.c: Rework the tooltip string code a little bit. Modified: xfce4-appfinder/trunk/ChangeLog === --- xfce4-appfinder/trunk/ChangeLog 2009-07-09 10:03:02 UTC (rev 30227) +++ xfce4-appfinder/trunk/ChangeLog 2009-07-09 10:40:14 UTC (rev 30228) @@ -1,5 +1,10 @@ 2009-07-09 Jannis Pohlmann + * src/xfce-appfinder-window.c: Rework the tooltip string code a little + bit. + +2009-07-09 Jannis Pohlmann + * src/xfce-appfinder-window.c: Don't use startup notification for now. As we use exo-open to launch desktop entries, people usually end up with annoying waiting cursors and a lot of temporary exo-open items Modified: xfce4-appfinder/trunk/src/xfce-appfinder-window.c === --- xfce4-appfinder/trunk/src/xfce-appfinder-window.c 2009-07-09 10:03:02 UTC (rev 30227) +++ xfce4-appfinder/trunk/src/xfce-appfinder-window.c 2009-07-09 10:40:14 UTC (rev 30228) @@ -1089,10 +1089,10 @@ GString *tooltip_str; GList*categories; GList*lp; - const gchar **categories_array; const gchar *name = NULL; const gchar *comment; const gchar *command; + gchar **categories_array; gchar*categories_string; gchar*text; gchar*tooltip = NULL; @@ -1127,20 +1127,26 @@ if (G_LIKELY (categories != NULL)) { - categories_array = g_new0 (const gchar *, g_list_length (categories) + 1); + categories_array = g_new0 (gchar *, g_list_length (categories) + 1); for (lp = categories, n = 0; lp != NULL; lp = lp->next, ++n) categories_array[n] = lp->data; - categories_string = g_strjoinv (", ", (gchar **) categories_array); - g_string_append_printf (tooltip_str, _("Categories: %s\n"), categories_string); + categories_string = g_strjoinv (", ", categories_array); + g_string_append_printf (tooltip_str, _("Categories: %s"), categories_string); g_free (categories_string); g_free (categories_array); } - g_string_append_printf (tooltip_str, _("Command: %s"), command); + if (command != NULL && *command != '\0') +{ + if (categories != NULL) +g_string_append_c (tooltip_str, '\n'); + g_string_append_printf (tooltip_str, _("Command: %s"), command); +} + tooltip = g_string_free (tooltip_str, FALSE); gtk_list_store_append (window->list_store, &iter); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30344 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-07-18 14:24:27 + (Sat, 18 Jul 2009) New Revision: 30344 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/INSTALL thunar/branches/migration-to-gio/thunar/thunar-application.c thunar/branches/migration-to-gio/thunar/thunar-file.c thunar/branches/migration-to-gio/thunar/thunar-launcher.c Log: * thunar/thunar-launcher.c: Make executing files work again. Note that this only works for one selected file right now. Poking/launching multiple files/directories still have to be worked on anyway. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-07-18 12:25:33 UTC (rev 30343) +++ thunar/branches/migration-to-gio/ChangeLog 2009-07-18 14:24:27 UTC (rev 30344) @@ -1,3 +1,9 @@ +2009-07-18 Jannis Pohlmann + + * thunar/thunar-launcher.c: Make executing files work again. Note that + this only works for one selected file right now. Poking/launching + multiple files/directories still have to be worked on anyway. + 2009-06-20 Jannis Pohlmann * po/POTFILES.in: Add thunar-settings.desktop.in. Modified: thunar/branches/migration-to-gio/INSTALL === --- thunar/branches/migration-to-gio/INSTALL2009-07-18 12:25:33 UTC (rev 30343) +++ thunar/branches/migration-to-gio/INSTALL2009-07-18 14:24:27 UTC (rev 30344) @@ -2,15 +2,15 @@ * Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007 Free Software Foundation, Inc. +2006, 2007, 2008, 2009 Free Software Foundation, Inc. -This file is free documentation; the Free Software Foundation gives + This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation == -Briefly, the shell commands `./configure; make; make install' should + Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. @@ -73,9 +73,9 @@ Compilers and Options = -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here @@ -88,7 +88,7 @@ Compiling For Multiple Architectures -You can compile the package for more than one kind of computer at the + You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run @@ -100,10 +100,24 @@ installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + Installation Names == -By default, `make install' installs the package's commands under + By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. @@ -126,7 +140,7 @@ Optional Features = -Some packages pay attention to `--enable-FEATURE' options to + Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part
[Xfce4-commits] r30346 - in thunar/branches/migration-to-gio: . thunar thunarx
Author: jannis Date: 2009-07-18 16:55:47 + (Sat, 18 Jul 2009) New Revision: 30346 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c thunar/branches/migration-to-gio/thunar/thunar-file.h thunar/branches/migration-to-gio/thunarx/thunarx-file-info.h Log: * thunar/thunar-file.{c,h}: Introduce new function thunar_file_same_filesystem() which uses G_FILE_ATTRIBUTE_ID_FILESYSTEM to check whether two files reside on the same device/filesystem. Use this to fix the copy/move decision in thunar_file_accepts_drop(). * thunarx/thunarx-file-info.h: Add the "id" namespace to THUNARX_FILE_INFO_NAMESPACE. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-07-18 15:30:19 UTC (rev 30345) +++ thunar/branches/migration-to-gio/ChangeLog 2009-07-18 16:55:47 UTC (rev 30346) @@ -1,5 +1,15 @@ 2009-07-18 Jannis Pohlmann + * thunar/thunar-file.{c,h}: Introduce new function + thunar_file_same_filesystem() which uses + G_FILE_ATTRIBUTE_ID_FILESYSTEM to check whether two files reside on + the same device/filesystem. Use this to fix the copy/move decision + in thunar_file_accepts_drop(). + * thunarx/thunarx-file-info.h: Add the "id" namespace to + THUNARX_FILE_INFO_NAMESPACE. + +2009-07-18 Jannis Pohlmann + * thunar/thunar-launcher.c: Make executing files work again. Note that this only works for one selected file right now. Poking/launching multiple files/directories still have to be worked on anyway. Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-07-18 15:30:19 UTC (rev 30345) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-07-18 16:55:47 UTC (rev 30346) @@ -329,10 +329,6 @@ if (file->filesystem_info != NULL) g_object_unref (file->filesystem_info); - /* release the mount */ - if (file->mount != NULL) -g_object_unref (file->mount); - /* free the custom icon name */ g_free (file->custom_icon_name); @@ -661,7 +657,6 @@ file = g_object_new (THUNAR_TYPE_FILE, NULL); file->gfile = g_object_ref (gfile); file->info = NULL; - file->mount = NULL; file->filesystem_info = NULL; file->custom_icon_name = NULL; file->display_name = NULL; @@ -767,13 +762,6 @@ file->filesystem_info = NULL; } - /* release the current mount */ - if (file->mount != NULL) -{ - g_object_unref (file->mount); - file->mount = NULL; -} - /* free the custom icon name */ g_free (file->custom_icon_name); @@ -817,9 +805,6 @@ cancellable, NULL); - /* try to detect the corresponding mount */ - file->mount = g_file_find_enclosing_mount (file->gfile, cancellable, NULL); - /* determine the basename */ file->basename = g_file_get_basename (file->gfile); _thunar_assert (file->basename != NULL); @@ -1431,7 +1416,7 @@ * are on the same disk, and the source file is owned by the current user. */ if (ofile == NULL - || (!g_mount_is_same_drive (ofile->mount, file->mount)) + || !thunar_file_same_filesystem (file, ofile) || (ofile->info != NULL && g_file_info_get_attribute_uint32 (ofile->info, G_FILE_ATTRIBUTE_UNIX_UID) != effective_user_id)) @@ -3139,6 +3124,33 @@ +gboolean +thunar_file_same_filesystem (const ThunarFile *file_a, + const ThunarFile *file_b) +{ + const gchar *filesystem_id_a; + const gchar *filesystem_id_b; + + _thunar_return_val_if_fail (THUNAR_IS_FILE (file_a), FALSE); + _thunar_return_val_if_fail (THUNAR_IS_FILE (file_b), FALSE); + + /* return false if we have no information about one of the files */ + if (file_a->info == NULL || file_b->info == NULL) +return FALSE; + + /* determine the filesystem IDs */ + filesystem_id_a = g_file_info_get_attribute_string (file_a->info, + G_FILE_ATTRIBUTE_ID_FILESYSTEM); + + filesystem_id_b = g_file_info_get_attribute_string (file_b->info, + G_FILE_ATTRIBUTE_ID_FILESYSTEM); + + /* compare the filesystem IDs */ + return exo_str_is_equal (filesystem_id_a, filesystem_id_b); +} + + + /**
[Xfce4-commits] r30347 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-07-18 17:28:56 + (Sat, 18 Jul 2009) New Revision: 30347 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c Log: * thunar/thunar-file.c: Only return true from thunar_file_is_executable() if the file is either a desktop file or is an application/x-executable or application/x-shellscript. On Windows we use g_content_type_can_be_executable() directly instead of checking for these two content types. Patch by Nick. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-07-18 16:55:47 UTC (rev 30346) +++ thunar/branches/migration-to-gio/ChangeLog 2009-07-18 17:28:56 UTC (rev 30347) @@ -1,5 +1,13 @@ 2009-07-18 Jannis Pohlmann + * thunar/thunar-file.c: Only return true from + thunar_file_is_executable() if the file is either a desktop file or + is an application/x-executable or application/x-shellscript. On + Windows we use g_content_type_can_be_executable() directly instead + of checking for these two content types. Patch by Nick. + +2009-07-18 Jannis Pohlmann + * thunar/thunar-file.{c,h}: Introduce new function thunar_file_same_filesystem() which uses G_FILE_ATTRIBUTE_ID_FILESYSTEM to check whether two files reside on Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-07-18 16:55:47 UTC (rev 30346) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-07-18 17:28:56 UTC (rev 30347) @@ -2026,16 +2026,36 @@ gboolean thunar_file_is_executable (const ThunarFile *file) { - gboolean can_execute; + gboolean can_execute = FALSE; + const gchar *content_type; _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE); if (file->info == NULL) return FALSE; - - can_execute = g_file_info_get_attribute_boolean (file->info, - G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE); + if (g_file_info_get_attribute_boolean (file->info, G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE)) +{ + /* get the content type of the file */ + content_type = g_file_info_get_content_type (file->info); + if (G_LIKELY (content_type != NULL)) +{ +#ifdef G_OS_WIN32 + /* check for .exe, .bar or .com */ + can_execute = g_content_type_can_be_executable (content_type); +#else + /* check if the content type is save to execute, we don't use + * g_content_type_can_be_executable() for unix because it also returns + * true for "text/plain" and we don't want that */ + if (g_content_type_is_a (content_type, "application/x-executable") + || g_content_type_is_a (content_type, "application/x-shellscript")) +{ + can_execute = TRUE; +} +#endif +} +} + return can_execute || thunar_file_is_desktop_file (file); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] r30378 - in thunar/branches/migration-to-gio: . thunar
Author: jannis Date: 2009-07-22 15:58:17 + (Wed, 22 Jul 2009) New Revision: 30378 Modified: thunar/branches/migration-to-gio/ChangeLog thunar/branches/migration-to-gio/thunar/thunar-file.c Log: * thunar/thunar-file.c: Fix typo in thunar_file_info_has_mime_type() which caused a lot of problems. Patch by Nick. Modified: thunar/branches/migration-to-gio/ChangeLog === --- thunar/branches/migration-to-gio/ChangeLog 2009-07-22 08:16:40 UTC (rev 30377) +++ thunar/branches/migration-to-gio/ChangeLog 2009-07-22 15:58:17 UTC (rev 30378) @@ -1,3 +1,8 @@ +2009-07-22 Jannis Pohlmann + + * thunar/thunar-file.c: Fix typo in thunar_file_info_has_mime_type() + which caused a lot of problems. Patch by Nick. + 2009-07-18 Jannis Pohlmann * thunar/thunar-file.c: Only return true from Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c === --- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-07-22 08:16:40 UTC (rev 30377) +++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-07-22 15:58:17 UTC (rev 30378) @@ -407,7 +407,7 @@ if (THUNAR_FILE (file_info)->info == NULL) return FALSE; - return g_content_type_is_a (mime_type, g_file_info_get_content_type (THUNAR_FILE (file_info)->info)); + return g_content_type_is_a (g_file_info_get_content_type (THUNAR_FILE (file_info)->info), mime_type); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits