From f41b3447d488e4fba3ff5f52f14578adf3657365 Mon Sep 17 00:00:00 2001 From: Benedikt Meurer <benny@xfce.org> Date: Sun, 8 Jan 2006 21:52:40 +0000 Subject: [PATCH] 2006-01-08 Benedikt Meurer <benny@xfce.org> * thunar-vfs/thunar-vfs-monitor.c (thunar_vfs_monitor_queue_notification): Don't use strcmp() here, as the notification's filename may be NULL. * thunar-vfs/thunar-vfs-info.{c,h}, thunar-vfs/thunar-vfs.symbols: Drop thunar_vfs_info_chmod() and thunar_vfs_info_chgrp() again. * thunar-vfs/thunar-vfs-chmod-job.{c,h}, thunar-vfs/thunar-vfs.{c,h}, thunar-vfs/thunar-vfs-chown-job.{c,h}, thunar-vfs/Makefile.am: Add new classes ThunarVfsChmodJob and ThunarVfsChownJob as replacements for the thunar_vfs_info_chmod() and thunar_vfs_info_chgrp() functions. These jobs can operate recursively. Add interfaces to the new classes, thunar_vfs_change_mode() and thunar_vfs_change_group(). * docs/reference/thunar-vfs/: Update documentation. * thunar/thunar-file.{c,h}: Drop thunar_file_chmod(),thunar_file_chgrp() and thunar_file_is_chgrpable(), as we'll use the asynchronous jobs added to Thunar-VFS now. * thunar/thunar-advanced-permissions-dialog.{c,h}, thunar/thunar-change-group-dialog.{c,h}, thunar/thunar-permissions-model.{c,h}, thunar/thunar-permissions-view.{c,h}, thunar/Makefile.am, thunar/thunar-properties-dialog.c: Ditch the ACL aware permissions user interface, as it's unlikely that ACL support will be there for 1.0 and so there's no need to reduce the usability of the permissions user interface yet. * thunar/thunar-pango-extensions.{c,h}: Add new Pango helper method thunar_pango_attr_list_small_italic(). * thunar/thunar-enum-types.{c,h}: Import new files to contain enum types that don't fit anywhere else and provide conversation functions for these types. * thunar/thunar-permissions-chooser.{c,h}, thunar/Makefile.am, thunar/thunar-properties-dialog.c: Import simplified permissions chooser, similar to the Aqua Finder one, with support to change permissions recursively for folders. * thunar/thunar-preferences-dialog.c, thunar/thunar-preferences.c: Add option "misc-recursive-permissions", which controls whether permissions are always/never applied recursively, or whether Thunar should ask the user everytime a permission flag is changed. * icons/16x16/, thunar/thunar-stock.{c,h}: Remove now obsolete icon thunar-permissions-other. Rename the user and group icons. * po/*.po, po/POTFILES.in: Update file list. Merge new strings. (Old svn revision: 19357) --- ChangeLog | 42 + .../thunar-vfs/thunar-vfs-sections.txt | 4 +- .../thunar-vfs/tmpl/thunar-vfs-info.sgml | 22 - .../tmpl/thunar-vfs-operations.sgml | 27 + icons/16x16/Makefile.am | 5 +- ...sions-group.png => stock_thunar-group.png} | Bin .../16x16/stock_thunar-permissions-other.png | Bin 520 -> 0 bytes ...issions-user.png => stock_thunar-user.png} | Bin po/POTFILES.in | 7 +- po/ca.po | 454 +++--- po/de.po | 452 +++--- po/el.po | 470 ++++--- po/es.po | 478 ++++--- po/fr.po | 474 ++++--- po/hu.po | 478 ++++--- po/it.po | 476 ++++--- po/ja.po | 474 ++++--- po/pt_BR.po | 474 ++++--- thunar-vfs/Makefile.am | 4 + thunar-vfs/thunar-vfs-chmod-job.c | 336 +++++ thunar-vfs/thunar-vfs-chmod-job.h | 56 + thunar-vfs/thunar-vfs-chown-job.c | 321 +++++ thunar-vfs/thunar-vfs-chown-job.h | 54 + thunar-vfs/thunar-vfs-info.c | 101 -- thunar-vfs/thunar-vfs-info.h | 8 - thunar-vfs/thunar-vfs-monitor.c | 4 +- thunar-vfs/thunar-vfs.c | 121 ++ thunar-vfs/thunar-vfs.h | 84 +- thunar-vfs/thunar-vfs.symbols | 5 +- thunar/Makefile.am | 12 +- thunar/thunar-advanced-permissions-dialog.c | 478 ------- thunar/thunar-advanced-permissions-dialog.h | 47 - thunar/thunar-change-group-dialog.c | 531 ------- thunar/thunar-change-group-dialog.h | 47 - thunar/thunar-enum-types.c | 84 ++ thunar/thunar-enum-types.h | 48 + thunar/thunar-file.c | 83 -- thunar/thunar-file.h | 9 - thunar/thunar-pango-extensions.c | 52 +- thunar/thunar-pango-extensions.h | 7 +- thunar/thunar-permissions-chooser.c | 1247 +++++++++++++++++ thunar/thunar-permissions-chooser.h | 47 + thunar/thunar-permissions-model.c | 968 ------------- thunar/thunar-permissions-model.h | 73 - thunar/thunar-permissions-view.c | 572 -------- thunar/thunar-permissions-view.h | 47 - thunar/thunar-preferences-dialog.c | 67 +- thunar/thunar-preferences.c | 19 +- thunar/thunar-properties-dialog.c | 6 +- thunar/thunar-stock.c | 5 +- thunar/thunar-stock.h | 7 +- 51 files changed, 4915 insertions(+), 4972 deletions(-) rename icons/16x16/{stock_thunar-permissions-group.png => stock_thunar-group.png} (100%) delete mode 100644 icons/16x16/stock_thunar-permissions-other.png rename icons/16x16/{stock_thunar-permissions-user.png => stock_thunar-user.png} (100%) create mode 100644 thunar-vfs/thunar-vfs-chmod-job.c create mode 100644 thunar-vfs/thunar-vfs-chmod-job.h create mode 100644 thunar-vfs/thunar-vfs-chown-job.c create mode 100644 thunar-vfs/thunar-vfs-chown-job.h delete mode 100644 thunar/thunar-advanced-permissions-dialog.c delete mode 100644 thunar/thunar-advanced-permissions-dialog.h delete mode 100644 thunar/thunar-change-group-dialog.c delete mode 100644 thunar/thunar-change-group-dialog.h create mode 100644 thunar/thunar-enum-types.c create mode 100644 thunar/thunar-enum-types.h create mode 100644 thunar/thunar-permissions-chooser.c create mode 100644 thunar/thunar-permissions-chooser.h delete mode 100644 thunar/thunar-permissions-model.c delete mode 100644 thunar/thunar-permissions-model.h delete mode 100644 thunar/thunar-permissions-view.c delete mode 100644 thunar/thunar-permissions-view.h diff --git a/ChangeLog b/ChangeLog index b6dabe0e8..dfe12ba36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,45 @@ +2006-01-08 Benedikt Meurer <benny@xfce.org> + + * thunar-vfs/thunar-vfs-monitor.c + (thunar_vfs_monitor_queue_notification): Don't use strcmp() here, as + the notification's filename may be NULL. + * thunar-vfs/thunar-vfs-info.{c,h}, thunar-vfs/thunar-vfs.symbols: Drop + thunar_vfs_info_chmod() and thunar_vfs_info_chgrp() again. + * thunar-vfs/thunar-vfs-chmod-job.{c,h}, thunar-vfs/thunar-vfs.{c,h}, + thunar-vfs/thunar-vfs-chown-job.{c,h}, thunar-vfs/Makefile.am: Add + new classes ThunarVfsChmodJob and ThunarVfsChownJob as replacements + for the thunar_vfs_info_chmod() and thunar_vfs_info_chgrp() functions. + These jobs can operate recursively. Add interfaces to the new classes, + thunar_vfs_change_mode() and thunar_vfs_change_group(). + * docs/reference/thunar-vfs/: Update documentation. + * thunar/thunar-file.{c,h}: Drop thunar_file_chmod(),thunar_file_chgrp() + and thunar_file_is_chgrpable(), as we'll use the asynchronous jobs + added to Thunar-VFS now. + * thunar/thunar-advanced-permissions-dialog.{c,h}, + thunar/thunar-change-group-dialog.{c,h}, + thunar/thunar-permissions-model.{c,h}, + thunar/thunar-permissions-view.{c,h}, thunar/Makefile.am, + thunar/thunar-properties-dialog.c: Ditch the ACL aware permissions + user interface, as it's unlikely that ACL support will be there for + 1.0 and so there's no need to reduce the usability of the permissions + user interface yet. + * thunar/thunar-pango-extensions.{c,h}: Add new Pango helper method + thunar_pango_attr_list_small_italic(). + * thunar/thunar-enum-types.{c,h}: Import new files to contain enum + types that don't fit anywhere else and provide conversation functions + for these types. + * thunar/thunar-permissions-chooser.{c,h}, thunar/Makefile.am, + thunar/thunar-properties-dialog.c: Import simplified permissions + chooser, similar to the Aqua Finder one, with support to change + permissions recursively for folders. + * thunar/thunar-preferences-dialog.c, thunar/thunar-preferences.c: Add + option "misc-recursive-permissions", which controls whether + permissions are always/never applied recursively, or whether Thunar + should ask the user everytime a permission flag is changed. + * icons/16x16/, thunar/thunar-stock.{c,h}: Remove now obsolete icon + thunar-permissions-other. Rename the user and group icons. + * po/*.po, po/POTFILES.in: Update file list. Merge new strings. + 2006-01-05 Benedikt Meurer <benny@xfce.org> * thunar/thunar-text-renderer.c: Don't determine the focus-padding and diff --git a/docs/reference/thunar-vfs/thunar-vfs-sections.txt b/docs/reference/thunar-vfs/thunar-vfs-sections.txt index 270015a99..676b7a1ee 100644 --- a/docs/reference/thunar-vfs/thunar-vfs-sections.txt +++ b/docs/reference/thunar-vfs/thunar-vfs-sections.txt @@ -30,8 +30,6 @@ thunar_vfs_info_new_for_path thunar_vfs_info_ref thunar_vfs_info_unref thunar_vfs_info_execute -thunar_vfs_info_chgrp -thunar_vfs_info_chmod thunar_vfs_info_rename thunar_vfs_info_matches thunar_vfs_info_list_free @@ -221,6 +219,8 @@ thunar_vfs_unlink_file thunar_vfs_unlink_files thunar_vfs_make_directory thunar_vfs_make_directories +thunar_vfs_change_mode +thunar_vfs_change_group </SECTION> diff --git a/docs/reference/thunar-vfs/tmpl/thunar-vfs-info.sgml b/docs/reference/thunar-vfs/tmpl/thunar-vfs-info.sgml index 5cda7ded5..5b8bf1ca7 100644 --- a/docs/reference/thunar-vfs/tmpl/thunar-vfs-info.sgml +++ b/docs/reference/thunar-vfs/tmpl/thunar-vfs-info.sgml @@ -79,28 +79,6 @@ ThunarVfsInfo @uris: -<!-- ##### FUNCTION thunar_vfs_info_chgrp ##### --> -<para> - -</para> - -@info: -@gid: -@error: -@Returns: - - -<!-- ##### FUNCTION thunar_vfs_info_chmod ##### --> -<para> - -</para> - -@info: -@mode: -@error: -@Returns: - - <!-- ##### FUNCTION thunar_vfs_info_rename ##### --> <para> diff --git a/docs/reference/thunar-vfs/tmpl/thunar-vfs-operations.sgml b/docs/reference/thunar-vfs/tmpl/thunar-vfs-operations.sgml index 4c211e6a8..50ece7f87 100644 --- a/docs/reference/thunar-vfs/tmpl/thunar-vfs-operations.sgml +++ b/docs/reference/thunar-vfs/tmpl/thunar-vfs-operations.sgml @@ -135,3 +135,30 @@ Operations @Returns: +<!-- ##### FUNCTION thunar_vfs_change_mode ##### --> +<para> + +</para> + +@path: +@dir_mask: +@dir_mode: +@file_mask: +@file_mode: +@recursive: +@error: +@Returns: + + +<!-- ##### FUNCTION thunar_vfs_change_group ##### --> +<para> + +</para> + +@path: +@gid: +@recursive: +@error: +@Returns: + + diff --git a/icons/16x16/Makefile.am b/icons/16x16/Makefile.am index bbbc89990..4680093fc 100644 --- a/icons/16x16/Makefile.am +++ b/icons/16x16/Makefile.am @@ -2,9 +2,8 @@ iconsdir = $(datadir)/icons/hicolor/16x16/stock/generic icons_DATA = \ - stock_thunar-permissions-group.png \ - stock_thunar-permissions-other.png \ - stock_thunar-permissions-user.png + stock_thunar-group.png \ + stock_thunar-user.png EXTRA_DIST = \ $(icons_DATA) diff --git a/icons/16x16/stock_thunar-permissions-group.png b/icons/16x16/stock_thunar-group.png similarity index 100% rename from icons/16x16/stock_thunar-permissions-group.png rename to icons/16x16/stock_thunar-group.png diff --git a/icons/16x16/stock_thunar-permissions-other.png b/icons/16x16/stock_thunar-permissions-other.png deleted file mode 100644 index 320d55d1c3dc12e1001788d07fe6698ee626a58e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 520 zcmV+j0{8uiP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3labT3lag+-G2N4000McNliru(+M66Fcn*7y9EFM0hLKa zK~#9!ty8~C!$1`NuGEZX?Gd5c4qg4RYbg%d{0BPK&4P3(bnM>Mp_6qfb#QYKp<)ok zNhbw|77Vn#U<g)Yq7;+oppAyMTF?i_J?`H7-uHe1e-s7)3yH+s>x;VqU}p-SJt2&3 z0Cw=gd8}40m&vlMUr#>2MV!YfAqJes==%BwrfH&3C`=5U&1R9wWU#Wb3?U5modMal zO{%Jr<G7@0=cH-pA>Fp0NmW(q_xr?ojE26^q2hTS0O0KO5?~+TXWA83)5`z|2m2>u zSp@*T?*jk`00ZIe%||2xIF1u?AfoXALox3kJ`8;Vi?ET169Iyc&x<hz5O8#OF&%&; zNvKpRC>DzoyHF~X#@FES@u^v@R@Za69P0J@k5klWG)4g=X-2EncGtVz4mjtC$LB*v zx_$>C1T4!!v)P0!%f~_(UxOsev$vg2H|2RAbX|v{D4|^2?RL=SWHO1RrNv;7f*SOC zJs5@o*L7i<W{AOHFo2>ch(@DmwOZp+kS@~cwbZm5D1@<z|B`pY58zeDX|1XN0000< KMNUMnLSTa1gW*a5 diff --git a/icons/16x16/stock_thunar-permissions-user.png b/icons/16x16/stock_thunar-user.png similarity index 100% rename from icons/16x16/stock_thunar-permissions-user.png rename to icons/16x16/stock_thunar-user.png diff --git a/po/POTFILES.in b/po/POTFILES.in index 6c854595a..26bf1ebce 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,3 +1,5 @@ +thunar-vfs/thunar-vfs-chmod-job.c +thunar-vfs/thunar-vfs-chown-job.c thunar-vfs/thunar-vfs-config.c thunar-vfs/thunar-vfs-exec.c thunar-vfs/thunar-vfs-info.c @@ -29,9 +31,7 @@ thunar-vfs/thunar-vfs-xfer.c thunar-vfs/thunar-vfs.c thunar/main.c -thunar/thunar-advanced-permissions-dialog.c thunar/thunar-application.c -thunar/thunar-change-group-dialog.c thunar/thunar-chooser-dialog.c thunar/thunar-chooser-model.c thunar/thunar-clipboard-manager.c @@ -58,8 +58,7 @@ thunar/thunar-metafile.c thunar/thunar-navigator.c thunar/thunar-open-with-action.c thunar/thunar-path-entry.c -thunar/thunar-permissions-model.c -thunar/thunar-permissions-view.c +thunar/thunar-permissions-chooser.c thunar/thunar-preferences-dialog.c thunar/thunar-preferences.c thunar/thunar-progress-dialog.c diff --git a/po/ca.po b/po/ca.po index 8eb524fc3..e4ff40060 100644 --- a/po/ca.po +++ b/po/ca.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Thunar 0.1.4svn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-01-04 18:34+0100\n" +"POT-Creation-Date: 2006-01-08 22:45+0100\n" "PO-Revision-Date: 2006-01-08 21:52+0100\n" "Last-Translator: Pau Rul·lan Ferragut <paurullan@bulma.net>\n" "Language-Team: catalan\n" @@ -16,23 +16,67 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n!=1;\n" -#: ../thunar-vfs/thunar-vfs-info.c:362 +#: ../thunar-vfs/thunar-vfs-chmod-job.c:168 +#: ../thunar-vfs/thunar-vfs-chown-job.c:166 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 +msgid "Collecting files..." +msgstr "Recol·lectant fitxers..." + +#. ask the user whether we should skip the file +#. ask the user whether to skip this file (used for cancellation only) +#. ask the user whether to skip +#: ../thunar-vfs/thunar-vfs-chmod-job.c:189 +#: ../thunar-vfs/thunar-vfs-chown-job.c:187 +#: ../thunar-vfs/thunar-vfs-link-job.c:212 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 +#, fuzzy, c-format +msgid "" +"%s.\n" +"\n" +"Do you want to skip it?" +msgstr "" +"\n" +"\n" +"Voleu ometre-ho?" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:246 +#: ../thunar-vfs/thunar-vfs-chown-job.c:244 +#, fuzzy, c-format +msgid "Failed to determine file info of `%s': %s" +msgstr "No s'ha pogut eliminar %s." + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:272 +#, fuzzy, c-format +msgid "Failed to change permissions of `%s': %s" +msgstr "Impossible de carregar el programa des del fitxer %s" + +#: ../thunar-vfs/thunar-vfs-chown-job.c:260 +#, fuzzy, c-format +msgid "Failed to change file owner of `%s': %s" +msgstr "Impossible de carregar el programa des del fitxer %s" + +#: ../thunar-vfs/thunar-vfs-chown-job.c:262 +#, fuzzy, c-format +msgid "Failed to change file group of `%s': %s" +msgstr "Impossible de carregar el programa des del fitxer %s" + +#: ../thunar-vfs/thunar-vfs-info.c:261 msgid "No Exec field specified" msgstr "No ha especificat un camp executable" -#: ../thunar-vfs/thunar-vfs-info.c:370 +#: ../thunar-vfs/thunar-vfs-info.c:269 msgid "Unable to parse file" msgstr "No s'ha pogut analitzar el fitxer" -#: ../thunar-vfs/thunar-vfs-info.c:460 +#: ../thunar-vfs/thunar-vfs-info.c:359 msgid "Invalid file name" msgstr "El nom del fitxer no és và lid" -#: ../thunar-vfs/thunar-vfs-info.c:482 +#: ../thunar-vfs/thunar-vfs-info.c:381 msgid "Invalid desktop file" msgstr "El nom de l'escriptori no és và lid" -#: ../thunar-vfs/thunar-vfs-info.c:716 +#: ../thunar-vfs/thunar-vfs-info.c:615 #, c-format msgid "Failed to stat file `%s': %s" msgstr "" @@ -56,20 +100,6 @@ msgstr "" msgid "Failed to remove `%s': %s" msgstr "No s'ha pogut eliminar %s." -#. ask the user whether to skip this file (used for cancellation only) -#. ask the user whether to skip -#: ../thunar-vfs/thunar-vfs-link-job.c:212 -#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 -#, fuzzy, c-format -msgid "" -"%s.\n" -"\n" -"Do you want to skip it?" -msgstr "" -"\n" -"\n" -"Voleu ometre-ho?" - #: ../thunar-vfs/thunar-vfs-mime-database.c:1657 #, c-format msgid "Failed to load application from file %s" @@ -101,10 +131,6 @@ msgstr "Mida" msgid "The desired thumbnail size" msgstr "Tamany de les miniatures" -#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 -msgid "Collecting files..." -msgstr "Recol·lectant fitxers..." - #. display info message #: ../thunar-vfs/thunar-vfs-transfer-job.c:329 #, fuzzy @@ -145,7 +171,7 @@ msgid "copy of %s" msgstr "" #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703 -#: ../thunar/thunar-properties-dialog.c:643 +#: ../thunar/thunar-properties-dialog.c:631 #, c-format msgid "link to %s" msgstr "" @@ -261,58 +287,6 @@ msgstr "" msgid "Thunar" msgstr "" -#: ../thunar/thunar-advanced-permissions-dialog.c:159 -#, fuzzy -msgid "Advanced Permissions" -msgstr "Permisos" - -#: ../thunar/thunar-advanced-permissions-dialog.c:167 -msgid "Special Bits" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:180 -msgid "Set _User ID (SUID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:190 -msgid "" -"An executable file whose Set User ID (SUID) bit is\n" -"set will always be executed with the privileges of\n" -"the owner of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:211 -msgid "Set _Group ID (SGID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:221 -msgid "" -"An executable file whose Set Group ID (SGID) bit is\n" -"set will always be executed with the privileges of the\n" -"group of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:242 -msgid "_Sticky" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:252 -msgid "" -"A file in a sticky directory may only be removed or\n" -"renamed by a user if the user has write permission\n" -"for the directory and the user is the owner of the\n" -"file, the owner of the directory or the superuser." -msgstr "" - -#. display an error message to the user -#. display an error to the user (when we get here, we definitely have a valid file!) -#: ../thunar/thunar-advanced-permissions-dialog.c:356 -#: ../thunar/thunar-permissions-model.c:830 -#: ../thunar/thunar-permissions-view.c:494 -#, fuzzy, c-format -msgid "Failed to change permissions of `%s'" -msgstr "Impossible de carregar el programa des del fitxer %s" - #. display an error message to the user #: ../thunar/thunar-application.c:222 msgid "Failed to launch operation" @@ -339,25 +313,11 @@ msgstr "" msgid "Creating directories..." msgstr "Recol·lectant fitxers..." -#: ../thunar/thunar-change-group-dialog.c:193 -msgid "Change Group" -msgstr "" - -#: ../thunar/thunar-change-group-dialog.c:200 -msgid "_Group:" -msgstr "" - -#. display an error message -#: ../thunar/thunar-change-group-dialog.c:309 -#, c-format -msgid "Failed to change the group to which `%s' belongs" -msgstr "" - #: ../thunar/thunar-chooser-dialog.c:169 ../thunar/thunar-emblem-chooser.c:147 #: ../thunar/thunar-emblem-chooser.c:148 ../thunar/thunar-icon-renderer.c:161 #: ../thunar/thunar-open-with-action.c:146 #: ../thunar/thunar-open-with-action.c:147 -#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190 +#: ../thunar/thunar-properties-dialog.c:173 ../thunar/thunar-statusbar.c:190 msgid "File" msgstr "Fitxer" @@ -407,37 +367,37 @@ msgid "Failed to execute `%s'" msgstr "" #. update the header label -#: ../thunar/thunar-chooser-dialog.c:612 +#: ../thunar/thunar-chooser-dialog.c:613 #, c-format msgid "Open <i>%s</i> and other files of type \"%s\" with:" msgstr "Obre <i>%s</i> i d'altres fitxers de tipus «%s» amb:" -#: ../thunar/thunar-chooser-dialog.c:634 ../thunar-uca/thunar-uca-editor.c:491 +#: ../thunar/thunar-chooser-dialog.c:635 ../thunar-uca/thunar-uca-editor.c:491 msgid "Select an Application" msgstr "Seleccioneu una aplicació" -#: ../thunar/thunar-chooser-dialog.c:644 ../thunar-uca/thunar-uca-editor.c:501 +#: ../thunar/thunar-chooser-dialog.c:645 ../thunar-uca/thunar-uca-editor.c:501 #: ../thunar-uca/thunar-uca-editor.c:640 msgid "All Files" msgstr "Tots els fitxers" -#: ../thunar/thunar-chooser-dialog.c:649 ../thunar-uca/thunar-uca-editor.c:506 +#: ../thunar/thunar-chooser-dialog.c:650 ../thunar-uca/thunar-uca-editor.c:506 msgid "Executable Files" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:664 ../thunar-uca/thunar-uca-editor.c:521 +#: ../thunar/thunar-chooser-dialog.c:665 ../thunar-uca/thunar-uca-editor.c:521 msgid "Perl Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:670 ../thunar-uca/thunar-uca-editor.c:527 +#: ../thunar/thunar-chooser-dialog.c:671 ../thunar-uca/thunar-uca-editor.c:527 msgid "Python Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:676 ../thunar-uca/thunar-uca-editor.c:533 +#: ../thunar/thunar-chooser-dialog.c:677 ../thunar-uca/thunar-uca-editor.c:533 msgid "Ruby Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:682 ../thunar-uca/thunar-uca-editor.c:539 +#: ../thunar/thunar-chooser-dialog.c:683 ../thunar-uca/thunar-uca-editor.c:539 msgid "Shell Scripts" msgstr "" @@ -507,7 +467,7 @@ msgstr "Nom" #. Permissions chooser #. #: ../thunar/thunar-details-view.c:197 -#: ../thunar/thunar-properties-dialog.c:382 +#: ../thunar/thunar-properties-dialog.c:374 msgid "Permissions" msgstr "Permisos" @@ -557,11 +517,11 @@ msgstr "No s'ha pogut analitzar el fitxer" msgid "The root folder has no parent" msgstr "" -#: ../thunar/thunar-file.c:1032 +#: ../thunar/thunar-file.c:967 msgid "Filesystem" msgstr "Sistema de fitxers" -#: ../thunar/thunar-file.c:1056 +#: ../thunar/thunar-file.c:991 msgid "Home" msgstr "Inici" @@ -618,7 +578,7 @@ msgid "The file whose icon to render" msgstr "" #: ../thunar/thunar-icon-renderer.c:177 ../thunar/thunar-icon-renderer.c:178 -#: ../thunar/thunar-text-renderer.c:202 ../thunar/thunar-text-renderer.c:203 +#: ../thunar/thunar-text-renderer.c:203 ../thunar/thunar-text-renderer.c:204 msgid "Follow state" msgstr "" @@ -789,7 +749,7 @@ msgstr "" msgid "Whether to display hidden files" msgstr "" -#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641 +#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:629 msgid "broken link" msgstr "" @@ -829,11 +789,11 @@ msgid_plural "%d items selected (%s)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-location-buttons.c:258 +#: ../thunar/thunar-location-buttons.c:257 msgid "Spacing" msgstr "Espaiat" -#: ../thunar/thunar-location-buttons.c:259 +#: ../thunar/thunar-location-buttons.c:258 msgid "The amount of space between the path buttons" msgstr "" @@ -875,255 +835,313 @@ msgstr "" msgid "The icon size for the path entry" msgstr "" -#: ../thunar/thunar-permissions-model.c:440 -#, c-format -msgid "%s (%s)" +#. 0000 +#: ../thunar/thunar-permissions-chooser.c:234 +msgid "None" msgstr "" -#: ../thunar/thunar-permissions-model.c:447 -msgid "Unknown file owner" +#. 0002 +#: ../thunar/thunar-permissions-chooser.c:236 +msgid "Write only" msgstr "" -#: ../thunar/thunar-permissions-model.c:460 -msgid "Unknown file group" +#. 0004 +#: ../thunar/thunar-permissions-chooser.c:238 +msgid "Read only" msgstr "" -#: ../thunar/thunar-permissions-model.c:465 -msgid "All other users" +#. 0006 +#: ../thunar/thunar-permissions-chooser.c:240 +msgid "Read & Write" msgstr "" -#: ../thunar/thunar-permissions-model.c:474 -msgid "Read" +#: ../thunar/thunar-permissions-chooser.c:252 +msgid "Owner:" msgstr "" -#: ../thunar/thunar-permissions-model.c:478 -msgid "Write" +#: ../thunar/thunar-permissions-chooser.c:266 +msgid "Unknown" msgstr "" -#: ../thunar/thunar-permissions-model.c:482 -msgid "List folder contents" +#: ../thunar/thunar-permissions-chooser.c:280 +#: ../thunar/thunar-permissions-chooser.c:335 +#, fuzzy +msgid "Access:" +msgstr "Accedit:" + +#: ../thunar/thunar-permissions-chooser.c:309 +msgid "Group:" msgstr "" -#: ../thunar/thunar-permissions-model.c:482 -#, fuzzy -msgid "Execute" -msgstr "_Executa" +#: ../thunar/thunar-permissions-chooser.c:364 +msgid "Others:" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:393 +msgid "Program:" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:399 +msgid "Allow this file to _run as a program" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:423 +msgid "" +"Allowing untrusted programs to run \n" +"presents a security risk to your system." +msgstr "" -#. actions for the group item -#: ../thunar/thunar-permissions-model.c:884 -msgid "Change _Group..." +#: ../thunar/thunar-permissions-chooser.c:434 +msgid "Please wait..." msgstr "" -#. append the "Grant Permission" action -#: ../thunar/thunar-permissions-model.c:897 +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:545 #, fuzzy -msgid "_Grant Permission" -msgstr "Permisos" +msgid "Failed to change group" +msgstr "Impossible de carregar el programa des del fitxer %s" -#. append the "Deny Permission" action -#: ../thunar/thunar-permissions-model.c:906 +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:580 #, fuzzy -msgid "_Deny Permission" -msgstr "Permisos" +msgid "Failed to apply new permissions" +msgstr "Impossible de carregar el programa des del fitxer %s" + +#. allocate the question dialog +#: ../thunar/thunar-permissions-chooser.c:619 +#: ../thunar/thunar-permissions-chooser.c:961 +#: ../thunar/thunar-progress-dialog.c:295 +msgid "Question" +msgstr "Pregunta" -#: ../thunar/thunar-permissions-view.c:213 +#: ../thunar/thunar-permissions-chooser.c:642 +msgid "Apply recursively?" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:648 msgid "" -"For special permissions and for\n" -"advanced settings, click Advanced." +"Do you want to apply your changes recursively to\n" +"all files and subfolder below the selected folder?" msgstr "" -#: ../thunar/thunar-permissions-view.c:222 -msgid "_Advanced..." +#: ../thunar/thunar-permissions-chooser.c:653 +msgid "Do _not ask me again" msgstr "" -#: ../thunar/thunar-permissions-view.c:223 -msgid "Click here for special permissions and for advanced settings." +#: ../thunar/thunar-permissions-chooser.c:851 +msgid "Unknown file owner" msgstr "" -#: ../thunar/thunar-permissions-view.c:243 -msgid "" -"You are not the owner of this file, so\n" -"you cannot change these permissions." +#: ../thunar/thunar-permissions-chooser.c:990 +#: ../thunar/thunar-progress-dialog.c:321 +msgid "_Yes" +msgstr "_SÃ" + +#: ../thunar/thunar-permissions-chooser.c:994 +#: ../thunar/thunar-progress-dialog.c:325 +msgid "Yes to _all" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:184 +#: ../thunar/thunar-permissions-chooser.c:998 +#: ../thunar/thunar-progress-dialog.c:329 +msgid "_No" +msgstr "_No" + +#: ../thunar/thunar-permissions-chooser.c:1002 +#: ../thunar/thunar-progress-dialog.c:333 +msgid "_Cancel" +msgstr "_Cancel·la" + +#: ../thunar/thunar-preferences-dialog.c:186 #, fuzzy msgid "File Manager Preferences" msgstr "Gestor de fitxers" -#: ../thunar/thunar-preferences-dialog.c:200 -msgid "<b>Default View</b>" +#. +#. Views +#. +#: ../thunar/thunar-preferences-dialog.c:203 +#, fuzzy +msgid "Views" +msgstr "_Visualitza" + +#: ../thunar/thunar-preferences-dialog.c:213 +msgid "Default View" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:211 +#: ../thunar/thunar-preferences-dialog.c:225 msgid "View _new folders using:" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:216 +#: ../thunar/thunar-preferences-dialog.c:230 +#: ../thunar/thunar-preferences-dialog.c:267 #, fuzzy msgid "Icon View" msgstr "Mida d'icona" -#: ../thunar/thunar-preferences-dialog.c:217 +#: ../thunar/thunar-preferences-dialog.c:231 msgid "Detailed List View" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:218 +#: ../thunar/thunar-preferences-dialog.c:232 msgid "Last Active View" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:233 +#: ../thunar/thunar-preferences-dialog.c:249 msgid "Sort _folders before files" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:235 +#: ../thunar/thunar-preferences-dialog.c:251 msgid "Select this option to list folders before files when you sort a folder." msgstr "" -#: ../thunar/thunar-preferences-dialog.c:239 +#: ../thunar/thunar-preferences-dialog.c:255 msgid "Show hidden and _backup files" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:241 +#: ../thunar/thunar-preferences-dialog.c:257 msgid "" "Select this option to show hidden and backup files in new windows. The first " "character in a hidden filename is a period (.). The last character in a " "backup filename is a tilde (~)." msgstr "" -#: ../thunar/thunar-preferences-dialog.c:251 -msgid "<b>Icon View</b>" -msgstr "" - -#: ../thunar/thunar-preferences-dialog.c:262 +#: ../thunar/thunar-preferences-dialog.c:279 msgid "_Text beside icons" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:264 +#: ../thunar/thunar-preferences-dialog.c:281 msgid "" "Select this option to place the icon captions for items beside the icon " "rather than below the icon." msgstr "" -#: ../thunar/thunar-preferences.c:255 +#. +#. Advanced +#. +#: ../thunar/thunar-preferences-dialog.c:290 +msgid "Advanced" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:300 +msgid "Miscellaneous" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:312 +msgid "Apply permissions _recursively:" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:317 +msgid "Ask everytime" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:318 +msgid "Always" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:319 +msgid "Never" +msgstr "" + +#: ../thunar/thunar-preferences.c:272 #, c-format msgid "Failed to create the Thunar configuration directory in %s" msgstr "" -#: ../thunar/thunar-preferences.c:263 +#: ../thunar/thunar-preferences.c:280 #, c-format msgid "Failed to open preferences database in %s: %s" msgstr "" -#: ../thunar/thunar-progress-dialog.c:150 +#: ../thunar/thunar-progress-dialog.c:151 msgid "Job" msgstr "Treball" -#: ../thunar/thunar-progress-dialog.c:151 +#: ../thunar/thunar-progress-dialog.c:152 msgid "The job whose progress to display" msgstr "" -#: ../thunar/thunar-progress-dialog.c:303 -msgid "Question" -msgstr "Pregunta" - -#: ../thunar/thunar-progress-dialog.c:329 -msgid "_Yes" -msgstr "_SÃ" - -#: ../thunar/thunar-progress-dialog.c:333 -msgid "Yes to _all" -msgstr "" - -#: ../thunar/thunar-progress-dialog.c:337 -msgid "_No" -msgstr "_No" - -#: ../thunar/thunar-progress-dialog.c:341 -msgid "_Cancel" -msgstr "_Cancel·la" - -#: ../thunar/thunar-progress-dialog.c:467 +#: ../thunar/thunar-progress-dialog.c:459 #, c-format msgid "(%lu hour remaining)" msgid_plural "(%lu hours remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-progress-dialog.c:472 +#: ../thunar/thunar-progress-dialog.c:464 #, c-format msgid "(%lu minute remaining)" msgid_plural "(%lu minutes remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-progress-dialog.c:477 +#: ../thunar/thunar-progress-dialog.c:469 #, c-format msgid "(%lu second remaining)" msgid_plural "(%lu seconds remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-properties-dialog.c:173 +#: ../thunar/thunar-properties-dialog.c:174 msgid "The file displayed by the dialog" msgstr "" -#: ../thunar/thunar-properties-dialog.c:220 +#: ../thunar/thunar-properties-dialog.c:212 msgid "General" msgstr "General" -#: ../thunar/thunar-properties-dialog.c:237 +#: ../thunar/thunar-properties-dialog.c:229 msgid "Name:" msgstr "Nom:" #. #. Second box (kind) #. -#: ../thunar/thunar-properties-dialog.c:262 +#: ../thunar/thunar-properties-dialog.c:254 msgid "Kind:" msgstr "" #. #. Third box (modified, accessed) #. -#: ../thunar/thunar-properties-dialog.c:287 +#: ../thunar/thunar-properties-dialog.c:279 msgid "Modified:" msgstr "Modificat:" -#: ../thunar/thunar-properties-dialog.c:300 +#: ../thunar/thunar-properties-dialog.c:292 msgid "Accessed:" msgstr "Accedit:" #. #. Fourth box (volume, size) #. -#: ../thunar/thunar-properties-dialog.c:324 +#: ../thunar/thunar-properties-dialog.c:316 msgid "Volume:" msgstr "Volum:" -#: ../thunar/thunar-properties-dialog.c:347 +#: ../thunar/thunar-properties-dialog.c:339 msgid "Size:" msgstr "Mida:" #. #. Emblem chooser #. -#: ../thunar/thunar-properties-dialog.c:371 +#: ../thunar/thunar-properties-dialog.c:363 msgid "Emblems" msgstr "" -#: ../thunar/thunar-properties-dialog.c:618 +#: ../thunar/thunar-properties-dialog.c:606 #, c-format msgid "%s Info" msgstr "" -#: ../thunar/thunar-properties-dialog.c:699 +#: ../thunar/thunar-properties-dialog.c:687 #, c-format msgid "%s (%u Bytes)" msgstr "" #. display an error message -#: ../thunar/thunar-properties-dialog.c:745 +#: ../thunar/thunar-properties-dialog.c:733 #: ../thunar/thunar-standard-view.c:2170 #, fuzzy, c-format msgid "Failed to rename `%s'" @@ -1352,27 +1370,27 @@ msgstr "" msgid "The main text to be displayed in the statusbar" msgstr "" -#: ../thunar/thunar-text-renderer.c:215 +#: ../thunar/thunar-text-renderer.c:216 msgid "Text" msgstr "Text" -#: ../thunar/thunar-text-renderer.c:216 +#: ../thunar/thunar-text-renderer.c:217 msgid "The text to render" msgstr "" -#: ../thunar/thunar-text-renderer.c:230 +#: ../thunar/thunar-text-renderer.c:231 msgid "Wrap mode" msgstr "Mode d'ajust" -#: ../thunar/thunar-text-renderer.c:231 +#: ../thunar/thunar-text-renderer.c:232 msgid "The wrap mode" msgstr "" -#: ../thunar/thunar-text-renderer.c:246 +#: ../thunar/thunar-text-renderer.c:247 msgid "Wrap width" msgstr "Ajusta l'amplada" -#: ../thunar/thunar-text-renderer.c:247 +#: ../thunar/thunar-text-renderer.c:248 msgid "The wrap width" msgstr "" @@ -1857,3 +1875,19 @@ msgstr "Gestor de fitxers" #: ../Thunar.desktop.in.h:3 msgid "Thunar File Manager" msgstr "" + +#, fuzzy +#~ msgid "Advanced Permissions" +#~ msgstr "Permisos" + +#, fuzzy +#~ msgid "Execute" +#~ msgstr "_Executa" + +#, fuzzy +#~ msgid "_Grant Permission" +#~ msgstr "Permisos" + +#, fuzzy +#~ msgid "_Deny Permission" +#~ msgstr "Permisos" diff --git a/po/de.po b/po/de.po index f933abece..91b11d698 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Thunar 0.1.4svn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-01-04 18:34+0100\n" +"POT-Creation-Date: 2006-01-08 22:45+0100\n" "PO-Revision-Date: 2005-10-06 22:03+0900\n" "Last-Translator: Benedikt Meurer <benny@xfce.org>\n" "Language-Team: German <de@li.org>\n" @@ -15,23 +15,64 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../thunar-vfs/thunar-vfs-info.c:362 +#: ../thunar-vfs/thunar-vfs-chmod-job.c:168 +#: ../thunar-vfs/thunar-vfs-chown-job.c:166 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 +msgid "Collecting files..." +msgstr "" + +#. ask the user whether we should skip the file +#. ask the user whether to skip this file (used for cancellation only) +#. ask the user whether to skip +#: ../thunar-vfs/thunar-vfs-chmod-job.c:189 +#: ../thunar-vfs/thunar-vfs-chown-job.c:187 +#: ../thunar-vfs/thunar-vfs-link-job.c:212 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 +#, c-format +msgid "" +"%s.\n" +"\n" +"Do you want to skip it?" +msgstr "" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:246 +#: ../thunar-vfs/thunar-vfs-chown-job.c:244 +#, fuzzy, c-format +msgid "Failed to determine file info of `%s': %s" +msgstr "Andere Anwendung..." + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:272 +#, fuzzy, c-format +msgid "Failed to change permissions of `%s': %s" +msgstr "Andere Anwendung..." + +#: ../thunar-vfs/thunar-vfs-chown-job.c:260 +#, fuzzy, c-format +msgid "Failed to change file owner of `%s': %s" +msgstr "Andere Anwendung..." + +#: ../thunar-vfs/thunar-vfs-chown-job.c:262 +#, fuzzy, c-format +msgid "Failed to change file group of `%s': %s" +msgstr "Andere Anwendung..." + +#: ../thunar-vfs/thunar-vfs-info.c:261 msgid "No Exec field specified" msgstr "" -#: ../thunar-vfs/thunar-vfs-info.c:370 +#: ../thunar-vfs/thunar-vfs-info.c:269 msgid "Unable to parse file" msgstr "" -#: ../thunar-vfs/thunar-vfs-info.c:460 +#: ../thunar-vfs/thunar-vfs-info.c:359 msgid "Invalid file name" msgstr "" -#: ../thunar-vfs/thunar-vfs-info.c:482 +#: ../thunar-vfs/thunar-vfs-info.c:381 msgid "Invalid desktop file" msgstr "" -#: ../thunar-vfs/thunar-vfs-info.c:716 +#: ../thunar-vfs/thunar-vfs-info.c:615 #, c-format msgid "Failed to stat file `%s': %s" msgstr "" @@ -52,17 +93,6 @@ msgstr "" msgid "Failed to remove `%s': %s" msgstr "" -#. ask the user whether to skip this file (used for cancellation only) -#. ask the user whether to skip -#: ../thunar-vfs/thunar-vfs-link-job.c:212 -#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 -#, c-format -msgid "" -"%s.\n" -"\n" -"Do you want to skip it?" -msgstr "" - #: ../thunar-vfs/thunar-vfs-mime-database.c:1657 #, c-format msgid "Failed to load application from file %s" @@ -94,10 +124,6 @@ msgstr "Größe" msgid "The desired thumbnail size" msgstr "" -#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 -msgid "Collecting files..." -msgstr "" - #. display info message #: ../thunar-vfs/thunar-vfs-transfer-job.c:329 #, fuzzy @@ -138,7 +164,7 @@ msgid "copy of %s" msgstr "" #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703 -#: ../thunar/thunar-properties-dialog.c:643 +#: ../thunar/thunar-properties-dialog.c:631 #, c-format msgid "link to %s" msgstr "" @@ -254,58 +280,6 @@ msgstr "" msgid "Thunar" msgstr "Thunar" -#: ../thunar/thunar-advanced-permissions-dialog.c:159 -#, fuzzy -msgid "Advanced Permissions" -msgstr "Berechtigungen" - -#: ../thunar/thunar-advanced-permissions-dialog.c:167 -msgid "Special Bits" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:180 -msgid "Set _User ID (SUID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:190 -msgid "" -"An executable file whose Set User ID (SUID) bit is\n" -"set will always be executed with the privileges of\n" -"the owner of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:211 -msgid "Set _Group ID (SGID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:221 -msgid "" -"An executable file whose Set Group ID (SGID) bit is\n" -"set will always be executed with the privileges of the\n" -"group of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:242 -msgid "_Sticky" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:252 -msgid "" -"A file in a sticky directory may only be removed or\n" -"renamed by a user if the user has write permission\n" -"for the directory and the user is the owner of the\n" -"file, the owner of the directory or the superuser." -msgstr "" - -#. display an error message to the user -#. display an error to the user (when we get here, we definitely have a valid file!) -#: ../thunar/thunar-advanced-permissions-dialog.c:356 -#: ../thunar/thunar-permissions-model.c:830 -#: ../thunar/thunar-permissions-view.c:494 -#, fuzzy, c-format -msgid "Failed to change permissions of `%s'" -msgstr "Andere Anwendung..." - #. display an error message to the user #: ../thunar/thunar-application.c:222 msgid "Failed to launch operation" @@ -331,25 +305,11 @@ msgstr "" msgid "Creating directories..." msgstr "" -#: ../thunar/thunar-change-group-dialog.c:193 -msgid "Change Group" -msgstr "" - -#: ../thunar/thunar-change-group-dialog.c:200 -msgid "_Group:" -msgstr "" - -#. display an error message -#: ../thunar/thunar-change-group-dialog.c:309 -#, c-format -msgid "Failed to change the group to which `%s' belongs" -msgstr "" - #: ../thunar/thunar-chooser-dialog.c:169 ../thunar/thunar-emblem-chooser.c:147 #: ../thunar/thunar-emblem-chooser.c:148 ../thunar/thunar-icon-renderer.c:161 #: ../thunar/thunar-open-with-action.c:146 #: ../thunar/thunar-open-with-action.c:147 -#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190 +#: ../thunar/thunar-properties-dialog.c:173 ../thunar/thunar-statusbar.c:190 msgid "File" msgstr "" @@ -401,38 +361,38 @@ msgid "Failed to execute `%s'" msgstr "" #. update the header label -#: ../thunar/thunar-chooser-dialog.c:612 +#: ../thunar/thunar-chooser-dialog.c:613 #, c-format msgid "Open <i>%s</i> and other files of type \"%s\" with:" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:634 ../thunar-uca/thunar-uca-editor.c:491 +#: ../thunar/thunar-chooser-dialog.c:635 ../thunar-uca/thunar-uca-editor.c:491 #, fuzzy msgid "Select an Application" msgstr "Andere Anwendung..." -#: ../thunar/thunar-chooser-dialog.c:644 ../thunar-uca/thunar-uca-editor.c:501 +#: ../thunar/thunar-chooser-dialog.c:645 ../thunar-uca/thunar-uca-editor.c:501 #: ../thunar-uca/thunar-uca-editor.c:640 msgid "All Files" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:649 ../thunar-uca/thunar-uca-editor.c:506 +#: ../thunar/thunar-chooser-dialog.c:650 ../thunar-uca/thunar-uca-editor.c:506 msgid "Executable Files" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:664 ../thunar-uca/thunar-uca-editor.c:521 +#: ../thunar/thunar-chooser-dialog.c:665 ../thunar-uca/thunar-uca-editor.c:521 msgid "Perl Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:670 ../thunar-uca/thunar-uca-editor.c:527 +#: ../thunar/thunar-chooser-dialog.c:671 ../thunar-uca/thunar-uca-editor.c:527 msgid "Python Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:676 ../thunar-uca/thunar-uca-editor.c:533 +#: ../thunar/thunar-chooser-dialog.c:677 ../thunar-uca/thunar-uca-editor.c:533 msgid "Ruby Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:682 ../thunar-uca/thunar-uca-editor.c:539 +#: ../thunar/thunar-chooser-dialog.c:683 ../thunar-uca/thunar-uca-editor.c:539 msgid "Shell Scripts" msgstr "" @@ -503,7 +463,7 @@ msgstr "Name" #. Permissions chooser #. #: ../thunar/thunar-details-view.c:197 -#: ../thunar/thunar-properties-dialog.c:382 +#: ../thunar/thunar-properties-dialog.c:374 msgid "Permissions" msgstr "Berechtigungen" @@ -553,11 +513,11 @@ msgstr "" msgid "The root folder has no parent" msgstr "" -#: ../thunar/thunar-file.c:1032 +#: ../thunar/thunar-file.c:967 msgid "Filesystem" msgstr "Dateisystem" -#: ../thunar/thunar-file.c:1056 +#: ../thunar/thunar-file.c:991 msgid "Home" msgstr "" @@ -614,7 +574,7 @@ msgid "The file whose icon to render" msgstr "" #: ../thunar/thunar-icon-renderer.c:177 ../thunar/thunar-icon-renderer.c:178 -#: ../thunar/thunar-text-renderer.c:202 ../thunar/thunar-text-renderer.c:203 +#: ../thunar/thunar-text-renderer.c:203 ../thunar/thunar-text-renderer.c:204 msgid "Follow state" msgstr "" @@ -785,7 +745,7 @@ msgstr "" msgid "Whether to display hidden files" msgstr "" -#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641 +#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:629 msgid "broken link" msgstr "" @@ -825,11 +785,11 @@ msgid_plural "%d items selected (%s)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-location-buttons.c:258 +#: ../thunar/thunar-location-buttons.c:257 msgid "Spacing" msgstr "" -#: ../thunar/thunar-location-buttons.c:259 +#: ../thunar/thunar-location-buttons.c:258 msgid "The amount of space between the path buttons" msgstr "" @@ -871,254 +831,314 @@ msgstr "" msgid "The icon size for the path entry" msgstr "" -#: ../thunar/thunar-permissions-model.c:440 -#, fuzzy, c-format -msgid "%s (%s)" -msgstr "%s (%u Byte)" - -#: ../thunar/thunar-permissions-model.c:447 -msgid "Unknown file owner" +#. 0000 +#: ../thunar/thunar-permissions-chooser.c:234 +msgid "None" msgstr "" -#: ../thunar/thunar-permissions-model.c:460 -msgid "Unknown file group" +#. 0002 +#: ../thunar/thunar-permissions-chooser.c:236 +msgid "Write only" msgstr "" -#: ../thunar/thunar-permissions-model.c:465 -msgid "All other users" +#. 0004 +#: ../thunar/thunar-permissions-chooser.c:238 +msgid "Read only" msgstr "" -#: ../thunar/thunar-permissions-model.c:474 -msgid "Read" +#. 0006 +#: ../thunar/thunar-permissions-chooser.c:240 +msgid "Read & Write" msgstr "" -#: ../thunar/thunar-permissions-model.c:478 -msgid "Write" +#: ../thunar/thunar-permissions-chooser.c:252 +msgid "Owner:" msgstr "" -#: ../thunar/thunar-permissions-model.c:482 -msgid "List folder contents" +#: ../thunar/thunar-permissions-chooser.c:266 +msgid "Unknown" msgstr "" -#: ../thunar/thunar-permissions-model.c:482 -msgid "Execute" +#: ../thunar/thunar-permissions-chooser.c:280 +#: ../thunar/thunar-permissions-chooser.c:335 +msgid "Access:" msgstr "" -#. actions for the group item -#: ../thunar/thunar-permissions-model.c:884 -msgid "Change _Group..." +#: ../thunar/thunar-permissions-chooser.c:309 +msgid "Group:" msgstr "" -#. append the "Grant Permission" action -#: ../thunar/thunar-permissions-model.c:897 +#: ../thunar/thunar-permissions-chooser.c:364 #, fuzzy -msgid "_Grant Permission" -msgstr "Berechtigungen" +msgid "Others:" +msgstr "A_ndere Dateien" -#. append the "Deny Permission" action -#: ../thunar/thunar-permissions-model.c:906 -#, fuzzy -msgid "_Deny Permission" -msgstr "Berechtigungen" +#: ../thunar/thunar-permissions-chooser.c:393 +msgid "Program:" +msgstr "" -#: ../thunar/thunar-permissions-view.c:213 +#: ../thunar/thunar-permissions-chooser.c:399 +msgid "Allow this file to _run as a program" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:423 msgid "" -"For special permissions and for\n" -"advanced settings, click Advanced." +"Allowing untrusted programs to run \n" +"presents a security risk to your system." msgstr "" -#: ../thunar/thunar-permissions-view.c:222 -msgid "_Advanced..." +#: ../thunar/thunar-permissions-chooser.c:434 +msgid "Please wait..." msgstr "" -#: ../thunar/thunar-permissions-view.c:223 -msgid "Click here for special permissions and for advanced settings." +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:545 +#, fuzzy +msgid "Failed to change group" +msgstr "Andere Anwendung..." + +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:580 +#, fuzzy +msgid "Failed to apply new permissions" +msgstr "Andere Anwendung..." + +#. allocate the question dialog +#: ../thunar/thunar-permissions-chooser.c:619 +#: ../thunar/thunar-permissions-chooser.c:961 +#: ../thunar/thunar-progress-dialog.c:295 +msgid "Question" +msgstr "Frage" + +#: ../thunar/thunar-permissions-chooser.c:642 +msgid "Apply recursively?" msgstr "" -#: ../thunar/thunar-permissions-view.c:243 +#: ../thunar/thunar-permissions-chooser.c:648 msgid "" -"You are not the owner of this file, so\n" -"you cannot change these permissions." +"Do you want to apply your changes recursively to\n" +"all files and subfolder below the selected folder?" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:653 +msgid "Do _not ask me again" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:851 +msgid "Unknown file owner" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:184 +#: ../thunar/thunar-permissions-chooser.c:990 +#: ../thunar/thunar-progress-dialog.c:321 +msgid "_Yes" +msgstr "_Ja" + +#: ../thunar/thunar-permissions-chooser.c:994 +#: ../thunar/thunar-progress-dialog.c:325 +msgid "Yes to _all" +msgstr "Ja zu _allen" + +#: ../thunar/thunar-permissions-chooser.c:998 +#: ../thunar/thunar-progress-dialog.c:329 +msgid "_No" +msgstr "_Nein" + +#: ../thunar/thunar-permissions-chooser.c:1002 +#: ../thunar/thunar-progress-dialog.c:333 +msgid "_Cancel" +msgstr "_Abbrechen" + +#: ../thunar/thunar-preferences-dialog.c:186 #, fuzzy msgid "File Manager Preferences" msgstr "Dateimanager" -#: ../thunar/thunar-preferences-dialog.c:200 -msgid "<b>Default View</b>" -msgstr "" +#. +#. Views +#. +#: ../thunar/thunar-preferences-dialog.c:203 +#, fuzzy +msgid "Views" +msgstr "_Anzeige" + +#: ../thunar/thunar-preferences-dialog.c:213 +#, fuzzy +msgid "Default View" +msgstr "Detailansicht" -#: ../thunar/thunar-preferences-dialog.c:211 +#: ../thunar/thunar-preferences-dialog.c:225 msgid "View _new folders using:" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:216 +#: ../thunar/thunar-preferences-dialog.c:230 +#: ../thunar/thunar-preferences-dialog.c:267 msgid "Icon View" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:217 +#: ../thunar/thunar-preferences-dialog.c:231 #, fuzzy msgid "Detailed List View" msgstr "Detailansicht" -#: ../thunar/thunar-preferences-dialog.c:218 +#: ../thunar/thunar-preferences-dialog.c:232 msgid "Last Active View" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:233 +#: ../thunar/thunar-preferences-dialog.c:249 msgid "Sort _folders before files" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:235 +#: ../thunar/thunar-preferences-dialog.c:251 msgid "Select this option to list folders before files when you sort a folder." msgstr "" -#: ../thunar/thunar-preferences-dialog.c:239 +#: ../thunar/thunar-preferences-dialog.c:255 msgid "Show hidden and _backup files" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:241 +#: ../thunar/thunar-preferences-dialog.c:257 msgid "" "Select this option to show hidden and backup files in new windows. The first " "character in a hidden filename is a period (.). The last character in a " "backup filename is a tilde (~)." msgstr "" -#: ../thunar/thunar-preferences-dialog.c:251 -msgid "<b>Icon View</b>" -msgstr "" - -#: ../thunar/thunar-preferences-dialog.c:262 +#: ../thunar/thunar-preferences-dialog.c:279 msgid "_Text beside icons" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:264 +#: ../thunar/thunar-preferences-dialog.c:281 msgid "" "Select this option to place the icon captions for items beside the icon " "rather than below the icon." msgstr "" -#: ../thunar/thunar-preferences.c:255 +#. +#. Advanced +#. +#: ../thunar/thunar-preferences-dialog.c:290 +msgid "Advanced" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:300 +msgid "Miscellaneous" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:312 +msgid "Apply permissions _recursively:" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:317 +msgid "Ask everytime" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:318 +msgid "Always" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:319 +msgid "Never" +msgstr "" + +#: ../thunar/thunar-preferences.c:272 #, c-format msgid "Failed to create the Thunar configuration directory in %s" msgstr "" -#: ../thunar/thunar-preferences.c:263 +#: ../thunar/thunar-preferences.c:280 #, c-format msgid "Failed to open preferences database in %s: %s" msgstr "" -#: ../thunar/thunar-progress-dialog.c:150 +#: ../thunar/thunar-progress-dialog.c:151 msgid "Job" msgstr "" -#: ../thunar/thunar-progress-dialog.c:151 +#: ../thunar/thunar-progress-dialog.c:152 msgid "The job whose progress to display" msgstr "" -#: ../thunar/thunar-progress-dialog.c:303 -msgid "Question" -msgstr "Frage" - -#: ../thunar/thunar-progress-dialog.c:329 -msgid "_Yes" -msgstr "_Ja" - -#: ../thunar/thunar-progress-dialog.c:333 -msgid "Yes to _all" -msgstr "Ja zu _allen" - -#: ../thunar/thunar-progress-dialog.c:337 -msgid "_No" -msgstr "_Nein" - -#: ../thunar/thunar-progress-dialog.c:341 -msgid "_Cancel" -msgstr "_Abbrechen" - -#: ../thunar/thunar-progress-dialog.c:467 +#: ../thunar/thunar-progress-dialog.c:459 #, c-format msgid "(%lu hour remaining)" msgid_plural "(%lu hours remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-progress-dialog.c:472 +#: ../thunar/thunar-progress-dialog.c:464 #, c-format msgid "(%lu minute remaining)" msgid_plural "(%lu minutes remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-progress-dialog.c:477 +#: ../thunar/thunar-progress-dialog.c:469 #, c-format msgid "(%lu second remaining)" msgid_plural "(%lu seconds remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-properties-dialog.c:173 +#: ../thunar/thunar-properties-dialog.c:174 msgid "The file displayed by the dialog" msgstr "" -#: ../thunar/thunar-properties-dialog.c:220 +#: ../thunar/thunar-properties-dialog.c:212 msgid "General" msgstr "Allgemein" -#: ../thunar/thunar-properties-dialog.c:237 +#: ../thunar/thunar-properties-dialog.c:229 msgid "Name:" msgstr "Name:" #. #. Second box (kind) #. -#: ../thunar/thunar-properties-dialog.c:262 +#: ../thunar/thunar-properties-dialog.c:254 msgid "Kind:" msgstr "" #. #. Third box (modified, accessed) #. -#: ../thunar/thunar-properties-dialog.c:287 +#: ../thunar/thunar-properties-dialog.c:279 msgid "Modified:" msgstr "" -#: ../thunar/thunar-properties-dialog.c:300 +#: ../thunar/thunar-properties-dialog.c:292 msgid "Accessed:" msgstr "" #. #. Fourth box (volume, size) #. -#: ../thunar/thunar-properties-dialog.c:324 +#: ../thunar/thunar-properties-dialog.c:316 msgid "Volume:" msgstr "" -#: ../thunar/thunar-properties-dialog.c:347 +#: ../thunar/thunar-properties-dialog.c:339 msgid "Size:" msgstr "Größe:" #. #. Emblem chooser #. -#: ../thunar/thunar-properties-dialog.c:371 +#: ../thunar/thunar-properties-dialog.c:363 msgid "Emblems" msgstr "" -#: ../thunar/thunar-properties-dialog.c:618 +#: ../thunar/thunar-properties-dialog.c:606 #, c-format msgid "%s Info" msgstr "" -#: ../thunar/thunar-properties-dialog.c:699 +#: ../thunar/thunar-properties-dialog.c:687 #, c-format msgid "%s (%u Bytes)" msgstr "%s (%u Byte)" #. display an error message -#: ../thunar/thunar-properties-dialog.c:745 +#: ../thunar/thunar-properties-dialog.c:733 #: ../thunar/thunar-standard-view.c:2170 #, c-format msgid "Failed to rename `%s'" @@ -1344,27 +1364,27 @@ msgstr "" msgid "The main text to be displayed in the statusbar" msgstr "" -#: ../thunar/thunar-text-renderer.c:215 +#: ../thunar/thunar-text-renderer.c:216 msgid "Text" msgstr "" -#: ../thunar/thunar-text-renderer.c:216 +#: ../thunar/thunar-text-renderer.c:217 msgid "The text to render" msgstr "" -#: ../thunar/thunar-text-renderer.c:230 +#: ../thunar/thunar-text-renderer.c:231 msgid "Wrap mode" msgstr "" -#: ../thunar/thunar-text-renderer.c:231 +#: ../thunar/thunar-text-renderer.c:232 msgid "The wrap mode" msgstr "" -#: ../thunar/thunar-text-renderer.c:246 +#: ../thunar/thunar-text-renderer.c:247 msgid "Wrap width" msgstr "" -#: ../thunar/thunar-text-renderer.c:247 +#: ../thunar/thunar-text-renderer.c:248 msgid "The wrap width" msgstr "" @@ -1838,3 +1858,19 @@ msgstr "Dateimanager" #: ../Thunar.desktop.in.h:3 msgid "Thunar File Manager" msgstr "Thunar Dateimanager" + +#, fuzzy +#~ msgid "Advanced Permissions" +#~ msgstr "Berechtigungen" + +#, fuzzy +#~ msgid "%s (%s)" +#~ msgstr "%s (%u Byte)" + +#, fuzzy +#~ msgid "_Grant Permission" +#~ msgstr "Berechtigungen" + +#, fuzzy +#~ msgid "_Deny Permission" +#~ msgstr "Berechtigungen" diff --git a/po/el.po b/po/el.po index fae18e108..46ba6810b 100644 --- a/po/el.po +++ b/po/el.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Thunar 0.1.4svn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-01-04 18:34+0100\n" +"POT-Creation-Date: 2006-01-08 22:45+0100\n" "PO-Revision-Date: 2005-12-04 23:18+0900\n" "Last-Translator: Stavros Giannouris <stavrosg2002@freemail.gr>\n" "Language-Team: Greek <nls@tux.hellug.gr>\n" @@ -18,23 +18,67 @@ msgstr "" "X-Poedit-Country: GREECE\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ../thunar-vfs/thunar-vfs-info.c:362 +#: ../thunar-vfs/thunar-vfs-chmod-job.c:168 +#: ../thunar-vfs/thunar-vfs-chown-job.c:166 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 +msgid "Collecting files..." +msgstr "Συλλογή αÏχείων..." + +#. ask the user whether we should skip the file +#. ask the user whether to skip this file (used for cancellation only) +#. ask the user whether to skip +#: ../thunar-vfs/thunar-vfs-chmod-job.c:189 +#: ../thunar-vfs/thunar-vfs-chown-job.c:187 +#: ../thunar-vfs/thunar-vfs-link-job.c:212 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 +#, c-format +msgid "" +"%s.\n" +"\n" +"Do you want to skip it?" +msgstr "" +"%s.\n" +"\n" +"ΘÎλετε να το Ï€ÏοσπεÏάσετε;" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:246 +#: ../thunar-vfs/thunar-vfs-chown-job.c:244 +#, fuzzy, c-format +msgid "Failed to determine file info of `%s': %s" +msgstr "Ο Ï€ÏοσδιοÏισμός των πληÏοφοÏιών αÏχείου για το `%s' απÎτυχε" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:272 +#, fuzzy, c-format +msgid "Failed to change permissions of `%s': %s" +msgstr "Η Ï€Ïοσθήκη της εφαÏμογής `%s' απÎτυχε." + +#: ../thunar-vfs/thunar-vfs-chown-job.c:260 +#, fuzzy, c-format +msgid "Failed to change file owner of `%s': %s" +msgstr "Η Ï€Ïοσθήκη της εφαÏμογής `%s' απÎτυχε." + +#: ../thunar-vfs/thunar-vfs-chown-job.c:262 +#, fuzzy, c-format +msgid "Failed to change file group of `%s': %s" +msgstr "Η Ï€Ïοσθήκη της εφαÏμογής `%s' απÎτυχε." + +#: ../thunar-vfs/thunar-vfs-info.c:261 msgid "No Exec field specified" msgstr "Δεν Îχει οÏιστεί το πεδίο Exec" -#: ../thunar-vfs/thunar-vfs-info.c:370 +#: ../thunar-vfs/thunar-vfs-info.c:269 msgid "Unable to parse file" msgstr "Δεν ήταν δυνατή η ανάγνωση του αÏχείου" -#: ../thunar-vfs/thunar-vfs-info.c:460 +#: ../thunar-vfs/thunar-vfs-info.c:359 msgid "Invalid file name" msgstr "Μη ÎγκυÏο όνομα αÏχείου" -#: ../thunar-vfs/thunar-vfs-info.c:482 +#: ../thunar-vfs/thunar-vfs-info.c:381 msgid "Invalid desktop file" msgstr "Μη ÎγκυÏο αÏχείο συντόμευσης" -#: ../thunar-vfs/thunar-vfs-info.c:716 +#: ../thunar-vfs/thunar-vfs-info.c:615 #, c-format msgid "Failed to stat file `%s': %s" msgstr "" @@ -58,20 +102,6 @@ msgstr "" msgid "Failed to remove `%s': %s" msgstr "Η διαγÏαφή του `%s' απÎτυχε: %s" -#. ask the user whether to skip this file (used for cancellation only) -#. ask the user whether to skip -#: ../thunar-vfs/thunar-vfs-link-job.c:212 -#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 -#, c-format -msgid "" -"%s.\n" -"\n" -"Do you want to skip it?" -msgstr "" -"%s.\n" -"\n" -"ΘÎλετε να το Ï€ÏοσπεÏάσετε;" - #: ../thunar-vfs/thunar-vfs-mime-database.c:1657 #, c-format msgid "Failed to load application from file %s" @@ -103,10 +133,6 @@ msgstr "ÎœÎγεθος" msgid "The desired thumbnail size" msgstr "Το επιθυμητό μÎγεθος μικÏογÏαφιών" -#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 -msgid "Collecting files..." -msgstr "Συλλογή αÏχείων..." - #. display info message #: ../thunar-vfs/thunar-vfs-transfer-job.c:329 msgid "Deleting directories..." @@ -149,7 +175,7 @@ msgid "copy of %s" msgstr "αντίγÏαφο του %s" #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703 -#: ../thunar/thunar-properties-dialog.c:643 +#: ../thunar/thunar-properties-dialog.c:631 #, c-format msgid "link to %s" msgstr "δεσμός Ï€Ïος το %s" @@ -265,58 +291,6 @@ msgstr "Δεν είναι δυνατή η δημιουÏγία συμβολικ msgid "Thunar" msgstr "Thunar" -#: ../thunar/thunar-advanced-permissions-dialog.c:159 -#, fuzzy -msgid "Advanced Permissions" -msgstr "Δικαιώματα" - -#: ../thunar/thunar-advanced-permissions-dialog.c:167 -msgid "Special Bits" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:180 -msgid "Set _User ID (SUID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:190 -msgid "" -"An executable file whose Set User ID (SUID) bit is\n" -"set will always be executed with the privileges of\n" -"the owner of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:211 -msgid "Set _Group ID (SGID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:221 -msgid "" -"An executable file whose Set Group ID (SGID) bit is\n" -"set will always be executed with the privileges of the\n" -"group of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:242 -msgid "_Sticky" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:252 -msgid "" -"A file in a sticky directory may only be removed or\n" -"renamed by a user if the user has write permission\n" -"for the directory and the user is the owner of the\n" -"file, the owner of the directory or the superuser." -msgstr "" - -#. display an error message to the user -#. display an error to the user (when we get here, we definitely have a valid file!) -#: ../thunar/thunar-advanced-permissions-dialog.c:356 -#: ../thunar/thunar-permissions-model.c:830 -#: ../thunar/thunar-permissions-view.c:494 -#, fuzzy, c-format -msgid "Failed to change permissions of `%s'" -msgstr "Η Ï€Ïοσθήκη της εφαÏμογής `%s' απÎτυχε." - #. display an error message to the user #: ../thunar/thunar-application.c:222 msgid "Failed to launch operation" @@ -342,25 +316,11 @@ msgstr "ΔιαγÏαφή αÏχείων..." msgid "Creating directories..." msgstr "ΔημιουÏγία καταλόγων..." -#: ../thunar/thunar-change-group-dialog.c:193 -msgid "Change Group" -msgstr "" - -#: ../thunar/thunar-change-group-dialog.c:200 -msgid "_Group:" -msgstr "" - -#. display an error message -#: ../thunar/thunar-change-group-dialog.c:309 -#, c-format -msgid "Failed to change the group to which `%s' belongs" -msgstr "" - #: ../thunar/thunar-chooser-dialog.c:169 ../thunar/thunar-emblem-chooser.c:147 #: ../thunar/thunar-emblem-chooser.c:148 ../thunar/thunar-icon-renderer.c:161 #: ../thunar/thunar-open-with-action.c:146 #: ../thunar/thunar-open-with-action.c:147 -#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190 +#: ../thunar/thunar-properties-dialog.c:173 ../thunar/thunar-statusbar.c:190 msgid "File" msgstr "ΑÏχείο" @@ -410,37 +370,37 @@ msgid "Failed to execute `%s'" msgstr "Η εκτÎλεση του `%s' απÎτυχε" #. update the header label -#: ../thunar/thunar-chooser-dialog.c:612 +#: ../thunar/thunar-chooser-dialog.c:613 #, c-format msgid "Open <i>%s</i> and other files of type \"%s\" with:" msgstr "Άνοιγμα του <i>%s</i> και των άλλων αÏχείων του Ï„Ïπου \"%s\" με:" -#: ../thunar/thunar-chooser-dialog.c:634 ../thunar-uca/thunar-uca-editor.c:491 +#: ../thunar/thunar-chooser-dialog.c:635 ../thunar-uca/thunar-uca-editor.c:491 msgid "Select an Application" msgstr "Επιλογή ΕφαÏμογής" -#: ../thunar/thunar-chooser-dialog.c:644 ../thunar-uca/thunar-uca-editor.c:501 +#: ../thunar/thunar-chooser-dialog.c:645 ../thunar-uca/thunar-uca-editor.c:501 #: ../thunar-uca/thunar-uca-editor.c:640 msgid "All Files" msgstr "Όλα τα ΑÏχεία" -#: ../thunar/thunar-chooser-dialog.c:649 ../thunar-uca/thunar-uca-editor.c:506 +#: ../thunar/thunar-chooser-dialog.c:650 ../thunar-uca/thunar-uca-editor.c:506 msgid "Executable Files" msgstr "ΕκτελÎσιμα ΑÏχεία" -#: ../thunar/thunar-chooser-dialog.c:664 ../thunar-uca/thunar-uca-editor.c:521 +#: ../thunar/thunar-chooser-dialog.c:665 ../thunar-uca/thunar-uca-editor.c:521 msgid "Perl Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:670 ../thunar-uca/thunar-uca-editor.c:527 +#: ../thunar/thunar-chooser-dialog.c:671 ../thunar-uca/thunar-uca-editor.c:527 msgid "Python Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:676 ../thunar-uca/thunar-uca-editor.c:533 +#: ../thunar/thunar-chooser-dialog.c:677 ../thunar-uca/thunar-uca-editor.c:533 msgid "Ruby Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:682 ../thunar-uca/thunar-uca-editor.c:539 +#: ../thunar/thunar-chooser-dialog.c:683 ../thunar-uca/thunar-uca-editor.c:539 msgid "Shell Scripts" msgstr "" @@ -509,7 +469,7 @@ msgstr "Όνομα" #. Permissions chooser #. #: ../thunar/thunar-details-view.c:197 -#: ../thunar/thunar-properties-dialog.c:382 +#: ../thunar/thunar-properties-dialog.c:374 msgid "Permissions" msgstr "Δικαιώματα" @@ -559,11 +519,11 @@ msgstr "Δεν ήταν δυνατή η εκτÎλεση του αÏχείου ` msgid "The root folder has no parent" msgstr "Ο Ïιζικός φάκελος δεν Îχει γονεϊκό φάκελο" -#: ../thunar/thunar-file.c:1032 +#: ../thunar/thunar-file.c:967 msgid "Filesystem" msgstr "ΣÏστημα αÏχείων" -#: ../thunar/thunar-file.c:1056 +#: ../thunar/thunar-file.c:991 msgid "Home" msgstr "ΑÏχή" @@ -620,7 +580,7 @@ msgid "The file whose icon to render" msgstr "Το αÏχείο του οποίου το εικονίδιο να Ï€Ïοβληθει" #: ../thunar/thunar-icon-renderer.c:177 ../thunar/thunar-icon-renderer.c:178 -#: ../thunar/thunar-text-renderer.c:202 ../thunar/thunar-text-renderer.c:203 +#: ../thunar/thunar-text-renderer.c:203 ../thunar/thunar-text-renderer.c:204 msgid "Follow state" msgstr "ΠαÏακολοÏθηση κατάστασης" @@ -791,7 +751,7 @@ msgstr "Î Ïοβολή κÏυφών" msgid "Whether to display hidden files" msgstr "Αν θα Ï€Ïοβάλλονται τα κÏυφά αÏχεία" -#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641 +#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:629 msgid "broken link" msgstr "σπασμÎνος δεσμός" @@ -831,11 +791,11 @@ msgid_plural "%d items selected (%s)" msgstr[0] "%d επιλεγμÎνο αντικείμενο" msgstr[1] "%d επιλεγμÎνα αντικείμενα (%s)" -#: ../thunar/thunar-location-buttons.c:258 +#: ../thunar/thunar-location-buttons.c:257 msgid "Spacing" msgstr "Διάστιχο" -#: ../thunar/thunar-location-buttons.c:259 +#: ../thunar/thunar-location-buttons.c:258 msgid "The amount of space between the path buttons" msgstr "Το μÎγεθος του διαστήματος Î¼ÎµÏ„Î±Î¾Ï ÎºÎ¿Ï…Î¼Ï€Î¹ÏŽÎ½ διαδÏομής" @@ -877,256 +837,315 @@ msgstr "Το αÏχείο που εμφανίζεται Ï„ÏŽÏα" msgid "The icon size for the path entry" msgstr "ÎœÎγεθος εικονιδίου για τη διαδÏομή" -#: ../thunar/thunar-permissions-model.c:440 -#, fuzzy, c-format -msgid "%s (%s)" -msgstr "\"%s\" (%s) %s" +#. 0000 +#: ../thunar/thunar-permissions-chooser.c:234 +msgid "None" +msgstr "" -#: ../thunar/thunar-permissions-model.c:447 -msgid "Unknown file owner" +#. 0002 +#: ../thunar/thunar-permissions-chooser.c:236 +msgid "Write only" msgstr "" -#: ../thunar/thunar-permissions-model.c:460 -msgid "Unknown file group" +#. 0004 +#: ../thunar/thunar-permissions-chooser.c:238 +msgid "Read only" msgstr "" -#: ../thunar/thunar-permissions-model.c:465 -msgid "All other users" +#. 0006 +#: ../thunar/thunar-permissions-chooser.c:240 +msgid "Read & Write" msgstr "" -#: ../thunar/thunar-permissions-model.c:474 -msgid "Read" +#: ../thunar/thunar-permissions-chooser.c:252 +msgid "Owner:" msgstr "" -#: ../thunar/thunar-permissions-model.c:478 -msgid "Write" +#: ../thunar/thunar-permissions-chooser.c:266 +msgid "Unknown" msgstr "" -#: ../thunar/thunar-permissions-model.c:482 +#: ../thunar/thunar-permissions-chooser.c:280 +#: ../thunar/thunar-permissions-chooser.c:335 #, fuzzy -msgid "List folder contents" -msgstr "ΦόÏτωμα πεÏιεχομÎνων φακÎλου..." +msgid "Access:" +msgstr "Î Ïοσπελάστηκε:" -#: ../thunar/thunar-permissions-model.c:482 +#: ../thunar/thunar-permissions-chooser.c:309 +msgid "Group:" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:364 #, fuzzy -msgid "Execute" -msgstr "_ΕκτÎλεση" +msgid "Others:" +msgstr "_Άλλα ΑÏχεία" + +#: ../thunar/thunar-permissions-chooser.c:393 +msgid "Program:" +msgstr "" -#. actions for the group item -#: ../thunar/thunar-permissions-model.c:884 -msgid "Change _Group..." +#: ../thunar/thunar-permissions-chooser.c:399 +msgid "Allow this file to _run as a program" msgstr "" -#. append the "Grant Permission" action -#: ../thunar/thunar-permissions-model.c:897 +#: ../thunar/thunar-permissions-chooser.c:423 +msgid "" +"Allowing untrusted programs to run \n" +"presents a security risk to your system." +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:434 +msgid "Please wait..." +msgstr "" + +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:545 #, fuzzy -msgid "_Grant Permission" -msgstr "Δικαιώματα" +msgid "Failed to change group" +msgstr "Η Ï€Ïοσθήκη νÎας συντόμευσης απÎτυχε" -#. append the "Deny Permission" action -#: ../thunar/thunar-permissions-model.c:906 +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:580 #, fuzzy -msgid "_Deny Permission" -msgstr "Δικαιώματα" +msgid "Failed to apply new permissions" +msgstr "Η Ï€Ïοσθήκη της εφαÏμογής `%s' απÎτυχε." -#: ../thunar/thunar-permissions-view.c:213 -msgid "" -"For special permissions and for\n" -"advanced settings, click Advanced." +#. allocate the question dialog +#: ../thunar/thunar-permissions-chooser.c:619 +#: ../thunar/thunar-permissions-chooser.c:961 +#: ../thunar/thunar-progress-dialog.c:295 +msgid "Question" +msgstr "ΕÏώτηση" + +#: ../thunar/thunar-permissions-chooser.c:642 +msgid "Apply recursively?" msgstr "" -#: ../thunar/thunar-permissions-view.c:222 -msgid "_Advanced..." +#: ../thunar/thunar-permissions-chooser.c:648 +msgid "" +"Do you want to apply your changes recursively to\n" +"all files and subfolder below the selected folder?" msgstr "" -#: ../thunar/thunar-permissions-view.c:223 -msgid "Click here for special permissions and for advanced settings." +#: ../thunar/thunar-permissions-chooser.c:653 +msgid "Do _not ask me again" msgstr "" -#: ../thunar/thunar-permissions-view.c:243 -msgid "" -"You are not the owner of this file, so\n" -"you cannot change these permissions." +#: ../thunar/thunar-permissions-chooser.c:851 +msgid "Unknown file owner" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:184 +#: ../thunar/thunar-permissions-chooser.c:990 +#: ../thunar/thunar-progress-dialog.c:321 +msgid "_Yes" +msgstr "_Îαι" + +#: ../thunar/thunar-permissions-chooser.c:994 +#: ../thunar/thunar-progress-dialog.c:325 +msgid "Yes to _all" +msgstr "Îαι σε ÏŒ_λα" + +#: ../thunar/thunar-permissions-chooser.c:998 +#: ../thunar/thunar-progress-dialog.c:329 +msgid "_No" +msgstr "_Όχι" + +#: ../thunar/thunar-permissions-chooser.c:1002 +#: ../thunar/thunar-progress-dialog.c:333 +msgid "_Cancel" +msgstr "_ΑκÏÏωση" + +#: ../thunar/thunar-preferences-dialog.c:186 msgid "File Manager Preferences" msgstr "Î Ïοτιμήσεις ΔιαχειÏιστή ΑÏχείων" -#: ../thunar/thunar-preferences-dialog.c:200 -msgid "<b>Default View</b>" +#. +#. Views +#. +#: ../thunar/thunar-preferences-dialog.c:203 +#, fuzzy +msgid "Views" +msgstr "_Î Ïοβολή" + +#: ../thunar/thunar-preferences-dialog.c:213 +#, fuzzy +msgid "Default View" msgstr "<b>Î ÏοκαθοÏισμÎνη Î Ïοβολή</b>" -#: ../thunar/thunar-preferences-dialog.c:211 +#: ../thunar/thunar-preferences-dialog.c:225 msgid "View _new folders using:" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:216 +#: ../thunar/thunar-preferences-dialog.c:230 +#: ../thunar/thunar-preferences-dialog.c:267 msgid "Icon View" msgstr "Εικονίδια" -#: ../thunar/thunar-preferences-dialog.c:217 +#: ../thunar/thunar-preferences-dialog.c:231 msgid "Detailed List View" msgstr "ΛεπτομÎÏειες" -#: ../thunar/thunar-preferences-dialog.c:218 +#: ../thunar/thunar-preferences-dialog.c:232 msgid "Last Active View" msgstr "Τελευταία ΕνεÏγή Î Ïοβολή" -#: ../thunar/thunar-preferences-dialog.c:233 +#: ../thunar/thunar-preferences-dialog.c:249 msgid "Sort _folders before files" msgstr "Ταξινόμηση _φακÎλων Ï€Ïιν τα αÏχεία" -#: ../thunar/thunar-preferences-dialog.c:235 +#: ../thunar/thunar-preferences-dialog.c:251 msgid "Select this option to list folders before files when you sort a folder." msgstr "" "ΕπιλÎξτε αυτό για να τοποθετοÏνται οι φάκελοι Ï€Ïιν από τα αÏχεία κατά την " "ταξινόμηση ενός φακÎλου." -#: ../thunar/thunar-preferences-dialog.c:239 +#: ../thunar/thunar-preferences-dialog.c:255 msgid "Show hidden and _backup files" msgstr "Εμφάνιση κÏυφών αÏχείων και _αντιγÏάφων ασφαλείας" -#: ../thunar/thunar-preferences-dialog.c:241 +#: ../thunar/thunar-preferences-dialog.c:257 msgid "" "Select this option to show hidden and backup files in new windows. The first " "character in a hidden filename is a period (.). The last character in a " "backup filename is a tilde (~)." msgstr "" -#: ../thunar/thunar-preferences-dialog.c:251 -msgid "<b>Icon View</b>" -msgstr "<b>Εικονίδια</b>" - -#: ../thunar/thunar-preferences-dialog.c:262 +#: ../thunar/thunar-preferences-dialog.c:279 msgid "_Text beside icons" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:264 +#: ../thunar/thunar-preferences-dialog.c:281 msgid "" "Select this option to place the icon captions for items beside the icon " "rather than below the icon." msgstr "" -#: ../thunar/thunar-preferences.c:255 +#. +#. Advanced +#. +#: ../thunar/thunar-preferences-dialog.c:290 +msgid "Advanced" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:300 +msgid "Miscellaneous" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:312 +msgid "Apply permissions _recursively:" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:317 +msgid "Ask everytime" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:318 +msgid "Always" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:319 +msgid "Never" +msgstr "" + +#: ../thunar/thunar-preferences.c:272 #, c-format msgid "Failed to create the Thunar configuration directory in %s" msgstr "Η δημιουÏγία του καταλόγου Ïυθμίσεων του Thunar στο %s απÎτυχε" -#: ../thunar/thunar-preferences.c:263 +#: ../thunar/thunar-preferences.c:280 #, c-format msgid "Failed to open preferences database in %s: %s" msgstr "Το άνοιγμα των Ï€Ïοτιμήσεων στο %s απÎτυχε: %s" -#: ../thunar/thunar-progress-dialog.c:150 +#: ../thunar/thunar-progress-dialog.c:151 msgid "Job" msgstr "ΕÏγασία" -#: ../thunar/thunar-progress-dialog.c:151 +#: ../thunar/thunar-progress-dialog.c:152 msgid "The job whose progress to display" msgstr "Ποιας εÏγασίας η Ï€Ïόοδος θα παÏουσιαστεί" -#: ../thunar/thunar-progress-dialog.c:303 -msgid "Question" -msgstr "ΕÏώτηση" - -#: ../thunar/thunar-progress-dialog.c:329 -msgid "_Yes" -msgstr "_Îαι" - -#: ../thunar/thunar-progress-dialog.c:333 -msgid "Yes to _all" -msgstr "Îαι σε ÏŒ_λα" - -#: ../thunar/thunar-progress-dialog.c:337 -msgid "_No" -msgstr "_Όχι" - -#: ../thunar/thunar-progress-dialog.c:341 -msgid "_Cancel" -msgstr "_ΑκÏÏωση" - -#: ../thunar/thunar-progress-dialog.c:467 +#: ../thunar/thunar-progress-dialog.c:459 #, c-format msgid "(%lu hour remaining)" msgid_plural "(%lu hours remaining)" msgstr[0] "(απομÎνει %lu ÏŽÏα)" msgstr[1] "(απομÎνουν %lu ÏŽÏες)" -#: ../thunar/thunar-progress-dialog.c:472 +#: ../thunar/thunar-progress-dialog.c:464 #, c-format msgid "(%lu minute remaining)" msgid_plural "(%lu minutes remaining)" msgstr[0] "(απομÎνει %lu λεπτό)" msgstr[1] "(απομÎνουν %lu λεπτά)" -#: ../thunar/thunar-progress-dialog.c:477 +#: ../thunar/thunar-progress-dialog.c:469 #, c-format msgid "(%lu second remaining)" msgid_plural "(%lu seconds remaining)" msgstr[0] "(απομÎνει %lu δευτεÏόλεπτο)" msgstr[1] "(απομÎνουν %lu δευτεÏόλεπτα)" -#: ../thunar/thunar-properties-dialog.c:173 +#: ../thunar/thunar-properties-dialog.c:174 msgid "The file displayed by the dialog" msgstr "Το αÏχείο που απεικονίζεται από το διάλογο" -#: ../thunar/thunar-properties-dialog.c:220 +#: ../thunar/thunar-properties-dialog.c:212 msgid "General" msgstr "ΓενικÎÏ‚" -#: ../thunar/thunar-properties-dialog.c:237 +#: ../thunar/thunar-properties-dialog.c:229 msgid "Name:" msgstr "Όνομα:" #. #. Second box (kind) #. -#: ../thunar/thunar-properties-dialog.c:262 +#: ../thunar/thunar-properties-dialog.c:254 msgid "Kind:" msgstr "Είδος:" #. #. Third box (modified, accessed) #. -#: ../thunar/thunar-properties-dialog.c:287 +#: ../thunar/thunar-properties-dialog.c:279 msgid "Modified:" msgstr "ΤÏοποποιήθηκε:" -#: ../thunar/thunar-properties-dialog.c:300 +#: ../thunar/thunar-properties-dialog.c:292 msgid "Accessed:" msgstr "Î Ïοσπελάστηκε:" #. #. Fourth box (volume, size) #. -#: ../thunar/thunar-properties-dialog.c:324 +#: ../thunar/thunar-properties-dialog.c:316 msgid "Volume:" msgstr "Τόμος:" -#: ../thunar/thunar-properties-dialog.c:347 +#: ../thunar/thunar-properties-dialog.c:339 msgid "Size:" msgstr "ÎœÎγεθος:" #. #. Emblem chooser #. -#: ../thunar/thunar-properties-dialog.c:371 +#: ../thunar/thunar-properties-dialog.c:363 msgid "Emblems" msgstr "Εμβλήματα" -#: ../thunar/thunar-properties-dialog.c:618 +#: ../thunar/thunar-properties-dialog.c:606 #, c-format msgid "%s Info" msgstr "%s ΠληÏοφοÏίες" -#: ../thunar/thunar-properties-dialog.c:699 +#: ../thunar/thunar-properties-dialog.c:687 #, c-format msgid "%s (%u Bytes)" msgstr "%s (%u Bytes)" #. display an error message -#: ../thunar/thunar-properties-dialog.c:745 +#: ../thunar/thunar-properties-dialog.c:733 #: ../thunar/thunar-standard-view.c:2170 #, c-format msgid "Failed to rename `%s'" @@ -1355,27 +1374,27 @@ msgstr "Κείμενο μπάÏας κατάστασης" msgid "The main text to be displayed in the statusbar" msgstr "Το κυÏίως κείμενο που θα εμφανίζεται στη μπάÏα κατάστασης" -#: ../thunar/thunar-text-renderer.c:215 +#: ../thunar/thunar-text-renderer.c:216 msgid "Text" msgstr "Κείμενο" -#: ../thunar/thunar-text-renderer.c:216 +#: ../thunar/thunar-text-renderer.c:217 msgid "The text to render" msgstr "Κείμενο Ï€Ïος εμφάνιση" -#: ../thunar/thunar-text-renderer.c:230 +#: ../thunar/thunar-text-renderer.c:231 msgid "Wrap mode" msgstr "Κατάσταση αναδίπλωσης" -#: ../thunar/thunar-text-renderer.c:231 +#: ../thunar/thunar-text-renderer.c:232 msgid "The wrap mode" msgstr "Η κατάσταση αναδίπλωσης" -#: ../thunar/thunar-text-renderer.c:246 +#: ../thunar/thunar-text-renderer.c:247 msgid "Wrap width" msgstr "Πλάτος αναδίπλωσης" -#: ../thunar/thunar-text-renderer.c:247 +#: ../thunar/thunar-text-renderer.c:248 msgid "The wrap width" msgstr "Το πλάτος αναδίπλωσης" @@ -1848,3 +1867,30 @@ msgstr "ΔιαχειÏιστής ΑÏχείων" #: ../Thunar.desktop.in.h:3 msgid "Thunar File Manager" msgstr "ΔιαχειÏιστής ΑÏχείων Thunar" + +#, fuzzy +#~ msgid "Advanced Permissions" +#~ msgstr "Δικαιώματα" + +#, fuzzy +#~ msgid "%s (%s)" +#~ msgstr "\"%s\" (%s) %s" + +#, fuzzy +#~ msgid "List folder contents" +#~ msgstr "ΦόÏτωμα πεÏιεχομÎνων φακÎλου..." + +#, fuzzy +#~ msgid "Execute" +#~ msgstr "_ΕκτÎλεση" + +#, fuzzy +#~ msgid "_Grant Permission" +#~ msgstr "Δικαιώματα" + +#, fuzzy +#~ msgid "_Deny Permission" +#~ msgstr "Δικαιώματα" + +#~ msgid "<b>Icon View</b>" +#~ msgstr "<b>Εικονίδια</b>" diff --git a/po/es.po b/po/es.po index f0200d90b..35dd4aaa8 100644 --- a/po/es.po +++ b/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Thunar 0.1.4svn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-01-04 18:34+0100\n" +"POT-Creation-Date: 2006-01-08 22:45+0100\n" "PO-Revision-Date: 2005-10-14 23:57+0900\n" "Last-Translator: Pablo Hernández-M. Saiz <homeless3d@gmail.com>\n" "Language-Team: Spanish <es@li.org>\n" @@ -16,23 +16,67 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ../thunar-vfs/thunar-vfs-info.c:362 +#: ../thunar-vfs/thunar-vfs-chmod-job.c:168 +#: ../thunar-vfs/thunar-vfs-chown-job.c:166 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 +msgid "Collecting files..." +msgstr "" + +#. ask the user whether we should skip the file +#. ask the user whether to skip this file (used for cancellation only) +#. ask the user whether to skip +#: ../thunar-vfs/thunar-vfs-chmod-job.c:189 +#: ../thunar-vfs/thunar-vfs-chown-job.c:187 +#: ../thunar-vfs/thunar-vfs-link-job.c:212 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 +#, fuzzy, c-format +msgid "" +"%s.\n" +"\n" +"Do you want to skip it?" +msgstr "" +"\n" +"\n" +"¿Quiere dejarlo como está?" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:246 +#: ../thunar-vfs/thunar-vfs-chown-job.c:244 +#, fuzzy, c-format +msgid "Failed to determine file info of `%s': %s" +msgstr "Imposible renombrar %s." + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:272 +#, fuzzy, c-format +msgid "Failed to change permissions of `%s': %s" +msgstr "Imposible renombrar %s." + +#: ../thunar-vfs/thunar-vfs-chown-job.c:260 +#, fuzzy, c-format +msgid "Failed to change file owner of `%s': %s" +msgstr "Imposible renombrar %s." + +#: ../thunar-vfs/thunar-vfs-chown-job.c:262 +#, fuzzy, c-format +msgid "Failed to change file group of `%s': %s" +msgstr "Imposible renombrar %s." + +#: ../thunar-vfs/thunar-vfs-info.c:261 msgid "No Exec field specified" msgstr "Campo de ejecución no especificado" -#: ../thunar-vfs/thunar-vfs-info.c:370 +#: ../thunar-vfs/thunar-vfs-info.c:269 msgid "Unable to parse file" msgstr "Imposible interpretar archivo" -#: ../thunar-vfs/thunar-vfs-info.c:460 +#: ../thunar-vfs/thunar-vfs-info.c:359 msgid "Invalid file name" msgstr "Nombre de archivo inválido" -#: ../thunar-vfs/thunar-vfs-info.c:482 +#: ../thunar-vfs/thunar-vfs-info.c:381 msgid "Invalid desktop file" msgstr "" -#: ../thunar-vfs/thunar-vfs-info.c:716 +#: ../thunar-vfs/thunar-vfs-info.c:615 #, fuzzy, c-format msgid "Failed to stat file `%s': %s" msgstr "Imposible renombrar %s." @@ -56,20 +100,6 @@ msgstr "" msgid "Failed to remove `%s': %s" msgstr "Imposible renombrar %s." -#. ask the user whether to skip this file (used for cancellation only) -#. ask the user whether to skip -#: ../thunar-vfs/thunar-vfs-link-job.c:212 -#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 -#, fuzzy, c-format -msgid "" -"%s.\n" -"\n" -"Do you want to skip it?" -msgstr "" -"\n" -"\n" -"¿Quiere dejarlo como está?" - #: ../thunar-vfs/thunar-vfs-mime-database.c:1657 #, c-format msgid "Failed to load application from file %s" @@ -101,10 +131,6 @@ msgstr "Tamaño" msgid "The desired thumbnail size" msgstr "" -#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 -msgid "Collecting files..." -msgstr "" - #. display info message #: ../thunar-vfs/thunar-vfs-transfer-job.c:329 #, fuzzy @@ -148,7 +174,7 @@ msgid "copy of %s" msgstr "" #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703 -#: ../thunar/thunar-properties-dialog.c:643 +#: ../thunar/thunar-properties-dialog.c:631 #, c-format msgid "link to %s" msgstr "" @@ -264,58 +290,6 @@ msgstr "Imposible crear el enlace de %s." msgid "Thunar" msgstr "Thunar" -#: ../thunar/thunar-advanced-permissions-dialog.c:159 -#, fuzzy -msgid "Advanced Permissions" -msgstr "Permisos" - -#: ../thunar/thunar-advanced-permissions-dialog.c:167 -msgid "Special Bits" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:180 -msgid "Set _User ID (SUID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:190 -msgid "" -"An executable file whose Set User ID (SUID) bit is\n" -"set will always be executed with the privileges of\n" -"the owner of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:211 -msgid "Set _Group ID (SGID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:221 -msgid "" -"An executable file whose Set Group ID (SGID) bit is\n" -"set will always be executed with the privileges of the\n" -"group of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:242 -msgid "_Sticky" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:252 -msgid "" -"A file in a sticky directory may only be removed or\n" -"renamed by a user if the user has write permission\n" -"for the directory and the user is the owner of the\n" -"file, the owner of the directory or the superuser." -msgstr "" - -#. display an error message to the user -#. display an error to the user (when we get here, we definitely have a valid file!) -#: ../thunar/thunar-advanced-permissions-dialog.c:356 -#: ../thunar/thunar-permissions-model.c:830 -#: ../thunar/thunar-permissions-view.c:494 -#, fuzzy, c-format -msgid "Failed to change permissions of `%s'" -msgstr "Imposible renombrar %s." - #. display an error message to the user #: ../thunar/thunar-application.c:222 #, fuzzy @@ -343,25 +317,11 @@ msgstr "Borrando archivos..." msgid "Creating directories..." msgstr "Directorio actual" -#: ../thunar/thunar-change-group-dialog.c:193 -msgid "Change Group" -msgstr "" - -#: ../thunar/thunar-change-group-dialog.c:200 -msgid "_Group:" -msgstr "" - -#. display an error message -#: ../thunar/thunar-change-group-dialog.c:309 -#, fuzzy, c-format -msgid "Failed to change the group to which `%s' belongs" -msgstr "Imposible renombrar %s." - #: ../thunar/thunar-chooser-dialog.c:169 ../thunar/thunar-emblem-chooser.c:147 #: ../thunar/thunar-emblem-chooser.c:148 ../thunar/thunar-icon-renderer.c:161 #: ../thunar/thunar-open-with-action.c:146 #: ../thunar/thunar-open-with-action.c:147 -#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190 +#: ../thunar/thunar-properties-dialog.c:173 ../thunar/thunar-statusbar.c:190 msgid "File" msgstr "Archivo" @@ -412,40 +372,40 @@ msgid "Failed to execute `%s'" msgstr "Imposible renombrar %s." #. update the header label -#: ../thunar/thunar-chooser-dialog.c:612 +#: ../thunar/thunar-chooser-dialog.c:613 #, c-format msgid "Open <i>%s</i> and other files of type \"%s\" with:" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:634 ../thunar-uca/thunar-uca-editor.c:491 +#: ../thunar/thunar-chooser-dialog.c:635 ../thunar-uca/thunar-uca-editor.c:491 #, fuzzy msgid "Select an Application" msgstr "Otra aplicación..." -#: ../thunar/thunar-chooser-dialog.c:644 ../thunar-uca/thunar-uca-editor.c:501 +#: ../thunar/thunar-chooser-dialog.c:645 ../thunar-uca/thunar-uca-editor.c:501 #: ../thunar-uca/thunar-uca-editor.c:640 #, fuzzy msgid "All Files" msgstr "Archivos" -#: ../thunar/thunar-chooser-dialog.c:649 ../thunar-uca/thunar-uca-editor.c:506 +#: ../thunar/thunar-chooser-dialog.c:650 ../thunar-uca/thunar-uca-editor.c:506 #, fuzzy msgid "Executable Files" msgstr "Seleccionar _todos los archivos" -#: ../thunar/thunar-chooser-dialog.c:664 ../thunar-uca/thunar-uca-editor.c:521 +#: ../thunar/thunar-chooser-dialog.c:665 ../thunar-uca/thunar-uca-editor.c:521 msgid "Perl Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:670 ../thunar-uca/thunar-uca-editor.c:527 +#: ../thunar/thunar-chooser-dialog.c:671 ../thunar-uca/thunar-uca-editor.c:527 msgid "Python Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:676 ../thunar-uca/thunar-uca-editor.c:533 +#: ../thunar/thunar-chooser-dialog.c:677 ../thunar-uca/thunar-uca-editor.c:533 msgid "Ruby Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:682 ../thunar-uca/thunar-uca-editor.c:539 +#: ../thunar/thunar-chooser-dialog.c:683 ../thunar-uca/thunar-uca-editor.c:539 msgid "Shell Scripts" msgstr "" @@ -516,7 +476,7 @@ msgstr "Nombre" #. Permissions chooser #. #: ../thunar/thunar-details-view.c:197 -#: ../thunar/thunar-properties-dialog.c:382 +#: ../thunar/thunar-properties-dialog.c:374 msgid "Permissions" msgstr "Permisos" @@ -567,12 +527,12 @@ msgstr "No se puede ejecutar el archivo \"%s\"." msgid "The root folder has no parent" msgstr "" -#: ../thunar/thunar-file.c:1032 +#: ../thunar/thunar-file.c:967 msgid "Filesystem" msgstr "RaÃz" # msgstr "Sistema de archivos" -#: ../thunar/thunar-file.c:1056 +#: ../thunar/thunar-file.c:991 msgid "Home" msgstr "Casa" @@ -629,7 +589,7 @@ msgid "The file whose icon to render" msgstr "" #: ../thunar/thunar-icon-renderer.c:177 ../thunar/thunar-icon-renderer.c:178 -#: ../thunar/thunar-text-renderer.c:202 ../thunar/thunar-text-renderer.c:203 +#: ../thunar/thunar-text-renderer.c:203 ../thunar/thunar-text-renderer.c:204 msgid "Follow state" msgstr "" @@ -801,7 +761,7 @@ msgstr "Mostrar ocultos" msgid "Whether to display hidden files" msgstr "" -#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641 +#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:629 msgid "broken link" msgstr "" @@ -841,11 +801,11 @@ msgid_plural "%d items selected (%s)" msgstr[0] "%d elemento seleccionado" msgstr[1] "%d elementos seleccionados (%s)" -#: ../thunar/thunar-location-buttons.c:258 +#: ../thunar/thunar-location-buttons.c:257 msgid "Spacing" msgstr "Espaciado" -#: ../thunar/thunar-location-buttons.c:259 +#: ../thunar/thunar-location-buttons.c:258 msgid "The amount of space between the path buttons" msgstr "Espacio entre los botones del path" @@ -887,259 +847,317 @@ msgstr "" msgid "The icon size for the path entry" msgstr "" -#: ../thunar/thunar-permissions-model.c:440 -#, fuzzy, c-format -msgid "%s (%s)" -msgstr "\"%s\" (%s) %s" +#. 0000 +#: ../thunar/thunar-permissions-chooser.c:234 +msgid "None" +msgstr "" -#: ../thunar/thunar-permissions-model.c:447 -msgid "Unknown file owner" +#. 0002 +#: ../thunar/thunar-permissions-chooser.c:236 +msgid "Write only" msgstr "" -#: ../thunar/thunar-permissions-model.c:460 -msgid "Unknown file group" +#. 0004 +#: ../thunar/thunar-permissions-chooser.c:238 +msgid "Read only" msgstr "" -#: ../thunar/thunar-permissions-model.c:465 -msgid "All other users" +#. 0006 +#: ../thunar/thunar-permissions-chooser.c:240 +msgid "Read & Write" msgstr "" -#: ../thunar/thunar-permissions-model.c:474 -msgid "Read" +#: ../thunar/thunar-permissions-chooser.c:252 +msgid "Owner:" msgstr "" -#: ../thunar/thunar-permissions-model.c:478 -msgid "Write" +#: ../thunar/thunar-permissions-chooser.c:266 +msgid "Unknown" msgstr "" -#: ../thunar/thunar-permissions-model.c:482 +#: ../thunar/thunar-permissions-chooser.c:280 +#: ../thunar/thunar-permissions-chooser.c:335 #, fuzzy -msgid "List folder contents" -msgstr "Cargando el contenido de la carpeta..." +msgid "Access:" +msgstr "Accedido:" -#: ../thunar/thunar-permissions-model.c:482 +#: ../thunar/thunar-permissions-chooser.c:309 +msgid "Group:" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:364 #, fuzzy -msgid "Execute" -msgstr "Ejecutar" +msgid "Others:" +msgstr "_Pegar archivos" + +#: ../thunar/thunar-permissions-chooser.c:393 +msgid "Program:" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:399 +msgid "Allow this file to _run as a program" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:423 +msgid "" +"Allowing untrusted programs to run \n" +"presents a security risk to your system." +msgstr "" -#. actions for the group item -#: ../thunar/thunar-permissions-model.c:884 -msgid "Change _Group..." +#: ../thunar/thunar-permissions-chooser.c:434 +msgid "Please wait..." msgstr "" -#. append the "Grant Permission" action -#: ../thunar/thunar-permissions-model.c:897 +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:545 #, fuzzy -msgid "_Grant Permission" -msgstr "Permisos" +msgid "Failed to change group" +msgstr "Imposible renombrar %s." -#. append the "Deny Permission" action -#: ../thunar/thunar-permissions-model.c:906 +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:580 #, fuzzy -msgid "_Deny Permission" -msgstr "Permisos" +msgid "Failed to apply new permissions" +msgstr "Imposible renombrar %s." -#: ../thunar/thunar-permissions-view.c:213 -msgid "" -"For special permissions and for\n" -"advanced settings, click Advanced." +#. allocate the question dialog +#: ../thunar/thunar-permissions-chooser.c:619 +#: ../thunar/thunar-permissions-chooser.c:961 +#: ../thunar/thunar-progress-dialog.c:295 +msgid "Question" msgstr "" -#: ../thunar/thunar-permissions-view.c:222 -msgid "_Advanced..." +#: ../thunar/thunar-permissions-chooser.c:642 +msgid "Apply recursively?" msgstr "" -#: ../thunar/thunar-permissions-view.c:223 -msgid "Click here for special permissions and for advanced settings." +#: ../thunar/thunar-permissions-chooser.c:648 +msgid "" +"Do you want to apply your changes recursively to\n" +"all files and subfolder below the selected folder?" msgstr "" -#: ../thunar/thunar-permissions-view.c:243 -msgid "" -"You are not the owner of this file, so\n" -"you cannot change these permissions." +#: ../thunar/thunar-permissions-chooser.c:653 +msgid "Do _not ask me again" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:184 +#: ../thunar/thunar-permissions-chooser.c:851 +msgid "Unknown file owner" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:990 +#: ../thunar/thunar-progress-dialog.c:321 +msgid "_Yes" +msgstr "_Si" + +#: ../thunar/thunar-permissions-chooser.c:994 +#: ../thunar/thunar-progress-dialog.c:325 +msgid "Yes to _all" +msgstr "Si a_todo" + +#: ../thunar/thunar-permissions-chooser.c:998 +#: ../thunar/thunar-progress-dialog.c:329 +msgid "_No" +msgstr "_No" + +#: ../thunar/thunar-permissions-chooser.c:1002 +#: ../thunar/thunar-progress-dialog.c:333 +msgid "_Cancel" +msgstr "_Cancelar" + +#: ../thunar/thunar-preferences-dialog.c:186 #, fuzzy msgid "File Manager Preferences" msgstr "Gestor de archivos" -#: ../thunar/thunar-preferences-dialog.c:200 -msgid "<b>Default View</b>" -msgstr "" +#. +#. Views +#. +#: ../thunar/thunar-preferences-dialog.c:203 +#, fuzzy +msgid "Views" +msgstr "_Ver" + +#: ../thunar/thunar-preferences-dialog.c:213 +#, fuzzy +msgid "Default View" +msgstr "Vista detallada" -#: ../thunar/thunar-preferences-dialog.c:211 +#: ../thunar/thunar-preferences-dialog.c:225 msgid "View _new folders using:" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:216 +#: ../thunar/thunar-preferences-dialog.c:230 +#: ../thunar/thunar-preferences-dialog.c:267 #, fuzzy msgid "Icon View" msgstr "Vista de iconos" -#: ../thunar/thunar-preferences-dialog.c:217 +#: ../thunar/thunar-preferences-dialog.c:231 #, fuzzy msgid "Detailed List View" msgstr "Vista detallada" -#: ../thunar/thunar-preferences-dialog.c:218 +#: ../thunar/thunar-preferences-dialog.c:232 msgid "Last Active View" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:233 +#: ../thunar/thunar-preferences-dialog.c:249 msgid "Sort _folders before files" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:235 +#: ../thunar/thunar-preferences-dialog.c:251 msgid "Select this option to list folders before files when you sort a folder." msgstr "" -#: ../thunar/thunar-preferences-dialog.c:239 +#: ../thunar/thunar-preferences-dialog.c:255 #, fuzzy msgid "Show hidden and _backup files" msgstr "Mostrar los archivos _ocultos" -#: ../thunar/thunar-preferences-dialog.c:241 +#: ../thunar/thunar-preferences-dialog.c:257 msgid "" "Select this option to show hidden and backup files in new windows. The first " "character in a hidden filename is a period (.). The last character in a " "backup filename is a tilde (~)." msgstr "" -#: ../thunar/thunar-preferences-dialog.c:251 -#, fuzzy -msgid "<b>Icon View</b>" -msgstr "Vista de iconos" - -#: ../thunar/thunar-preferences-dialog.c:262 +#: ../thunar/thunar-preferences-dialog.c:279 msgid "_Text beside icons" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:264 +#: ../thunar/thunar-preferences-dialog.c:281 msgid "" "Select this option to place the icon captions for items beside the icon " "rather than below the icon." msgstr "" -#: ../thunar/thunar-preferences.c:255 +#. +#. Advanced +#. +#: ../thunar/thunar-preferences-dialog.c:290 +msgid "Advanced" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:300 +msgid "Miscellaneous" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:312 +msgid "Apply permissions _recursively:" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:317 +msgid "Ask everytime" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:318 +msgid "Always" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:319 +msgid "Never" +msgstr "" + +#: ../thunar/thunar-preferences.c:272 #, fuzzy, c-format msgid "Failed to create the Thunar configuration directory in %s" msgstr "Imposible crear el directorio %s." -#: ../thunar/thunar-preferences.c:263 +#: ../thunar/thunar-preferences.c:280 #, fuzzy, c-format msgid "Failed to open preferences database in %s: %s" msgstr "Imposible renombrar %s." -#: ../thunar/thunar-progress-dialog.c:150 +#: ../thunar/thunar-progress-dialog.c:151 msgid "Job" msgstr "Trabajo" -#: ../thunar/thunar-progress-dialog.c:151 +#: ../thunar/thunar-progress-dialog.c:152 msgid "The job whose progress to display" msgstr "" -#: ../thunar/thunar-progress-dialog.c:303 -msgid "Question" -msgstr "" - -#: ../thunar/thunar-progress-dialog.c:329 -msgid "_Yes" -msgstr "_Si" - -#: ../thunar/thunar-progress-dialog.c:333 -msgid "Yes to _all" -msgstr "Si a_todo" - -#: ../thunar/thunar-progress-dialog.c:337 -msgid "_No" -msgstr "_No" - -#: ../thunar/thunar-progress-dialog.c:341 -msgid "_Cancel" -msgstr "_Cancelar" - -#: ../thunar/thunar-progress-dialog.c:467 +#: ../thunar/thunar-progress-dialog.c:459 #, c-format msgid "(%lu hour remaining)" msgid_plural "(%lu hours remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-progress-dialog.c:472 +#: ../thunar/thunar-progress-dialog.c:464 #, c-format msgid "(%lu minute remaining)" msgid_plural "(%lu minutes remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-progress-dialog.c:477 +#: ../thunar/thunar-progress-dialog.c:469 #, c-format msgid "(%lu second remaining)" msgid_plural "(%lu seconds remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-properties-dialog.c:173 +#: ../thunar/thunar-properties-dialog.c:174 msgid "The file displayed by the dialog" msgstr "" -#: ../thunar/thunar-properties-dialog.c:220 +#: ../thunar/thunar-properties-dialog.c:212 msgid "General" msgstr "General" -#: ../thunar/thunar-properties-dialog.c:237 +#: ../thunar/thunar-properties-dialog.c:229 msgid "Name:" msgstr "Nombre:" #. #. Second box (kind) #. -#: ../thunar/thunar-properties-dialog.c:262 +#: ../thunar/thunar-properties-dialog.c:254 msgid "Kind:" msgstr "Tipo:" #. #. Third box (modified, accessed) #. -#: ../thunar/thunar-properties-dialog.c:287 +#: ../thunar/thunar-properties-dialog.c:279 msgid "Modified:" msgstr "Modificado:" -#: ../thunar/thunar-properties-dialog.c:300 +#: ../thunar/thunar-properties-dialog.c:292 msgid "Accessed:" msgstr "Accedido:" #. #. Fourth box (volume, size) #. -#: ../thunar/thunar-properties-dialog.c:324 +#: ../thunar/thunar-properties-dialog.c:316 msgid "Volume:" msgstr "Volumen:" -#: ../thunar/thunar-properties-dialog.c:347 +#: ../thunar/thunar-properties-dialog.c:339 msgid "Size:" msgstr "Tamaño:" #. #. Emblem chooser #. -#: ../thunar/thunar-properties-dialog.c:371 +#: ../thunar/thunar-properties-dialog.c:363 msgid "Emblems" msgstr "" -#: ../thunar/thunar-properties-dialog.c:618 +#: ../thunar/thunar-properties-dialog.c:606 #, c-format msgid "%s Info" msgstr "" -#: ../thunar/thunar-properties-dialog.c:699 +#: ../thunar/thunar-properties-dialog.c:687 #, c-format msgid "%s (%u Bytes)" msgstr "%s (%u Bytes)" #. display an error message -#: ../thunar/thunar-properties-dialog.c:745 +#: ../thunar/thunar-properties-dialog.c:733 #: ../thunar/thunar-standard-view.c:2170 #, fuzzy, c-format msgid "Failed to rename `%s'" @@ -1384,27 +1402,27 @@ msgstr "Texto de la barra de estado" msgid "The main text to be displayed in the statusbar" msgstr "" -#: ../thunar/thunar-text-renderer.c:215 +#: ../thunar/thunar-text-renderer.c:216 msgid "Text" msgstr "Texto" -#: ../thunar/thunar-text-renderer.c:216 +#: ../thunar/thunar-text-renderer.c:217 msgid "The text to render" msgstr "" -#: ../thunar/thunar-text-renderer.c:230 +#: ../thunar/thunar-text-renderer.c:231 msgid "Wrap mode" msgstr "" -#: ../thunar/thunar-text-renderer.c:231 +#: ../thunar/thunar-text-renderer.c:232 msgid "The wrap mode" msgstr "" -#: ../thunar/thunar-text-renderer.c:246 +#: ../thunar/thunar-text-renderer.c:247 msgid "Wrap width" msgstr "" -#: ../thunar/thunar-text-renderer.c:247 +#: ../thunar/thunar-text-renderer.c:248 msgid "The wrap width" msgstr "" @@ -1902,3 +1920,35 @@ msgstr "Gestor de archivos" #: ../Thunar.desktop.in.h:3 msgid "Thunar File Manager" msgstr "Gestor de archivos Thunar" + +#, fuzzy +#~ msgid "Advanced Permissions" +#~ msgstr "Permisos" + +#, fuzzy +#~ msgid "Failed to change the group to which `%s' belongs" +#~ msgstr "Imposible renombrar %s." + +#, fuzzy +#~ msgid "%s (%s)" +#~ msgstr "\"%s\" (%s) %s" + +#, fuzzy +#~ msgid "List folder contents" +#~ msgstr "Cargando el contenido de la carpeta..." + +#, fuzzy +#~ msgid "Execute" +#~ msgstr "Ejecutar" + +#, fuzzy +#~ msgid "_Grant Permission" +#~ msgstr "Permisos" + +#, fuzzy +#~ msgid "_Deny Permission" +#~ msgstr "Permisos" + +#, fuzzy +#~ msgid "<b>Icon View</b>" +#~ msgstr "Vista de iconos" diff --git a/po/fr.po b/po/fr.po index 03f4fd0eb..ba86be117 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Thunar 0.1.4svn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-01-04 18:34+0100\n" +"POT-Creation-Date: 2006-01-08 22:45+0100\n" "PO-Revision-Date: 2006-01-01 15:02+0100\n" "Last-Translator: Stephane Roy <sroy@j2n.net>\n" "Language-Team: French <traduc@traduc.org>\n" @@ -16,23 +16,67 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: ../thunar-vfs/thunar-vfs-info.c:362 +#: ../thunar-vfs/thunar-vfs-chmod-job.c:168 +#: ../thunar-vfs/thunar-vfs-chown-job.c:166 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 +msgid "Collecting files..." +msgstr "Récupération des fichiers..." + +#. ask the user whether we should skip the file +#. ask the user whether to skip this file (used for cancellation only) +#. ask the user whether to skip +#: ../thunar-vfs/thunar-vfs-chmod-job.c:189 +#: ../thunar-vfs/thunar-vfs-chown-job.c:187 +#: ../thunar-vfs/thunar-vfs-link-job.c:212 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 +#, c-format +msgid "" +"%s.\n" +"\n" +"Do you want to skip it?" +msgstr "" +"%s.\n" +"\n" +"Voulez-vous l'ignorer ?" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:246 +#: ../thunar-vfs/thunar-vfs-chown-job.c:244 +#, fuzzy, c-format +msgid "Failed to determine file info of `%s': %s" +msgstr "Échec à la détermination d'informations sur le fichier `%s'" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:272 +#, fuzzy, c-format +msgid "Failed to change permissions of `%s': %s" +msgstr "Échec au changement de mode de `%s'" + +#: ../thunar-vfs/thunar-vfs-chown-job.c:260 +#, fuzzy, c-format +msgid "Failed to change file owner of `%s': %s" +msgstr "Échec au changement de mode de `%s'" + +#: ../thunar-vfs/thunar-vfs-chown-job.c:262 +#, fuzzy, c-format +msgid "Failed to change file group of `%s': %s" +msgstr "Échec au changement de mode de `%s'" + +#: ../thunar-vfs/thunar-vfs-info.c:261 msgid "No Exec field specified" msgstr "Aucun champ Exec spécifié" -#: ../thunar-vfs/thunar-vfs-info.c:370 +#: ../thunar-vfs/thunar-vfs-info.c:269 msgid "Unable to parse file" msgstr "Impossible d'analyser le fichier" -#: ../thunar-vfs/thunar-vfs-info.c:460 +#: ../thunar-vfs/thunar-vfs-info.c:359 msgid "Invalid file name" msgstr "Nom de fichier invalide" -#: ../thunar-vfs/thunar-vfs-info.c:482 +#: ../thunar-vfs/thunar-vfs-info.c:381 msgid "Invalid desktop file" msgstr "Fichier de bureau invalide" -#: ../thunar-vfs/thunar-vfs-info.c:716 +#: ../thunar-vfs/thunar-vfs-info.c:615 #, c-format msgid "Failed to stat file `%s': %s" msgstr "Échec pour récupérer le statut du fichier `%s' : %s" @@ -56,20 +100,6 @@ msgstr "" msgid "Failed to remove `%s': %s" msgstr "Échec à la suppression de `%s' : %s" -#. ask the user whether to skip this file (used for cancellation only) -#. ask the user whether to skip -#: ../thunar-vfs/thunar-vfs-link-job.c:212 -#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 -#, c-format -msgid "" -"%s.\n" -"\n" -"Do you want to skip it?" -msgstr "" -"%s.\n" -"\n" -"Voulez-vous l'ignorer ?" - #: ../thunar-vfs/thunar-vfs-mime-database.c:1657 #, c-format msgid "Failed to load application from file %s" @@ -101,10 +131,6 @@ msgstr "Taille" msgid "The desired thumbnail size" msgstr "La taille de vignette désirée" -#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 -msgid "Collecting files..." -msgstr "Récupération des fichiers..." - #. display info message #: ../thunar-vfs/thunar-vfs-transfer-job.c:329 msgid "Deleting directories..." @@ -147,7 +173,7 @@ msgid "copy of %s" msgstr "copie de %s" #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703 -#: ../thunar/thunar-properties-dialog.c:643 +#: ../thunar/thunar-properties-dialog.c:631 #, c-format msgid "link to %s" msgstr "lien vers %s" @@ -263,58 +289,6 @@ msgstr "Échec à la création du lien symbolique `%s'" msgid "Thunar" msgstr "Thunar" -#: ../thunar/thunar-advanced-permissions-dialog.c:159 -#, fuzzy -msgid "Advanced Permissions" -msgstr "Permissions" - -#: ../thunar/thunar-advanced-permissions-dialog.c:167 -msgid "Special Bits" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:180 -msgid "Set _User ID (SUID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:190 -msgid "" -"An executable file whose Set User ID (SUID) bit is\n" -"set will always be executed with the privileges of\n" -"the owner of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:211 -msgid "Set _Group ID (SGID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:221 -msgid "" -"An executable file whose Set Group ID (SGID) bit is\n" -"set will always be executed with the privileges of the\n" -"group of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:242 -msgid "_Sticky" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:252 -msgid "" -"A file in a sticky directory may only be removed or\n" -"renamed by a user if the user has write permission\n" -"for the directory and the user is the owner of the\n" -"file, the owner of the directory or the superuser." -msgstr "" - -#. display an error message to the user -#. display an error to the user (when we get here, we definitely have a valid file!) -#: ../thunar/thunar-advanced-permissions-dialog.c:356 -#: ../thunar/thunar-permissions-model.c:830 -#: ../thunar/thunar-permissions-view.c:494 -#, fuzzy, c-format -msgid "Failed to change permissions of `%s'" -msgstr "Échec au changement de mode de `%s'" - #. display an error message to the user #: ../thunar/thunar-application.c:222 msgid "Failed to launch operation" @@ -340,25 +314,11 @@ msgstr "Suppression des fichiers..." msgid "Creating directories..." msgstr "Création de répertoires..." -#: ../thunar/thunar-change-group-dialog.c:193 -msgid "Change Group" -msgstr "" - -#: ../thunar/thunar-change-group-dialog.c:200 -msgid "_Group:" -msgstr "" - -#. display an error message -#: ../thunar/thunar-change-group-dialog.c:309 -#, fuzzy, c-format -msgid "Failed to change the group to which `%s' belongs" -msgstr "Échec au changement de mode de `%s'" - #: ../thunar/thunar-chooser-dialog.c:169 ../thunar/thunar-emblem-chooser.c:147 #: ../thunar/thunar-emblem-chooser.c:148 ../thunar/thunar-icon-renderer.c:161 #: ../thunar/thunar-open-with-action.c:146 #: ../thunar/thunar-open-with-action.c:147 -#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190 +#: ../thunar/thunar-properties-dialog.c:173 ../thunar/thunar-statusbar.c:190 msgid "File" msgstr "Fichier" @@ -408,37 +368,37 @@ msgid "Failed to execute `%s'" msgstr "Échec à l'exécution de `%s'" #. update the header label -#: ../thunar/thunar-chooser-dialog.c:612 +#: ../thunar/thunar-chooser-dialog.c:613 #, c-format msgid "Open <i>%s</i> and other files of type \"%s\" with:" msgstr "Ouvrir <i>%s</i> et les autres fichiers de type \"%s\" avec :" -#: ../thunar/thunar-chooser-dialog.c:634 ../thunar-uca/thunar-uca-editor.c:491 +#: ../thunar/thunar-chooser-dialog.c:635 ../thunar-uca/thunar-uca-editor.c:491 msgid "Select an Application" msgstr "Sélectionner une application" -#: ../thunar/thunar-chooser-dialog.c:644 ../thunar-uca/thunar-uca-editor.c:501 +#: ../thunar/thunar-chooser-dialog.c:645 ../thunar-uca/thunar-uca-editor.c:501 #: ../thunar-uca/thunar-uca-editor.c:640 msgid "All Files" msgstr "Tous les fichiers" -#: ../thunar/thunar-chooser-dialog.c:649 ../thunar-uca/thunar-uca-editor.c:506 +#: ../thunar/thunar-chooser-dialog.c:650 ../thunar-uca/thunar-uca-editor.c:506 msgid "Executable Files" msgstr "Fichiers exécutables" -#: ../thunar/thunar-chooser-dialog.c:664 ../thunar-uca/thunar-uca-editor.c:521 +#: ../thunar/thunar-chooser-dialog.c:665 ../thunar-uca/thunar-uca-editor.c:521 msgid "Perl Scripts" msgstr "Scripts perl" -#: ../thunar/thunar-chooser-dialog.c:670 ../thunar-uca/thunar-uca-editor.c:527 +#: ../thunar/thunar-chooser-dialog.c:671 ../thunar-uca/thunar-uca-editor.c:527 msgid "Python Scripts" msgstr "Scripts python" -#: ../thunar/thunar-chooser-dialog.c:676 ../thunar-uca/thunar-uca-editor.c:533 +#: ../thunar/thunar-chooser-dialog.c:677 ../thunar-uca/thunar-uca-editor.c:533 msgid "Ruby Scripts" msgstr "Scripts ruby" -#: ../thunar/thunar-chooser-dialog.c:682 ../thunar-uca/thunar-uca-editor.c:539 +#: ../thunar/thunar-chooser-dialog.c:683 ../thunar-uca/thunar-uca-editor.c:539 msgid "Shell Scripts" msgstr "Scripts shell" @@ -507,7 +467,7 @@ msgstr "Nom" #. Permissions chooser #. #: ../thunar/thunar-details-view.c:197 -#: ../thunar/thunar-properties-dialog.c:382 +#: ../thunar/thunar-properties-dialog.c:374 msgid "Permissions" msgstr "Permissions" @@ -557,11 +517,11 @@ msgstr "Impossible d'exécuter le fichier `%s'" msgid "The root folder has no parent" msgstr "Le dossier racine n'a pas de père" -#: ../thunar/thunar-file.c:1032 +#: ../thunar/thunar-file.c:967 msgid "Filesystem" msgstr "Système de fichier" -#: ../thunar/thunar-file.c:1056 +#: ../thunar/thunar-file.c:991 msgid "Home" msgstr "Répertoire personnel" @@ -618,7 +578,7 @@ msgid "The file whose icon to render" msgstr "" #: ../thunar/thunar-icon-renderer.c:177 ../thunar/thunar-icon-renderer.c:178 -#: ../thunar/thunar-text-renderer.c:202 ../thunar/thunar-text-renderer.c:203 +#: ../thunar/thunar-text-renderer.c:203 ../thunar/thunar-text-renderer.c:204 msgid "Follow state" msgstr "" @@ -790,7 +750,7 @@ msgstr "Montrer cachés" msgid "Whether to display hidden files" msgstr "Montrer ou non les fichiers cachés" -#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641 +#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:629 msgid "broken link" msgstr "lien cassé" @@ -830,11 +790,11 @@ msgid_plural "%d items selected (%s)" msgstr[0] "%d élément sélectionné" msgstr[1] "%d éléments sélectionnés (%s)" -#: ../thunar/thunar-location-buttons.c:258 +#: ../thunar/thunar-location-buttons.c:257 msgid "Spacing" msgstr "Espace" -#: ../thunar/thunar-location-buttons.c:259 +#: ../thunar/thunar-location-buttons.c:258 msgid "The amount of space between the path buttons" msgstr "Quantité d'espace entre les boutons du chemin" @@ -876,117 +836,173 @@ msgstr "Le fichier actuellement affiché" msgid "The icon size for the path entry" msgstr "" -#: ../thunar/thunar-permissions-model.c:440 -#, fuzzy, c-format -msgid "%s (%s)" -msgstr "\"%s\" (%s) %s" +#. 0000 +#: ../thunar/thunar-permissions-chooser.c:234 +msgid "None" +msgstr "" -#: ../thunar/thunar-permissions-model.c:447 -msgid "Unknown file owner" +#. 0002 +#: ../thunar/thunar-permissions-chooser.c:236 +msgid "Write only" msgstr "" -#: ../thunar/thunar-permissions-model.c:460 -msgid "Unknown file group" +#. 0004 +#: ../thunar/thunar-permissions-chooser.c:238 +msgid "Read only" msgstr "" -#: ../thunar/thunar-permissions-model.c:465 -msgid "All other users" +#. 0006 +#: ../thunar/thunar-permissions-chooser.c:240 +msgid "Read & Write" msgstr "" -#: ../thunar/thunar-permissions-model.c:474 -msgid "Read" +#: ../thunar/thunar-permissions-chooser.c:252 +msgid "Owner:" msgstr "" -#: ../thunar/thunar-permissions-model.c:478 -msgid "Write" +#: ../thunar/thunar-permissions-chooser.c:266 +msgid "Unknown" msgstr "" -#: ../thunar/thunar-permissions-model.c:482 +#: ../thunar/thunar-permissions-chooser.c:280 +#: ../thunar/thunar-permissions-chooser.c:335 #, fuzzy -msgid "List folder contents" -msgstr "Chargement du contenu du dossier..." +msgid "Access:" +msgstr "Accédé :" + +#: ../thunar/thunar-permissions-chooser.c:309 +msgid "Group:" +msgstr "" -#: ../thunar/thunar-permissions-model.c:482 +#: ../thunar/thunar-permissions-chooser.c:364 #, fuzzy -msgid "Execute" -msgstr "_Exécuter" +msgid "Others:" +msgstr "Autres _fichiers" -#. actions for the group item -#: ../thunar/thunar-permissions-model.c:884 -msgid "Change _Group..." +#: ../thunar/thunar-permissions-chooser.c:393 +msgid "Program:" msgstr "" -#. append the "Grant Permission" action -#: ../thunar/thunar-permissions-model.c:897 +#: ../thunar/thunar-permissions-chooser.c:399 +msgid "Allow this file to _run as a program" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:423 +msgid "" +"Allowing untrusted programs to run \n" +"presents a security risk to your system." +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:434 +msgid "Please wait..." +msgstr "" + +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:545 #, fuzzy -msgid "_Grant Permission" -msgstr "Permissions" +msgid "Failed to change group" +msgstr "Échec au changement de mode de `%s'" -#. append the "Deny Permission" action -#: ../thunar/thunar-permissions-model.c:906 +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:580 #, fuzzy -msgid "_Deny Permission" -msgstr "Permissions" +msgid "Failed to apply new permissions" +msgstr "Échec au changement de mode de `%s'" -#: ../thunar/thunar-permissions-view.c:213 -msgid "" -"For special permissions and for\n" -"advanced settings, click Advanced." +#. allocate the question dialog +#: ../thunar/thunar-permissions-chooser.c:619 +#: ../thunar/thunar-permissions-chooser.c:961 +#: ../thunar/thunar-progress-dialog.c:295 +msgid "Question" +msgstr "Question" + +#: ../thunar/thunar-permissions-chooser.c:642 +msgid "Apply recursively?" msgstr "" -#: ../thunar/thunar-permissions-view.c:222 -msgid "_Advanced..." +#: ../thunar/thunar-permissions-chooser.c:648 +msgid "" +"Do you want to apply your changes recursively to\n" +"all files and subfolder below the selected folder?" msgstr "" -#: ../thunar/thunar-permissions-view.c:223 -msgid "Click here for special permissions and for advanced settings." +#: ../thunar/thunar-permissions-chooser.c:653 +msgid "Do _not ask me again" msgstr "" -#: ../thunar/thunar-permissions-view.c:243 -msgid "" -"You are not the owner of this file, so\n" -"you cannot change these permissions." +#: ../thunar/thunar-permissions-chooser.c:851 +msgid "Unknown file owner" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:184 +#: ../thunar/thunar-permissions-chooser.c:990 +#: ../thunar/thunar-progress-dialog.c:321 +msgid "_Yes" +msgstr "_Oui" + +#: ../thunar/thunar-permissions-chooser.c:994 +#: ../thunar/thunar-progress-dialog.c:325 +msgid "Yes to _all" +msgstr "Oui pour _tout" + +#: ../thunar/thunar-permissions-chooser.c:998 +#: ../thunar/thunar-progress-dialog.c:329 +msgid "_No" +msgstr "_Non" + +#: ../thunar/thunar-permissions-chooser.c:1002 +#: ../thunar/thunar-progress-dialog.c:333 +msgid "_Cancel" +msgstr "_Annuler" + +#: ../thunar/thunar-preferences-dialog.c:186 msgid "File Manager Preferences" msgstr "Préférences du gestionnaire de fichier" -#: ../thunar/thunar-preferences-dialog.c:200 -msgid "<b>Default View</b>" +#. +#. Views +#. +#: ../thunar/thunar-preferences-dialog.c:203 +#, fuzzy +msgid "Views" +msgstr "_Voir" + +#: ../thunar/thunar-preferences-dialog.c:213 +#, fuzzy +msgid "Default View" msgstr "<b>Vue par défaut</b>" -#: ../thunar/thunar-preferences-dialog.c:211 +#: ../thunar/thunar-preferences-dialog.c:225 msgid "View _new folders using:" msgstr "Voir un _nouveau dossier en utilisant :" -#: ../thunar/thunar-preferences-dialog.c:216 +#: ../thunar/thunar-preferences-dialog.c:230 +#: ../thunar/thunar-preferences-dialog.c:267 msgid "Icon View" msgstr "vue d'icônes" -#: ../thunar/thunar-preferences-dialog.c:217 +#: ../thunar/thunar-preferences-dialog.c:231 msgid "Detailed List View" msgstr "liste détaillée" -#: ../thunar/thunar-preferences-dialog.c:218 +#: ../thunar/thunar-preferences-dialog.c:232 msgid "Last Active View" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:233 +#: ../thunar/thunar-preferences-dialog.c:249 msgid "Sort _folders before files" msgstr "Trier les _dossiers avant les fichiers" -#: ../thunar/thunar-preferences-dialog.c:235 +#: ../thunar/thunar-preferences-dialog.c:251 msgid "Select this option to list folders before files when you sort a folder." msgstr "" "Sélectionner cette option pour lister les dossiers avant les fichiers quand " "vous trier un dossier." -#: ../thunar/thunar-preferences-dialog.c:239 +#: ../thunar/thunar-preferences-dialog.c:255 msgid "Show hidden and _backup files" msgstr "Montrer les fichiers _cachés et de sauvegardes" -#: ../thunar/thunar-preferences-dialog.c:241 +#: ../thunar/thunar-preferences-dialog.c:257 msgid "" "Select this option to show hidden and backup files in new windows. The first " "character in a hidden filename is a period (.). The last character in a " @@ -996,15 +1012,11 @@ msgstr "" "dans une nouvelle fenêtre. Le premier caractère d'un fichier caché est un " "point (.). Le dernier caractère d'un fichier de sauvegarde est un tilde (~)." -#: ../thunar/thunar-preferences-dialog.c:251 -msgid "<b>Icon View</b>" -msgstr "<b>Vue d'icônes</b>" - -#: ../thunar/thunar-preferences-dialog.c:262 +#: ../thunar/thunar-preferences-dialog.c:279 msgid "_Text beside icons" msgstr "_Texte à côté des icônes" -#: ../thunar/thunar-preferences-dialog.c:264 +#: ../thunar/thunar-preferences-dialog.c:281 msgid "" "Select this option to place the icon captions for items beside the icon " "rather than below the icon." @@ -1012,126 +1024,133 @@ msgstr "" "Sélectionner cette option pour placer la légende des éléments à côté de " "l'icône au lieu d'en dessous." -#: ../thunar/thunar-preferences.c:255 +#. +#. Advanced +#. +#: ../thunar/thunar-preferences-dialog.c:290 +msgid "Advanced" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:300 +msgid "Miscellaneous" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:312 +msgid "Apply permissions _recursively:" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:317 +msgid "Ask everytime" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:318 +msgid "Always" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:319 +msgid "Never" +msgstr "" + +#: ../thunar/thunar-preferences.c:272 #, c-format msgid "Failed to create the Thunar configuration directory in %s" msgstr "" "Échec dans la création du répertoire de configuration de Thunar dans %s" -#: ../thunar/thunar-preferences.c:263 +#: ../thunar/thunar-preferences.c:280 #, c-format msgid "Failed to open preferences database in %s: %s" msgstr "" -#: ../thunar/thunar-progress-dialog.c:150 +#: ../thunar/thunar-progress-dialog.c:151 msgid "Job" msgstr "" -#: ../thunar/thunar-progress-dialog.c:151 +#: ../thunar/thunar-progress-dialog.c:152 msgid "The job whose progress to display" msgstr "" -#: ../thunar/thunar-progress-dialog.c:303 -msgid "Question" -msgstr "Question" - -#: ../thunar/thunar-progress-dialog.c:329 -msgid "_Yes" -msgstr "_Oui" - -#: ../thunar/thunar-progress-dialog.c:333 -msgid "Yes to _all" -msgstr "Oui pour _tout" - -#: ../thunar/thunar-progress-dialog.c:337 -msgid "_No" -msgstr "_Non" - -#: ../thunar/thunar-progress-dialog.c:341 -msgid "_Cancel" -msgstr "_Annuler" - -#: ../thunar/thunar-progress-dialog.c:467 +#: ../thunar/thunar-progress-dialog.c:459 #, c-format msgid "(%lu hour remaining)" msgid_plural "(%lu hours remaining)" msgstr[0] "(%lu houre restante)" msgstr[1] "(%lu heures restantes)" -#: ../thunar/thunar-progress-dialog.c:472 +#: ../thunar/thunar-progress-dialog.c:464 #, c-format msgid "(%lu minute remaining)" msgid_plural "(%lu minutes remaining)" msgstr[0] "(%lu minute restante)" msgstr[1] "(%lu minutes restantes)" -#: ../thunar/thunar-progress-dialog.c:477 +#: ../thunar/thunar-progress-dialog.c:469 #, c-format msgid "(%lu second remaining)" msgid_plural "(%lu seconds remaining)" msgstr[0] "(%lu seconde restante)" msgstr[1] "(%lu secondes restantes)" -#: ../thunar/thunar-properties-dialog.c:173 +#: ../thunar/thunar-properties-dialog.c:174 msgid "The file displayed by the dialog" msgstr "La fichier affiché par la fenêtre de dialogue" -#: ../thunar/thunar-properties-dialog.c:220 +#: ../thunar/thunar-properties-dialog.c:212 msgid "General" msgstr "Général" -#: ../thunar/thunar-properties-dialog.c:237 +#: ../thunar/thunar-properties-dialog.c:229 msgid "Name:" msgstr "Nom :" #. #. Second box (kind) #. -#: ../thunar/thunar-properties-dialog.c:262 +#: ../thunar/thunar-properties-dialog.c:254 msgid "Kind:" msgstr "Type :" #. #. Third box (modified, accessed) #. -#: ../thunar/thunar-properties-dialog.c:287 +#: ../thunar/thunar-properties-dialog.c:279 msgid "Modified:" msgstr "Modifié :" -#: ../thunar/thunar-properties-dialog.c:300 +#: ../thunar/thunar-properties-dialog.c:292 msgid "Accessed:" msgstr "Accédé :" #. #. Fourth box (volume, size) #. -#: ../thunar/thunar-properties-dialog.c:324 +#: ../thunar/thunar-properties-dialog.c:316 msgid "Volume:" msgstr "Volume :" -#: ../thunar/thunar-properties-dialog.c:347 +#: ../thunar/thunar-properties-dialog.c:339 msgid "Size:" msgstr "Taille :" #. #. Emblem chooser #. -#: ../thunar/thunar-properties-dialog.c:371 +#: ../thunar/thunar-properties-dialog.c:363 msgid "Emblems" msgstr "Emblèmes" -#: ../thunar/thunar-properties-dialog.c:618 +#: ../thunar/thunar-properties-dialog.c:606 #, c-format msgid "%s Info" msgstr "Info %s" -#: ../thunar/thunar-properties-dialog.c:699 +#: ../thunar/thunar-properties-dialog.c:687 #, c-format msgid "%s (%u Bytes)" msgstr "%s (%u octets)" #. display an error message -#: ../thunar/thunar-properties-dialog.c:745 +#: ../thunar/thunar-properties-dialog.c:733 #: ../thunar/thunar-standard-view.c:2170 #, c-format msgid "Failed to rename `%s'" @@ -1358,27 +1377,27 @@ msgstr "Texte de la barre de statut" msgid "The main text to be displayed in the statusbar" msgstr "Le texte principal à afficher dans la barre de statut" -#: ../thunar/thunar-text-renderer.c:215 +#: ../thunar/thunar-text-renderer.c:216 msgid "Text" msgstr "Texte" -#: ../thunar/thunar-text-renderer.c:216 +#: ../thunar/thunar-text-renderer.c:217 msgid "The text to render" msgstr "" -#: ../thunar/thunar-text-renderer.c:230 +#: ../thunar/thunar-text-renderer.c:231 msgid "Wrap mode" msgstr "Mode retour à la ligne" -#: ../thunar/thunar-text-renderer.c:231 +#: ../thunar/thunar-text-renderer.c:232 msgid "The wrap mode" msgstr "Le mode de retour à la ligne automatique" -#: ../thunar/thunar-text-renderer.c:246 +#: ../thunar/thunar-text-renderer.c:247 msgid "Wrap width" msgstr "Largeur de retour à la ligne" -#: ../thunar/thunar-text-renderer.c:247 +#: ../thunar/thunar-text-renderer.c:248 msgid "The wrap width" msgstr "La largeur pour le retour à la ligne automatique" @@ -1884,3 +1903,34 @@ msgstr "Gestionnaire de fichier" #: ../Thunar.desktop.in.h:3 msgid "Thunar File Manager" msgstr "Gestionnaire de Fichier Thunar" + +#, fuzzy +#~ msgid "Advanced Permissions" +#~ msgstr "Permissions" + +#, fuzzy +#~ msgid "Failed to change the group to which `%s' belongs" +#~ msgstr "Échec au changement de mode de `%s'" + +#, fuzzy +#~ msgid "%s (%s)" +#~ msgstr "\"%s\" (%s) %s" + +#, fuzzy +#~ msgid "List folder contents" +#~ msgstr "Chargement du contenu du dossier..." + +#, fuzzy +#~ msgid "Execute" +#~ msgstr "_Exécuter" + +#, fuzzy +#~ msgid "_Grant Permission" +#~ msgstr "Permissions" + +#, fuzzy +#~ msgid "_Deny Permission" +#~ msgstr "Permissions" + +#~ msgid "<b>Icon View</b>" +#~ msgstr "<b>Vue d'icônes</b>" diff --git a/po/hu.po b/po/hu.po index 6874fb7be..697ddd721 100644 --- a/po/hu.po +++ b/po/hu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Thunar 0.1.4svn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-01-04 18:34+0100\n" +"POT-Creation-Date: 2006-01-08 22:45+0100\n" "PO-Revision-Date: 2005-10-06 22:02+0900\n" "Last-Translator: SZERVÃC Attila <sas@321.hu>\n" "Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n" @@ -15,24 +15,68 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../thunar-vfs/thunar-vfs-info.c:362 +#: ../thunar-vfs/thunar-vfs-chmod-job.c:168 +#: ../thunar-vfs/thunar-vfs-chown-job.c:166 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 +msgid "Collecting files..." +msgstr "Fájlok gyűjtése..." + +#. ask the user whether we should skip the file +#. ask the user whether to skip this file (used for cancellation only) +#. ask the user whether to skip +#: ../thunar-vfs/thunar-vfs-chmod-job.c:189 +#: ../thunar-vfs/thunar-vfs-chown-job.c:187 +#: ../thunar-vfs/thunar-vfs-link-job.c:212 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 +#, fuzzy, c-format +msgid "" +"%s.\n" +"\n" +"Do you want to skip it?" +msgstr "" +"\n" +"\n" +"Kihagyod?" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:246 +#: ../thunar-vfs/thunar-vfs-chown-job.c:244 +#, fuzzy, c-format +msgid "Failed to determine file info of `%s': %s" +msgstr "Nem sikerült meghatározni a szülÅ‘ URI-t ehhez: %s" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:272 +#, fuzzy, c-format +msgid "Failed to change permissions of `%s': %s" +msgstr "Nem törölhetÅ‘: %s" + +#: ../thunar-vfs/thunar-vfs-chown-job.c:260 +#, fuzzy, c-format +msgid "Failed to change file owner of `%s': %s" +msgstr "Nem törölhetÅ‘: %s" + +#: ../thunar-vfs/thunar-vfs-chown-job.c:262 +#, fuzzy, c-format +msgid "Failed to change file group of `%s': %s" +msgstr "Nem törölhetÅ‘: %s" + +#: ../thunar-vfs/thunar-vfs-info.c:261 msgid "No Exec field specified" msgstr "" -#: ../thunar-vfs/thunar-vfs-info.c:370 +#: ../thunar-vfs/thunar-vfs-info.c:269 #, fuzzy msgid "Unable to parse file" msgstr "Nem nyitható meg e fájl: %s" -#: ../thunar-vfs/thunar-vfs-info.c:460 +#: ../thunar-vfs/thunar-vfs-info.c:359 msgid "Invalid file name" msgstr "" -#: ../thunar-vfs/thunar-vfs-info.c:482 +#: ../thunar-vfs/thunar-vfs-info.c:381 msgid "Invalid desktop file" msgstr "" -#: ../thunar-vfs/thunar-vfs-info.c:716 +#: ../thunar-vfs/thunar-vfs-info.c:615 #, fuzzy, c-format msgid "Failed to stat file `%s': %s" msgstr "Nem törölhetÅ‘: %s" @@ -56,20 +100,6 @@ msgstr "" msgid "Failed to remove `%s': %s" msgstr "Nem törölhetÅ‘: %s" -#. ask the user whether to skip this file (used for cancellation only) -#. ask the user whether to skip -#: ../thunar-vfs/thunar-vfs-link-job.c:212 -#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 -#, fuzzy, c-format -msgid "" -"%s.\n" -"\n" -"Do you want to skip it?" -msgstr "" -"\n" -"\n" -"Kihagyod?" - #: ../thunar-vfs/thunar-vfs-mime-database.c:1657 #, c-format msgid "Failed to load application from file %s" @@ -101,10 +131,6 @@ msgstr "Méret" msgid "The desired thumbnail size" msgstr "" -#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 -msgid "Collecting files..." -msgstr "Fájlok gyűjtése..." - #. display info message #: ../thunar-vfs/thunar-vfs-transfer-job.c:329 #, fuzzy @@ -148,7 +174,7 @@ msgid "copy of %s" msgstr "" #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703 -#: ../thunar/thunar-properties-dialog.c:643 +#: ../thunar/thunar-properties-dialog.c:631 #, c-format msgid "link to %s" msgstr "" @@ -264,58 +290,6 @@ msgstr "Nem hozható létre e szimlink: %s" msgid "Thunar" msgstr "Thunar" -#: ../thunar/thunar-advanced-permissions-dialog.c:159 -#, fuzzy -msgid "Advanced Permissions" -msgstr "Jogok" - -#: ../thunar/thunar-advanced-permissions-dialog.c:167 -msgid "Special Bits" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:180 -msgid "Set _User ID (SUID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:190 -msgid "" -"An executable file whose Set User ID (SUID) bit is\n" -"set will always be executed with the privileges of\n" -"the owner of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:211 -msgid "Set _Group ID (SGID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:221 -msgid "" -"An executable file whose Set Group ID (SGID) bit is\n" -"set will always be executed with the privileges of the\n" -"group of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:242 -msgid "_Sticky" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:252 -msgid "" -"A file in a sticky directory may only be removed or\n" -"renamed by a user if the user has write permission\n" -"for the directory and the user is the owner of the\n" -"file, the owner of the directory or the superuser." -msgstr "" - -#. display an error message to the user -#. display an error to the user (when we get here, we definitely have a valid file!) -#: ../thunar/thunar-advanced-permissions-dialog.c:356 -#: ../thunar/thunar-permissions-model.c:830 -#: ../thunar/thunar-permissions-view.c:494 -#, fuzzy, c-format -msgid "Failed to change permissions of `%s'" -msgstr "Nem törölhetÅ‘: %s" - #. display an error message to the user #: ../thunar/thunar-application.c:222 #, fuzzy @@ -344,25 +318,11 @@ msgstr "Fájlok gyűjtése..." msgid "Creating directories..." msgstr "Jelenlegi könyvtár" -#: ../thunar/thunar-change-group-dialog.c:193 -msgid "Change Group" -msgstr "" - -#: ../thunar/thunar-change-group-dialog.c:200 -msgid "_Group:" -msgstr "" - -#. display an error message -#: ../thunar/thunar-change-group-dialog.c:309 -#, fuzzy, c-format -msgid "Failed to change the group to which `%s' belongs" -msgstr "Nem törölhetÅ‘: %s" - #: ../thunar/thunar-chooser-dialog.c:169 ../thunar/thunar-emblem-chooser.c:147 #: ../thunar/thunar-emblem-chooser.c:148 ../thunar/thunar-icon-renderer.c:161 #: ../thunar/thunar-open-with-action.c:146 #: ../thunar/thunar-open-with-action.c:147 -#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190 +#: ../thunar/thunar-properties-dialog.c:173 ../thunar/thunar-statusbar.c:190 msgid "File" msgstr "Fájl" @@ -413,40 +373,40 @@ msgid "Failed to execute `%s'" msgstr "Nem törölhetÅ‘: %s" #. update the header label -#: ../thunar/thunar-chooser-dialog.c:612 +#: ../thunar/thunar-chooser-dialog.c:613 #, c-format msgid "Open <i>%s</i> and other files of type \"%s\" with:" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:634 ../thunar-uca/thunar-uca-editor.c:491 +#: ../thunar/thunar-chooser-dialog.c:635 ../thunar-uca/thunar-uca-editor.c:491 #, fuzzy msgid "Select an Application" msgstr "_Hely megnyitása..." -#: ../thunar/thunar-chooser-dialog.c:644 ../thunar-uca/thunar-uca-editor.c:501 +#: ../thunar/thunar-chooser-dialog.c:645 ../thunar-uca/thunar-uca-editor.c:501 #: ../thunar-uca/thunar-uca-editor.c:640 #, fuzzy msgid "All Files" msgstr "Fájlok" -#: ../thunar/thunar-chooser-dialog.c:649 ../thunar-uca/thunar-uca-editor.c:506 +#: ../thunar/thunar-chooser-dialog.c:650 ../thunar-uca/thunar-uca-editor.c:506 #, fuzzy msgid "Executable Files" msgstr "Minden fájl kiválasztása" -#: ../thunar/thunar-chooser-dialog.c:664 ../thunar-uca/thunar-uca-editor.c:521 +#: ../thunar/thunar-chooser-dialog.c:665 ../thunar-uca/thunar-uca-editor.c:521 msgid "Perl Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:670 ../thunar-uca/thunar-uca-editor.c:527 +#: ../thunar/thunar-chooser-dialog.c:671 ../thunar-uca/thunar-uca-editor.c:527 msgid "Python Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:676 ../thunar-uca/thunar-uca-editor.c:533 +#: ../thunar/thunar-chooser-dialog.c:677 ../thunar-uca/thunar-uca-editor.c:533 msgid "Ruby Scripts" msgstr "" -#: ../thunar/thunar-chooser-dialog.c:682 ../thunar-uca/thunar-uca-editor.c:539 +#: ../thunar/thunar-chooser-dialog.c:683 ../thunar-uca/thunar-uca-editor.c:539 msgid "Shell Scripts" msgstr "" @@ -519,7 +479,7 @@ msgstr "Név" #. Permissions chooser #. #: ../thunar/thunar-details-view.c:197 -#: ../thunar/thunar-properties-dialog.c:382 +#: ../thunar/thunar-properties-dialog.c:374 msgid "Permissions" msgstr "Jogok" @@ -570,11 +530,11 @@ msgstr "Nem lehet másolni a fájlt: %s" msgid "The root folder has no parent" msgstr "" -#: ../thunar/thunar-file.c:1032 +#: ../thunar/thunar-file.c:967 msgid "Filesystem" msgstr "Fájlrendszer" -#: ../thunar/thunar-file.c:1056 +#: ../thunar/thunar-file.c:991 msgid "Home" msgstr "Saját könyvtár" @@ -632,7 +592,7 @@ msgid "The file whose icon to render" msgstr "A kirajzolandó ikon" #: ../thunar/thunar-icon-renderer.c:177 ../thunar/thunar-icon-renderer.c:178 -#: ../thunar/thunar-text-renderer.c:202 ../thunar/thunar-text-renderer.c:203 +#: ../thunar/thunar-text-renderer.c:203 ../thunar/thunar-text-renderer.c:204 msgid "Follow state" msgstr "" @@ -806,7 +766,7 @@ msgstr "Rejtettek mutatása" msgid "Whether to display hidden files" msgstr "Mutassuk-e a rejtett fájlokat" -#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641 +#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:629 msgid "broken link" msgstr "" @@ -846,11 +806,11 @@ msgid_plural "%d items selected (%s)" msgstr[0] "%d elem kijelölve" msgstr[1] "%d elem kijelölve" -#: ../thunar/thunar-location-buttons.c:258 +#: ../thunar/thunar-location-buttons.c:257 msgid "Spacing" msgstr "Távolság" -#: ../thunar/thunar-location-buttons.c:259 +#: ../thunar/thunar-location-buttons.c:258 msgid "The amount of space between the path buttons" msgstr "Ösvénygombok közti táv" @@ -893,259 +853,317 @@ msgstr "A most megjelenÃtett fájl" msgid "The icon size for the path entry" msgstr "Az ösvényelem ikonmérete" -#: ../thunar/thunar-permissions-model.c:440 -#, fuzzy, c-format -msgid "%s (%s)" -msgstr "\"%s\" (%s) %s" +#. 0000 +#: ../thunar/thunar-permissions-chooser.c:234 +msgid "None" +msgstr "" -#: ../thunar/thunar-permissions-model.c:447 -msgid "Unknown file owner" +#. 0002 +#: ../thunar/thunar-permissions-chooser.c:236 +msgid "Write only" msgstr "" -#: ../thunar/thunar-permissions-model.c:460 -msgid "Unknown file group" +#. 0004 +#: ../thunar/thunar-permissions-chooser.c:238 +msgid "Read only" msgstr "" -#: ../thunar/thunar-permissions-model.c:465 -msgid "All other users" +#. 0006 +#: ../thunar/thunar-permissions-chooser.c:240 +msgid "Read & Write" msgstr "" -#: ../thunar/thunar-permissions-model.c:474 -msgid "Read" +#: ../thunar/thunar-permissions-chooser.c:252 +msgid "Owner:" msgstr "" -#: ../thunar/thunar-permissions-model.c:478 -msgid "Write" +#: ../thunar/thunar-permissions-chooser.c:266 +msgid "Unknown" msgstr "" -#: ../thunar/thunar-permissions-model.c:482 +#: ../thunar/thunar-permissions-chooser.c:280 +#: ../thunar/thunar-permissions-chooser.c:335 #, fuzzy -msgid "List folder contents" -msgstr "Mappa beolvasása..." +msgid "Access:" +msgstr "Megnyitva:" -#: ../thunar/thunar-permissions-model.c:482 +#: ../thunar/thunar-permissions-chooser.c:309 +msgid "Group:" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:364 #, fuzzy -msgid "Execute" -msgstr "Minden fájl kiválasztása" +msgid "Others:" +msgstr "Fájlok beillesztése" + +#: ../thunar/thunar-permissions-chooser.c:393 +msgid "Program:" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:399 +msgid "Allow this file to _run as a program" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:423 +msgid "" +"Allowing untrusted programs to run \n" +"presents a security risk to your system." +msgstr "" -#. actions for the group item -#: ../thunar/thunar-permissions-model.c:884 -msgid "Change _Group..." +#: ../thunar/thunar-permissions-chooser.c:434 +msgid "Please wait..." msgstr "" -#. append the "Grant Permission" action -#: ../thunar/thunar-permissions-model.c:897 +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:545 #, fuzzy -msgid "_Grant Permission" -msgstr "Jogok" +msgid "Failed to change group" +msgstr "Nem törölhetÅ‘: %s" -#. append the "Deny Permission" action -#: ../thunar/thunar-permissions-model.c:906 +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:580 #, fuzzy -msgid "_Deny Permission" -msgstr "Jogok" +msgid "Failed to apply new permissions" +msgstr "Nem törölhetÅ‘: %s" -#: ../thunar/thunar-permissions-view.c:213 -msgid "" -"For special permissions and for\n" -"advanced settings, click Advanced." +#. allocate the question dialog +#: ../thunar/thunar-permissions-chooser.c:619 +#: ../thunar/thunar-permissions-chooser.c:961 +#: ../thunar/thunar-progress-dialog.c:295 +msgid "Question" +msgstr "Kérdés" + +#: ../thunar/thunar-permissions-chooser.c:642 +msgid "Apply recursively?" msgstr "" -#: ../thunar/thunar-permissions-view.c:222 -msgid "_Advanced..." +#: ../thunar/thunar-permissions-chooser.c:648 +msgid "" +"Do you want to apply your changes recursively to\n" +"all files and subfolder below the selected folder?" msgstr "" -#: ../thunar/thunar-permissions-view.c:223 -msgid "Click here for special permissions and for advanced settings." +#: ../thunar/thunar-permissions-chooser.c:653 +msgid "Do _not ask me again" msgstr "" -#: ../thunar/thunar-permissions-view.c:243 -msgid "" -"You are not the owner of this file, so\n" -"you cannot change these permissions." +#: ../thunar/thunar-permissions-chooser.c:851 +msgid "Unknown file owner" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:184 +#: ../thunar/thunar-permissions-chooser.c:990 +#: ../thunar/thunar-progress-dialog.c:321 +msgid "_Yes" +msgstr "_Igen" + +#: ../thunar/thunar-permissions-chooser.c:994 +#: ../thunar/thunar-progress-dialog.c:325 +msgid "Yes to _all" +msgstr "_Mind" + +#: ../thunar/thunar-permissions-chooser.c:998 +#: ../thunar/thunar-progress-dialog.c:329 +msgid "_No" +msgstr "_Nem" + +#: ../thunar/thunar-permissions-chooser.c:1002 +#: ../thunar/thunar-progress-dialog.c:333 +msgid "_Cancel" +msgstr "_Csendet!" + +#: ../thunar/thunar-preferences-dialog.c:186 #, fuzzy msgid "File Manager Preferences" msgstr "FájlkezelÅ‘" -#: ../thunar/thunar-preferences-dialog.c:200 -msgid "<b>Default View</b>" -msgstr "" +#. +#. Views +#. +#: ../thunar/thunar-preferences-dialog.c:203 +#, fuzzy +msgid "Views" +msgstr "_Nézet" + +#: ../thunar/thunar-preferences-dialog.c:213 +#, fuzzy +msgid "Default View" +msgstr "Részletes nézet" -#: ../thunar/thunar-preferences-dialog.c:211 +#: ../thunar/thunar-preferences-dialog.c:225 msgid "View _new folders using:" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:216 +#: ../thunar/thunar-preferences-dialog.c:230 +#: ../thunar/thunar-preferences-dialog.c:267 #, fuzzy msgid "Icon View" msgstr "Ikonnézet" -#: ../thunar/thunar-preferences-dialog.c:217 +#: ../thunar/thunar-preferences-dialog.c:231 #, fuzzy msgid "Detailed List View" msgstr "Részletes nézet" -#: ../thunar/thunar-preferences-dialog.c:218 +#: ../thunar/thunar-preferences-dialog.c:232 msgid "Last Active View" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:233 +#: ../thunar/thunar-preferences-dialog.c:249 msgid "Sort _folders before files" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:235 +#: ../thunar/thunar-preferences-dialog.c:251 msgid "Select this option to list folders before files when you sort a folder." msgstr "" -#: ../thunar/thunar-preferences-dialog.c:239 +#: ../thunar/thunar-preferences-dialog.c:255 #, fuzzy msgid "Show hidden and _backup files" msgstr "Rejtett fájlok mutatása" -#: ../thunar/thunar-preferences-dialog.c:241 +#: ../thunar/thunar-preferences-dialog.c:257 msgid "" "Select this option to show hidden and backup files in new windows. The first " "character in a hidden filename is a period (.). The last character in a " "backup filename is a tilde (~)." msgstr "" -#: ../thunar/thunar-preferences-dialog.c:251 -#, fuzzy -msgid "<b>Icon View</b>" -msgstr "Ikonnézet" - -#: ../thunar/thunar-preferences-dialog.c:262 +#: ../thunar/thunar-preferences-dialog.c:279 msgid "_Text beside icons" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:264 +#: ../thunar/thunar-preferences-dialog.c:281 msgid "" "Select this option to place the icon captions for items beside the icon " "rather than below the icon." msgstr "" -#: ../thunar/thunar-preferences.c:255 +#. +#. Advanced +#. +#: ../thunar/thunar-preferences-dialog.c:290 +msgid "Advanced" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:300 +msgid "Miscellaneous" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:312 +msgid "Apply permissions _recursively:" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:317 +msgid "Ask everytime" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:318 +msgid "Always" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:319 +msgid "Never" +msgstr "" + +#: ../thunar/thunar-preferences.c:272 #, fuzzy, c-format msgid "Failed to create the Thunar configuration directory in %s" msgstr "Nem hozható létre ez a könyvtár: %s" -#: ../thunar/thunar-preferences.c:263 +#: ../thunar/thunar-preferences.c:280 #, fuzzy, c-format msgid "Failed to open preferences database in %s: %s" msgstr "Nem törölhetÅ‘: %s" -#: ../thunar/thunar-progress-dialog.c:150 +#: ../thunar/thunar-progress-dialog.c:151 msgid "Job" msgstr "" -#: ../thunar/thunar-progress-dialog.c:151 +#: ../thunar/thunar-progress-dialog.c:152 msgid "The job whose progress to display" msgstr "" -#: ../thunar/thunar-progress-dialog.c:303 -msgid "Question" -msgstr "Kérdés" - -#: ../thunar/thunar-progress-dialog.c:329 -msgid "_Yes" -msgstr "_Igen" - -#: ../thunar/thunar-progress-dialog.c:333 -msgid "Yes to _all" -msgstr "_Mind" - -#: ../thunar/thunar-progress-dialog.c:337 -msgid "_No" -msgstr "_Nem" - -#: ../thunar/thunar-progress-dialog.c:341 -msgid "_Cancel" -msgstr "_Csendet!" - -#: ../thunar/thunar-progress-dialog.c:467 +#: ../thunar/thunar-progress-dialog.c:459 #, c-format msgid "(%lu hour remaining)" msgid_plural "(%lu hours remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-progress-dialog.c:472 +#: ../thunar/thunar-progress-dialog.c:464 #, c-format msgid "(%lu minute remaining)" msgid_plural "(%lu minutes remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-progress-dialog.c:477 +#: ../thunar/thunar-progress-dialog.c:469 #, c-format msgid "(%lu second remaining)" msgid_plural "(%lu seconds remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-properties-dialog.c:173 +#: ../thunar/thunar-properties-dialog.c:174 msgid "The file displayed by the dialog" msgstr "" -#: ../thunar/thunar-properties-dialog.c:220 +#: ../thunar/thunar-properties-dialog.c:212 msgid "General" msgstr "Ãltalános" -#: ../thunar/thunar-properties-dialog.c:237 +#: ../thunar/thunar-properties-dialog.c:229 msgid "Name:" msgstr "Név" #. #. Second box (kind) #. -#: ../thunar/thunar-properties-dialog.c:262 +#: ../thunar/thunar-properties-dialog.c:254 msgid "Kind:" msgstr "TÃpus:" #. #. Third box (modified, accessed) #. -#: ../thunar/thunar-properties-dialog.c:287 +#: ../thunar/thunar-properties-dialog.c:279 msgid "Modified:" msgstr "MódosÃtva:" -#: ../thunar/thunar-properties-dialog.c:300 +#: ../thunar/thunar-properties-dialog.c:292 msgid "Accessed:" msgstr "Megnyitva:" #. #. Fourth box (volume, size) #. -#: ../thunar/thunar-properties-dialog.c:324 +#: ../thunar/thunar-properties-dialog.c:316 msgid "Volume:" msgstr "Kötet:" -#: ../thunar/thunar-properties-dialog.c:347 +#: ../thunar/thunar-properties-dialog.c:339 msgid "Size:" msgstr "Méret:" #. #. Emblem chooser #. -#: ../thunar/thunar-properties-dialog.c:371 +#: ../thunar/thunar-properties-dialog.c:363 msgid "Emblems" msgstr "" -#: ../thunar/thunar-properties-dialog.c:618 +#: ../thunar/thunar-properties-dialog.c:606 #, c-format msgid "%s Info" msgstr "%s Info" -#: ../thunar/thunar-properties-dialog.c:699 +#: ../thunar/thunar-properties-dialog.c:687 #, c-format msgid "%s (%u Bytes)" msgstr "%s (%u bájt)" #. display an error message -#: ../thunar/thunar-properties-dialog.c:745 +#: ../thunar/thunar-properties-dialog.c:733 #: ../thunar/thunar-standard-view.c:2170 #, fuzzy, c-format msgid "Failed to rename `%s'" @@ -1388,28 +1406,28 @@ msgstr "Ãllapotsor szöveg" msgid "The main text to be displayed in the statusbar" msgstr "Az állapotsor fÅ‘ szövege" -#: ../thunar/thunar-text-renderer.c:215 +#: ../thunar/thunar-text-renderer.c:216 msgid "Text" msgstr "Szöveg" -#: ../thunar/thunar-text-renderer.c:216 +#: ../thunar/thunar-text-renderer.c:217 msgid "The text to render" msgstr "A kiÃrandó szöveg" -#: ../thunar/thunar-text-renderer.c:230 +#: ../thunar/thunar-text-renderer.c:231 msgid "Wrap mode" msgstr "" -#: ../thunar/thunar-text-renderer.c:231 +#: ../thunar/thunar-text-renderer.c:232 #, fuzzy msgid "The wrap mode" msgstr "A tároló mappák" -#: ../thunar/thunar-text-renderer.c:246 +#: ../thunar/thunar-text-renderer.c:247 msgid "Wrap width" msgstr "" -#: ../thunar/thunar-text-renderer.c:247 +#: ../thunar/thunar-text-renderer.c:248 msgid "The wrap width" msgstr "" @@ -1907,3 +1925,35 @@ msgstr "FájlkezelÅ‘" #, fuzzy msgid "Thunar File Manager" msgstr "FájlkezelÅ‘" + +#, fuzzy +#~ msgid "Advanced Permissions" +#~ msgstr "Jogok" + +#, fuzzy +#~ msgid "Failed to change the group to which `%s' belongs" +#~ msgstr "Nem törölhetÅ‘: %s" + +#, fuzzy +#~ msgid "%s (%s)" +#~ msgstr "\"%s\" (%s) %s" + +#, fuzzy +#~ msgid "List folder contents" +#~ msgstr "Mappa beolvasása..." + +#, fuzzy +#~ msgid "Execute" +#~ msgstr "Minden fájl kiválasztása" + +#, fuzzy +#~ msgid "_Grant Permission" +#~ msgstr "Jogok" + +#, fuzzy +#~ msgid "_Deny Permission" +#~ msgstr "Jogok" + +#, fuzzy +#~ msgid "<b>Icon View</b>" +#~ msgstr "Ikonnézet" diff --git a/po/it.po b/po/it.po index c30655538..12ff0ca56 100644 --- a/po/it.po +++ b/po/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Thunar 0.1.4svn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-01-04 18:34+0100\n" +"POT-Creation-Date: 2006-01-08 22:45+0100\n" "PO-Revision-Date: 2005-12-22 05:26+0100\n" "Last-Translator: Roberto Pariset <r.pariset@gmail.com>\n" "Language-Team: GUFI <traduzioni@gufi.org>\n" @@ -19,23 +19,67 @@ msgstr "" "X-Poedit-Country: ITALY\n" "X-Poedit-SourceCharset: utf-8\n" -#: ../thunar-vfs/thunar-vfs-info.c:362 +#: ../thunar-vfs/thunar-vfs-chmod-job.c:168 +#: ../thunar-vfs/thunar-vfs-chown-job.c:166 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 +msgid "Collecting files..." +msgstr "Raccolta file in corso..." + +#. ask the user whether we should skip the file +#. ask the user whether to skip this file (used for cancellation only) +#. ask the user whether to skip +#: ../thunar-vfs/thunar-vfs-chmod-job.c:189 +#: ../thunar-vfs/thunar-vfs-chown-job.c:187 +#: ../thunar-vfs/thunar-vfs-link-job.c:212 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 +#, c-format +msgid "" +"%s.\n" +"\n" +"Do you want to skip it?" +msgstr "" +"%s. \n" +"\n" +"Si desidera saltarlo?" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:246 +#: ../thunar-vfs/thunar-vfs-chown-job.c:244 +#, fuzzy, c-format +msgid "Failed to determine file info of `%s': %s" +msgstr "Impossibile reperire informazioni per il file `%s'" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:272 +#, fuzzy, c-format +msgid "Failed to change permissions of `%s': %s" +msgstr "Impossibile cambiare modalità di `%s'" + +#: ../thunar-vfs/thunar-vfs-chown-job.c:260 +#, fuzzy, c-format +msgid "Failed to change file owner of `%s': %s" +msgstr "Impossibile cambiare modalità di `%s'" + +#: ../thunar-vfs/thunar-vfs-chown-job.c:262 +#, fuzzy, c-format +msgid "Failed to change file group of `%s': %s" +msgstr "Impossibile cambiare modalità di `%s'" + +#: ../thunar-vfs/thunar-vfs-info.c:261 msgid "No Exec field specified" msgstr "Campo Exec non specificato" -#: ../thunar-vfs/thunar-vfs-info.c:370 +#: ../thunar-vfs/thunar-vfs-info.c:269 msgid "Unable to parse file" msgstr "Impossibile fare il parsing del file" -#: ../thunar-vfs/thunar-vfs-info.c:460 +#: ../thunar-vfs/thunar-vfs-info.c:359 msgid "Invalid file name" msgstr "Nome del file non valido" -#: ../thunar-vfs/thunar-vfs-info.c:482 +#: ../thunar-vfs/thunar-vfs-info.c:381 msgid "Invalid desktop file" msgstr "Desktop file non valido" -#: ../thunar-vfs/thunar-vfs-info.c:716 +#: ../thunar-vfs/thunar-vfs-info.c:615 #, c-format msgid "Failed to stat file `%s': %s" msgstr "Stat del file `%s' fallito: %s" @@ -59,20 +103,6 @@ msgstr "" msgid "Failed to remove `%s': %s" msgstr "Impossibile rimuovere `%s': %s" -#. ask the user whether to skip this file (used for cancellation only) -#. ask the user whether to skip -#: ../thunar-vfs/thunar-vfs-link-job.c:212 -#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 -#, c-format -msgid "" -"%s.\n" -"\n" -"Do you want to skip it?" -msgstr "" -"%s. \n" -"\n" -"Si desidera saltarlo?" - #: ../thunar-vfs/thunar-vfs-mime-database.c:1657 #, c-format msgid "Failed to load application from file %s" @@ -105,10 +135,6 @@ msgstr "Dimensione" msgid "The desired thumbnail size" msgstr "Dimensione desiderata della miniatura" -#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 -msgid "Collecting files..." -msgstr "Raccolta file in corso..." - #. display info message #: ../thunar-vfs/thunar-vfs-transfer-job.c:329 msgid "Deleting directories..." @@ -151,7 +177,7 @@ msgid "copy of %s" msgstr "" #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703 -#: ../thunar/thunar-properties-dialog.c:643 +#: ../thunar/thunar-properties-dialog.c:631 #, c-format msgid "link to %s" msgstr "" @@ -267,58 +293,6 @@ msgstr "Impossibile creare link simbolico `%s'" msgid "Thunar" msgstr "Thunar" -#: ../thunar/thunar-advanced-permissions-dialog.c:159 -#, fuzzy -msgid "Advanced Permissions" -msgstr "Permessi" - -#: ../thunar/thunar-advanced-permissions-dialog.c:167 -msgid "Special Bits" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:180 -msgid "Set _User ID (SUID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:190 -msgid "" -"An executable file whose Set User ID (SUID) bit is\n" -"set will always be executed with the privileges of\n" -"the owner of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:211 -msgid "Set _Group ID (SGID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:221 -msgid "" -"An executable file whose Set Group ID (SGID) bit is\n" -"set will always be executed with the privileges of the\n" -"group of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:242 -msgid "_Sticky" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:252 -msgid "" -"A file in a sticky directory may only be removed or\n" -"renamed by a user if the user has write permission\n" -"for the directory and the user is the owner of the\n" -"file, the owner of the directory or the superuser." -msgstr "" - -#. display an error message to the user -#. display an error to the user (when we get here, we definitely have a valid file!) -#: ../thunar/thunar-advanced-permissions-dialog.c:356 -#: ../thunar/thunar-permissions-model.c:830 -#: ../thunar/thunar-permissions-view.c:494 -#, fuzzy, c-format -msgid "Failed to change permissions of `%s'" -msgstr "Impossibile cambiare modalità di `%s'" - #. display an error message to the user #: ../thunar/thunar-application.c:222 msgid "Failed to launch operation" @@ -344,25 +318,11 @@ msgstr "Eliminazione dei file in corso..." msgid "Creating directories..." msgstr "Creazione directory in corso..." -#: ../thunar/thunar-change-group-dialog.c:193 -msgid "Change Group" -msgstr "" - -#: ../thunar/thunar-change-group-dialog.c:200 -msgid "_Group:" -msgstr "" - -#. display an error message -#: ../thunar/thunar-change-group-dialog.c:309 -#, fuzzy, c-format -msgid "Failed to change the group to which `%s' belongs" -msgstr "Impossibile cambiare modalità di `%s'" - #: ../thunar/thunar-chooser-dialog.c:169 ../thunar/thunar-emblem-chooser.c:147 #: ../thunar/thunar-emblem-chooser.c:148 ../thunar/thunar-icon-renderer.c:161 #: ../thunar/thunar-open-with-action.c:146 #: ../thunar/thunar-open-with-action.c:147 -#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190 +#: ../thunar/thunar-properties-dialog.c:173 ../thunar/thunar-statusbar.c:190 msgid "File" msgstr "File" @@ -414,37 +374,37 @@ msgid "Failed to execute `%s'" msgstr "Impossibile eseguire `%s'" #. update the header label -#: ../thunar/thunar-chooser-dialog.c:612 +#: ../thunar/thunar-chooser-dialog.c:613 #, c-format msgid "Open <i>%s</i> and other files of type \"%s\" with:" msgstr "Aprire <i>%s</i> e altri file di tipo \"%s\" con:" -#: ../thunar/thunar-chooser-dialog.c:634 ../thunar-uca/thunar-uca-editor.c:491 +#: ../thunar/thunar-chooser-dialog.c:635 ../thunar-uca/thunar-uca-editor.c:491 msgid "Select an Application" msgstr "Selezionare un'applicazione" -#: ../thunar/thunar-chooser-dialog.c:644 ../thunar-uca/thunar-uca-editor.c:501 +#: ../thunar/thunar-chooser-dialog.c:645 ../thunar-uca/thunar-uca-editor.c:501 #: ../thunar-uca/thunar-uca-editor.c:640 msgid "All Files" msgstr "Tutti i file" -#: ../thunar/thunar-chooser-dialog.c:649 ../thunar-uca/thunar-uca-editor.c:506 +#: ../thunar/thunar-chooser-dialog.c:650 ../thunar-uca/thunar-uca-editor.c:506 msgid "Executable Files" msgstr "File eseguibili" -#: ../thunar/thunar-chooser-dialog.c:664 ../thunar-uca/thunar-uca-editor.c:521 +#: ../thunar/thunar-chooser-dialog.c:665 ../thunar-uca/thunar-uca-editor.c:521 msgid "Perl Scripts" msgstr "Script Perl" -#: ../thunar/thunar-chooser-dialog.c:670 ../thunar-uca/thunar-uca-editor.c:527 +#: ../thunar/thunar-chooser-dialog.c:671 ../thunar-uca/thunar-uca-editor.c:527 msgid "Python Scripts" msgstr "Script Python" -#: ../thunar/thunar-chooser-dialog.c:676 ../thunar-uca/thunar-uca-editor.c:533 +#: ../thunar/thunar-chooser-dialog.c:677 ../thunar-uca/thunar-uca-editor.c:533 msgid "Ruby Scripts" msgstr "Script Ruby" -#: ../thunar/thunar-chooser-dialog.c:682 ../thunar-uca/thunar-uca-editor.c:539 +#: ../thunar/thunar-chooser-dialog.c:683 ../thunar-uca/thunar-uca-editor.c:539 msgid "Shell Scripts" msgstr "Script Shell" @@ -517,7 +477,7 @@ msgstr "Nome" #. Permissions chooser #. #: ../thunar/thunar-details-view.c:197 -#: ../thunar/thunar-properties-dialog.c:382 +#: ../thunar/thunar-properties-dialog.c:374 msgid "Permissions" msgstr "Permessi" @@ -568,11 +528,11 @@ msgstr "Impossibile eseguire il file `%s'" msgid "The root folder has no parent" msgstr "" -#: ../thunar/thunar-file.c:1032 +#: ../thunar/thunar-file.c:967 msgid "Filesystem" msgstr "Filesystem" -#: ../thunar/thunar-file.c:1056 +#: ../thunar/thunar-file.c:991 msgid "Home" msgstr "Home" @@ -629,7 +589,7 @@ msgid "The file whose icon to render" msgstr "" #: ../thunar/thunar-icon-renderer.c:177 ../thunar/thunar-icon-renderer.c:178 -#: ../thunar/thunar-text-renderer.c:202 ../thunar/thunar-text-renderer.c:203 +#: ../thunar/thunar-text-renderer.c:203 ../thunar/thunar-text-renderer.c:204 msgid "Follow state" msgstr "" @@ -804,7 +764,7 @@ msgstr "Mostra file nascosti" msgid "Whether to display hidden files" msgstr "Se mostrare file nascosti" -#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641 +#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:629 msgid "broken link" msgstr "" @@ -844,11 +804,11 @@ msgid_plural "%d items selected (%s)" msgstr[0] "%d elemento selezionato" msgstr[1] "%d elementi selezionati (%s)" -#: ../thunar/thunar-location-buttons.c:258 +#: ../thunar/thunar-location-buttons.c:257 msgid "Spacing" msgstr "" -#: ../thunar/thunar-location-buttons.c:259 +#: ../thunar/thunar-location-buttons.c:258 msgid "The amount of space between the path buttons" msgstr "Quantità di spazio tra i bottoni della path" @@ -892,255 +852,314 @@ msgstr "Il file visualizzato correntemente" msgid "The icon size for the path entry" msgstr "" -#: ../thunar/thunar-permissions-model.c:440 -#, fuzzy, c-format -msgid "%s (%s)" -msgstr "\"%s\" (%s) %s" +#. 0000 +#: ../thunar/thunar-permissions-chooser.c:234 +msgid "None" +msgstr "" -#: ../thunar/thunar-permissions-model.c:447 -msgid "Unknown file owner" +#. 0002 +#: ../thunar/thunar-permissions-chooser.c:236 +msgid "Write only" msgstr "" -#: ../thunar/thunar-permissions-model.c:460 -msgid "Unknown file group" +#. 0004 +#: ../thunar/thunar-permissions-chooser.c:238 +msgid "Read only" msgstr "" -#: ../thunar/thunar-permissions-model.c:465 -msgid "All other users" +#. 0006 +#: ../thunar/thunar-permissions-chooser.c:240 +msgid "Read & Write" msgstr "" -#: ../thunar/thunar-permissions-model.c:474 -msgid "Read" +#: ../thunar/thunar-permissions-chooser.c:252 +msgid "Owner:" msgstr "" -#: ../thunar/thunar-permissions-model.c:478 -msgid "Write" +#: ../thunar/thunar-permissions-chooser.c:266 +msgid "Unknown" msgstr "" -#: ../thunar/thunar-permissions-model.c:482 +#: ../thunar/thunar-permissions-chooser.c:280 +#: ../thunar/thunar-permissions-chooser.c:335 #, fuzzy -msgid "List folder contents" -msgstr "Caricamento dei contenuti della cartella in corso..." +msgid "Access:" +msgstr "Acceduto:" + +#: ../thunar/thunar-permissions-chooser.c:309 +msgid "Group:" +msgstr "" -#: ../thunar/thunar-permissions-model.c:482 +#: ../thunar/thunar-permissions-chooser.c:364 #, fuzzy -msgid "Execute" -msgstr "_Esegui" +msgid "Others:" +msgstr "Altri file" + +#: ../thunar/thunar-permissions-chooser.c:393 +msgid "Program:" +msgstr "" -#. actions for the group item -#: ../thunar/thunar-permissions-model.c:884 -msgid "Change _Group..." +#: ../thunar/thunar-permissions-chooser.c:399 +msgid "Allow this file to _run as a program" msgstr "" -#. append the "Grant Permission" action -#: ../thunar/thunar-permissions-model.c:897 +#: ../thunar/thunar-permissions-chooser.c:423 +msgid "" +"Allowing untrusted programs to run \n" +"presents a security risk to your system." +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:434 +msgid "Please wait..." +msgstr "" + +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:545 #, fuzzy -msgid "_Grant Permission" -msgstr "Permessi" +msgid "Failed to change group" +msgstr "Impossibile cambiare modalità di `%s'" -#. append the "Deny Permission" action -#: ../thunar/thunar-permissions-model.c:906 +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:580 #, fuzzy -msgid "_Deny Permission" -msgstr "Permessi" +msgid "Failed to apply new permissions" +msgstr "Impossibile cambiare modalità di `%s'" -#: ../thunar/thunar-permissions-view.c:213 -msgid "" -"For special permissions and for\n" -"advanced settings, click Advanced." +#. allocate the question dialog +#: ../thunar/thunar-permissions-chooser.c:619 +#: ../thunar/thunar-permissions-chooser.c:961 +#: ../thunar/thunar-progress-dialog.c:295 +msgid "Question" +msgstr "Domanda" + +#: ../thunar/thunar-permissions-chooser.c:642 +msgid "Apply recursively?" msgstr "" -#: ../thunar/thunar-permissions-view.c:222 -msgid "_Advanced..." +#: ../thunar/thunar-permissions-chooser.c:648 +msgid "" +"Do you want to apply your changes recursively to\n" +"all files and subfolder below the selected folder?" msgstr "" -#: ../thunar/thunar-permissions-view.c:223 -msgid "Click here for special permissions and for advanced settings." +#: ../thunar/thunar-permissions-chooser.c:653 +msgid "Do _not ask me again" msgstr "" -#: ../thunar/thunar-permissions-view.c:243 -msgid "" -"You are not the owner of this file, so\n" -"you cannot change these permissions." +#: ../thunar/thunar-permissions-chooser.c:851 +msgid "Unknown file owner" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:184 +#: ../thunar/thunar-permissions-chooser.c:990 +#: ../thunar/thunar-progress-dialog.c:321 +msgid "_Yes" +msgstr "_Sì" + +#: ../thunar/thunar-permissions-chooser.c:994 +#: ../thunar/thunar-progress-dialog.c:325 +msgid "Yes to _all" +msgstr "Sì a tutti" + +#: ../thunar/thunar-permissions-chooser.c:998 +#: ../thunar/thunar-progress-dialog.c:329 +msgid "_No" +msgstr "_No" + +#: ../thunar/thunar-permissions-chooser.c:1002 +#: ../thunar/thunar-progress-dialog.c:333 +msgid "_Cancel" +msgstr "_Cancella" + +#: ../thunar/thunar-preferences-dialog.c:186 msgid "File Manager Preferences" msgstr "Preferenze del File Manager" -#: ../thunar/thunar-preferences-dialog.c:200 -msgid "<b>Default View</b>" -msgstr "" +#. +#. Views +#. +#: ../thunar/thunar-preferences-dialog.c:203 +#, fuzzy +msgid "Views" +msgstr "Vista" + +#: ../thunar/thunar-preferences-dialog.c:213 +#, fuzzy +msgid "Default View" +msgstr "Vista dettagliata" -#: ../thunar/thunar-preferences-dialog.c:211 +#: ../thunar/thunar-preferences-dialog.c:225 msgid "View _new folders using:" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:216 +#: ../thunar/thunar-preferences-dialog.c:230 +#: ../thunar/thunar-preferences-dialog.c:267 msgid "Icon View" msgstr "Vista a icone" -#: ../thunar/thunar-preferences-dialog.c:217 +#: ../thunar/thunar-preferences-dialog.c:231 #, fuzzy msgid "Detailed List View" msgstr "Vista dettagliata" -#: ../thunar/thunar-preferences-dialog.c:218 +#: ../thunar/thunar-preferences-dialog.c:232 msgid "Last Active View" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:233 +#: ../thunar/thunar-preferences-dialog.c:249 msgid "Sort _folders before files" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:235 +#: ../thunar/thunar-preferences-dialog.c:251 msgid "Select this option to list folders before files when you sort a folder." msgstr "" -#: ../thunar/thunar-preferences-dialog.c:239 +#: ../thunar/thunar-preferences-dialog.c:255 msgid "Show hidden and _backup files" msgstr "Mostra file nascosti e di _backup" -#: ../thunar/thunar-preferences-dialog.c:241 +#: ../thunar/thunar-preferences-dialog.c:257 msgid "" "Select this option to show hidden and backup files in new windows. The first " "character in a hidden filename is a period (.). The last character in a " "backup filename is a tilde (~)." msgstr "" -#: ../thunar/thunar-preferences-dialog.c:251 -msgid "<b>Icon View</b>" -msgstr "<b>Vista a icone</b>" - -#: ../thunar/thunar-preferences-dialog.c:262 +#: ../thunar/thunar-preferences-dialog.c:279 msgid "_Text beside icons" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:264 +#: ../thunar/thunar-preferences-dialog.c:281 msgid "" "Select this option to place the icon captions for items beside the icon " "rather than below the icon." msgstr "" -#: ../thunar/thunar-preferences.c:255 +#. +#. Advanced +#. +#: ../thunar/thunar-preferences-dialog.c:290 +msgid "Advanced" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:300 +msgid "Miscellaneous" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:312 +msgid "Apply permissions _recursively:" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:317 +msgid "Ask everytime" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:318 +msgid "Always" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:319 +msgid "Never" +msgstr "" + +#: ../thunar/thunar-preferences.c:272 #, c-format msgid "Failed to create the Thunar configuration directory in %s" msgstr "" -#: ../thunar/thunar-preferences.c:263 +#: ../thunar/thunar-preferences.c:280 #, c-format msgid "Failed to open preferences database in %s: %s" msgstr "" -#: ../thunar/thunar-progress-dialog.c:150 +#: ../thunar/thunar-progress-dialog.c:151 msgid "Job" msgstr "Job" -#: ../thunar/thunar-progress-dialog.c:151 +#: ../thunar/thunar-progress-dialog.c:152 msgid "The job whose progress to display" msgstr "" -#: ../thunar/thunar-progress-dialog.c:303 -msgid "Question" -msgstr "Domanda" - -#: ../thunar/thunar-progress-dialog.c:329 -msgid "_Yes" -msgstr "_Sì" - -#: ../thunar/thunar-progress-dialog.c:333 -msgid "Yes to _all" -msgstr "Sì a tutti" - -#: ../thunar/thunar-progress-dialog.c:337 -msgid "_No" -msgstr "_No" - -#: ../thunar/thunar-progress-dialog.c:341 -msgid "_Cancel" -msgstr "_Cancella" - -#: ../thunar/thunar-progress-dialog.c:467 +#: ../thunar/thunar-progress-dialog.c:459 #, c-format msgid "(%lu hour remaining)" msgid_plural "(%lu hours remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-progress-dialog.c:472 +#: ../thunar/thunar-progress-dialog.c:464 #, c-format msgid "(%lu minute remaining)" msgid_plural "(%lu minutes remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-progress-dialog.c:477 +#: ../thunar/thunar-progress-dialog.c:469 #, c-format msgid "(%lu second remaining)" msgid_plural "(%lu seconds remaining)" msgstr[0] "" msgstr[1] "" -#: ../thunar/thunar-properties-dialog.c:173 +#: ../thunar/thunar-properties-dialog.c:174 msgid "The file displayed by the dialog" msgstr "" -#: ../thunar/thunar-properties-dialog.c:220 +#: ../thunar/thunar-properties-dialog.c:212 msgid "General" msgstr "Generale" -#: ../thunar/thunar-properties-dialog.c:237 +#: ../thunar/thunar-properties-dialog.c:229 msgid "Name:" msgstr "Nome:" #. #. Second box (kind) #. -#: ../thunar/thunar-properties-dialog.c:262 +#: ../thunar/thunar-properties-dialog.c:254 msgid "Kind:" msgstr "Tipo:" #. #. Third box (modified, accessed) #. -#: ../thunar/thunar-properties-dialog.c:287 +#: ../thunar/thunar-properties-dialog.c:279 msgid "Modified:" msgstr "Modificato:" -#: ../thunar/thunar-properties-dialog.c:300 +#: ../thunar/thunar-properties-dialog.c:292 msgid "Accessed:" msgstr "Acceduto:" #. #. Fourth box (volume, size) #. -#: ../thunar/thunar-properties-dialog.c:324 +#: ../thunar/thunar-properties-dialog.c:316 msgid "Volume:" msgstr "Volume:" -#: ../thunar/thunar-properties-dialog.c:347 +#: ../thunar/thunar-properties-dialog.c:339 msgid "Size:" msgstr "Dimensione:" #. #. Emblem chooser #. -#: ../thunar/thunar-properties-dialog.c:371 +#: ../thunar/thunar-properties-dialog.c:363 msgid "Emblems" msgstr "" -#: ../thunar/thunar-properties-dialog.c:618 +#: ../thunar/thunar-properties-dialog.c:606 #, c-format msgid "%s Info" msgstr "Informazioni su %s" -#: ../thunar/thunar-properties-dialog.c:699 +#: ../thunar/thunar-properties-dialog.c:687 #, c-format msgid "%s (%u Bytes)" msgstr "%s (%u Byte)" #. display an error message -#: ../thunar/thunar-properties-dialog.c:745 +#: ../thunar/thunar-properties-dialog.c:733 #: ../thunar/thunar-standard-view.c:2170 #, c-format msgid "Failed to rename `%s'" @@ -1371,27 +1390,27 @@ msgstr "Testo della barra di stato" msgid "The main text to be displayed in the statusbar" msgstr "Il testo principale da mostrare nella barra di stato " -#: ../thunar/thunar-text-renderer.c:215 +#: ../thunar/thunar-text-renderer.c:216 msgid "Text" msgstr "Testo" -#: ../thunar/thunar-text-renderer.c:216 +#: ../thunar/thunar-text-renderer.c:217 msgid "The text to render" msgstr "" -#: ../thunar/thunar-text-renderer.c:230 +#: ../thunar/thunar-text-renderer.c:231 msgid "Wrap mode" msgstr "" -#: ../thunar/thunar-text-renderer.c:231 +#: ../thunar/thunar-text-renderer.c:232 msgid "The wrap mode" msgstr "" -#: ../thunar/thunar-text-renderer.c:246 +#: ../thunar/thunar-text-renderer.c:247 msgid "Wrap width" msgstr "" -#: ../thunar/thunar-text-renderer.c:247 +#: ../thunar/thunar-text-renderer.c:248 msgid "The wrap width" msgstr "" @@ -1869,3 +1888,34 @@ msgstr "File Manager" #: ../Thunar.desktop.in.h:3 msgid "Thunar File Manager" msgstr "Thunar File Manager" + +#, fuzzy +#~ msgid "Advanced Permissions" +#~ msgstr "Permessi" + +#, fuzzy +#~ msgid "Failed to change the group to which `%s' belongs" +#~ msgstr "Impossibile cambiare modalità di `%s'" + +#, fuzzy +#~ msgid "%s (%s)" +#~ msgstr "\"%s\" (%s) %s" + +#, fuzzy +#~ msgid "List folder contents" +#~ msgstr "Caricamento dei contenuti della cartella in corso..." + +#, fuzzy +#~ msgid "Execute" +#~ msgstr "_Esegui" + +#, fuzzy +#~ msgid "_Grant Permission" +#~ msgstr "Permessi" + +#, fuzzy +#~ msgid "_Deny Permission" +#~ msgstr "Permessi" + +#~ msgid "<b>Icon View</b>" +#~ msgstr "<b>Vista a icone</b>" diff --git a/po/ja.po b/po/ja.po index 5125adfa3..567921423 100644 --- a/po/ja.po +++ b/po/ja.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Thunar 0.1.4svn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-01-04 18:34+0100\n" +"POT-Creation-Date: 2006-01-08 22:45+0100\n" "PO-Revision-Date: 2005-12-31 01:22+0900\n" "Last-Translator: Daichi Kawahata <daichi@xfce.org>\n" "Language-Team: Japanese <xfce-users-jp@ml.fdiary.net>\n" @@ -22,23 +22,67 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: ../thunar-vfs/thunar-vfs-info.c:362 +#: ../thunar-vfs/thunar-vfs-chmod-job.c:168 +#: ../thunar-vfs/thunar-vfs-chown-job.c:166 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 +msgid "Collecting files..." +msgstr "ファイルを集ã‚ã¦ã„ã¾ã™..." + +#. ask the user whether we should skip the file +#. ask the user whether to skip this file (used for cancellation only) +#. ask the user whether to skip +#: ../thunar-vfs/thunar-vfs-chmod-job.c:189 +#: ../thunar-vfs/thunar-vfs-chown-job.c:187 +#: ../thunar-vfs/thunar-vfs-link-job.c:212 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 +#, c-format +msgid "" +"%s.\n" +"\n" +"Do you want to skip it?" +msgstr "" +"%s。\n" +"\n" +"ã“れを飛ã°ã—ã¾ã™ã‹ï¼Ÿ" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:246 +#: ../thunar-vfs/thunar-vfs-chown-job.c:244 +#, fuzzy, c-format +msgid "Failed to determine file info of `%s': %s" +msgstr "「%sã€ã®ãƒ•ã‚¡ã‚¤ãƒ«æƒ…å ±ã‚’ç¢ºå®šã™ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—ãŸã€‚" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:272 +#, fuzzy, c-format +msgid "Failed to change permissions of `%s': %s" +msgstr "「%sã€ã®ãƒ¢ãƒ¼ãƒ‰å¤‰æ›´ã«å¤±æ•—ã—ã¾ã—ãŸã€‚" + +#: ../thunar-vfs/thunar-vfs-chown-job.c:260 +#, fuzzy, c-format +msgid "Failed to change file owner of `%s': %s" +msgstr "「%sã€ã®ãƒ¢ãƒ¼ãƒ‰å¤‰æ›´ã«å¤±æ•—ã—ã¾ã—ãŸã€‚" + +#: ../thunar-vfs/thunar-vfs-chown-job.c:262 +#, fuzzy, c-format +msgid "Failed to change file group of `%s': %s" +msgstr "「%sã€ã®ãƒ¢ãƒ¼ãƒ‰å¤‰æ›´ã«å¤±æ•—ã—ã¾ã—ãŸã€‚" + +#: ../thunar-vfs/thunar-vfs-info.c:261 msgid "No Exec field specified" msgstr "実行コマンドãŒæŒ‡å®šã•ã‚Œã¦ã„ã¾ã›ã‚“。" -#: ../thunar-vfs/thunar-vfs-info.c:370 +#: ../thunar-vfs/thunar-vfs-info.c:269 msgid "Unable to parse file" msgstr "ファイルを解æžã§ãã¾ã›ã‚“。" -#: ../thunar-vfs/thunar-vfs-info.c:460 +#: ../thunar-vfs/thunar-vfs-info.c:359 msgid "Invalid file name" msgstr "無効ãªãƒ•ã‚¡ã‚¤ãƒ«åã§ã™ã€‚" -#: ../thunar-vfs/thunar-vfs-info.c:482 +#: ../thunar-vfs/thunar-vfs-info.c:381 msgid "Invalid desktop file" msgstr "無効ãªãƒ‡ã‚¹ã‚¯ãƒˆãƒƒãƒ—ファイルã§ã™ã€‚" -#: ../thunar-vfs/thunar-vfs-info.c:716 +#: ../thunar-vfs/thunar-vfs-info.c:615 #, c-format msgid "Failed to stat file `%s': %s" msgstr "ファイル「%sã€ã®çŠ¶æ…‹ã‚’å–å¾—ã™ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—ãŸ: %s" @@ -62,20 +106,6 @@ msgstr "" msgid "Failed to remove `%s': %s" msgstr "「%sã€ã®å‰Šé™¤ã«å¤±æ•—ã—ã¾ã—ãŸ: %s" -#. ask the user whether to skip this file (used for cancellation only) -#. ask the user whether to skip -#: ../thunar-vfs/thunar-vfs-link-job.c:212 -#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 -#, c-format -msgid "" -"%s.\n" -"\n" -"Do you want to skip it?" -msgstr "" -"%s。\n" -"\n" -"ã“れを飛ã°ã—ã¾ã™ã‹ï¼Ÿ" - #: ../thunar-vfs/thunar-vfs-mime-database.c:1657 #, c-format msgid "Failed to load application from file %s" @@ -107,10 +137,6 @@ msgstr "サイズ" msgid "The desired thumbnail size" msgstr "ãŠæœ›ã¿ã®ã‚µãƒ ãƒã‚¤ãƒ«ã‚µã‚¤ã‚ºã§ã™ã€‚" -#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 -msgid "Collecting files..." -msgstr "ファイルを集ã‚ã¦ã„ã¾ã™..." - #. display info message #: ../thunar-vfs/thunar-vfs-transfer-job.c:329 msgid "Deleting directories..." @@ -155,7 +181,7 @@ msgstr "%s ã®ã‚³ãƒ”ー" # FIXME: #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703 -#: ../thunar/thunar-properties-dialog.c:643 +#: ../thunar/thunar-properties-dialog.c:631 #, c-format msgid "link to %s" msgstr "%s ã¸ã®ãƒªãƒ³ã‚¯" @@ -276,58 +302,6 @@ msgstr "リンク「%sã€ã®ä½œæˆã«å¤±æ•—ã—ã¾ã—ãŸã€‚" msgid "Thunar" msgstr "Thunar" -#: ../thunar/thunar-advanced-permissions-dialog.c:159 -#, fuzzy -msgid "Advanced Permissions" -msgstr "アクセス権" - -#: ../thunar/thunar-advanced-permissions-dialog.c:167 -msgid "Special Bits" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:180 -msgid "Set _User ID (SUID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:190 -msgid "" -"An executable file whose Set User ID (SUID) bit is\n" -"set will always be executed with the privileges of\n" -"the owner of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:211 -msgid "Set _Group ID (SGID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:221 -msgid "" -"An executable file whose Set Group ID (SGID) bit is\n" -"set will always be executed with the privileges of the\n" -"group of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:242 -msgid "_Sticky" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:252 -msgid "" -"A file in a sticky directory may only be removed or\n" -"renamed by a user if the user has write permission\n" -"for the directory and the user is the owner of the\n" -"file, the owner of the directory or the superuser." -msgstr "" - -#. display an error message to the user -#. display an error to the user (when we get here, we definitely have a valid file!) -#: ../thunar/thunar-advanced-permissions-dialog.c:356 -#: ../thunar/thunar-permissions-model.c:830 -#: ../thunar/thunar-permissions-view.c:494 -#, fuzzy, c-format -msgid "Failed to change permissions of `%s'" -msgstr "「%sã€ã®ãƒ¢ãƒ¼ãƒ‰å¤‰æ›´ã«å¤±æ•—ã—ã¾ã—ãŸã€‚" - #. display an error message to the user #: ../thunar/thunar-application.c:222 msgid "Failed to launch operation" @@ -353,25 +327,11 @@ msgstr "ファイルを削除ã—ã¦ã„ã¾ã™..." msgid "Creating directories..." msgstr "フォルダを作æˆã—ã¦ã„ã¾ã™..." -#: ../thunar/thunar-change-group-dialog.c:193 -msgid "Change Group" -msgstr "" - -#: ../thunar/thunar-change-group-dialog.c:200 -msgid "_Group:" -msgstr "" - -#. display an error message -#: ../thunar/thunar-change-group-dialog.c:309 -#, fuzzy, c-format -msgid "Failed to change the group to which `%s' belongs" -msgstr "「%sã€ã®ãƒ¢ãƒ¼ãƒ‰å¤‰æ›´ã«å¤±æ•—ã—ã¾ã—ãŸã€‚" - #: ../thunar/thunar-chooser-dialog.c:169 ../thunar/thunar-emblem-chooser.c:147 #: ../thunar/thunar-emblem-chooser.c:148 ../thunar/thunar-icon-renderer.c:161 #: ../thunar/thunar-open-with-action.c:146 #: ../thunar/thunar-open-with-action.c:147 -#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190 +#: ../thunar/thunar-properties-dialog.c:173 ../thunar/thunar-statusbar.c:190 msgid "File" msgstr "ファイル" @@ -421,37 +381,37 @@ msgid "Failed to execute `%s'" msgstr "「%sã€ã®å®Ÿè¡Œã«å¤±æ•—ã—ã¾ã—ãŸã€‚" #. update the header label -#: ../thunar/thunar-chooser-dialog.c:612 +#: ../thunar/thunar-chooser-dialog.c:613 #, c-format msgid "Open <i>%s</i> and other files of type \"%s\" with:" msgstr "<i>%s</i> ã¨ã‚¿ã‚¤ãƒ—ãŒã€Œ%sã€ã®ä»–ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’以下ã®ã‚¢ãƒ—リã§é–‹ãã¾ã™:" -#: ../thunar/thunar-chooser-dialog.c:634 ../thunar-uca/thunar-uca-editor.c:491 +#: ../thunar/thunar-chooser-dialog.c:635 ../thunar-uca/thunar-uca-editor.c:491 msgid "Select an Application" msgstr "アプリケーションをé¸æŠžã—ã¦ä¸‹ã•ã„" -#: ../thunar/thunar-chooser-dialog.c:644 ../thunar-uca/thunar-uca-editor.c:501 +#: ../thunar/thunar-chooser-dialog.c:645 ../thunar-uca/thunar-uca-editor.c:501 #: ../thunar-uca/thunar-uca-editor.c:640 msgid "All Files" msgstr "å…¨ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«" -#: ../thunar/thunar-chooser-dialog.c:649 ../thunar-uca/thunar-uca-editor.c:506 +#: ../thunar/thunar-chooser-dialog.c:650 ../thunar-uca/thunar-uca-editor.c:506 msgid "Executable Files" msgstr "実行å¯èƒ½ãƒ•ã‚¡ã‚¤ãƒ«" -#: ../thunar/thunar-chooser-dialog.c:664 ../thunar-uca/thunar-uca-editor.c:521 +#: ../thunar/thunar-chooser-dialog.c:665 ../thunar-uca/thunar-uca-editor.c:521 msgid "Perl Scripts" msgstr "Perl スクリプト" -#: ../thunar/thunar-chooser-dialog.c:670 ../thunar-uca/thunar-uca-editor.c:527 +#: ../thunar/thunar-chooser-dialog.c:671 ../thunar-uca/thunar-uca-editor.c:527 msgid "Python Scripts" msgstr "Python スクリプト" -#: ../thunar/thunar-chooser-dialog.c:676 ../thunar-uca/thunar-uca-editor.c:533 +#: ../thunar/thunar-chooser-dialog.c:677 ../thunar-uca/thunar-uca-editor.c:533 msgid "Ruby Scripts" msgstr "Ruby スクリプト" -#: ../thunar/thunar-chooser-dialog.c:682 ../thunar-uca/thunar-uca-editor.c:539 +#: ../thunar/thunar-chooser-dialog.c:683 ../thunar-uca/thunar-uca-editor.c:539 msgid "Shell Scripts" msgstr "シェルスクリプト" @@ -520,7 +480,7 @@ msgstr "åå‰" #. Permissions chooser #. #: ../thunar/thunar-details-view.c:197 -#: ../thunar/thunar-properties-dialog.c:382 +#: ../thunar/thunar-properties-dialog.c:374 msgid "Permissions" msgstr "アクセス権" @@ -570,11 +530,11 @@ msgstr "ファイル「%sã€ã‚’実行ã§ãã¾ã›ã‚“。" msgid "The root folder has no parent" msgstr "ルートフォルダã«ä¸Šä½ã®ãƒ•ã‚©ãƒ«ãƒ€ãŒã‚ã‚Šã¾ã›ã‚“。" -#: ../thunar/thunar-file.c:1032 +#: ../thunar/thunar-file.c:967 msgid "Filesystem" msgstr "ファイルシステム" -#: ../thunar/thunar-file.c:1056 +#: ../thunar/thunar-file.c:991 msgid "Home" msgstr "ホーム" @@ -635,7 +595,7 @@ msgstr "アイコンを表示ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã§ã™ã€‚" # FIXME: what's this? #: ../thunar/thunar-icon-renderer.c:177 ../thunar/thunar-icon-renderer.c:178 -#: ../thunar/thunar-text-renderer.c:202 ../thunar/thunar-text-renderer.c:203 +#: ../thunar/thunar-text-renderer.c:203 ../thunar/thunar-text-renderer.c:204 msgid "Follow state" msgstr "状態ã«å¾“ã†" @@ -803,7 +763,7 @@ msgstr "éš ã—ファイルを表示" msgid "Whether to display hidden files" msgstr "éš ã—ファイルを表示ã™ã‚‹ã‹ã‚’指定ã—ã¾ã™ã€‚" -#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641 +#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:629 msgid "broken link" msgstr "壊れãŸãƒªãƒ³ã‚¯" @@ -840,11 +800,11 @@ msgid "%d item selected" msgid_plural "%d items selected (%s)" msgstr[0] "%d 個ã®ã‚¢ã‚¤ãƒ†ãƒ (%s) ãŒé¸æŠžã•ã‚Œã¦ã„ã¾ã™ã€‚" -#: ../thunar/thunar-location-buttons.c:258 +#: ../thunar/thunar-location-buttons.c:257 msgid "Spacing" msgstr "é–“éš”" -#: ../thunar/thunar-location-buttons.c:259 +#: ../thunar/thunar-location-buttons.c:258 msgid "The amount of space between the path buttons" msgstr "パスボタンåŒå£«ã®é–“ã®ã‚¹ãƒšãƒ¼ã‚¹ã§ã™ã€‚" @@ -886,117 +846,173 @@ msgstr "ç¾åœ¨è¡¨ç¤ºã•ã‚Œã¦ã„るファイルã§ã™ã€‚" msgid "The icon size for the path entry" msgstr "パス・エントリーã®ã‚¢ã‚¤ã‚³ãƒ³ãƒ»ã‚µã‚¤ã‚ºã§ã™" -#: ../thunar/thunar-permissions-model.c:440 -#, fuzzy, c-format -msgid "%s (%s)" -msgstr "「%sã€(%s) %sã§ã™ã€‚" +#. 0000 +#: ../thunar/thunar-permissions-chooser.c:234 +msgid "None" +msgstr "" -#: ../thunar/thunar-permissions-model.c:447 -msgid "Unknown file owner" +#. 0002 +#: ../thunar/thunar-permissions-chooser.c:236 +msgid "Write only" msgstr "" -#: ../thunar/thunar-permissions-model.c:460 -msgid "Unknown file group" +#. 0004 +#: ../thunar/thunar-permissions-chooser.c:238 +msgid "Read only" msgstr "" -#: ../thunar/thunar-permissions-model.c:465 -msgid "All other users" +#. 0006 +#: ../thunar/thunar-permissions-chooser.c:240 +msgid "Read & Write" msgstr "" -#: ../thunar/thunar-permissions-model.c:474 -msgid "Read" +#: ../thunar/thunar-permissions-chooser.c:252 +msgid "Owner:" msgstr "" -#: ../thunar/thunar-permissions-model.c:478 -msgid "Write" +#: ../thunar/thunar-permissions-chooser.c:266 +msgid "Unknown" msgstr "" -#: ../thunar/thunar-permissions-model.c:482 +#: ../thunar/thunar-permissions-chooser.c:280 +#: ../thunar/thunar-permissions-chooser.c:335 #, fuzzy -msgid "List folder contents" -msgstr "フォルダã®å†…容をèªã¿è¾¼ã‚“ã§ã„ã¾ã™..." +msgid "Access:" +msgstr "アクセス日時:" + +#: ../thunar/thunar-permissions-chooser.c:309 +msgid "Group:" +msgstr "" -#: ../thunar/thunar-permissions-model.c:482 +#: ../thunar/thunar-permissions-chooser.c:364 #, fuzzy -msgid "Execute" -msgstr "実行(_E)" +msgid "Others:" +msgstr "ãã®ä»–ã®ãƒ•ã‚¡ã‚¤ãƒ«(_O)" -#. actions for the group item -#: ../thunar/thunar-permissions-model.c:884 -msgid "Change _Group..." +#: ../thunar/thunar-permissions-chooser.c:393 +msgid "Program:" msgstr "" -#. append the "Grant Permission" action -#: ../thunar/thunar-permissions-model.c:897 +#: ../thunar/thunar-permissions-chooser.c:399 +msgid "Allow this file to _run as a program" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:423 +msgid "" +"Allowing untrusted programs to run \n" +"presents a security risk to your system." +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:434 +msgid "Please wait..." +msgstr "" + +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:545 #, fuzzy -msgid "_Grant Permission" -msgstr "アクセス権" +msgid "Failed to change group" +msgstr "「%sã€ã®ãƒ¢ãƒ¼ãƒ‰å¤‰æ›´ã«å¤±æ•—ã—ã¾ã—ãŸã€‚" -#. append the "Deny Permission" action -#: ../thunar/thunar-permissions-model.c:906 +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:580 #, fuzzy -msgid "_Deny Permission" -msgstr "アクセス権" +msgid "Failed to apply new permissions" +msgstr "「%sã€ã®ãƒ¢ãƒ¼ãƒ‰å¤‰æ›´ã«å¤±æ•—ã—ã¾ã—ãŸã€‚" -#: ../thunar/thunar-permissions-view.c:213 -msgid "" -"For special permissions and for\n" -"advanced settings, click Advanced." +#. allocate the question dialog +#: ../thunar/thunar-permissions-chooser.c:619 +#: ../thunar/thunar-permissions-chooser.c:961 +#: ../thunar/thunar-progress-dialog.c:295 +msgid "Question" +msgstr "質å•" + +#: ../thunar/thunar-permissions-chooser.c:642 +msgid "Apply recursively?" msgstr "" -#: ../thunar/thunar-permissions-view.c:222 -msgid "_Advanced..." +#: ../thunar/thunar-permissions-chooser.c:648 +msgid "" +"Do you want to apply your changes recursively to\n" +"all files and subfolder below the selected folder?" msgstr "" -#: ../thunar/thunar-permissions-view.c:223 -msgid "Click here for special permissions and for advanced settings." +#: ../thunar/thunar-permissions-chooser.c:653 +msgid "Do _not ask me again" msgstr "" -#: ../thunar/thunar-permissions-view.c:243 -msgid "" -"You are not the owner of this file, so\n" -"you cannot change these permissions." +#: ../thunar/thunar-permissions-chooser.c:851 +msgid "Unknown file owner" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:184 +#: ../thunar/thunar-permissions-chooser.c:990 +#: ../thunar/thunar-progress-dialog.c:321 +msgid "_Yes" +msgstr "ã¯ã„(_Y)" + +#: ../thunar/thunar-permissions-chooser.c:994 +#: ../thunar/thunar-progress-dialog.c:325 +msgid "Yes to _all" +msgstr "å…¨ã¦ã«ã¯ã„(_A)" + +#: ../thunar/thunar-permissions-chooser.c:998 +#: ../thunar/thunar-progress-dialog.c:329 +msgid "_No" +msgstr "ã„ã„ãˆ(_N)" + +#: ../thunar/thunar-permissions-chooser.c:1002 +#: ../thunar/thunar-progress-dialog.c:333 +msgid "_Cancel" +msgstr "ã‚ャンセル(_C)" + +#: ../thunar/thunar-preferences-dialog.c:186 msgid "File Manager Preferences" msgstr "ファイルマãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã®ç’°å¢ƒè¨å®š" -#: ../thunar/thunar-preferences-dialog.c:200 -msgid "<b>Default View</b>" +#. +#. Views +#. +#: ../thunar/thunar-preferences-dialog.c:203 +#, fuzzy +msgid "Views" +msgstr "表示(_V)" + +#: ../thunar/thunar-preferences-dialog.c:213 +#, fuzzy +msgid "Default View" msgstr "<b>標準ã®è¡¨ç¤ºæ–¹æ³•</b>" -#: ../thunar/thunar-preferences-dialog.c:211 +#: ../thunar/thunar-preferences-dialog.c:225 msgid "View _new folders using:" msgstr "æ–°è¦ãƒ•ã‚©ãƒ«ãƒ€ã®è¡¨ç¤ºæ–¹æ³•(_N):" -#: ../thunar/thunar-preferences-dialog.c:216 +#: ../thunar/thunar-preferences-dialog.c:230 +#: ../thunar/thunar-preferences-dialog.c:267 msgid "Icon View" msgstr "アイコン表示" -#: ../thunar/thunar-preferences-dialog.c:217 +#: ../thunar/thunar-preferences-dialog.c:231 msgid "Detailed List View" msgstr "詳細リスト表示" -#: ../thunar/thunar-preferences-dialog.c:218 +#: ../thunar/thunar-preferences-dialog.c:232 msgid "Last Active View" msgstr "最後ã«ä½¿ç”¨ã—ãŸè¡¨ç¤ºæ–¹æ³•" -#: ../thunar/thunar-preferences-dialog.c:233 +#: ../thunar/thunar-preferences-dialog.c:249 msgid "Sort _folders before files" msgstr "フォルダをファイルã®å‰ã«ã™ã‚‹(_F)" -#: ../thunar/thunar-preferences-dialog.c:235 +#: ../thunar/thunar-preferences-dialog.c:251 msgid "Select this option to list folders before files when you sort a folder." msgstr "" "フォルダを並ã¹æ›¿ãˆã‚‹æ™‚ã«ãƒ•ã‚©ãƒ«ãƒ€ã‚’ファイルã®å‰ã«ä¸¦ã¹ã‚‹ãªã‚‰ã€ã“ã®ã‚ªãƒ—ションを" "é¸æŠžã—ã¦ä¸‹ã•ã„。" -#: ../thunar/thunar-preferences-dialog.c:239 +#: ../thunar/thunar-preferences-dialog.c:255 msgid "Show hidden and _backup files" msgstr "éš ã—ファイルを表示ã™ã‚‹(_B)" -#: ../thunar/thunar-preferences-dialog.c:241 +#: ../thunar/thunar-preferences-dialog.c:257 msgid "" "Select this option to show hidden and backup files in new windows. The first " "character in a hidden filename is a period (.). The last character in a " @@ -1006,15 +1022,11 @@ msgstr "" "é¸æŠžã—ã¦ä¸‹ã•ã„ã€‚éš ã—ファイルåã®å…ˆé ã«ã¯ãƒ”リオド「.ã€ãŒã€äºˆå‚™ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ«å°¾ã«" "ã¯ãƒãƒ«ãƒ€ã€Œ~ã€ãŒã¤ã„ã¦ã„ã¾ã™ã€‚" -#: ../thunar/thunar-preferences-dialog.c:251 -msgid "<b>Icon View</b>" -msgstr "<b>アイコン表示</b>" - -#: ../thunar/thunar-preferences-dialog.c:262 +#: ../thunar/thunar-preferences-dialog.c:279 msgid "_Text beside icons" msgstr "æ–‡å—をアイコンã®éš£ã«ç½®ã(_T)" -#: ../thunar/thunar-preferences-dialog.c:264 +#: ../thunar/thunar-preferences-dialog.c:281 msgid "" "Select this option to place the icon captions for items beside the icon " "rather than below the icon." @@ -1022,100 +1034,107 @@ msgstr "" "アイテムã®ã‚¢ã‚¤ã‚³ãƒ³ãƒ»ã‚ャプションをアイコンã®ä¸‹ã§ã¯ãªã隣ã«ç½®ããªã‚‰ã€ã“ã®ã‚ªãƒ—" "ションをé¸æŠžã—ã¦ä¸‹ã•ã„。" -#: ../thunar/thunar-preferences.c:255 +#. +#. Advanced +#. +#: ../thunar/thunar-preferences-dialog.c:290 +msgid "Advanced" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:300 +msgid "Miscellaneous" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:312 +msgid "Apply permissions _recursively:" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:317 +msgid "Ask everytime" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:318 +msgid "Always" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:319 +msgid "Never" +msgstr "" + +#: ../thunar/thunar-preferences.c:272 #, c-format msgid "Failed to create the Thunar configuration directory in %s" msgstr "%s ã« Thunar ã®è¨å®šãƒ•ã‚©ãƒ«ãƒ€ã‚’作æˆã™ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—ãŸã€‚" -#: ../thunar/thunar-preferences.c:263 +#: ../thunar/thunar-preferences.c:280 #, c-format msgid "Failed to open preferences database in %s: %s" msgstr "%s ã«ã‚る環境è¨å®šãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’é–‹ãã®ã«å¤±æ•—ã—ã¾ã—ãŸ: %s" -#: ../thunar/thunar-progress-dialog.c:150 +#: ../thunar/thunar-progress-dialog.c:151 msgid "Job" msgstr "ジョブ" -#: ../thunar/thunar-progress-dialog.c:151 +#: ../thunar/thunar-progress-dialog.c:152 msgid "The job whose progress to display" msgstr "途ä¸çµŒéŽã‚’表示ã™ã‚‹ã‚¸ãƒ§ãƒ–ã§ã™" -#: ../thunar/thunar-progress-dialog.c:303 -msgid "Question" -msgstr "質å•" - -#: ../thunar/thunar-progress-dialog.c:329 -msgid "_Yes" -msgstr "ã¯ã„(_Y)" - -#: ../thunar/thunar-progress-dialog.c:333 -msgid "Yes to _all" -msgstr "å…¨ã¦ã«ã¯ã„(_A)" - -#: ../thunar/thunar-progress-dialog.c:337 -msgid "_No" -msgstr "ã„ã„ãˆ(_N)" - -#: ../thunar/thunar-progress-dialog.c:341 -msgid "_Cancel" -msgstr "ã‚ャンセル(_C)" - -#: ../thunar/thunar-progress-dialog.c:467 +#: ../thunar/thunar-progress-dialog.c:459 #, c-format msgid "(%lu hour remaining)" msgid_plural "(%lu hours remaining)" msgstr[0] "(残り %lu 時間)" -#: ../thunar/thunar-progress-dialog.c:472 +#: ../thunar/thunar-progress-dialog.c:464 #, c-format msgid "(%lu minute remaining)" msgid_plural "(%lu minutes remaining)" msgstr[0] "(残り %lu 分)" -#: ../thunar/thunar-progress-dialog.c:477 +#: ../thunar/thunar-progress-dialog.c:469 #, c-format msgid "(%lu second remaining)" msgid_plural "(%lu seconds remaining)" msgstr[0] "(残り %lu 秒)" -#: ../thunar/thunar-properties-dialog.c:173 +#: ../thunar/thunar-properties-dialog.c:174 msgid "The file displayed by the dialog" msgstr "ダイアãƒã‚°ã«è¡¨ç¤ºã•ã‚Œã¦ã„るファイルã§ã™" -#: ../thunar/thunar-properties-dialog.c:220 +#: ../thunar/thunar-properties-dialog.c:212 msgid "General" msgstr "一般" -#: ../thunar/thunar-properties-dialog.c:237 +#: ../thunar/thunar-properties-dialog.c:229 msgid "Name:" msgstr "åå‰:" #. #. Second box (kind) #. -#: ../thunar/thunar-properties-dialog.c:262 +#: ../thunar/thunar-properties-dialog.c:254 msgid "Kind:" msgstr "種類:" #. #. Third box (modified, accessed) #. -#: ../thunar/thunar-properties-dialog.c:287 +#: ../thunar/thunar-properties-dialog.c:279 msgid "Modified:" msgstr "変更日時:" -#: ../thunar/thunar-properties-dialog.c:300 +#: ../thunar/thunar-properties-dialog.c:292 msgid "Accessed:" msgstr "アクセス日時:" #. #. Fourth box (volume, size) #. -#: ../thunar/thunar-properties-dialog.c:324 +#: ../thunar/thunar-properties-dialog.c:316 msgid "Volume:" msgstr "容é‡:" -#: ../thunar/thunar-properties-dialog.c:347 +#: ../thunar/thunar-properties-dialog.c:339 msgid "Size:" msgstr "サイズ:" @@ -1123,22 +1142,22 @@ msgstr "サイズ:" #. #. Emblem chooser #. -#: ../thunar/thunar-properties-dialog.c:371 +#: ../thunar/thunar-properties-dialog.c:363 msgid "Emblems" msgstr "エンブレム" -#: ../thunar/thunar-properties-dialog.c:618 +#: ../thunar/thunar-properties-dialog.c:606 #, c-format msgid "%s Info" msgstr "%s ã®æƒ…å ±" -#: ../thunar/thunar-properties-dialog.c:699 +#: ../thunar/thunar-properties-dialog.c:687 #, c-format msgid "%s (%u Bytes)" msgstr "%s (%u ãƒã‚¤ãƒˆ)" #. display an error message -#: ../thunar/thunar-properties-dialog.c:745 +#: ../thunar/thunar-properties-dialog.c:733 #: ../thunar/thunar-standard-view.c:2170 #, c-format msgid "Failed to rename `%s'" @@ -1357,27 +1376,27 @@ msgstr "ステータスãƒãƒ¼ã®ãƒ†ã‚スト" msgid "The main text to be displayed in the statusbar" msgstr "ステータスãƒãƒ¼ã«è¡¨ç¤ºã•ã‚Œã‚‹ãƒ¡ã‚¤ãƒ³ãƒ†ã‚ストã§ã™ã€‚" -#: ../thunar/thunar-text-renderer.c:215 +#: ../thunar/thunar-text-renderer.c:216 msgid "Text" msgstr "テã‚スト" -#: ../thunar/thunar-text-renderer.c:216 +#: ../thunar/thunar-text-renderer.c:217 msgid "The text to render" msgstr "表示ã™ã‚‹ãƒ†ã‚ストã§ã™ã€‚" -#: ../thunar/thunar-text-renderer.c:230 +#: ../thunar/thunar-text-renderer.c:231 msgid "Wrap mode" msgstr "折り返ã—モード" -#: ../thunar/thunar-text-renderer.c:231 +#: ../thunar/thunar-text-renderer.c:232 msgid "The wrap mode" msgstr "テã‚ストを折り返ã—ã¾ã™ã€‚" -#: ../thunar/thunar-text-renderer.c:246 +#: ../thunar/thunar-text-renderer.c:247 msgid "Wrap width" msgstr "折り返ã—å¹…" -#: ../thunar/thunar-text-renderer.c:247 +#: ../thunar/thunar-text-renderer.c:248 msgid "The wrap width" msgstr "テã‚ストを折り返ã™å¹…ã§ã™ã€‚" @@ -1879,3 +1898,34 @@ msgstr "ファイルマãƒãƒ¼ã‚¸ãƒ£ãƒ¼" #: ../Thunar.desktop.in.h:3 msgid "Thunar File Manager" msgstr "Thunar ファイルマãƒãƒ¼ã‚¸ãƒ£ãƒ¼" + +#, fuzzy +#~ msgid "Advanced Permissions" +#~ msgstr "アクセス権" + +#, fuzzy +#~ msgid "Failed to change the group to which `%s' belongs" +#~ msgstr "「%sã€ã®ãƒ¢ãƒ¼ãƒ‰å¤‰æ›´ã«å¤±æ•—ã—ã¾ã—ãŸã€‚" + +#, fuzzy +#~ msgid "%s (%s)" +#~ msgstr "「%sã€(%s) %sã§ã™ã€‚" + +#, fuzzy +#~ msgid "List folder contents" +#~ msgstr "フォルダã®å†…容をèªã¿è¾¼ã‚“ã§ã„ã¾ã™..." + +#, fuzzy +#~ msgid "Execute" +#~ msgstr "実行(_E)" + +#, fuzzy +#~ msgid "_Grant Permission" +#~ msgstr "アクセス権" + +#, fuzzy +#~ msgid "_Deny Permission" +#~ msgstr "アクセス権" + +#~ msgid "<b>Icon View</b>" +#~ msgstr "<b>アイコン表示</b>" diff --git a/po/pt_BR.po b/po/pt_BR.po index d0e7d5162..ffc83a858 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Thunar 0.1.4svn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-01-04 18:34+0100\n" +"POT-Creation-Date: 2006-01-08 22:45+0100\n" "PO-Revision-Date: 2005-11-17 16:55+0900\n" "Last-Translator: Joao Pedrosa <joaopedrosa@gmail.com>\n" "Language-Team: os-cillation <info@os-cillation.com>\n" @@ -16,23 +16,67 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ../thunar-vfs/thunar-vfs-info.c:362 +#: ../thunar-vfs/thunar-vfs-chmod-job.c:168 +#: ../thunar-vfs/thunar-vfs-chown-job.c:166 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 +msgid "Collecting files..." +msgstr "Coletando arquivos..." + +#. ask the user whether we should skip the file +#. ask the user whether to skip this file (used for cancellation only) +#. ask the user whether to skip +#: ../thunar-vfs/thunar-vfs-chmod-job.c:189 +#: ../thunar-vfs/thunar-vfs-chown-job.c:187 +#: ../thunar-vfs/thunar-vfs-link-job.c:212 +#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 +#, c-format +msgid "" +"%s.\n" +"\n" +"Do you want to skip it?" +msgstr "" +"%s.\n" +"\n" +"Você quer pulá-lo?" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:246 +#: ../thunar-vfs/thunar-vfs-chown-job.c:244 +#, fuzzy, c-format +msgid "Failed to determine file info of `%s': %s" +msgstr "Falha em determinar informação de arquivo para `%s'" + +#: ../thunar-vfs/thunar-vfs-chmod-job.c:272 +#, fuzzy, c-format +msgid "Failed to change permissions of `%s': %s" +msgstr "Falha em trocar modo de `%s'" + +#: ../thunar-vfs/thunar-vfs-chown-job.c:260 +#, fuzzy, c-format +msgid "Failed to change file owner of `%s': %s" +msgstr "Falha em trocar modo de `%s'" + +#: ../thunar-vfs/thunar-vfs-chown-job.c:262 +#, fuzzy, c-format +msgid "Failed to change file group of `%s': %s" +msgstr "Falha em trocar modo de `%s'" + +#: ../thunar-vfs/thunar-vfs-info.c:261 msgid "No Exec field specified" msgstr "Nenhum campo Exec especificado" -#: ../thunar-vfs/thunar-vfs-info.c:370 +#: ../thunar-vfs/thunar-vfs-info.c:269 msgid "Unable to parse file" msgstr "Incapaz de \"parse\" arquivo" -#: ../thunar-vfs/thunar-vfs-info.c:460 +#: ../thunar-vfs/thunar-vfs-info.c:359 msgid "Invalid file name" msgstr "Nome de arquivo inválido" -#: ../thunar-vfs/thunar-vfs-info.c:482 +#: ../thunar-vfs/thunar-vfs-info.c:381 msgid "Invalid desktop file" msgstr "Arquivo de área de trabalho inválido" -#: ../thunar-vfs/thunar-vfs-info.c:716 +#: ../thunar-vfs/thunar-vfs-info.c:615 #, c-format msgid "Failed to stat file `%s': %s" msgstr "Falha em \"stat\" arquivo `%s': %s" @@ -56,20 +100,6 @@ msgstr "" msgid "Failed to remove `%s': %s" msgstr "Falha em remover `%s': %s" -#. ask the user whether to skip this file (used for cancellation only) -#. ask the user whether to skip -#: ../thunar-vfs/thunar-vfs-link-job.c:212 -#: ../thunar-vfs/thunar-vfs-transfer-job.c:747 -#, c-format -msgid "" -"%s.\n" -"\n" -"Do you want to skip it?" -msgstr "" -"%s.\n" -"\n" -"Você quer pulá-lo?" - #: ../thunar-vfs/thunar-vfs-mime-database.c:1657 #, c-format msgid "Failed to load application from file %s" @@ -101,10 +131,6 @@ msgstr "Tamanho" msgid "The desired thumbnail size" msgstr "O tamanho de miniatura desejado" -#: ../thunar-vfs/thunar-vfs-transfer-job.c:267 -msgid "Collecting files..." -msgstr "Coletando arquivos..." - #. display info message #: ../thunar-vfs/thunar-vfs-transfer-job.c:329 msgid "Deleting directories..." @@ -147,7 +173,7 @@ msgid "copy of %s" msgstr "cópia de %s" #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703 -#: ../thunar/thunar-properties-dialog.c:643 +#: ../thunar/thunar-properties-dialog.c:631 #, c-format msgid "link to %s" msgstr "link para %s" @@ -263,58 +289,6 @@ msgstr "Falha em criar simbólico `%s'" msgid "Thunar" msgstr "Thunar" -#: ../thunar/thunar-advanced-permissions-dialog.c:159 -#, fuzzy -msgid "Advanced Permissions" -msgstr "Permissões" - -#: ../thunar/thunar-advanced-permissions-dialog.c:167 -msgid "Special Bits" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:180 -msgid "Set _User ID (SUID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:190 -msgid "" -"An executable file whose Set User ID (SUID) bit is\n" -"set will always be executed with the privileges of\n" -"the owner of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:211 -msgid "Set _Group ID (SGID)" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:221 -msgid "" -"An executable file whose Set Group ID (SGID) bit is\n" -"set will always be executed with the privileges of the\n" -"group of the executable." -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:242 -msgid "_Sticky" -msgstr "" - -#: ../thunar/thunar-advanced-permissions-dialog.c:252 -msgid "" -"A file in a sticky directory may only be removed or\n" -"renamed by a user if the user has write permission\n" -"for the directory and the user is the owner of the\n" -"file, the owner of the directory or the superuser." -msgstr "" - -#. display an error message to the user -#. display an error to the user (when we get here, we definitely have a valid file!) -#: ../thunar/thunar-advanced-permissions-dialog.c:356 -#: ../thunar/thunar-permissions-model.c:830 -#: ../thunar/thunar-permissions-view.c:494 -#, fuzzy, c-format -msgid "Failed to change permissions of `%s'" -msgstr "Falha em trocar modo de `%s'" - #. display an error message to the user #: ../thunar/thunar-application.c:222 msgid "Failed to launch operation" @@ -340,25 +314,11 @@ msgstr "Deletando arquivos..." msgid "Creating directories..." msgstr "Criando diretórios..." -#: ../thunar/thunar-change-group-dialog.c:193 -msgid "Change Group" -msgstr "" - -#: ../thunar/thunar-change-group-dialog.c:200 -msgid "_Group:" -msgstr "" - -#. display an error message -#: ../thunar/thunar-change-group-dialog.c:309 -#, fuzzy, c-format -msgid "Failed to change the group to which `%s' belongs" -msgstr "Falha em trocar modo de `%s'" - #: ../thunar/thunar-chooser-dialog.c:169 ../thunar/thunar-emblem-chooser.c:147 #: ../thunar/thunar-emblem-chooser.c:148 ../thunar/thunar-icon-renderer.c:161 #: ../thunar/thunar-open-with-action.c:146 #: ../thunar/thunar-open-with-action.c:147 -#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190 +#: ../thunar/thunar-properties-dialog.c:173 ../thunar/thunar-statusbar.c:190 msgid "File" msgstr "Arquivo" @@ -408,37 +368,37 @@ msgid "Failed to execute `%s'" msgstr "Falha em executar `%s'" #. update the header label -#: ../thunar/thunar-chooser-dialog.c:612 +#: ../thunar/thunar-chooser-dialog.c:613 #, c-format msgid "Open <i>%s</i> and other files of type \"%s\" with:" msgstr "Abrir <i>%s</i> e outros arquivos do tipo \"%s\" com:" -#: ../thunar/thunar-chooser-dialog.c:634 ../thunar-uca/thunar-uca-editor.c:491 +#: ../thunar/thunar-chooser-dialog.c:635 ../thunar-uca/thunar-uca-editor.c:491 msgid "Select an Application" msgstr "Selecione uma Aplicação" -#: ../thunar/thunar-chooser-dialog.c:644 ../thunar-uca/thunar-uca-editor.c:501 +#: ../thunar/thunar-chooser-dialog.c:645 ../thunar-uca/thunar-uca-editor.c:501 #: ../thunar-uca/thunar-uca-editor.c:640 msgid "All Files" msgstr "Todos os Arquivos" -#: ../thunar/thunar-chooser-dialog.c:649 ../thunar-uca/thunar-uca-editor.c:506 +#: ../thunar/thunar-chooser-dialog.c:650 ../thunar-uca/thunar-uca-editor.c:506 msgid "Executable Files" msgstr "Arquivos Executáveis" -#: ../thunar/thunar-chooser-dialog.c:664 ../thunar-uca/thunar-uca-editor.c:521 +#: ../thunar/thunar-chooser-dialog.c:665 ../thunar-uca/thunar-uca-editor.c:521 msgid "Perl Scripts" msgstr "Scripts de Perl" -#: ../thunar/thunar-chooser-dialog.c:670 ../thunar-uca/thunar-uca-editor.c:527 +#: ../thunar/thunar-chooser-dialog.c:671 ../thunar-uca/thunar-uca-editor.c:527 msgid "Python Scripts" msgstr "Scripts de Python" -#: ../thunar/thunar-chooser-dialog.c:676 ../thunar-uca/thunar-uca-editor.c:533 +#: ../thunar/thunar-chooser-dialog.c:677 ../thunar-uca/thunar-uca-editor.c:533 msgid "Ruby Scripts" msgstr "Scripts de Ruby" -#: ../thunar/thunar-chooser-dialog.c:682 ../thunar-uca/thunar-uca-editor.c:539 +#: ../thunar/thunar-chooser-dialog.c:683 ../thunar-uca/thunar-uca-editor.c:539 msgid "Shell Scripts" msgstr "Scripts de Shell" @@ -507,7 +467,7 @@ msgstr "Nome" #. Permissions chooser #. #: ../thunar/thunar-details-view.c:197 -#: ../thunar/thunar-properties-dialog.c:382 +#: ../thunar/thunar-properties-dialog.c:374 msgid "Permissions" msgstr "Permissões" @@ -557,11 +517,11 @@ msgstr "Incapaz de executar arquivo `%s'" msgid "The root folder has no parent" msgstr "A pasta raiz não tem parente" -#: ../thunar/thunar-file.c:1032 +#: ../thunar/thunar-file.c:967 msgid "Filesystem" msgstr "Sistema de Arquivos" -#: ../thunar/thunar-file.c:1056 +#: ../thunar/thunar-file.c:991 msgid "Home" msgstr "Pasta Inicial" @@ -618,7 +578,7 @@ msgid "The file whose icon to render" msgstr "O arquivo cujo Ãcone é para renderizar" #: ../thunar/thunar-icon-renderer.c:177 ../thunar/thunar-icon-renderer.c:178 -#: ../thunar/thunar-text-renderer.c:202 ../thunar/thunar-text-renderer.c:203 +#: ../thunar/thunar-text-renderer.c:203 ../thunar/thunar-text-renderer.c:204 msgid "Follow state" msgstr "Segue estado" @@ -789,7 +749,7 @@ msgstr "Mostrar invisÃveis" msgid "Whether to display hidden files" msgstr "Se deve-se mostrar arquivos invisÃveis" -#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641 +#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:629 msgid "broken link" msgstr "ligação quebrada" @@ -829,11 +789,11 @@ msgid_plural "%d items selected (%s)" msgstr[0] "%d item selecionado" msgstr[1] "%d Ãtens selecionados" -#: ../thunar/thunar-location-buttons.c:258 +#: ../thunar/thunar-location-buttons.c:257 msgid "Spacing" msgstr "Espaçamento" -#: ../thunar/thunar-location-buttons.c:259 +#: ../thunar/thunar-location-buttons.c:258 msgid "The amount of space between the path buttons" msgstr "A quantidade de espaço entre os botões de caminho" @@ -875,117 +835,173 @@ msgstr "O arquivo mostrado atualmente" msgid "The icon size for the path entry" msgstr "O tamanho de Ãcone para a entrada de caminho" -#: ../thunar/thunar-permissions-model.c:440 -#, fuzzy, c-format -msgid "%s (%s)" -msgstr "\"%s\" (%s) %s" +#. 0000 +#: ../thunar/thunar-permissions-chooser.c:234 +msgid "None" +msgstr "" -#: ../thunar/thunar-permissions-model.c:447 -msgid "Unknown file owner" +#. 0002 +#: ../thunar/thunar-permissions-chooser.c:236 +msgid "Write only" msgstr "" -#: ../thunar/thunar-permissions-model.c:460 -msgid "Unknown file group" +#. 0004 +#: ../thunar/thunar-permissions-chooser.c:238 +msgid "Read only" msgstr "" -#: ../thunar/thunar-permissions-model.c:465 -msgid "All other users" +#. 0006 +#: ../thunar/thunar-permissions-chooser.c:240 +msgid "Read & Write" msgstr "" -#: ../thunar/thunar-permissions-model.c:474 -msgid "Read" +#: ../thunar/thunar-permissions-chooser.c:252 +msgid "Owner:" msgstr "" -#: ../thunar/thunar-permissions-model.c:478 -msgid "Write" +#: ../thunar/thunar-permissions-chooser.c:266 +msgid "Unknown" msgstr "" -#: ../thunar/thunar-permissions-model.c:482 +#: ../thunar/thunar-permissions-chooser.c:280 +#: ../thunar/thunar-permissions-chooser.c:335 #, fuzzy -msgid "List folder contents" -msgstr "Carregando conteúdos de pasta..." +msgid "Access:" +msgstr "Acessado:" + +#: ../thunar/thunar-permissions-chooser.c:309 +msgid "Group:" +msgstr "" -#: ../thunar/thunar-permissions-model.c:482 +#: ../thunar/thunar-permissions-chooser.c:364 #, fuzzy -msgid "Execute" -msgstr "_Executar" +msgid "Others:" +msgstr "C_olar Arquivos" -#. actions for the group item -#: ../thunar/thunar-permissions-model.c:884 -msgid "Change _Group..." +#: ../thunar/thunar-permissions-chooser.c:393 +msgid "Program:" msgstr "" -#. append the "Grant Permission" action -#: ../thunar/thunar-permissions-model.c:897 +#: ../thunar/thunar-permissions-chooser.c:399 +msgid "Allow this file to _run as a program" +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:423 +msgid "" +"Allowing untrusted programs to run \n" +"presents a security risk to your system." +msgstr "" + +#: ../thunar/thunar-permissions-chooser.c:434 +msgid "Please wait..." +msgstr "" + +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:545 #, fuzzy -msgid "_Grant Permission" -msgstr "Permissões" +msgid "Failed to change group" +msgstr "Falha em trocar modo de `%s'" -#. append the "Deny Permission" action -#: ../thunar/thunar-permissions-model.c:906 +#. display an error to the user +#: ../thunar/thunar-permissions-chooser.c:580 #, fuzzy -msgid "_Deny Permission" -msgstr "Permissões" +msgid "Failed to apply new permissions" +msgstr "Falha em trocar modo de `%s'" -#: ../thunar/thunar-permissions-view.c:213 -msgid "" -"For special permissions and for\n" -"advanced settings, click Advanced." +#. allocate the question dialog +#: ../thunar/thunar-permissions-chooser.c:619 +#: ../thunar/thunar-permissions-chooser.c:961 +#: ../thunar/thunar-progress-dialog.c:295 +msgid "Question" +msgstr "Questão" + +#: ../thunar/thunar-permissions-chooser.c:642 +msgid "Apply recursively?" msgstr "" -#: ../thunar/thunar-permissions-view.c:222 -msgid "_Advanced..." +#: ../thunar/thunar-permissions-chooser.c:648 +msgid "" +"Do you want to apply your changes recursively to\n" +"all files and subfolder below the selected folder?" msgstr "" -#: ../thunar/thunar-permissions-view.c:223 -msgid "Click here for special permissions and for advanced settings." +#: ../thunar/thunar-permissions-chooser.c:653 +msgid "Do _not ask me again" msgstr "" -#: ../thunar/thunar-permissions-view.c:243 -msgid "" -"You are not the owner of this file, so\n" -"you cannot change these permissions." +#: ../thunar/thunar-permissions-chooser.c:851 +msgid "Unknown file owner" msgstr "" -#: ../thunar/thunar-preferences-dialog.c:184 +#: ../thunar/thunar-permissions-chooser.c:990 +#: ../thunar/thunar-progress-dialog.c:321 +msgid "_Yes" +msgstr "_Sim" + +#: ../thunar/thunar-permissions-chooser.c:994 +#: ../thunar/thunar-progress-dialog.c:325 +msgid "Yes to _all" +msgstr "Sim para _todos" + +#: ../thunar/thunar-permissions-chooser.c:998 +#: ../thunar/thunar-progress-dialog.c:329 +msgid "_No" +msgstr "_Não" + +#: ../thunar/thunar-permissions-chooser.c:1002 +#: ../thunar/thunar-progress-dialog.c:333 +msgid "_Cancel" +msgstr "_Cancelar" + +#: ../thunar/thunar-preferences-dialog.c:186 msgid "File Manager Preferences" msgstr "Preferências de Gerenciador de Arquivo" -#: ../thunar/thunar-preferences-dialog.c:200 -msgid "<b>Default View</b>" +#. +#. Views +#. +#: ../thunar/thunar-preferences-dialog.c:203 +#, fuzzy +msgid "Views" +msgstr "_Visualização" + +#: ../thunar/thunar-preferences-dialog.c:213 +#, fuzzy +msgid "Default View" msgstr "<b>Visualização Padrão</b>" -#: ../thunar/thunar-preferences-dialog.c:211 +#: ../thunar/thunar-preferences-dialog.c:225 msgid "View _new folders using:" msgstr "Visualizar _novas pastas usando:" -#: ../thunar/thunar-preferences-dialog.c:216 +#: ../thunar/thunar-preferences-dialog.c:230 +#: ../thunar/thunar-preferences-dialog.c:267 msgid "Icon View" msgstr "Visualização de Ãcone" -#: ../thunar/thunar-preferences-dialog.c:217 +#: ../thunar/thunar-preferences-dialog.c:231 msgid "Detailed List View" msgstr "Visualização de Lista Detalhada" -#: ../thunar/thunar-preferences-dialog.c:218 +#: ../thunar/thunar-preferences-dialog.c:232 msgid "Last Active View" msgstr "Última Visualização Ativa" -#: ../thunar/thunar-preferences-dialog.c:233 +#: ../thunar/thunar-preferences-dialog.c:249 msgid "Sort _folders before files" msgstr "Ordenar _pastas antes dos arquivos" -#: ../thunar/thunar-preferences-dialog.c:235 +#: ../thunar/thunar-preferences-dialog.c:251 msgid "Select this option to list folders before files when you sort a folder." msgstr "" "Selecione esta opção para listar pastas antes dos arquivos quando você " "ordenar uma pasta." -#: ../thunar/thunar-preferences-dialog.c:239 +#: ../thunar/thunar-preferences-dialog.c:255 msgid "Show hidden and _backup files" msgstr "Mostrar arquivos de _backup e invisÃveis" -#: ../thunar/thunar-preferences-dialog.c:241 +#: ../thunar/thunar-preferences-dialog.c:257 msgid "" "Select this option to show hidden and backup files in new windows. The first " "character in a hidden filename is a period (.). The last character in a " @@ -995,15 +1011,11 @@ msgstr "" "janelas. O primeiro caractere em um arquivo invisÃvel é um ponto (.). O " "último caractere em um arquivo de backup é um tio (~)." -#: ../thunar/thunar-preferences-dialog.c:251 -msgid "<b>Icon View</b>" -msgstr "<b>Visualização de Ãcone</b>" - -#: ../thunar/thunar-preferences-dialog.c:262 +#: ../thunar/thunar-preferences-dialog.c:279 msgid "_Text beside icons" msgstr "_Texto ao lado dos Ãcones" -#: ../thunar/thunar-preferences-dialog.c:264 +#: ../thunar/thunar-preferences-dialog.c:281 msgid "" "Select this option to place the icon captions for items beside the icon " "rather than below the icon." @@ -1011,125 +1023,132 @@ msgstr "" "Selecione esta opção para colocar os rótulos de Ãcones para Ãtens ao lado do " "Ãcone, em vez de abaixo do Ãcone." -#: ../thunar/thunar-preferences.c:255 +#. +#. Advanced +#. +#: ../thunar/thunar-preferences-dialog.c:290 +msgid "Advanced" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:300 +msgid "Miscellaneous" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:312 +msgid "Apply permissions _recursively:" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:317 +msgid "Ask everytime" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:318 +msgid "Always" +msgstr "" + +#: ../thunar/thunar-preferences-dialog.c:319 +msgid "Never" +msgstr "" + +#: ../thunar/thunar-preferences.c:272 #, c-format msgid "Failed to create the Thunar configuration directory in %s" msgstr "Falha em criar o diretório de configuração do Thunar em %s" -#: ../thunar/thunar-preferences.c:263 +#: ../thunar/thunar-preferences.c:280 #, c-format msgid "Failed to open preferences database in %s: %s" msgstr "Falha em abrir banco de dados de preferência em %s: %s" -#: ../thunar/thunar-progress-dialog.c:150 +#: ../thunar/thunar-progress-dialog.c:151 msgid "Job" msgstr "Trabalho" -#: ../thunar/thunar-progress-dialog.c:151 +#: ../thunar/thunar-progress-dialog.c:152 msgid "The job whose progress to display" msgstr "O trabalho cujo progresso deve ser mostrado" -#: ../thunar/thunar-progress-dialog.c:303 -msgid "Question" -msgstr "Questão" - -#: ../thunar/thunar-progress-dialog.c:329 -msgid "_Yes" -msgstr "_Sim" - -#: ../thunar/thunar-progress-dialog.c:333 -msgid "Yes to _all" -msgstr "Sim para _todos" - -#: ../thunar/thunar-progress-dialog.c:337 -msgid "_No" -msgstr "_Não" - -#: ../thunar/thunar-progress-dialog.c:341 -msgid "_Cancel" -msgstr "_Cancelar" - -#: ../thunar/thunar-progress-dialog.c:467 +#: ../thunar/thunar-progress-dialog.c:459 #, c-format msgid "(%lu hour remaining)" msgid_plural "(%lu hours remaining)" msgstr[0] "(Restando %lu hora)" msgstr[1] "(Restando %lu horas)" -#: ../thunar/thunar-progress-dialog.c:472 +#: ../thunar/thunar-progress-dialog.c:464 #, c-format msgid "(%lu minute remaining)" msgid_plural "(%lu minutes remaining)" msgstr[0] "(Restando %lu minuto)" msgstr[1] "(Restando %lu minutos)" -#: ../thunar/thunar-progress-dialog.c:477 +#: ../thunar/thunar-progress-dialog.c:469 #, c-format msgid "(%lu second remaining)" msgid_plural "(%lu seconds remaining)" msgstr[0] "(Restando %lu segundo)" msgstr[1] "(Restando %lu segundos)" -#: ../thunar/thunar-properties-dialog.c:173 +#: ../thunar/thunar-properties-dialog.c:174 msgid "The file displayed by the dialog" msgstr "O arquivo mostrado pelo diálogo" -#: ../thunar/thunar-properties-dialog.c:220 +#: ../thunar/thunar-properties-dialog.c:212 msgid "General" msgstr "Geral" -#: ../thunar/thunar-properties-dialog.c:237 +#: ../thunar/thunar-properties-dialog.c:229 msgid "Name:" msgstr "Nome:" #. #. Second box (kind) #. -#: ../thunar/thunar-properties-dialog.c:262 +#: ../thunar/thunar-properties-dialog.c:254 msgid "Kind:" msgstr "Tipo:" #. #. Third box (modified, accessed) #. -#: ../thunar/thunar-properties-dialog.c:287 +#: ../thunar/thunar-properties-dialog.c:279 msgid "Modified:" msgstr "Modificado:" -#: ../thunar/thunar-properties-dialog.c:300 +#: ../thunar/thunar-properties-dialog.c:292 msgid "Accessed:" msgstr "Acessado:" #. #. Fourth box (volume, size) #. -#: ../thunar/thunar-properties-dialog.c:324 +#: ../thunar/thunar-properties-dialog.c:316 msgid "Volume:" msgstr "Volume:" -#: ../thunar/thunar-properties-dialog.c:347 +#: ../thunar/thunar-properties-dialog.c:339 msgid "Size:" msgstr "Tamanho:" #. #. Emblem chooser #. -#: ../thunar/thunar-properties-dialog.c:371 +#: ../thunar/thunar-properties-dialog.c:363 msgid "Emblems" msgstr "Emblemas" -#: ../thunar/thunar-properties-dialog.c:618 +#: ../thunar/thunar-properties-dialog.c:606 #, c-format msgid "%s Info" msgstr "Informação %s" -#: ../thunar/thunar-properties-dialog.c:699 +#: ../thunar/thunar-properties-dialog.c:687 #, c-format msgid "%s (%u Bytes)" msgstr "%s (%u Bytes)" #. display an error message -#: ../thunar/thunar-properties-dialog.c:745 +#: ../thunar/thunar-properties-dialog.c:733 #: ../thunar/thunar-standard-view.c:2170 #, c-format msgid "Failed to rename `%s'" @@ -1360,27 +1379,27 @@ msgstr "Texto da barra de status" msgid "The main text to be displayed in the statusbar" msgstr "O texto principal a ser mostrado na barra de status" -#: ../thunar/thunar-text-renderer.c:215 +#: ../thunar/thunar-text-renderer.c:216 msgid "Text" msgstr "Texto" -#: ../thunar/thunar-text-renderer.c:216 +#: ../thunar/thunar-text-renderer.c:217 msgid "The text to render" msgstr "O texto para renderizar" -#: ../thunar/thunar-text-renderer.c:230 +#: ../thunar/thunar-text-renderer.c:231 msgid "Wrap mode" msgstr "Modo quebra de texto" -#: ../thunar/thunar-text-renderer.c:231 +#: ../thunar/thunar-text-renderer.c:232 msgid "The wrap mode" msgstr "O modo de quebra de texto" -#: ../thunar/thunar-text-renderer.c:246 +#: ../thunar/thunar-text-renderer.c:247 msgid "Wrap width" msgstr "Largura da quebra de texto" -#: ../thunar/thunar-text-renderer.c:247 +#: ../thunar/thunar-text-renderer.c:248 msgid "The wrap width" msgstr "A largura da quebra de texto" @@ -1873,3 +1892,34 @@ msgstr "Gerenciador de Arquivos" #: ../Thunar.desktop.in.h:3 msgid "Thunar File Manager" msgstr "Gerenciador de Arquivos Thunar" + +#, fuzzy +#~ msgid "Advanced Permissions" +#~ msgstr "Permissões" + +#, fuzzy +#~ msgid "Failed to change the group to which `%s' belongs" +#~ msgstr "Falha em trocar modo de `%s'" + +#, fuzzy +#~ msgid "%s (%s)" +#~ msgstr "\"%s\" (%s) %s" + +#, fuzzy +#~ msgid "List folder contents" +#~ msgstr "Carregando conteúdos de pasta..." + +#, fuzzy +#~ msgid "Execute" +#~ msgstr "_Executar" + +#, fuzzy +#~ msgid "_Grant Permission" +#~ msgstr "Permissões" + +#, fuzzy +#~ msgid "_Deny Permission" +#~ msgstr "Permissões" + +#~ msgid "<b>Icon View</b>" +#~ msgstr "<b>Visualização de Ãcone</b>" diff --git a/thunar-vfs/Makefile.am b/thunar-vfs/Makefile.am index 59e4c6202..f3a62a0f2 100644 --- a/thunar-vfs/Makefile.am +++ b/thunar-vfs/Makefile.am @@ -49,6 +49,10 @@ libthunar_vfs_include_HEADERS = \ libthunar_vfs_1_la_SOURCES = \ $(libthunar_vfs_built_sources) \ $(libthunar_vfs_headers) \ + thunar-vfs-chmod-job.c \ + thunar-vfs-chmod-job.h \ + thunar-vfs-chown-job.c \ + thunar-vfs-chown-job.h \ thunar-vfs-config.c \ thunar-vfs-exec.c \ thunar-vfs-exec.h \ diff --git a/thunar-vfs/thunar-vfs-chmod-job.c b/thunar-vfs/thunar-vfs-chmod-job.c new file mode 100644 index 000000000..7c27f8d1a --- /dev/null +++ b/thunar-vfs/thunar-vfs-chmod-job.c @@ -0,0 +1,336 @@ +/* $Id$ */ +/*- + * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#ifdef HAVE_SYS_STAT_H +#include <sys/stat.h> +#endif + +#ifdef HAVE_ERRNO_H +#include <errno.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#include <thunar-vfs/thunar-vfs-chmod-job.h> +#include <thunar-vfs/thunar-vfs-monitor.h> +#include <thunar-vfs/thunar-vfs-scandir.h> +#include <thunar-vfs/thunar-vfs-alias.h> + + + +static void thunar_vfs_chmod_job_class_init (ThunarVfsChmodJobClass *klass); +static void thunar_vfs_chmod_job_init (ThunarVfsChmodJob *chmod_job); +static void thunar_vfs_chmod_job_finalize (GObject *object); +static void thunar_vfs_chmod_job_execute (ThunarVfsJob *job); +static gboolean thunar_vfs_chmod_job_operate (ThunarVfsChmodJob *chmod_job, + ThunarVfsPath *path, + GError **error); + + + +struct _ThunarVfsChmodJobClass +{ + ThunarVfsInteractiveJobClass __parent__; +}; + +struct _ThunarVfsChmodJob +{ + ThunarVfsInteractiveJob __parent__; + + ThunarVfsMonitor *monitor; + + ThunarVfsPath *path; + ThunarVfsFileMode dir_mask; + ThunarVfsFileMode dir_mode; + ThunarVfsFileMode file_mask; + ThunarVfsFileMode file_mode; + gboolean recursive; + + guint total; + guint completed; +}; + + + +static GObjectClass *thunar_vfs_chmod_job_parent_class; + + + +GType +thunar_vfs_chmod_job_get_type (void) +{ + static GType type = G_TYPE_INVALID; + + if (G_UNLIKELY (type == G_TYPE_INVALID)) + { + static const GTypeInfo info = + { + sizeof (ThunarVfsChmodJobClass), + NULL, + NULL, + (GClassInitFunc) thunar_vfs_chmod_job_class_init, + NULL, + NULL, + sizeof (ThunarVfsChmodJob), + 0, + (GInstanceInitFunc) thunar_vfs_chmod_job_init, + NULL, + }; + + type = g_type_register_static (THUNAR_VFS_TYPE_INTERACTIVE_JOB, + I_("ThunarVfsChmodJob"), &info, 0); + } + + return type; +} + + + +static void +thunar_vfs_chmod_job_class_init (ThunarVfsChmodJobClass *klass) +{ + ThunarVfsJobClass *thunarvfs_job_class; + GObjectClass *gobject_class; + + /* determine the parent type class */ + thunar_vfs_chmod_job_parent_class = g_type_class_peek_parent (klass); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = thunar_vfs_chmod_job_finalize; + + thunarvfs_job_class = THUNAR_VFS_JOB_CLASS (klass); + thunarvfs_job_class->execute = thunar_vfs_chmod_job_execute; +} + + + +static void +thunar_vfs_chmod_job_init (ThunarVfsChmodJob *chmod_job) +{ + /* grab a reference on the VFS monitor */ + chmod_job->monitor = thunar_vfs_monitor_get_default (); +} + + + +static void +thunar_vfs_chmod_job_finalize (GObject *object) +{ + ThunarVfsChmodJob *chmod_job = THUNAR_VFS_CHMOD_JOB (object); + + /* release the reference on the VFS monitor */ + g_object_unref (G_OBJECT (chmod_job->monitor)); + + /* release the base path */ + thunar_vfs_path_unref (chmod_job->path); + + (*G_OBJECT_CLASS (thunar_vfs_chmod_job_parent_class)->finalize) (object); +} + + + +static void +thunar_vfs_chmod_job_execute (ThunarVfsJob *job) +{ + ThunarVfsChmodJob *chmod_job = THUNAR_VFS_CHMOD_JOB (job); + gboolean skip; + gdouble percentage; + GError *error = NULL; + gchar *message; + GList *path_list = NULL; + GList *lp; + + thunar_vfs_interactive_job_info_message (THUNAR_VFS_INTERACTIVE_JOB (job), _("Collecting files...")); + + /* check if we should operate recursively and collect the paths */ + if (G_UNLIKELY (chmod_job->recursive)) + path_list = thunar_vfs_scandir (chmod_job->path, THUNAR_VFS_SCANDIR_RECURSIVE, NULL, NULL); + path_list = thunar_vfs_path_list_prepend (path_list, chmod_job->path); + + /* determine the total number of paths (atleast one!) */ + chmod_job->total = g_list_length (path_list); + + /* process all paths */ + for (lp = path_list; !thunar_vfs_job_cancelled (job) && lp != NULL; lp = lp->next) + { + /* try to perform the operation */ + if (!thunar_vfs_chmod_job_operate (chmod_job, lp->data, &error)) + { + /* no need to ask if this is the last file */ + if (G_UNLIKELY (lp->next == NULL)) + break; + + /* ask the user whether we should skip the file */ + message = g_strdup_printf (_("%s.\n\nDo you want to skip it?"), error->message); + skip = thunar_vfs_interactive_job_skip (THUNAR_VFS_INTERACTIVE_JOB (job), message); + g_clear_error (&error); + g_free (message); + + /* check if we should skip */ + if (G_UNLIKELY (!skip)) + break; + } + + /* we've just completed another item */ + chmod_job->completed += 1; + + /* update the percentage */ + percentage = (chmod_job->completed * 100.0) / chmod_job->total; + thunar_vfs_interactive_job_percent (THUNAR_VFS_INTERACTIVE_JOB (job), CLAMP (percentage, 0.0, 100.0)); + + /* release the path */ + thunar_vfs_path_unref (lp->data); + } + + /* release the (remaining) path list */ + for (; lp != NULL; lp = lp->next) + thunar_vfs_path_unref (lp->data); + g_list_free (path_list); +} + + + +static gboolean +thunar_vfs_chmod_job_operate (ThunarVfsChmodJob *chmod_job, + ThunarVfsPath *path, + GError **error) +{ + const gchar *message; + struct stat statb; + mode_t mask; + mode_t mode; + gchar absolute_path[THUNAR_VFS_PATH_MAXSTRLEN]; + gchar *display_name; + + /* update the progress message */ + display_name = g_filename_display_name (thunar_vfs_path_get_name (path)); + thunar_vfs_interactive_job_info_message (THUNAR_VFS_INTERACTIVE_JOB (chmod_job), display_name); + g_free (display_name); + + /* determine the absolute path */ + if (thunar_vfs_path_to_string (path, absolute_path, sizeof (absolute_path), error) < 0) + return FALSE; + + /* try to stat the file */ + if (stat (absolute_path, &statb) < 0) + { + /* we just ignore ENOENT here */ + if (G_UNLIKELY (errno == ENOENT)) + return TRUE; + + message = _("Failed to determine file info of `%s': %s"); + goto error; + } + + /* different actions depending on the type of the file */ + if (S_ISDIR (statb.st_mode)) + { + mask = chmod_job->dir_mask; + mode = chmod_job->dir_mode; + } + else + { + mask = chmod_job->file_mask; + mode = chmod_job->file_mode; + } + + /* determine the new mode */ + mode = ((statb.st_mode & ~mask) | mode) & 07777; + + /* try to apply the new mode */ + if (chmod (absolute_path, mode) < 0) + { + /* again, ignore ENOENT */ + if (G_UNLIKELY (errno == ENOENT)) + return TRUE; + + message = _("Failed to change permissions of `%s': %s"); + goto error; + } + + /* feed a change notification event */ + thunar_vfs_monitor_feed (chmod_job->monitor, THUNAR_VFS_MONITOR_EVENT_CHANGED, path); + + /* we did it */ + return TRUE; + +error: + display_name = g_filename_display_name (absolute_path); + g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno), message, display_name, g_strerror (errno)); + g_free (display_name); + return FALSE; +} + + + +/** + * thunar_vfs_chmod_job_new: + * @path : the base path. + * @dir_mask : the mode mask for directories. + * @dir_mode : the new mode for directories. + * @file_mask : the mode mask for files. + * @file_mode : the new mode for files. + * @recursive : whether to operate recursively. + * @error : return location for errors or %NULL. + * + * Allocates a new #ThunarVfsChmodJob instance, which is + * used to change the mode of @path (and maybe subfiles + * and subfolders, depending on @recursive). + * + * Return value: the newly allocated #ThunarVfsChmodJob. + **/ +ThunarVfsJob* +thunar_vfs_chmod_job_new (ThunarVfsPath *path, + ThunarVfsFileMode dir_mask, + ThunarVfsFileMode dir_mode, + ThunarVfsFileMode file_mask, + ThunarVfsFileMode file_mode, + gboolean recursive, + GError **error) +{ + ThunarVfsChmodJob *chmod_job; + + g_return_val_if_fail (path != NULL, NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + + /* allocate and initialize the new job */ + chmod_job = g_object_new (THUNAR_VFS_TYPE_CHMOD_JOB, NULL); + chmod_job->path = thunar_vfs_path_ref (path); + chmod_job->dir_mask = dir_mask; + chmod_job->dir_mode = dir_mode; + chmod_job->file_mask = file_mask; + chmod_job->file_mode = file_mode; + chmod_job->recursive = recursive; + + return THUNAR_VFS_JOB (chmod_job); +} + + + +#define __THUNAR_VFS_TRANSFER_JOB_C__ +#include <thunar-vfs/thunar-vfs-aliasdef.c> diff --git a/thunar-vfs/thunar-vfs-chmod-job.h b/thunar-vfs/thunar-vfs-chmod-job.h new file mode 100644 index 000000000..e0e23fc99 --- /dev/null +++ b/thunar-vfs/thunar-vfs-chmod-job.h @@ -0,0 +1,56 @@ +/* $Id$ */ +/*- + * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#if !defined (THUNAR_VFS_INSIDE_THUNAR_VFS_H) && !defined (THUNAR_VFS_COMPILATION) +#error "Only <thunar-vfs/thunar-vfs.h> can be included directly, this file may disappear or change contents." +#endif + +#ifndef __THUNAR_VFS_CHMOD_JOB_H__ +#define __THUNAR_VFS_CHMOD_JOB_H__ + +#include <thunar-vfs/thunar-vfs-interactive-job.h> +#include <thunar-vfs/thunar-vfs-path.h> +#include <thunar-vfs/thunar-vfs-types.h> + +G_BEGIN_DECLS; + +typedef struct _ThunarVfsChmodJobClass ThunarVfsChmodJobClass; +typedef struct _ThunarVfsChmodJob ThunarVfsChmodJob; + +#define THUNAR_VFS_TYPE_CHMOD_JOB (thunar_vfs_chmod_job_get_type ()) +#define THUNAR_VFS_CHMOD_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THUNAR_VFS_TYPE_CHMOD_JOB, ThunarVfsChmodJob)) +#define THUNAR_VFS_CHMOD_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), THUNAR_VFS_TYPE_CHMOD_JOB, ThunarVfsChmodJobClass)) +#define THUNAR_VFS_IS_CHMOD_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THUNAR_VFS_TYPE_CHMOD_JOB)) +#define THUNAR_VFS_IS_CHMOD_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), THUNAR_VFS_TYPE_CHMOD_JOB)) +#define THUNAR_VFS_CHMOD_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THUNAR_VFS_TYPE_CHMOD_JOB, ThunarVfsChmodJobClass)) + +GType thunar_vfs_chmod_job_get_type (void) G_GNUC_CONST G_GNUC_INTERNAL; + +ThunarVfsJob *thunar_vfs_chmod_job_new (ThunarVfsPath *path, + ThunarVfsFileMode dir_mask, + ThunarVfsFileMode dir_mode, + ThunarVfsFileMode file_mask, + ThunarVfsFileMode file_mode, + gboolean recursive, + GError **error) G_GNUC_INTERNAL G_GNUC_MALLOC; + +G_END_DECLS; + +#endif /* !__THUNAR_VFS_CHMOD_JOB_H__ */ diff --git a/thunar-vfs/thunar-vfs-chown-job.c b/thunar-vfs/thunar-vfs-chown-job.c new file mode 100644 index 000000000..410f6e811 --- /dev/null +++ b/thunar-vfs/thunar-vfs-chown-job.c @@ -0,0 +1,321 @@ +/* $Id$ */ +/*- + * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> + * + * This library is free software; you can redistribute it and/or + * ownify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#ifdef HAVE_SYS_STAT_H +#include <sys/stat.h> +#endif + +#ifdef HAVE_ERRNO_H +#include <errno.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#include <thunar-vfs/thunar-vfs-chown-job.h> +#include <thunar-vfs/thunar-vfs-monitor.h> +#include <thunar-vfs/thunar-vfs-scandir.h> +#include <thunar-vfs/thunar-vfs-alias.h> + + + +static void thunar_vfs_chown_job_class_init (ThunarVfsChownJobClass *klass); +static void thunar_vfs_chown_job_init (ThunarVfsChownJob *chown_job); +static void thunar_vfs_chown_job_finalize (GObject *object); +static void thunar_vfs_chown_job_execute (ThunarVfsJob *job); +static gboolean thunar_vfs_chown_job_operate (ThunarVfsChownJob *chown_job, + ThunarVfsPath *path, + GError **error); + + + +struct _ThunarVfsChownJobClass +{ + ThunarVfsInteractiveJobClass __parent__; +}; + +struct _ThunarVfsChownJob +{ + ThunarVfsInteractiveJob __parent__; + + ThunarVfsMonitor *monitor; + + ThunarVfsPath *path; + gint uid; + gint gid; + gboolean recursive; + + guint total; + guint completed; +}; + + + +static GObjectClass *thunar_vfs_chown_job_parent_class; + + + +GType +thunar_vfs_chown_job_get_type (void) +{ + static GType type = G_TYPE_INVALID; + + if (G_UNLIKELY (type == G_TYPE_INVALID)) + { + static const GTypeInfo info = + { + sizeof (ThunarVfsChownJobClass), + NULL, + NULL, + (GClassInitFunc) thunar_vfs_chown_job_class_init, + NULL, + NULL, + sizeof (ThunarVfsChownJob), + 0, + (GInstanceInitFunc) thunar_vfs_chown_job_init, + NULL, + }; + + type = g_type_register_static (THUNAR_VFS_TYPE_INTERACTIVE_JOB, + I_("ThunarVfsChownJob"), &info, 0); + } + + return type; +} + + + +static void +thunar_vfs_chown_job_class_init (ThunarVfsChownJobClass *klass) +{ + ThunarVfsJobClass *thunarvfs_job_class; + GObjectClass *gobject_class; + + /* determine the parent type class */ + thunar_vfs_chown_job_parent_class = g_type_class_peek_parent (klass); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = thunar_vfs_chown_job_finalize; + + thunarvfs_job_class = THUNAR_VFS_JOB_CLASS (klass); + thunarvfs_job_class->execute = thunar_vfs_chown_job_execute; +} + + + +static void +thunar_vfs_chown_job_init (ThunarVfsChownJob *chown_job) +{ + /* grab a reference on the VFS monitor */ + chown_job->monitor = thunar_vfs_monitor_get_default (); +} + + + +static void +thunar_vfs_chown_job_finalize (GObject *object) +{ + ThunarVfsChownJob *chown_job = THUNAR_VFS_CHOWN_JOB (object); + + /* release the reference on the VFS monitor */ + g_object_unref (G_OBJECT (chown_job->monitor)); + + /* release the base path */ + thunar_vfs_path_unref (chown_job->path); + + (*G_OBJECT_CLASS (thunar_vfs_chown_job_parent_class)->finalize) (object); +} + + + +static void +thunar_vfs_chown_job_execute (ThunarVfsJob *job) +{ + ThunarVfsChownJob *chown_job = THUNAR_VFS_CHOWN_JOB (job); + gboolean skip; + gdouble percentage; + GError *error = NULL; + gchar *message; + GList *path_list = NULL; + GList *lp; + + thunar_vfs_interactive_job_info_message (THUNAR_VFS_INTERACTIVE_JOB (job), _("Collecting files...")); + + /* check if we should operate recursively and collect the paths */ + if (G_UNLIKELY (chown_job->recursive)) + path_list = thunar_vfs_scandir (chown_job->path, THUNAR_VFS_SCANDIR_RECURSIVE, NULL, NULL); + path_list = thunar_vfs_path_list_prepend (path_list, chown_job->path); + + /* determine the total number of paths (atleast one!) */ + chown_job->total = g_list_length (path_list); + + /* process all paths */ + for (lp = path_list; !thunar_vfs_job_cancelled (job) && lp != NULL; lp = lp->next) + { + /* try to perform the operation */ + if (!thunar_vfs_chown_job_operate (chown_job, lp->data, &error)) + { + /* no need to ask if this is the last file */ + if (G_UNLIKELY (lp->next == NULL)) + break; + + /* ask the user whether we should skip the file */ + message = g_strdup_printf (_("%s.\n\nDo you want to skip it?"), error->message); + skip = thunar_vfs_interactive_job_skip (THUNAR_VFS_INTERACTIVE_JOB (job), message); + g_clear_error (&error); + g_free (message); + + /* check if we should skip */ + if (G_UNLIKELY (!skip)) + break; + } + + /* we've just completed another item */ + chown_job->completed += 1; + + /* update the percentage */ + percentage = (chown_job->completed * 100.0) / chown_job->total; + thunar_vfs_interactive_job_percent (THUNAR_VFS_INTERACTIVE_JOB (job), CLAMP (percentage, 0.0, 100.0)); + + /* release the path */ + thunar_vfs_path_unref (lp->data); + } + + /* release the (remaining) path list */ + for (; lp != NULL; lp = lp->next) + thunar_vfs_path_unref (lp->data); + g_list_free (path_list); +} + + + +static gboolean +thunar_vfs_chown_job_operate (ThunarVfsChownJob *chown_job, + ThunarVfsPath *path, + GError **error) +{ + const gchar *message; + struct stat statb; + gchar absolute_path[THUNAR_VFS_PATH_MAXSTRLEN]; + gchar *display_name; + gid_t gid; + uid_t uid; + + /* update the progress message */ + display_name = g_filename_display_name (thunar_vfs_path_get_name (path)); + thunar_vfs_interactive_job_info_message (THUNAR_VFS_INTERACTIVE_JOB (chown_job), display_name); + g_free (display_name); + + /* determine the absolute path */ + if (thunar_vfs_path_to_string (path, absolute_path, sizeof (absolute_path), error) < 0) + return FALSE; + + /* try to stat the file */ + if (stat (absolute_path, &statb) < 0) + { + /* we just ignore ENOENT here */ + if (G_UNLIKELY (errno == ENOENT)) + return TRUE; + + message = _("Failed to determine file info of `%s': %s"); + goto error; + } + + /* determine new gid/uid */ + gid = (chown_job->gid < 0) ? statb.st_gid : chown_job->gid; + uid = (chown_job->uid < 0) ? statb.st_uid : chown_job->uid; + + /* try to apply the new gid/uid */ + if (chown (absolute_path, uid, gid) < 0) + { + /* again, ignore ENOENT */ + if (G_UNLIKELY (errno == ENOENT)) + return TRUE; + + if (chown_job->uid < 0) + message = _("Failed to change file owner of `%s': %s"); + else + message = _("Failed to change file group of `%s': %s"); + goto error; + } + + /* feed a change notification event */ + thunar_vfs_monitor_feed (chown_job->monitor, THUNAR_VFS_MONITOR_EVENT_CHANGED, path); + + /* we did it */ + return TRUE; + +error: + display_name = g_filename_display_name (absolute_path); + g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno), message, display_name, g_strerror (errno)); + g_free (display_name); + return FALSE; +} + + + +/** + * thunar_vfs_chown_job_new: + * @path : the base path. + * @uid : the new user id or %-1 to keep the old uid. + * @gid : the new group id or %-1 to keep the old gid. + * @recursive : whether to operate recursively. + * @error : return location for errors or %NULL. + * + * Allocates a new #ThunarVfsChownJob instance, which is + * used to change the owne of @path (and maybe subfiles + * and subfolders, depending on @recursive). + * + * Return value: the newly allocated #ThunarVfsChownJob. + **/ +ThunarVfsJob* +thunar_vfs_chown_job_new (ThunarVfsPath *path, + gint uid, + gint gid, + gboolean recursive, + GError **error) +{ + ThunarVfsChownJob *chown_job; + + g_return_val_if_fail (path != NULL, NULL); + g_return_val_if_fail (uid >= 0 || gid >= 0, NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + + /* allocate and initialize the new job */ + chown_job = g_object_new (THUNAR_VFS_TYPE_CHOWN_JOB, NULL); + chown_job->path = thunar_vfs_path_ref (path); + chown_job->uid = uid; + chown_job->gid = gid; + chown_job->recursive = recursive; + + return THUNAR_VFS_JOB (chown_job); +} + + + +#define __THUNAR_VFS_TRANSFER_JOB_C__ +#include <thunar-vfs/thunar-vfs-aliasdef.c> diff --git a/thunar-vfs/thunar-vfs-chown-job.h b/thunar-vfs/thunar-vfs-chown-job.h new file mode 100644 index 000000000..6c17cb021 --- /dev/null +++ b/thunar-vfs/thunar-vfs-chown-job.h @@ -0,0 +1,54 @@ +/* $Id$ */ +/*- + * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> + * + * This library is free software; you can redistribute it and/or + * ownify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#if !defined (THUNAR_VFS_INSIDE_THUNAR_VFS_H) && !defined (THUNAR_VFS_COMPILATION) +#error "Only <thunar-vfs/thunar-vfs.h> can be included directly, this file may disappear or change contents." +#endif + +#ifndef __THUNAR_VFS_CHOWN_JOB_H__ +#define __THUNAR_VFS_CHOWN_JOB_H__ + +#include <thunar-vfs/thunar-vfs-interactive-job.h> +#include <thunar-vfs/thunar-vfs-path.h> +#include <thunar-vfs/thunar-vfs-types.h> + +G_BEGIN_DECLS; + +typedef struct _ThunarVfsChownJobClass ThunarVfsChownJobClass; +typedef struct _ThunarVfsChownJob ThunarVfsChownJob; + +#define THUNAR_VFS_TYPE_CHOWN_JOB (thunar_vfs_chown_job_get_type ()) +#define THUNAR_VFS_CHOWN_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THUNAR_VFS_TYPE_CHOWN_JOB, ThunarVfsChownJob)) +#define THUNAR_VFS_CHOWN_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), THUNAR_VFS_TYPE_CHOWN_JOB, ThunarVfsChownJobClass)) +#define THUNAR_VFS_IS_CHOWN_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THUNAR_VFS_TYPE_CHOWN_JOB)) +#define THUNAR_VFS_IS_CHOWN_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), THUNAR_VFS_TYPE_CHOWN_JOB)) +#define THUNAR_VFS_CHOWN_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THUNAR_VFS_TYPE_CHOWN_JOB, ThunarVfsChownJobClass)) + +GType thunar_vfs_chown_job_get_type (void) G_GNUC_CONST G_GNUC_INTERNAL; + +ThunarVfsJob *thunar_vfs_chown_job_new (ThunarVfsPath *path, + gint uid, + gint gid, + gboolean recursive, + GError **error) G_GNUC_INTERNAL G_GNUC_MALLOC; + +G_END_DECLS; + +#endif /* !__THUNAR_VFS_CHOWN_JOB_H__ */ diff --git a/thunar-vfs/thunar-vfs-info.c b/thunar-vfs/thunar-vfs-info.c index 5445a8028..819614028 100644 --- a/thunar-vfs/thunar-vfs-info.c +++ b/thunar-vfs/thunar-vfs-info.c @@ -192,107 +192,6 @@ thunar_vfs_info_copy (const ThunarVfsInfo *info) -/** - * thunar_vfs_info_chgrp: - * @info : a #ThunarVfsInfo. - * @gid : the new group id. - * @error : return location for errors or %NULL. - * - * Changes the group of the file identified by @info to @gid. Returns - * %TRUE if the operation was successfull, else %FALSE is returned and - * @error is set to describe the cause of the problem. - * - * Return value: %TRUE if the group of the file referred to by @info - * was successfully changed to @gid. - **/ -gboolean -thunar_vfs_info_chgrp (ThunarVfsInfo *info, - ThunarVfsGroupId gid, - GError **error) -{ - gboolean succeed = TRUE; - gchar *absolute_path; - - g_return_val_if_fail (info != NULL, FALSE); - g_return_val_if_fail (error == NULL || *error == NULL, FALSE); - - /* determine the absolute path to the file */ - absolute_path = thunar_vfs_path_dup_string (info->path); - - /* try to change the group */ - if (chown (absolute_path, info->uid, gid) < 0) - { - /* forward the error */ - g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno), g_strerror (errno)); - succeed = FALSE; - } - else - { - /* update the group id */ - info->gid = gid; - } - - /* cleanup */ - g_free (absolute_path); - - return succeed; -} - - - -/** - * thunar_vfs_info_chmod: - * @info : a #ThunarVfsInfo. - * @mode : the new file mode. - * @error : return location for errors or %NULL. - * - * Changes the mode of the file identified by @info to @mode. Returns - * %TRUE if the operation was successfull, else %FALSE is returned and - * @error is set to describe the cause of the problem. - * - * Return value: %TRUE if the mode of the file identified by @info - * was successfully changed to @mode. - **/ -gboolean -thunar_vfs_info_chmod (ThunarVfsInfo *info, - ThunarVfsFileMode mode, - GError **error) -{ - gboolean succeed = TRUE; - gchar *absolute_path; - - g_return_val_if_fail (info != NULL, FALSE); - g_return_val_if_fail (error == NULL || *error == NULL, FALSE); - - /* make sure, we don't try to set the file type - * (some systems will complain otherwise). - */ - mode &= 07777; - - /* determine the absolute path to the file */ - absolute_path = thunar_vfs_path_dup_string (info->path); - - /* try to change the file mode */ - if (chmod (absolute_path, mode) < 0) - { - /* forward the error */ - g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno), g_strerror (errno)); - succeed = FALSE; - } - else - { - /* update the mode for info */ - info->mode = mode; - } - - /* cleanup */ - g_free (absolute_path); - - return succeed; -} - - - /** * thunar_vfs_info_execute: * @info : a #ThunarVfsInfo. diff --git a/thunar-vfs/thunar-vfs-info.h b/thunar-vfs/thunar-vfs-info.h index 6e9519c62..1fc335cfc 100644 --- a/thunar-vfs/thunar-vfs-info.h +++ b/thunar-vfs/thunar-vfs-info.h @@ -102,14 +102,6 @@ ThunarVfsInfo *thunar_vfs_info_copy (const ThunarVfsIn G_INLINE_FUNC const gchar *thunar_vfs_info_get_custom_icon (const ThunarVfsInfo *info); -gboolean thunar_vfs_info_chgrp (ThunarVfsInfo *info, - ThunarVfsGroupId gid, - GError **error); - -gboolean thunar_vfs_info_chmod (ThunarVfsInfo *info, - ThunarVfsFileMode mode, - GError **error); - gboolean thunar_vfs_info_execute (const ThunarVfsInfo *info, GdkScreen *screen, GList *path_list, diff --git a/thunar-vfs/thunar-vfs-monitor.c b/thunar-vfs/thunar-vfs-monitor.c index ab106b458..5ad85ce05 100644 --- a/thunar-vfs/thunar-vfs-monitor.c +++ b/thunar-vfs/thunar-vfs-monitor.c @@ -1,6 +1,6 @@ /* $Id$ */ /*- - * Copyright (c) 2005 Benedikt Meurer <benny@xfce.org> + * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -266,7 +266,7 @@ thunar_vfs_monitor_queue_notification (ThunarVfsMonitor *monitor, /* check if we already have a matching notification */ for (notification = monitor->notifications; notification != NULL; notification = notification->next) - if (notification->id == id && strcmp (filename, notification->filename) == 0) + if (notification->id == id && exo_str_is_equal (filename, notification->filename)) { if (tag >= notification->tag) { diff --git a/thunar-vfs/thunar-vfs.c b/thunar-vfs/thunar-vfs.c index 7c2325232..07e9bb782 100644 --- a/thunar-vfs/thunar-vfs.c +++ b/thunar-vfs/thunar-vfs.c @@ -23,6 +23,8 @@ #endif #include <thunar-vfs/thunar-vfs.h> +#include <thunar-vfs/thunar-vfs-chmod-job.h> +#include <thunar-vfs/thunar-vfs-chown-job.h> #include <thunar-vfs/thunar-vfs-link-job.h> #include <thunar-vfs/thunar-vfs-listdir-job.h> #include <thunar-vfs/thunar-vfs-mkdir-job.h> @@ -519,5 +521,124 @@ thunar_vfs_make_directories (GList *path_list, +/** + * thunar_vfs_change_mode: + * @path : the base #ThunarVfsPath. + * @dir_mask : the mask for the @dir_mode. + * @dir_mode : the new mode for directories. + * @file_mask : the mask for the @file_mode. + * @file_mode : the new mode for files. + * @recursive : whether to change permissions recursively. + * @error : return location for errors or %NULL. + * + * The caller is responsible to free the returned job using + * g_object_unref() when no longer needed. + * + * Note, that the returned job is launched right away, so you don't + * need to call thunar_vfs_job_launch() on it. + * + * Return value: the newly allocated #ThunarVfsChmodJob or %NULL + * if an error occurs while creating the job. + **/ +ThunarVfsJob* +thunar_vfs_change_mode (ThunarVfsPath *path, + ThunarVfsFileMode dir_mask, + ThunarVfsFileMode dir_mode, + ThunarVfsFileMode file_mask, + ThunarVfsFileMode file_mode, + gboolean recursive, + GError **error) +{ + ThunarVfsJob *job; + + g_return_val_if_fail (path != NULL, NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + + /* allocate and launch the new job */ + job = thunar_vfs_chmod_job_new (path, dir_mask, dir_mode, file_mask, file_mode, recursive, error); + if (G_LIKELY (job != NULL)) + thunar_vfs_job_launch (job); + + return job; +} + + + +/** + * thunar_vfs_change_group: + * @path : the base #ThunarVfsPath. + * @gid : the new group id. + * @recursive : whether to change groups recursively. + * @error : return location for errors or %NULL. + * + * The caller is responsible to free the returned job using + * g_object_unref() when no longer needed. + * + * Note, that the returned job is launched right away, so you don't + * need to call thunar_vfs_job_launch() on it. + * + * Return value: the newly allocated #ThunarVfsChownJob or %NULL + * if an error occurs while creating the job. + **/ +ThunarVfsJob* +thunar_vfs_change_group (ThunarVfsPath *path, + ThunarVfsGroupId gid, + gboolean recursive, + GError **error) +{ + ThunarVfsJob *job; + + g_return_val_if_fail (path != NULL, NULL); + g_return_val_if_fail ((gint) gid >= 0, NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + + /* allocate and launch the new job */ + job = thunar_vfs_chown_job_new (path, -1, gid, recursive, error); + if (G_LIKELY (job != NULL)) + thunar_vfs_job_launch (job); + + return job; +} + + + +/** + * thunar_vfs_change_owner: + * @path : the base #ThunarVfsPath. + * @uid : the new user id. + * @recursive : whether to change groups recursively. + * @error : return location for errors or %NULL. + * + * The caller is responsible to free the returned job using + * g_object_unref() when no longer needed. + * + * Note, that the returned job is launched right away, so you don't + * need to call thunar_vfs_job_launch() on it. + * + * Return value: the newly allocated #ThunarVfsChownJob or %NULL + * if an error occurs while creating the job. + **/ +ThunarVfsJob* +thunar_vfs_change_owner (ThunarVfsPath *path, + ThunarVfsUserId uid, + gboolean recursive, + GError **error) +{ + ThunarVfsJob *job; + + g_return_val_if_fail (path != NULL, NULL); + g_return_val_if_fail ((gint) uid >= 0, NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + + /* allocate and launch the new job */ + job = thunar_vfs_chown_job_new (path, uid, -1, recursive, error); + if (G_LIKELY (job != NULL)) + thunar_vfs_job_launch (job); + + return job; +} + + + #define __THUNAR_VFS_C__ #include <thunar-vfs/thunar-vfs-aliasdef.c> diff --git a/thunar-vfs/thunar-vfs.h b/thunar-vfs/thunar-vfs.h index 6f863373f..919b7d7bd 100644 --- a/thunar-vfs/thunar-vfs.h +++ b/thunar-vfs/thunar-vfs.h @@ -44,39 +44,57 @@ G_BEGIN_DECLS; void thunar_vfs_init (void); void thunar_vfs_shutdown (void); -ThunarVfsJob *thunar_vfs_listdir (ThunarVfsPath *path, - GError **error) G_GNUC_MALLOC; - -ThunarVfsJob *thunar_vfs_copy_file (ThunarVfsPath *source_path, - ThunarVfsPath *target_path, - GError **error) G_GNUC_MALLOC; -ThunarVfsJob *thunar_vfs_copy_files (GList *source_path_list, - GList *target_path_list, - GError **error) G_GNUC_MALLOC; - -ThunarVfsJob *thunar_vfs_link_file (ThunarVfsPath *source_path, - ThunarVfsPath *target_path, - GError **error) G_GNUC_MALLOC; -ThunarVfsJob *thunar_vfs_link_files (GList *source_path_list, - GList *target_path_list, - GError **error) G_GNUC_MALLOC; - -ThunarVfsJob *thunar_vfs_move_file (ThunarVfsPath *source_path, - ThunarVfsPath *target_path, - GError **error) G_GNUC_MALLOC; -ThunarVfsJob *thunar_vfs_move_files (GList *source_path_list, - GList *target_path_list, - GError **error) G_GNUC_MALLOC; - -ThunarVfsJob *thunar_vfs_unlink_file (ThunarVfsPath *path, - GError **error) G_GNUC_MALLOC; -ThunarVfsJob *thunar_vfs_unlink_files (GList *path_list, - GError **error) G_GNUC_MALLOC; - -ThunarVfsJob *thunar_vfs_make_directory (ThunarVfsPath *path, - GError **error) G_GNUC_MALLOC; -ThunarVfsJob *thunar_vfs_make_directories (GList *path_list, - GError **error) G_GNUC_MALLOC; +ThunarVfsJob *thunar_vfs_listdir (ThunarVfsPath *path, + GError **error) G_GNUC_MALLOC; + +ThunarVfsJob *thunar_vfs_copy_file (ThunarVfsPath *source_path, + ThunarVfsPath *target_path, + GError **error) G_GNUC_MALLOC; +ThunarVfsJob *thunar_vfs_copy_files (GList *source_path_list, + GList *target_path_list, + GError **error) G_GNUC_MALLOC; + +ThunarVfsJob *thunar_vfs_link_file (ThunarVfsPath *source_path, + ThunarVfsPath *target_path, + GError **error) G_GNUC_MALLOC; +ThunarVfsJob *thunar_vfs_link_files (GList *source_path_list, + GList *target_path_list, + GError **error) G_GNUC_MALLOC; + +ThunarVfsJob *thunar_vfs_move_file (ThunarVfsPath *source_path, + ThunarVfsPath *target_path, + GError **error) G_GNUC_MALLOC; +ThunarVfsJob *thunar_vfs_move_files (GList *source_path_list, + GList *target_path_list, + GError **error) G_GNUC_MALLOC; + +ThunarVfsJob *thunar_vfs_unlink_file (ThunarVfsPath *path, + GError **error) G_GNUC_MALLOC; +ThunarVfsJob *thunar_vfs_unlink_files (GList *path_list, + GError **error) G_GNUC_MALLOC; + +ThunarVfsJob *thunar_vfs_make_directory (ThunarVfsPath *path, + GError **error) G_GNUC_MALLOC; +ThunarVfsJob *thunar_vfs_make_directories (GList *path_list, + GError **error) G_GNUC_MALLOC; + +ThunarVfsJob *thunar_vfs_change_mode (ThunarVfsPath *path, + ThunarVfsFileMode dir_mask, + ThunarVfsFileMode dir_mode, + ThunarVfsFileMode file_mask, + ThunarVfsFileMode file_mode, + gboolean recursive, + GError **error) G_GNUC_MALLOC; + +ThunarVfsJob *thunar_vfs_change_group (ThunarVfsPath *path, + ThunarVfsGroupId gid, + gboolean recursive, + GError **error) G_GNUC_MALLOC; + +ThunarVfsJob *thunar_vfs_change_owner (ThunarVfsPath *path, + ThunarVfsUserId uid, + gboolean recursive, + GError **error) G_GNUC_MALLOC; G_END_DECLS; diff --git a/thunar-vfs/thunar-vfs.symbols b/thunar-vfs/thunar-vfs.symbols index 9feea558e..c59ed495f 100644 --- a/thunar-vfs/thunar-vfs.symbols +++ b/thunar-vfs/thunar-vfs.symbols @@ -50,6 +50,9 @@ thunar_vfs_unlink_file G_GNUC_MALLOC thunar_vfs_unlink_files G_GNUC_MALLOC thunar_vfs_make_directory G_GNUC_MALLOC thunar_vfs_make_directories G_GNUC_MALLOC +thunar_vfs_change_mode G_GNUC_MALLOC +thunar_vfs_change_group G_GNUC_MALLOC +thunar_vfs_change_owner G_GNUC_MALLOC #endif #endif @@ -76,8 +79,6 @@ thunar_vfs_info_copy #ifdef INCLUDE_INTERNAL_SYMBOLS thunar_vfs_info_get_custom_icon #endif -thunar_vfs_info_chgrp -thunar_vfs_info_chmod thunar_vfs_info_execute thunar_vfs_info_rename thunar_vfs_info_matches diff --git a/thunar/Makefile.am b/thunar/Makefile.am index 27d557a46..3824a7441 100644 --- a/thunar/Makefile.am +++ b/thunar/Makefile.am @@ -24,12 +24,8 @@ Thunar_SOURCES = \ $(thunar_include_HEADERS) \ $(thunar_built_sources) \ main.c \ - thunar-advanced-permissions-dialog.c \ - thunar-advanced-permissions-dialog.h \ thunar-application.c \ thunar-application.h \ - thunar-change-group-dialog.c \ - thunar-change-group-dialog.h \ thunar-chooser-dialog.c \ thunar-chooser-dialog.h \ thunar-chooser-model.c \ @@ -46,6 +42,8 @@ Thunar_SOURCES = \ thunar-dnd.h \ thunar-emblem-chooser.c \ thunar-emblem-chooser.h \ + thunar-enum-types.c \ + thunar-enum-types.h \ thunar-shortcuts-model.c \ thunar-shortcuts-model.h \ thunar-shortcuts-pane.c \ @@ -93,10 +91,8 @@ Thunar_SOURCES = \ thunar-pango-extensions.h \ thunar-path-entry.c \ thunar-path-entry.h \ - thunar-permissions-model.c \ - thunar-permissions-model.h \ - thunar-permissions-view.c \ - thunar-permissions-view.h \ + thunar-permissions-chooser.c \ + thunar-permissions-chooser.h \ thunar-preferences-dialog.c \ thunar-preferences-dialog.h \ thunar-preferences.c \ diff --git a/thunar/thunar-advanced-permissions-dialog.c b/thunar/thunar-advanced-permissions-dialog.c deleted file mode 100644 index 8be9c7e95..000000000 --- a/thunar/thunar-advanced-permissions-dialog.c +++ /dev/null @@ -1,478 +0,0 @@ -/* $Id$ */ -/*- - * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> - * - * 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., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <thunar/thunar-advanced-permissions-dialog.h> -#include <thunar/thunar-dialogs.h> - - - -/* Property identifiers */ -enum -{ - PROP_0, - PROP_FILE, -}; - - - -static void thunar_advanced_permissions_dialog_class_init (ThunarAdvancedPermissionsDialogClass *klass); -static void thunar_advanced_permissions_dialog_init (ThunarAdvancedPermissionsDialog *advanced_permissions_dialog); -static void thunar_advanced_permissions_dialog_finalize (GObject *object); -static void thunar_advanced_permissions_dialog_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static void thunar_advanced_permissions_dialog_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void thunar_advanced_permissions_dialog_response (GtkDialog *dialog, - gint response); -static void thunar_advanced_permissions_dialog_file_changed (ThunarAdvancedPermissionsDialog *advanced_permissions_dialog, - ThunarFile *file); - - - -struct _ThunarAdvancedPermissionsDialogClass -{ - GtkDialogClass __parent__; -}; - -struct _ThunarAdvancedPermissionsDialog -{ - GtkDialog __parent__; - - ThunarFile *file; - - GtkWidget *suid_button; - GtkWidget *sgid_button; - GtkWidget *sticky_button; -}; - - - -static GObjectClass *thunar_advanced_permissions_dialog_parent_class; - - - -GType -thunar_advanced_permissions_dialog_get_type (void) -{ - static GType type = G_TYPE_INVALID; - - if (G_UNLIKELY (type == G_TYPE_INVALID)) - { - static const GTypeInfo info = - { - sizeof (ThunarAdvancedPermissionsDialogClass), - NULL, - NULL, - (GClassInitFunc) thunar_advanced_permissions_dialog_class_init, - NULL, - NULL, - sizeof (ThunarAdvancedPermissionsDialog), - 0, - (GInstanceInitFunc) thunar_advanced_permissions_dialog_init, - NULL, - }; - - type = g_type_register_static (GTK_TYPE_DIALOG, I_("ThunarAdvancedPermissionsDialog"), &info, 0); - } - - return type; -} - - - -static void -thunar_advanced_permissions_dialog_class_init (ThunarAdvancedPermissionsDialogClass *klass) -{ - GtkDialogClass *gtkdialog_class; - GObjectClass *gobject_class; - - /* determine the parent type class */ - thunar_advanced_permissions_dialog_parent_class = g_type_class_peek_parent (klass); - - gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = thunar_advanced_permissions_dialog_finalize; - gobject_class->get_property = thunar_advanced_permissions_dialog_get_property; - gobject_class->set_property = thunar_advanced_permissions_dialog_set_property; - - gtkdialog_class = GTK_DIALOG_CLASS (klass); - gtkdialog_class->response = thunar_advanced_permissions_dialog_response; - - /** - * ThunarAdvancedPermissionsDialog:file: - * - * The #ThunarFile whose advanced permissions should be edited - * by this dialog. - **/ - g_object_class_install_property (gobject_class, - PROP_FILE, - g_param_spec_object ("file", "file", "file", - THUNAR_TYPE_FILE, - EXO_PARAM_READWRITE)); -} - - - -static void -thunar_advanced_permissions_dialog_init (ThunarAdvancedPermissionsDialog *advanced_permissions_dialog) -{ - AtkRelationSet *relations; - AtkRelation *relation; - AtkObject *object; - GtkWidget *notebook; - GtkWidget *image; - GtkWidget *label; - GtkWidget *table; - GtkWidget *vbox; - - gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (advanced_permissions_dialog)->vbox), 2); - gtk_dialog_add_button (GTK_DIALOG (advanced_permissions_dialog), GTK_STOCK_HELP, GTK_RESPONSE_HELP); - gtk_dialog_add_button (GTK_DIALOG (advanced_permissions_dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); - gtk_dialog_add_button (GTK_DIALOG (advanced_permissions_dialog), GTK_STOCK_OK, GTK_RESPONSE_ACCEPT); - gtk_dialog_set_default_response (GTK_DIALOG (advanced_permissions_dialog), GTK_RESPONSE_ACCEPT); - gtk_dialog_set_has_separator (GTK_DIALOG (advanced_permissions_dialog), FALSE); - gtk_window_set_destroy_with_parent (GTK_WINDOW (advanced_permissions_dialog), TRUE); - gtk_window_set_modal (GTK_WINDOW (advanced_permissions_dialog), TRUE); - gtk_window_set_title (GTK_WINDOW (advanced_permissions_dialog), _("Advanced Permissions")); - - notebook = gtk_notebook_new (); - gtk_container_set_border_width (GTK_CONTAINER (notebook), 5); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (advanced_permissions_dialog)->vbox), notebook, TRUE, TRUE, 0); - gtk_widget_show (notebook); - - vbox = gtk_vbox_new (FALSE, 32); - label = gtk_label_new (_("Special Bits")); - gtk_container_set_border_width (GTK_CONTAINER (vbox), 12); - gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox, label); - gtk_widget_show (label); - gtk_widget_show (vbox); - - table = gtk_table_new (2, 2, FALSE); - gtk_table_set_col_spacings (GTK_TABLE (table), 3); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_container_set_border_width (GTK_CONTAINER (table), 0); - gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); - gtk_widget_show (table); - - advanced_permissions_dialog->suid_button = gtk_check_button_new_with_mnemonic (_("Set _User ID (SUID)")); - gtk_table_attach (GTK_TABLE (table), advanced_permissions_dialog->suid_button, 0, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (advanced_permissions_dialog->suid_button); - - image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG); - gtk_misc_set_alignment (GTK_MISC (image), 0.5f, 0.0f); - gtk_misc_set_padding (GTK_MISC (image), 3, 3); - gtk_table_attach (GTK_TABLE (table), image, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (image); - - label = gtk_label_new (_("An executable file whose Set User ID (SUID) bit is\n" - "set will always be executed with the privileges of\n" - "the owner of the executable.")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f); - gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (label); - - /* set Atk label relation */ - object = gtk_widget_get_accessible (advanced_permissions_dialog->suid_button); - relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label)); - relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR); - atk_relation_set_add (relations, relation); - g_object_unref (G_OBJECT (relation)); - - table = gtk_table_new (2, 2, FALSE); - gtk_table_set_col_spacings (GTK_TABLE (table), 3); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_container_set_border_width (GTK_CONTAINER (table), 0); - gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); - gtk_widget_show (table); - - advanced_permissions_dialog->sgid_button = gtk_check_button_new_with_mnemonic (_("Set _Group ID (SGID)")); - gtk_table_attach (GTK_TABLE (table), advanced_permissions_dialog->sgid_button, 0, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (advanced_permissions_dialog->sgid_button); - - image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG); - gtk_misc_set_alignment (GTK_MISC (image), 0.5f, 0.0f); - gtk_misc_set_padding (GTK_MISC (image), 3, 3); - gtk_table_attach (GTK_TABLE (table), image, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (image); - - label = gtk_label_new (_("An executable file whose Set Group ID (SGID) bit is\n" - "set will always be executed with the privileges of the\n" - "group of the executable.")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f); - gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (label); - - /* set Atk label relation */ - object = gtk_widget_get_accessible (advanced_permissions_dialog->suid_button); - relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label)); - relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR); - atk_relation_set_add (relations, relation); - g_object_unref (G_OBJECT (relation)); - - table = gtk_table_new (2, 2, FALSE); - gtk_table_set_col_spacings (GTK_TABLE (table), 3); - gtk_table_set_row_spacings (GTK_TABLE (table), 6); - gtk_container_set_border_width (GTK_CONTAINER (table), 0); - gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); - gtk_widget_show (table); - - advanced_permissions_dialog->sticky_button = gtk_check_button_new_with_mnemonic (_("_Sticky")); - gtk_table_attach (GTK_TABLE (table), advanced_permissions_dialog->sticky_button, 0, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (advanced_permissions_dialog->sticky_button); - - image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG); - gtk_misc_set_alignment (GTK_MISC (image), 0.5f, 0.0f); - gtk_misc_set_padding (GTK_MISC (image), 3, 3); - gtk_table_attach (GTK_TABLE (table), image, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (image); - - label = gtk_label_new (_("A file in a sticky directory may only be removed or\n" - "renamed by a user if the user has write permission\n" - "for the directory and the user is the owner of the\n" - "file, the owner of the directory or the superuser.")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f); - gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (label); - - /* set Atk label relation */ - object = gtk_widget_get_accessible (advanced_permissions_dialog->suid_button); - relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label)); - relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR); - atk_relation_set_add (relations, relation); - g_object_unref (G_OBJECT (relation)); -} - - - -static void -thunar_advanced_permissions_dialog_finalize (GObject *object) -{ - ThunarAdvancedPermissionsDialog *advanced_permissions_dialog = THUNAR_ADVANCED_PERMISSIONS_DIALOG (object); - - /* reset the file property */ - thunar_advanced_permissions_dialog_set_file (advanced_permissions_dialog, NULL); - - (*G_OBJECT_CLASS (thunar_advanced_permissions_dialog_parent_class)->finalize) (object); -} - - - -static void -thunar_advanced_permissions_dialog_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - ThunarAdvancedPermissionsDialog *advanced_permissions_dialog = THUNAR_ADVANCED_PERMISSIONS_DIALOG (object); - - switch (prop_id) - { - case PROP_FILE: - g_value_set_object (value, thunar_advanced_permissions_dialog_get_file (advanced_permissions_dialog)); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - - - -static void -thunar_advanced_permissions_dialog_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - ThunarAdvancedPermissionsDialog *advanced_permissions_dialog = THUNAR_ADVANCED_PERMISSIONS_DIALOG (object); - - switch (prop_id) - { - case PROP_FILE: - thunar_advanced_permissions_dialog_set_file (advanced_permissions_dialog, g_value_get_object (value)); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - - - -static void -thunar_advanced_permissions_dialog_response (GtkDialog *dialog, - gint response) -{ - ThunarAdvancedPermissionsDialog *advanced_permissions_dialog = THUNAR_ADVANCED_PERMISSIONS_DIALOG (dialog); - ThunarVfsFileMode mode; - GError *error = NULL; - - /* check if the user pressed "Ok" */ - if (response == GTK_RESPONSE_ACCEPT) - { - /* determine the previous file mode */ - mode = thunar_file_get_mode (advanced_permissions_dialog->file); - - /* drop the previous suid/sgid/sticky bits */ - mode &= ~(THUNAR_VFS_FILE_MODE_SUID | THUNAR_VFS_FILE_MODE_SGID | THUNAR_VFS_FILE_MODE_STICKY); - - /* apply the new bits */ - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (advanced_permissions_dialog->suid_button))) - mode |= THUNAR_VFS_FILE_MODE_SUID; - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (advanced_permissions_dialog->sgid_button))) - mode |= THUNAR_VFS_FILE_MODE_SGID; - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (advanced_permissions_dialog->sticky_button))) - mode |= THUNAR_VFS_FILE_MODE_STICKY; - - /* try to apply the new mode to the file */ - if (!thunar_file_chmod (advanced_permissions_dialog->file, mode, &error)) - { - /* display an error message to the user */ - thunar_dialogs_show_error (GTK_WIDGET (dialog), error, _("Failed to change permissions of `%s'"), - thunar_file_get_display_name (advanced_permissions_dialog->file)); - g_error_free (error); - } - } - - /* close the dialog window */ - gtk_widget_destroy (GTK_WIDGET (dialog)); -} - - - -static void -thunar_advanced_permissions_dialog_file_changed (ThunarAdvancedPermissionsDialog *advanced_permissions_dialog, - ThunarFile *file) -{ - ThunarVfsFileMode mode; - - g_return_if_fail (THUNAR_IS_ADVANCED_PERMISSIONS_DIALOG (advanced_permissions_dialog)); - g_return_if_fail (advanced_permissions_dialog->file == file); - g_return_if_fail (THUNAR_IS_FILE (file)); - - /* determine the file's mode */ - mode = thunar_file_get_mode (file); - - /* update the "SUID" check button */ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (advanced_permissions_dialog->suid_button), (mode & THUNAR_VFS_FILE_MODE_SUID)); - gtk_widget_set_sensitive (advanced_permissions_dialog->suid_button, thunar_file_is_chmodable (file)); - - /* update the "SGID" check button */ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (advanced_permissions_dialog->sgid_button), (mode & THUNAR_VFS_FILE_MODE_SGID)); - gtk_widget_set_sensitive (advanced_permissions_dialog->sgid_button, thunar_file_is_chmodable (file)); - - /* update the "Sticky" check button */ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (advanced_permissions_dialog->sticky_button), (mode & THUNAR_VFS_FILE_MODE_STICKY)); - gtk_widget_set_sensitive (advanced_permissions_dialog->sticky_button, thunar_file_is_chmodable (file)); - - /* update the sensitivity of the "Ok" button */ - gtk_dialog_set_response_sensitive (GTK_DIALOG (advanced_permissions_dialog), GTK_RESPONSE_ACCEPT, thunar_file_is_chmodable (file)); -} - - - -/** - * thunar_advanced_permissions_dialog_new: - * - * Allocates a new #ThunarAdvancedPermissionsDialog instance. - * - * Return value: the newly allocated #ThunarAdvancedPermissionsDialog. - **/ -GtkWidget* -thunar_advanced_permissions_dialog_new (void) -{ - return g_object_new (THUNAR_TYPE_ADVANCED_PERMISSIONS_DIALOG, NULL); -} - - - -/** - * thunar_advanced_permissions_dialog_get_file: - * @advanced_permissions_dialog : a #ThunarAdvancedPermissionsDialog instance. - * - * Returns the #ThunarFile currently associated with the @advanced_permissions_dialog. - * - * Return value: the file associated with @advanced_permissions_dialog. - **/ -ThunarFile* -thunar_advanced_permissions_dialog_get_file (ThunarAdvancedPermissionsDialog *advanced_permissions_dialog) -{ - g_return_val_if_fail (THUNAR_IS_ADVANCED_PERMISSIONS_DIALOG (advanced_permissions_dialog), NULL); - return advanced_permissions_dialog->file; -} - - - -/** - * thunar_advanced_permissions_dialog_set_file: - * @advanced_permissions_dialog : a #ThunarAdvancedPermissionsDialog instance. - * @file : a #ThunarFile or %NULL. - * - * Associates the @advanced_permissions_dialog with the specified @file. - **/ -void -thunar_advanced_permissions_dialog_set_file (ThunarAdvancedPermissionsDialog *advanced_permissions_dialog, - ThunarFile *file) -{ - g_return_if_fail (THUNAR_IS_ADVANCED_PERMISSIONS_DIALOG (advanced_permissions_dialog)); - g_return_if_fail (file == NULL || THUNAR_IS_FILE (file)); - - /* check if we already use that file */ - if (G_UNLIKELY (advanced_permissions_dialog->file == file)) - return; - - /* disconnect from the previous file */ - if (G_LIKELY (advanced_permissions_dialog->file != NULL)) - { - /* disconnect the changed signal handler */ - g_signal_handlers_disconnect_by_func (G_OBJECT (advanced_permissions_dialog->file), thunar_advanced_permissions_dialog_file_changed, advanced_permissions_dialog); - - /* release our reference */ - g_object_unref (G_OBJECT (advanced_permissions_dialog->file)); - } - - /* activate the new file */ - advanced_permissions_dialog->file = file; - - /* connect to the new file */ - if (G_LIKELY (file != NULL)) - { - /* take a reference on the file */ - g_object_ref (G_OBJECT (file)); - - /* stay informed about changes */ - g_signal_connect_swapped (G_OBJECT (file), "changed", G_CALLBACK (thunar_advanced_permissions_dialog_file_changed), advanced_permissions_dialog); - - /* update the GUI */ - thunar_advanced_permissions_dialog_file_changed (advanced_permissions_dialog, file); - } - - /* notify listeners */ - g_object_notify (G_OBJECT (advanced_permissions_dialog), "file"); -} - diff --git a/thunar/thunar-advanced-permissions-dialog.h b/thunar/thunar-advanced-permissions-dialog.h deleted file mode 100644 index 8372e1030..000000000 --- a/thunar/thunar-advanced-permissions-dialog.h +++ /dev/null @@ -1,47 +0,0 @@ -/* $Id$ */ -/*- - * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> - * - * 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., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __THUNAR_ADVANCED_PERMISSIONS_DIALOG_H__ -#define __THUNAR_ADVANCED_PERMISSIONS_DIALOG_H__ - -#include <thunar/thunar-file.h> - -G_BEGIN_DECLS; - -typedef struct _ThunarAdvancedPermissionsDialogClass ThunarAdvancedPermissionsDialogClass; -typedef struct _ThunarAdvancedPermissionsDialog ThunarAdvancedPermissionsDialog; - -#define THUNAR_TYPE_ADVANCED_PERMISSIONS_DIALOG (thunar_advanced_permissions_dialog_get_type ()) -#define THUNAR_ADVANCED_PERMISSIONS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THUNAR_TYPE_ADVANCED_PERMISSIONS_DIALOG, ThunarAdvancedPermissionsDialog)) -#define THUNAR_ADVANCED_PERMISSIONS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), THUNAR_TYPE_ADVANCED_PERMISSIONS_DIALOG, ThunarAdvancedPermissionsDialogClass)) -#define THUNAR_IS_ADVANCED_PERMISSIONS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THUNAR_TYPE_ADVANCED_PERMISSIONS_DIALOG)) -#define THUNAR_IS_ADVANCED_PERMISSIONS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), THUNAR_TYPE_ADVANCED_PERMISSIONS_DIALOG)) -#define THUNAR_ADVANCED_PERMISSIONS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THUNAR_TYPE_ADVANCED_PERMISSIONS_DIALOG, ThunarAdvancedPermissionsDialogClass)) - -GType thunar_advanced_permissions_dialog_get_type (void) G_GNUC_CONST; - -GtkWidget *thunar_advanced_permissions_dialog_new (void) G_GNUC_MALLOC; - -ThunarFile *thunar_advanced_permissions_dialog_get_file (ThunarAdvancedPermissionsDialog *advanced_permissions_dialog); -void thunar_advanced_permissions_dialog_set_file (ThunarAdvancedPermissionsDialog *advanced_permissions_dialog, - ThunarFile *file); - -G_END_DECLS; - -#endif /* !__THUNAR_ADVANCED_PERMISSIONS_DIALOG_H__ */ diff --git a/thunar/thunar-change-group-dialog.c b/thunar/thunar-change-group-dialog.c deleted file mode 100644 index a0c52c8ef..000000000 --- a/thunar/thunar-change-group-dialog.c +++ /dev/null @@ -1,531 +0,0 @@ -/* $Id$ */ -/*- - * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> - * - * 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., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#include <thunar/thunar-change-group-dialog.h> -#include <thunar/thunar-dialogs.h> -#include <thunar/thunar-stock.h> - - - -/* Property identifiers */ -enum -{ - PROP_0, - PROP_FILE, -}; - -/* Column identifiers for the combo box */ -typedef enum -{ - THUNAR_CHANGE_GROUP_STORE_COLUMN_STOCK_ID, - THUNAR_CHANGE_GROUP_STORE_COLUMN_NAME, - THUNAR_CHANGE_GROUP_STORE_COLUMN_GROUP, - THUNAR_CHANGE_GROUP_STORE_N_COLUMNS, -} ThunarChangeGroupStoreColumn; - - - -static void thunar_change_group_dialog_class_init (ThunarChangeGroupDialogClass *klass); -static void thunar_change_group_dialog_init (ThunarChangeGroupDialog *change_group_dialog); -static void thunar_change_group_dialog_finalize (GObject *object); -static void thunar_change_group_dialog_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static void thunar_change_group_dialog_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void thunar_change_group_dialog_response (GtkDialog *dialog, - gint response); -static void thunar_change_group_dialog_file_changed (ThunarChangeGroupDialog *change_group_dialog, - ThunarFile *file); - - - -struct _ThunarChangeGroupDialogClass -{ - GtkDialogClass __parent__; -}; - -struct _ThunarChangeGroupDialog -{ - GtkDialog __parent__; - - ThunarFile *file; - - GtkWidget *combo; -}; - - - -static GObjectClass *thunar_change_group_dialog_parent_class; - - - -GType -thunar_change_group_dialog_get_type (void) -{ - static GType type = G_TYPE_INVALID; - - if (G_UNLIKELY (type == G_TYPE_INVALID)) - { - static const GTypeInfo info = - { - sizeof (ThunarChangeGroupDialogClass), - NULL, - NULL, - (GClassInitFunc) thunar_change_group_dialog_class_init, - NULL, - NULL, - sizeof (ThunarChangeGroupDialog), - 0, - (GInstanceInitFunc) thunar_change_group_dialog_init, - NULL, - }; - - type = g_type_register_static (GTK_TYPE_DIALOG, I_("ThunarChangeGroupDialogClass"), &info, 0); - } - - return type; -} - - - -static void -thunar_change_group_dialog_class_init (ThunarChangeGroupDialogClass *klass) -{ - GtkDialogClass *gtkdialog_class; - GObjectClass *gobject_class; - - /* determine the parent type class */ - thunar_change_group_dialog_parent_class = g_type_class_peek_parent (klass); - - gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = thunar_change_group_dialog_finalize; - gobject_class->get_property = thunar_change_group_dialog_get_property; - gobject_class->set_property = thunar_change_group_dialog_set_property; - - gtkdialog_class = GTK_DIALOG_CLASS (klass); - gtkdialog_class->response = thunar_change_group_dialog_response; - - /** - * ThunarChangeGroupDialog:file: - * - * The #ThunarFile whose group should be edited. - **/ - g_object_class_install_property (gobject_class, - PROP_FILE, - g_param_spec_object ("file", "file", "file", - THUNAR_TYPE_FILE, - EXO_PARAM_READWRITE)); -} - - - -static gboolean -row_separator_func (GtkTreeModel *model, - GtkTreeIter *iter, - gpointer data) -{ - GObject *object; - - /* determine the value of the "group" column */ - gtk_tree_model_get (model, iter, THUNAR_CHANGE_GROUP_STORE_COLUMN_GROUP, &object, -1); - if (G_LIKELY (object != NULL)) - { - g_object_unref (object); - return FALSE; - } - - return TRUE; -} - - - -static void -thunar_change_group_dialog_init (ThunarChangeGroupDialog *change_group_dialog) -{ - GtkCellRenderer *renderer; - AtkRelationSet *relations; - AtkRelation *relation; - AtkObject *object; - GtkWidget *label; - GtkWidget *hbox; - - gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (change_group_dialog)->vbox), 2); - gtk_container_set_border_width (GTK_CONTAINER (change_group_dialog), 5); - gtk_dialog_add_button (GTK_DIALOG (change_group_dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); - gtk_dialog_add_button (GTK_DIALOG (change_group_dialog), GTK_STOCK_OK, GTK_RESPONSE_ACCEPT); - gtk_dialog_set_default_response (GTK_DIALOG (change_group_dialog), GTK_RESPONSE_ACCEPT); - gtk_dialog_set_has_separator (GTK_DIALOG (change_group_dialog), FALSE); - gtk_window_set_default_size (GTK_WINDOW (change_group_dialog), 300, -1); - gtk_window_set_destroy_with_parent (GTK_WINDOW (change_group_dialog), TRUE); - gtk_window_set_modal (GTK_WINDOW (change_group_dialog), TRUE); - gtk_window_set_title (GTK_WINDOW (change_group_dialog), _("Change Group")); - - hbox = gtk_hbox_new (FALSE, 12); - gtk_container_set_border_width (GTK_CONTAINER (hbox), 5); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (change_group_dialog)->vbox), hbox, FALSE, FALSE, 0); - gtk_widget_show (hbox); - - label = gtk_label_new_with_mnemonic (_("_Group:")); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); - gtk_widget_show (label); - - change_group_dialog->combo = gtk_combo_box_new (); - gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (change_group_dialog->combo), row_separator_func, NULL, NULL); - gtk_label_set_mnemonic_widget (GTK_LABEL (label), change_group_dialog->combo); - gtk_box_pack_start (GTK_BOX (hbox), change_group_dialog->combo, TRUE, TRUE, 0); - gtk_widget_show (change_group_dialog->combo); - - /* set Atk label relation for the entry */ - object = gtk_widget_get_accessible (change_group_dialog->combo); - relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label)); - relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR); - atk_relation_set_add (relations, relation); - g_object_unref (G_OBJECT (relation)); - - /* append the icon renderer */ - renderer = gtk_cell_renderer_pixbuf_new (); - gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (change_group_dialog->combo), renderer, FALSE); - gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (change_group_dialog->combo), renderer, "stock-id", THUNAR_CHANGE_GROUP_STORE_COLUMN_STOCK_ID); - - /* append the text renderer */ - renderer = gtk_cell_renderer_text_new (); - gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (change_group_dialog->combo), renderer, TRUE); - gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (change_group_dialog->combo), renderer, "text", THUNAR_CHANGE_GROUP_STORE_COLUMN_NAME); -} - - - -static void -thunar_change_group_dialog_finalize (GObject *object) -{ - ThunarChangeGroupDialog *change_group_dialog = THUNAR_CHANGE_GROUP_DIALOG (object); - - /* reset the file */ - thunar_change_group_dialog_set_file (change_group_dialog, NULL); - - (*G_OBJECT_CLASS (thunar_change_group_dialog_parent_class)->finalize) (object); -} - - - -static void -thunar_change_group_dialog_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - ThunarChangeGroupDialog *change_group_dialog = THUNAR_CHANGE_GROUP_DIALOG (object); - - switch (prop_id) - { - case PROP_FILE: - g_value_set_object (value, thunar_change_group_dialog_get_file (change_group_dialog)); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - - - -static void -thunar_change_group_dialog_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - ThunarChangeGroupDialog *change_group_dialog = THUNAR_CHANGE_GROUP_DIALOG (object); - - switch (prop_id) - { - case PROP_FILE: - thunar_change_group_dialog_set_file (change_group_dialog, g_value_get_object (value)); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - - - -static void -thunar_change_group_dialog_response (GtkDialog *dialog, - gint response) -{ - ThunarChangeGroupDialog *change_group_dialog = THUNAR_CHANGE_GROUP_DIALOG (dialog); - ThunarVfsGroup *group; - GtkTreeModel *model; - GtkTreeIter iter; - GError *error = NULL; - - /* check if the user pressed "Ok" and determine the selected iterator */ - if (response == GTK_RESPONSE_ACCEPT && gtk_combo_box_get_active_iter (GTK_COMBO_BOX (change_group_dialog->combo), &iter)) - { - /* determine the selected group */ - model = gtk_combo_box_get_model (GTK_COMBO_BOX (change_group_dialog->combo)); - gtk_tree_model_get (model, &iter, THUNAR_CHANGE_GROUP_STORE_COLUMN_GROUP, &group, -1); - if (G_LIKELY (group != NULL)) - { - /* try to change the group of the file */ - if (!thunar_file_chgrp (change_group_dialog->file, group, &error)) - { - /* display an error message */ - thunar_dialogs_show_error (GTK_WIDGET (change_group_dialog), error, _("Failed to change the group to which `%s' belongs"), - thunar_file_get_display_name (change_group_dialog->file)); - g_error_free (error); - } - - /* cleanup */ - g_object_unref (G_OBJECT (group)); - } - } - - /* close the dialog */ - gtk_widget_destroy (GTK_WIDGET (dialog)); -} - - - -static gint -group_compare (gconstpointer group_a, - gconstpointer group_b, - gpointer group_primary) -{ - ThunarVfsGroupId group_primary_id = thunar_vfs_group_get_id (THUNAR_VFS_GROUP (group_primary)); - ThunarVfsGroupId group_a_id = thunar_vfs_group_get_id (THUNAR_VFS_GROUP (group_a)); - ThunarVfsGroupId group_b_id = thunar_vfs_group_get_id (THUNAR_VFS_GROUP (group_b)); - - /* check if the groups are equal */ - if (group_a_id == group_b_id) - return 0; - - /* the primary group is always sorted first */ - if (group_a_id == group_primary_id) - return -1; - else if (group_b_id == group_primary_id) - return 1; - - /* system groups (< 100) are always sorted last */ - if (group_a_id < 100 && group_b_id >= 100) - return 1; - else if (group_b_id < 100 && group_a_id >= 100) - return -1; - - /* otherwise just sort by name */ - return g_ascii_strcasecmp (thunar_vfs_group_get_name (THUNAR_VFS_GROUP (group_a)), thunar_vfs_group_get_name (THUNAR_VFS_GROUP (group_b))); -} - - - -static void -thunar_change_group_dialog_file_changed (ThunarChangeGroupDialog *change_group_dialog, - ThunarFile *file) -{ - ThunarVfsUserManager *user_manager; - ThunarVfsGroup *group; - ThunarVfsUser *user; - GtkListStore *store; - GtkTreeIter iter; - GList *groups; - GList *lp; - gint state = 0; - - g_return_if_fail (THUNAR_IS_CHANGE_GROUP_DIALOG (change_group_dialog)); - g_return_if_fail (change_group_dialog->file == file); - g_return_if_fail (THUNAR_IS_FILE (file)); - - /* check if we are allowed to change the group */ - gtk_dialog_set_response_sensitive (GTK_DIALOG (change_group_dialog), GTK_RESPONSE_ACCEPT, thunar_file_is_chgrpable (file)); - gtk_widget_set_sensitive (change_group_dialog->combo, thunar_file_is_chgrpable (file)); - - /* allocate a new store for the combo box */ - store = gtk_list_store_new (THUNAR_CHANGE_GROUP_STORE_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_OBJECT); - - /* setup the new store for the combo box */ - gtk_combo_box_set_model (GTK_COMBO_BOX (change_group_dialog->combo), GTK_TREE_MODEL (store)); - - /* determine the user for the the new file */ - user = thunar_file_get_user (file); - if (G_LIKELY (user != NULL)) - { - /* determine the group of the new file */ - group = thunar_file_get_group (file); - if (G_LIKELY (group != NULL)) - { - /* check if we have superuser privilieges */ - if (G_UNLIKELY (geteuid () == 0)) - { - /* determine all groups in the system */ - user_manager = thunar_vfs_user_manager_get_default (); - groups = thunar_vfs_user_manager_get_all_groups (user_manager); - g_object_unref (G_OBJECT (user_manager)); - } - else - { - /* determine the groups for the user and take a copy */ - groups = g_list_copy (thunar_vfs_user_get_groups (user)); - g_list_foreach (groups, (GFunc) g_object_ref, NULL); - } - - /* sort the groups according to group_compare() */ - groups = g_list_sort_with_data (groups, group_compare, group); - - /* add the groups to the store */ - for (lp = groups; lp != NULL; lp = lp->next) - { - /* append a separator after the primary group and after the user-groups (not system groups) */ - if (thunar_vfs_group_get_id (groups->data) == thunar_vfs_group_get_id (group) && lp != groups && state == 0) - { - gtk_list_store_append (store, &iter); - ++state; - } - else if (lp != groups && thunar_vfs_group_get_id (lp->data) < 100 && state == 1) - { - gtk_list_store_append (store, &iter); - ++state; - } - - /* append a new item for the group */ - gtk_list_store_append (store, &iter); - gtk_list_store_set (store, &iter, - THUNAR_CHANGE_GROUP_STORE_COLUMN_STOCK_ID, THUNAR_STOCK_PERMISSIONS_GROUP, - THUNAR_CHANGE_GROUP_STORE_COLUMN_NAME, thunar_vfs_group_get_name (lp->data), - THUNAR_CHANGE_GROUP_STORE_COLUMN_GROUP, lp->data, - -1); - - /* set the active iter for the combo box if this group is the primary group */ - if (G_UNLIKELY (lp->data == group)) - gtk_combo_box_set_active_iter (GTK_COMBO_BOX (change_group_dialog->combo), &iter); - } - - /* cleanup */ - g_list_foreach (groups, (GFunc) g_object_unref, NULL); - g_object_unref (G_OBJECT (group)); - g_list_free (groups); - } - - /* cleanup */ - g_object_unref (G_OBJECT (user)); - } - - /* cleanup */ - g_object_unref (G_OBJECT (store)); -} - - - -/** - * thunar_change_group_dialog_new: - * - * Allocates a new #ThunarChangeGroupDialog instance. - * - * Return value: the newly allocated #ThunarChangeGroupDialog. - **/ -GtkWidget* -thunar_change_group_dialog_new (void) -{ - return g_object_new (THUNAR_TYPE_CHANGE_GROUP_DIALOG, NULL); -} - - - -/** - * thunar_change_group_dialog_get_file: - * @change_group_dialog : a #ThunarChangeGroupDialog instance. - * - * Returns the #ThunarFile associated with the specified @change_group_dialog. - * - * Return value: the #ThunarFile associated with @change_group_dialog. - **/ -ThunarFile* -thunar_change_group_dialog_get_file (ThunarChangeGroupDialog *change_group_dialog) -{ - g_return_val_if_fail (THUNAR_IS_CHANGE_GROUP_DIALOG (change_group_dialog), NULL); - return change_group_dialog->file; -} - - - -/** - * thunar_change_group_dialog_set_file: - * @change_group_dialog : a #ThunarChangeGroupDialog instance. - * @file : a #ThunarFile instance or %NULL. - * - * Associates @change_group_dialog with the specified @file, and thereby - * lets @change_group_dialog edit the group of the new @file. - **/ -void -thunar_change_group_dialog_set_file (ThunarChangeGroupDialog *change_group_dialog, - ThunarFile *file) -{ - g_return_if_fail (THUNAR_IS_CHANGE_GROUP_DIALOG (change_group_dialog)); - g_return_if_fail (file == NULL || THUNAR_IS_FILE (file)); - - /* check if we already use that file */ - if (G_UNLIKELY (change_group_dialog->file == file)) - return; - - /* disconnect from the previously set file */ - if (G_LIKELY (change_group_dialog->file != NULL)) - { - g_signal_handlers_disconnect_by_func (G_OBJECT (change_group_dialog->file), thunar_change_group_dialog_file_changed, change_group_dialog); - g_object_unref (G_OBJECT (change_group_dialog->file)); - } - - /* activate the new file */ - change_group_dialog->file = file; - - /* connect to the new file */ - if (G_LIKELY (file != NULL)) - { - /* take a reference on the file */ - g_object_ref (G_OBJECT (file)); - - /* stay informed of changes to the file */ - g_signal_connect_swapped (G_OBJECT (file), "changed", G_CALLBACK (thunar_change_group_dialog_file_changed), change_group_dialog); - - /* setup the GUI for the new file */ - thunar_change_group_dialog_file_changed (change_group_dialog, file); - } - - /* notify listeners */ - g_object_notify (G_OBJECT (change_group_dialog), "file"); -} - - diff --git a/thunar/thunar-change-group-dialog.h b/thunar/thunar-change-group-dialog.h deleted file mode 100644 index ec6fb8091..000000000 --- a/thunar/thunar-change-group-dialog.h +++ /dev/null @@ -1,47 +0,0 @@ -/* $Id$ */ -/*- - * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> - * - * 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., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __THUNAR_CHANGE_GROUP_DIALOG_H__ -#define __THUNAR_CHANGE_GROUP_DIALOG_H__ - -#include <thunar/thunar-file.h> - -G_BEGIN_DECLS; - -typedef struct _ThunarChangeGroupDialogClass ThunarChangeGroupDialogClass; -typedef struct _ThunarChangeGroupDialog ThunarChangeGroupDialog; - -#define THUNAR_TYPE_CHANGE_GROUP_DIALOG (thunar_change_group_dialog_get_type ()) -#define THUNAR_CHANGE_GROUP_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THUNAR_TYPE_CHANGE_GROUP_DIALOG, ThunarChangeGroupDialog)) -#define THUNAR_CHANGE_GROUP_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), THUNAR_TYPE_CHANGE_GROUP_DIALOG, ThunarChangeGroupDialogClass)) -#define THUNAR_IS_CHANGE_GROUP_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THUNAR_TYPE_CHANGE_GROUP_DIALOG)) -#define THUNAR_IS_CHANGE_GROUP_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), THUNAR_TYPE_CHANGE_GROUP_DIALOG)) -#define THUNAR_CHANGE_GROUP_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THUNAR_TYPE_CHANGE_GROUP_DIALOG, ThunarChangeGroupdDialogClass)) - -GType thunar_change_group_dialog_get_type (void) G_GNUC_CONST; - -GtkWidget *thunar_change_group_dialog_new (void) G_GNUC_MALLOC; - -ThunarFile *thunar_change_group_dialog_get_file (ThunarChangeGroupDialog *change_group_dialog); -void thunar_change_group_dialog_set_file (ThunarChangeGroupDialog *change_group_dialog, - ThunarFile *file); - -G_END_DECLS; - -#endif /* !__THUNAR_CHANGE_GROUP_DIALOG_H__ */ diff --git a/thunar/thunar-enum-types.c b/thunar/thunar-enum-types.c new file mode 100644 index 000000000..0ab419e0f --- /dev/null +++ b/thunar/thunar-enum-types.c @@ -0,0 +1,84 @@ +/* $Id$ */ +/*- + * Copyright (c) 2006 Benedikt Meurer <benny@xfce.org> + * + * 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., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <exo/exo.h> + +#include <thunar/thunar-enum-types.h> + + + +static void thunar_enum_from_string (const GValue *src_value, + GValue *dst_value); + + + +GType +thunar_recursive_permissions_get_type (void) +{ + static GType type = G_TYPE_INVALID; + + if (G_UNLIKELY (type == G_TYPE_INVALID)) + { + static const GEnumValue values[] = + { + { THUNAR_RECURSIVE_PERMISSIONS_ASK, "THUNAR_RECURSIVE_PERMISSIONS_ASK", "ask", }, + { THUNAR_RECURSIVE_PERMISSIONS_ALWAYS, "THUNAR_RECURSIVE_PERMISSIONS_ALWAYS", "always", }, + { THUNAR_RECURSIVE_PERMISSIONS_NEVER, "THUNAR_RECURSIVE_PERMISSIONS_NEVER", "never", }, + { 0, NULL, NULL, }, + }; + + type = g_enum_register_static (I_("ThunarRecursivePermissions"), values); + + /* register transformation function for string->ThunarRecursivePermissions */ + g_value_register_transform_func (G_TYPE_STRING, type, thunar_enum_from_string); + } + + return type; +} + + + +static void +thunar_enum_from_string (const GValue *src_value, + GValue *dst_value) +{ + GEnumClass *klass; + gint value = 0; + gint n; + + /* determine the enum value matching the src_value... */ + klass = g_type_class_ref (G_VALUE_TYPE (dst_value)); + for (n = 0; n < klass->n_values; ++n) + { + value = klass->values[n].value; + if (exo_str_is_equal (klass->values[n].value_name, g_value_get_string (src_value))) + break; + } + g_type_class_unref (klass); + + /* ...and return that value */ + g_value_set_enum (dst_value, value); +} + + + diff --git a/thunar/thunar-enum-types.h b/thunar/thunar-enum-types.h new file mode 100644 index 000000000..2e94991f8 --- /dev/null +++ b/thunar/thunar-enum-types.h @@ -0,0 +1,48 @@ +/* $Id$ */ +/*- + * Copyright (c) 2006 Benedikt Meurer <benny@xfce.org> + * + * 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., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __THUNAR_ENUM_TYPES_H__ +#define __THUNAR_ENUM_TYPES_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS; + +#define THUNAR_TYPE_RECURSIVE_PERMISSIONS (thunar_recursive_permissions_get_type ()) + +/** + * ThunarRecursivePermissionsMode: + * @THUNAR_RECURSIVE_PERMISSIONS_ASK : ask the user everytime permissions are changed. + * @THUNAR_RECURSIVE_PERMISSIONS_ALWAYS : always apply the change recursively. + * @THUNAR_RECURSIVE_PERMISSIONS_NEVER : never apply the change recursively. + * + * Modus operandi when changing permissions. + **/ +typedef enum +{ + THUNAR_RECURSIVE_PERMISSIONS_ASK, + THUNAR_RECURSIVE_PERMISSIONS_ALWAYS, + THUNAR_RECURSIVE_PERMISSIONS_NEVER, +} ThunarRecursivePermissionsMode; + +GType thunar_recursive_permissions_get_type (void) G_GNUC_CONST G_GNUC_INTERNAL; + +G_END_DECLS; + +#endif /* !__THUNAR_ENUM_TYPES_H__ */ diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index 106a3ece5..7b5e5091b 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -781,71 +781,6 @@ thunar_file_get_parent (const ThunarFile *file, -/** - * thunar_file_chgrp: - * @file : a #ThunarFile instance. - * @group : a #ThunarVfsGroup. - * @error : return location for errors or %NULL. - * - * Tries to change the #ThunarVfsGroup for @file to @group. - * Returns %TRUE if the operation was successfull, else %FALSE - * and @error is set to describe the cause. - * - * Return value: %TRUE if the group of @file was successfully - * changed to @group, else %FALSE. - **/ -gboolean -thunar_file_chgrp (ThunarFile *file, - ThunarVfsGroup *group, - GError **error) -{ - g_return_val_if_fail (THUNAR_IS_FILE (file), FALSE); - g_return_val_if_fail (THUNAR_VFS_IS_GROUP (group), FALSE); - g_return_val_if_fail (error == NULL || *error == NULL, FALSE); - - if (thunar_vfs_info_chgrp (file->info, thunar_vfs_group_get_id (group), error)) - { - thunar_file_changed (file); - return TRUE; - } - - return FALSE; -} - - - -/** - * thunar_file_chmod: - * @file : a #ThunarFile instance. - * @mode : the new #ThunarVfsFileMode for @file. - * @error : return location for errors or %NULL. - * - * Tries to change the #ThunarVfsFileMode for @file to @mode. - * Returns %TRUE if the operation was successfull, else %FALSE - * and @error is set to describe the cause. - * - * Return value: %TRUE if the mode of @file was successfully - * changed to @mode, else %FALSE. - **/ -gboolean -thunar_file_chmod (ThunarFile *file, - ThunarVfsFileMode mode, - GError **error) -{ - g_return_val_if_fail (THUNAR_IS_FILE (file), FALSE); - g_return_val_if_fail (error == NULL || *error == NULL, FALSE); - - if (thunar_vfs_info_chmod (file->info, mode, error)) - { - thunar_file_changed (file); - return TRUE; - } - - return FALSE; -} - - - /** * thunar_file_execute: * @file : a #ThunarFile instance. @@ -1287,24 +1222,6 @@ thunar_file_get_user (const ThunarFile *file) -/** - * thunar_file_is_chgrpable: - * @file : a #ThunarFile instance. - * - * Determines whether the owner of the current process is allowed - * to change the file group of @file. - * - * Return value: %TRUE if the group of @file can be changed. - **/ -gboolean -thunar_file_is_chgrpable (const ThunarFile *file) -{ - /* we can change the group if we can change the mode */ - return thunar_file_is_chmodable (file); -} - - - /** * thunar_file_is_chmodable: * @file : a #ThunarFile instance. diff --git a/thunar/thunar-file.h b/thunar/thunar-file.h index e2e218dcb..42cf6cbb0 100644 --- a/thunar/thunar-file.h +++ b/thunar/thunar-file.h @@ -119,14 +119,6 @@ static inline gboolean thunar_file_has_parent (const ThunarF ThunarFile *thunar_file_get_parent (const ThunarFile *file, GError **error); -gboolean thunar_file_chgrp (ThunarFile *file, - ThunarVfsGroup *group, - GError **error); - -gboolean thunar_file_chmod (ThunarFile *file, - ThunarVfsFileMode mode, - GError **error); - gboolean thunar_file_execute (ThunarFile *file, GdkScreen *screen, GList *path_list, @@ -163,7 +155,6 @@ ThunarVfsVolume *thunar_file_get_volume (const ThunarF ThunarVfsGroup *thunar_file_get_group (const ThunarFile *file); ThunarVfsUser *thunar_file_get_user (const ThunarFile *file); -gboolean thunar_file_is_chgrpable (const ThunarFile *file); gboolean thunar_file_is_chmodable (const ThunarFile *file); gboolean thunar_file_is_executable (const ThunarFile *file); gboolean thunar_file_is_readable (const ThunarFile *file); diff --git a/thunar/thunar-pango-extensions.c b/thunar/thunar-pango-extensions.c index 4e1090fc8..947498e97 100644 --- a/thunar/thunar-pango-extensions.c +++ b/thunar/thunar-pango-extensions.c @@ -21,23 +21,37 @@ #include <config.h> #endif +#ifdef HAVE_STDARG_H +#include <stdarg.h> +#endif + #include <thunar/thunar-pango-extensions.h> -static PangoAttrList *thunar_pango_attr_list_wrap (PangoAttribute *attribute) G_GNUC_MALLOC; +static PangoAttrList *thunar_pango_attr_list_wrap (PangoAttribute *attribute, ...) G_GNUC_MALLOC; static PangoAttrList* -thunar_pango_attr_list_wrap (PangoAttribute *attribute) +thunar_pango_attr_list_wrap (PangoAttribute *attribute, ...) { PangoAttrList *attr_list; - + va_list args; + + /* allocate a new attribute list */ attr_list = pango_attr_list_new (); - attribute->start_index = 0; - attribute->end_index = -1; - pango_attr_list_insert (attr_list, attribute); + + /* add all specified attributes */ + va_start (args, attribute); + while (attribute != NULL) + { + attribute->start_index = 0; + attribute->end_index = -1; + pango_attr_list_insert (attr_list, attribute); + attribute = va_arg (args, PangoAttribute *); + } + va_end (args); return attr_list; } @@ -58,7 +72,7 @@ thunar_pango_attr_list_big (void) { static PangoAttrList *attr_list = NULL; if (G_UNLIKELY (attr_list == NULL)) - attr_list = thunar_pango_attr_list_wrap (pango_attr_scale_new (PANGO_SCALE_LARGE)); + attr_list = thunar_pango_attr_list_wrap (pango_attr_scale_new (PANGO_SCALE_LARGE), NULL); return attr_list; } @@ -78,7 +92,7 @@ thunar_pango_attr_list_bold (void) { static PangoAttrList *attr_list = NULL; if (G_UNLIKELY (attr_list == NULL)) - attr_list = thunar_pango_attr_list_wrap (pango_attr_weight_new (PANGO_WEIGHT_BOLD)); + attr_list = thunar_pango_attr_list_wrap (pango_attr_weight_new (PANGO_WEIGHT_BOLD), NULL); return attr_list; } @@ -98,7 +112,27 @@ thunar_pango_attr_list_italic (void) { static PangoAttrList *attr_list = NULL; if (G_UNLIKELY (attr_list == NULL)) - attr_list = thunar_pango_attr_list_wrap (pango_attr_style_new (PANGO_STYLE_ITALIC)); + attr_list = thunar_pango_attr_list_wrap (pango_attr_style_new (PANGO_STYLE_ITALIC), NULL); + return attr_list; +} + + + +/** + * thunar_pango_attr_list_small_italic: + * + * Returns a #PangoAttrList for rendering small italic text. + * The returned list is owned by the callee and must + * not be freed or modified by the caller. + * + * Return value: a #PangoAttrList for rendering small italic text. + **/ +PangoAttrList* +thunar_pango_attr_list_small_italic (void) +{ + static PangoAttrList *attr_list = NULL; + if (G_UNLIKELY (attr_list == NULL)) + attr_list = thunar_pango_attr_list_wrap (pango_attr_scale_new (PANGO_SCALE_SMALL), pango_attr_style_new (PANGO_STYLE_ITALIC), NULL); return attr_list; } diff --git a/thunar/thunar-pango-extensions.h b/thunar/thunar-pango-extensions.h index 8b95f42d0..b1b38adae 100644 --- a/thunar/thunar-pango-extensions.h +++ b/thunar/thunar-pango-extensions.h @@ -24,9 +24,10 @@ G_BEGIN_DECLS; -PangoAttrList *thunar_pango_attr_list_big (void) G_GNUC_CONST G_GNUC_INTERNAL; -PangoAttrList *thunar_pango_attr_list_bold (void) G_GNUC_CONST G_GNUC_INTERNAL; -PangoAttrList *thunar_pango_attr_list_italic (void) G_GNUC_CONST G_GNUC_INTERNAL; +PangoAttrList *thunar_pango_attr_list_big (void) G_GNUC_CONST G_GNUC_INTERNAL; +PangoAttrList *thunar_pango_attr_list_bold (void) G_GNUC_CONST G_GNUC_INTERNAL; +PangoAttrList *thunar_pango_attr_list_italic (void) G_GNUC_CONST G_GNUC_INTERNAL; +PangoAttrList *thunar_pango_attr_list_small_italic (void) G_GNUC_CONST G_GNUC_INTERNAL; G_END_DECLS; diff --git a/thunar/thunar-permissions-chooser.c b/thunar/thunar-permissions-chooser.c new file mode 100644 index 000000000..a19d3ae0b --- /dev/null +++ b/thunar/thunar-permissions-chooser.c @@ -0,0 +1,1247 @@ +/* $Id$ */ +/*- + * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> + * + * 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., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#ifdef HAVE_MEMORY_H +#include <memory.h> +#endif +#ifdef HAVE_STRING_H +#include <string.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#include <thunar/thunar-dialogs.h> +#include <thunar/thunar-enum-types.h> +#include <thunar/thunar-pango-extensions.h> +#include <thunar/thunar-permissions-chooser.h> +#include <thunar/thunar-preferences.h> +#include <thunar/thunar-stock.h> + + + +/* Property identifiers */ +enum +{ + PROP_0, + PROP_FILE, + PROP_MUTABLE, +}; + +/* Column identifiers for the group combo box */ +enum +{ + THUNAR_PERMISSIONS_STORE_COLUMN_STOCK_ID, + THUNAR_PERMISSIONS_STORE_COLUMN_NAME, + THUNAR_PERMISSIONS_STORE_COLUMN_GID, + THUNAR_PERMISSIONS_STORE_N_COLUMNS, +}; + + + +static void thunar_permissions_chooser_class_init (ThunarPermissionsChooserClass *klass); +static void thunar_permissions_chooser_init (ThunarPermissionsChooser *chooser); +static void thunar_permissions_chooser_finalize (GObject *object); +static void thunar_permissions_chooser_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); +static void thunar_permissions_chooser_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void thunar_permissions_chooser_change_group (ThunarPermissionsChooser *chooser, + ThunarVfsGroupId gid); +static void thunar_permissions_chooser_change_mode (ThunarPermissionsChooser *chooser, + ThunarVfsFileMode dir_mask, + ThunarVfsFileMode dir_mode, + ThunarVfsFileMode file_mask, + ThunarVfsFileMode file_mode); +static gboolean thunar_permissions_chooser_recursive (ThunarPermissionsChooser *chooser); +static void thunar_permissions_chooser_access_changed (ThunarPermissionsChooser *chooser, + GtkWidget *combo); +static void thunar_permissions_chooser_file_changed (ThunarPermissionsChooser *chooser, + ThunarFile *file); +static void thunar_permissions_chooser_group_changed (ThunarPermissionsChooser *chooser, + GtkWidget *combo); +static void thunar_permissions_chooser_program_toggled (ThunarPermissionsChooser *chooser, + GtkWidget *button); +static ThunarVfsInteractiveJobResponse thunar_permissions_chooser_job_ask (ThunarPermissionsChooser *chooser, + const gchar *message, + ThunarVfsInteractiveJobResponse choices, + ThunarVfsJob *job); +static void thunar_permissions_chooser_job_cancel (ThunarPermissionsChooser *chooser); +static void thunar_permissions_chooser_job_error (ThunarPermissionsChooser *chooser, + GError *error, + ThunarVfsJob *job); +static void thunar_permissions_chooser_job_finished (ThunarPermissionsChooser *chooser, + ThunarVfsJob *job); +static void thunar_permissions_chooser_job_percent (ThunarPermissionsChooser *chooser, + gdouble percent, + ThunarVfsJob *job); +static void thunar_permissions_chooser_job_start (ThunarPermissionsChooser *chooser, + ThunarVfsJob *job, + gboolean recursive); +static gboolean thunar_permissions_chooser_row_separator (GtkTreeModel *model, + GtkTreeIter *iter, + gpointer data); + + + +struct _ThunarPermissionsChooserClass +{ + GtkVBoxClass __parent__; +}; + +struct _ThunarPermissionsChooser +{ + GtkVBox __parent__; + + ThunarFile *file; + + /* the main table widget, which contains everything but the job control stuff */ + GtkWidget *table; + + GtkWidget *user_label; + GtkWidget *group_combo; + GtkWidget *access_combos[3]; + GtkWidget *program_button; + + /* job control stuff */ + ThunarVfsJob *job; + GtkWidget *job_progress; +}; + + + +static GObjectClass *thunar_permissions_chooser_parent_class; + + + +GType +thunar_permissions_chooser_get_type (void) +{ + static GType type = G_TYPE_INVALID; + + if (G_UNLIKELY (type == G_TYPE_INVALID)) + { + static const GTypeInfo info = + { + sizeof (ThunarPermissionsChooserClass), + NULL, + NULL, + (GClassInitFunc) thunar_permissions_chooser_class_init, + NULL, + NULL, + sizeof (ThunarPermissionsChooser), + 0, + (GInstanceInitFunc) thunar_permissions_chooser_init, + NULL, + }; + + type = g_type_register_static (GTK_TYPE_VBOX, I_("ThunarPermissionsChooser"), &info, 0); + } + + return type; +} + + + +static void +thunar_permissions_chooser_class_init (ThunarPermissionsChooserClass *klass) +{ + GObjectClass *gobject_class; + + /* determine the parent type class */ + thunar_permissions_chooser_parent_class = g_type_class_peek_parent (klass); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = thunar_permissions_chooser_finalize; + gobject_class->get_property = thunar_permissions_chooser_get_property; + gobject_class->set_property = thunar_permissions_chooser_set_property; + + /** + * ThunarPermissionsChooser:file: + * + * The #ThunarFile whose permissions will be edited/viewed. + **/ + g_object_class_install_property (gobject_class, + PROP_FILE, + g_param_spec_object ("file", "file", "file", + THUNAR_TYPE_FILE, + EXO_PARAM_READWRITE)); + + /** + * ThunarPermissionsChooser:mutable: + * + * Whether the current #ThunarFile<!---->s permissions are + * mutable. + **/ + g_object_class_install_property (gobject_class, + PROP_MUTABLE, + g_param_spec_boolean ("mutable", + "mutable", + "mutable", + FALSE, + EXO_PARAM_READABLE)); +} + + + +static void +thunar_permissions_chooser_init (ThunarPermissionsChooser *chooser) +{ + GtkCellRenderer *renderer_pixbuf; + GtkCellRenderer *renderer_text; + AtkRelationSet *relations; + GtkListStore *store; + AtkRelation *relation; + GtkTreeIter iter; + AtkObject *object; + GtkWidget *separator; + GtkWidget *button; + GtkWidget *label; + GtkWidget *image; + GtkWidget *hbox; + gint row = 0; + + /* setup the chooser */ + gtk_container_set_border_width (GTK_CONTAINER (chooser), 12); + + /* allocate the store for the permission combos */ + store = gtk_list_store_new (1, G_TYPE_STRING); + gtk_list_store_append (store, &iter); /* 0000 */ + gtk_list_store_set (store, &iter, 0, _("None"), -1); + gtk_list_store_append (store, &iter); /* 0002 */ + gtk_list_store_set (store, &iter, 0, _("Write only"), -1); + gtk_list_store_append (store, &iter); /* 0004 */ + gtk_list_store_set (store, &iter, 0, _("Read only"), -1); + gtk_list_store_append (store, &iter); /* 0006 */ + gtk_list_store_set (store, &iter, 0, _("Read & Write"), -1); + + /* allocate the shared renderers for the various combo boxes */ + renderer_pixbuf = gtk_cell_renderer_pixbuf_new (); + renderer_text = gtk_cell_renderer_text_new (); + + chooser->table = gtk_table_new (2, 2, FALSE); + gtk_table_set_col_spacings (GTK_TABLE (chooser->table), 12); + gtk_table_set_row_spacings (GTK_TABLE (chooser->table), 6); + gtk_box_pack_start (GTK_BOX (chooser), chooser->table, TRUE, TRUE, 0); + gtk_widget_show (chooser->table); + + label = gtk_label_new (_("Owner:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); + gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); + gtk_table_attach (GTK_TABLE (chooser->table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (label); + + hbox = gtk_hbox_new (FALSE, 6); + gtk_table_attach (GTK_TABLE (chooser->table), hbox, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 6); + gtk_widget_show (hbox); + + image = gtk_image_new_from_stock (THUNAR_STOCK_USER, GTK_ICON_SIZE_MENU); + gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); + gtk_widget_show (image); + + chooser->user_label = gtk_label_new (_("Unknown")); + gtk_misc_set_alignment (GTK_MISC (chooser->user_label), 0.0f, 0.5f); + gtk_box_pack_start (GTK_BOX (hbox), chooser->user_label, TRUE, TRUE, 0); + gtk_widget_show (chooser->user_label); + + /* set Atk label relation for the user_label */ + object = gtk_widget_get_accessible (chooser->user_label); + relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label)); + relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR); + atk_relation_set_add (relations, relation); + g_object_unref (G_OBJECT (relation)); + + row += 1; + + label = gtk_label_new (_("Access:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); + gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); + gtk_table_attach (GTK_TABLE (chooser->table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (label); + + chooser->access_combos[2] = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (chooser->access_combos[2]), renderer_text, TRUE); + gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (chooser->access_combos[2]), renderer_text, "text", 0); + exo_binding_new (G_OBJECT (chooser), "mutable", G_OBJECT (chooser->access_combos[2]), "sensitive"); + g_signal_connect_swapped (G_OBJECT (chooser->access_combos[2]), "changed", G_CALLBACK (thunar_permissions_chooser_access_changed), chooser); + gtk_table_attach (GTK_TABLE (chooser->table), chooser->access_combos[2], 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (chooser->access_combos[2]); + + /* set Atk label relation for the combo */ + object = gtk_widget_get_accessible (chooser->access_combos[2]); + relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label)); + relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR); + atk_relation_set_add (relations, relation); + g_object_unref (G_OBJECT (relation)); + + row += 1; + + separator = gtk_alignment_new (0.0f, 0.0f, 0.0f, 0.0f); + gtk_table_attach (GTK_TABLE (chooser->table), separator, 0, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 6); + gtk_widget_show (separator); + + row += 1; + + label = gtk_label_new (_("Group:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); + gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); + gtk_table_attach (GTK_TABLE (chooser->table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (label); + + chooser->group_combo = gtk_combo_box_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (chooser->group_combo), renderer_pixbuf, FALSE); + gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (chooser->group_combo), renderer_pixbuf, "stock-id", THUNAR_PERMISSIONS_STORE_COLUMN_STOCK_ID); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (chooser->group_combo), renderer_text, TRUE); + gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (chooser->group_combo), renderer_text, "text", THUNAR_PERMISSIONS_STORE_COLUMN_NAME); + gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (chooser->group_combo), thunar_permissions_chooser_row_separator, NULL, NULL); + exo_binding_new (G_OBJECT (chooser), "mutable", G_OBJECT (chooser->group_combo), "sensitive"); + g_signal_connect_swapped (G_OBJECT (chooser->group_combo), "changed", G_CALLBACK (thunar_permissions_chooser_group_changed), chooser); + gtk_table_attach (GTK_TABLE (chooser->table), chooser->group_combo, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (chooser->group_combo); + + /* set Atk label relation for the combo */ + object = gtk_widget_get_accessible (chooser->group_combo); + relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label)); + relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR); + atk_relation_set_add (relations, relation); + g_object_unref (G_OBJECT (relation)); + + row += 1; + + label = gtk_label_new (_("Access:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); + gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); + gtk_table_attach (GTK_TABLE (chooser->table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (label); + + chooser->access_combos[1] = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (chooser->access_combos[1]), renderer_text, TRUE); + gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (chooser->access_combos[1]), renderer_text, "text", 0); + exo_binding_new (G_OBJECT (chooser), "mutable", G_OBJECT (chooser->access_combos[1]), "sensitive"); + g_signal_connect_swapped (G_OBJECT (chooser->access_combos[1]), "changed", G_CALLBACK (thunar_permissions_chooser_access_changed), chooser); + gtk_table_attach (GTK_TABLE (chooser->table), chooser->access_combos[1], 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (chooser->access_combos[1]); + + /* set Atk label relation for the combo */ + object = gtk_widget_get_accessible (chooser->access_combos[1]); + relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label)); + relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR); + atk_relation_set_add (relations, relation); + g_object_unref (G_OBJECT (relation)); + + row += 1; + + separator = gtk_alignment_new (0.0f, 0.0f, 0.0f, 0.0f); + gtk_table_attach (GTK_TABLE (chooser->table), separator, 0, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 6); + gtk_widget_show (separator); + + row += 1; + + label = gtk_label_new (_("Others:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); + gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); + gtk_table_attach (GTK_TABLE (chooser->table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (label); + + chooser->access_combos[0] = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (chooser->access_combos[0]), renderer_text, TRUE); + gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (chooser->access_combos[0]), renderer_text, "text", 0); + exo_binding_new (G_OBJECT (chooser), "mutable", G_OBJECT (chooser->access_combos[0]), "sensitive"); + g_signal_connect_swapped (G_OBJECT (chooser->access_combos[0]), "changed", G_CALLBACK (thunar_permissions_chooser_access_changed), chooser); + gtk_table_attach (GTK_TABLE (chooser->table), chooser->access_combos[0], 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (chooser->access_combos[0]); + + /* set Atk label relation for the combo */ + object = gtk_widget_get_accessible (chooser->access_combos[0]); + relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label)); + relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR); + atk_relation_set_add (relations, relation); + g_object_unref (G_OBJECT (relation)); + + row += 1; + + separator = gtk_alignment_new (0.0f, 0.0f, 0.0f, 0.0f); + gtk_table_attach (GTK_TABLE (chooser->table), separator, 0, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 6); + gtk_widget_show (separator); + + row += 1; + + label = gtk_label_new (_("Program:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); + gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); + gtk_table_attach (GTK_TABLE (chooser->table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (label); + + chooser->program_button = gtk_check_button_new_with_mnemonic (_("Allow this file to _run as a program")); + exo_binding_new (G_OBJECT (chooser->program_button), "visible", G_OBJECT (label), "visible"); + exo_binding_new (G_OBJECT (chooser), "mutable", G_OBJECT (chooser->program_button), "sensitive"); + g_signal_connect_swapped (G_OBJECT (chooser->program_button), "toggled", G_CALLBACK (thunar_permissions_chooser_program_toggled), chooser); + gtk_table_attach (GTK_TABLE (chooser->table), chooser->program_button, 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (chooser->program_button); + + /* set Atk label relation for the button */ + object = gtk_widget_get_accessible (chooser->program_button); + relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label)); + relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR); + atk_relation_set_add (relations, relation); + g_object_unref (G_OBJECT (relation)); + + row += 1; + + hbox = gtk_hbox_new (FALSE, 6); + exo_binding_new (G_OBJECT (chooser), "mutable", G_OBJECT (hbox), "sensitive"); + exo_binding_new (G_OBJECT (chooser->program_button), "visible", G_OBJECT (hbox), "visible"); + gtk_table_attach (GTK_TABLE (chooser->table), hbox, 1, 2, row, row + 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (hbox); + + image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_LARGE_TOOLBAR); + gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); + gtk_widget_show (image); + + label = gtk_label_new (_("Allowing untrusted programs to run \npresents a security risk to your system.")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f); + gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_small_italic ()); + gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); + gtk_widget_show (label); + + /* the job control stuff */ + hbox = gtk_hbox_new (FALSE, 6); + gtk_box_pack_start (GTK_BOX (chooser), hbox, FALSE, FALSE, 0); + + chooser->job_progress = gtk_progress_bar_new (); + gtk_progress_bar_set_text (GTK_PROGRESS_BAR (chooser->job_progress), _("Please wait...")); + exo_binding_new (G_OBJECT (chooser->job_progress), "visible", G_OBJECT (hbox), "visible"); + gtk_box_pack_start (GTK_BOX (hbox), chooser->job_progress, TRUE, TRUE, 0); + + button = gtk_button_new (); + g_signal_connect_swapped (G_OBJECT (button), "clicked", G_CALLBACK (thunar_permissions_chooser_job_cancel), chooser); + gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); + gtk_widget_show (button); + + image = gtk_image_new_from_stock (GTK_STOCK_CANCEL, GTK_ICON_SIZE_MENU); + gtk_container_add (GTK_CONTAINER (button), image); + gtk_widget_show (image); + + /* release the shared combo store */ + g_object_unref (G_OBJECT (store)); +} + + + +static void +thunar_permissions_chooser_finalize (GObject *object) +{ + ThunarPermissionsChooser *chooser = THUNAR_PERMISSIONS_CHOOSER (object); + + /* cancel any pending job */ + if (G_UNLIKELY (chooser->job != NULL)) + { + /* cancel the job (if not already done) */ + thunar_vfs_job_cancel (chooser->job); + + /* disconnect from the job */ + g_signal_handlers_disconnect_matched (chooser->job, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, chooser); + g_object_unref (G_OBJECT (chooser->job)); + chooser->job = NULL; + } + + /* drop the reference on the file (if any) */ + thunar_permissions_chooser_set_file (chooser, NULL); + + (*G_OBJECT_CLASS (thunar_permissions_chooser_parent_class)->finalize) (object); +} + + + +static void +thunar_permissions_chooser_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + ThunarPermissionsChooser *chooser = THUNAR_PERMISSIONS_CHOOSER (object); + + switch (prop_id) + { + case PROP_FILE: + g_value_set_object (value, thunar_permissions_chooser_get_file (chooser)); + break; + + case PROP_MUTABLE: + g_value_set_boolean (value, (chooser->file != NULL) && thunar_file_is_chmodable (chooser->file)); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + + + +static void +thunar_permissions_chooser_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + ThunarPermissionsChooser *chooser = THUNAR_PERMISSIONS_CHOOSER (object); + + switch (prop_id) + { + case PROP_FILE: + thunar_permissions_chooser_set_file (chooser, g_value_get_object (value)); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + + + +static void +thunar_permissions_chooser_change_group (ThunarPermissionsChooser *chooser, + ThunarVfsGroupId gid) +{ + ThunarVfsJob *job; + gboolean recursive; + GError *error = NULL; + + g_return_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser)); + g_return_if_fail (THUNAR_IS_FILE (chooser->file)); + + /* check if we should operate recursively */ + recursive = (thunar_file_is_directory (chooser->file) && thunar_permissions_chooser_recursive (chooser)); + + /* try to allocate the new job */ + job = thunar_vfs_change_group (thunar_file_get_path (chooser->file), gid, recursive, &error); + if (G_UNLIKELY (job == NULL)) + { + /* display an error to the user */ + thunar_dialogs_show_error (GTK_WIDGET (chooser), error, _("Failed to change group")); + g_error_free (error); + } + else + { + /* handle the job */ + thunar_permissions_chooser_job_start (chooser, job, recursive); + g_object_unref (G_OBJECT (job)); + } +} + + + +static void +thunar_permissions_chooser_change_mode (ThunarPermissionsChooser *chooser, + ThunarVfsFileMode dir_mask, + ThunarVfsFileMode dir_mode, + ThunarVfsFileMode file_mask, + ThunarVfsFileMode file_mode) +{ + ThunarVfsJob *job; + gboolean recursive; + GError *error = NULL; + + g_return_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser)); + g_return_if_fail (THUNAR_IS_FILE (chooser->file)); + + /* check if we should operate recursively */ + recursive = (thunar_file_is_directory (chooser->file) && thunar_permissions_chooser_recursive (chooser)); + + /* try to allocate the new job */ + job = thunar_vfs_change_mode (thunar_file_get_path (chooser->file), dir_mask, dir_mode, file_mask, file_mode, recursive, &error); + if (G_UNLIKELY (job == NULL)) + { + /* display an error to the user */ + thunar_dialogs_show_error (GTK_WIDGET (chooser), error, _("Failed to apply new permissions")); + g_error_free (error); + } + else + { + /* handle the job */ + thunar_permissions_chooser_job_start (chooser, job, recursive); + g_object_unref (G_OBJECT (job)); + } +} + + + +static gboolean +thunar_permissions_chooser_recursive (ThunarPermissionsChooser *chooser) +{ + ThunarRecursivePermissionsMode mode; + ThunarPreferences *preferences; + GtkWidget *toplevel; + GtkWidget *dialog; + GtkWidget *button; + GtkWidget *label; + GtkWidget *image; + GtkWidget *hbox; + GtkWidget *vbox; + + /* grab a reference on the preferences */ + preferences = thunar_preferences_get (); + + /* determine the current recursive permissions mode */ + g_object_get (G_OBJECT (preferences), "misc-recursive-permissions", &mode, NULL); + + /* check if we should ask the user first */ + if (G_UNLIKELY (mode == THUNAR_RECURSIVE_PERMISSIONS_ASK)) + { + /* determine the toplevel widget for the chooser */ + toplevel = gtk_widget_get_toplevel (GTK_WIDGET (chooser)); + + /* allocate the question dialog */ + dialog = gtk_dialog_new_with_buttons (_("Question"), GTK_WINDOW (toplevel), + GTK_DIALOG_DESTROY_WITH_PARENT + | GTK_DIALOG_NO_SEPARATOR + | GTK_DIALOG_MODAL, + GTK_STOCK_NO, GTK_RESPONSE_CANCEL, + GTK_STOCK_YES, GTK_RESPONSE_ACCEPT, + NULL); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); + + hbox = gtk_hbox_new (FALSE, 6); + gtk_container_set_border_width (GTK_CONTAINER (hbox), 8); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0); + gtk_widget_show (hbox); + + image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG); + gtk_misc_set_alignment (GTK_MISC (image), 0.5f, 0.0f); + gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); + gtk_widget_show (image); + + vbox = gtk_vbox_new (FALSE, 6); + gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); + gtk_widget_show (vbox); + + label = gtk_label_new (_("Apply recursively?")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f); + gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_big ()); + gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + gtk_widget_show (label); + + label = gtk_label_new (_("Do you want to apply your changes recursively to\nall files and subfolder below the selected folder?")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f); + gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0); + gtk_widget_show (label); + + button = gtk_check_button_new_with_mnemonic (_("Do _not ask me again")); + gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); + gtk_widget_show (button); + + /* run the dialog */ + switch (gtk_dialog_run (GTK_DIALOG (dialog))) + { + case GTK_RESPONSE_ACCEPT: + mode = THUNAR_RECURSIVE_PERMISSIONS_ALWAYS; + break; + + default: + mode = THUNAR_RECURSIVE_PERMISSIONS_NEVER; + break; + } + + /* save the selected option (if requested) */ + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button))) + g_object_set (G_OBJECT (preferences), "misc-recursive-permissions", mode, NULL); + + /* destroy the dialog resources */ + gtk_widget_destroy (dialog); + } + + /* release the reference on the preferences */ + g_object_unref (G_OBJECT (preferences)); + + return (mode == THUNAR_RECURSIVE_PERMISSIONS_ALWAYS); +} + + + +static void +thunar_permissions_chooser_access_changed (ThunarPermissionsChooser *chooser, + GtkWidget *combo) +{ + ThunarVfsFileMode file_mask; + ThunarVfsFileMode file_mode; + ThunarVfsFileMode dir_mask; + ThunarVfsFileMode dir_mode; + guint n; + + g_return_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser)); + g_return_if_fail (GTK_IS_COMBO_BOX (combo)); + + /* verify that we have a valid file */ + if (G_UNLIKELY (chooser->file == NULL)) + return; + + /* determine the new mode from the combo box */ + for (n = 0; chooser->access_combos[n] != combo && n < G_N_ELEMENTS (chooser->access_combos); ++n); + dir_mode = file_mode = (gtk_combo_box_get_active (GTK_COMBO_BOX (combo)) << 1) << (n * 3); + dir_mask = file_mask = 0006 << (n * 3); + + /* keep exec bit in sync for folders */ + if (thunar_file_is_directory (chooser->file)) + { + /* if either read or write is, set exec as well, else unset exec as well */ + if ((dir_mode & (0004 << (n * 3))) != 0) + dir_mode |= (0001 << (n * 3)); + dir_mask = 0007 << (n * 3); + } + + /* change the permissions */ + thunar_permissions_chooser_change_mode (chooser, dir_mask, dir_mode, file_mask, file_mode); +} + + + +static gint +group_compare (gconstpointer group_a, + gconstpointer group_b, + gpointer group_primary) +{ + ThunarVfsGroupId group_primary_id = thunar_vfs_group_get_id (THUNAR_VFS_GROUP (group_primary)); + ThunarVfsGroupId group_a_id = thunar_vfs_group_get_id (THUNAR_VFS_GROUP (group_a)); + ThunarVfsGroupId group_b_id = thunar_vfs_group_get_id (THUNAR_VFS_GROUP (group_b)); + + /* check if the groups are equal */ + if (group_a_id == group_b_id) + return 0; + + /* the primary group is always sorted first */ + if (group_a_id == group_primary_id) + return -1; + else if (group_b_id == group_primary_id) + return 1; + + /* system groups (< 100) are always sorted last */ + if (group_a_id < 100 && group_b_id >= 100) + return 1; + else if (group_b_id < 100 && group_a_id >= 100) + return -1; + + /* otherwise just sort by name */ + return g_ascii_strcasecmp (thunar_vfs_group_get_name (THUNAR_VFS_GROUP (group_a)), thunar_vfs_group_get_name (THUNAR_VFS_GROUP (group_b))); +} + + + +static void +thunar_permissions_chooser_file_changed (ThunarPermissionsChooser *chooser, + ThunarFile *file) +{ + ThunarVfsUserManager *user_manager; + ThunarVfsFileMode mode; + ThunarVfsGroup *group; + ThunarVfsUser *user; + GtkListStore *store; + GtkTreeIter iter; + const gchar *user_name; + const gchar *real_name; + GList *groups; + GList *lp; + gchar buffer[1024]; + guint n; + + g_return_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser)); + g_return_if_fail (THUNAR_IS_FILE (file)); + g_return_if_fail (chooser->file == file); + + /* allocate a new store for the group combo box */ + g_signal_handlers_block_by_func (G_OBJECT (chooser->group_combo), thunar_permissions_chooser_group_changed, chooser); + store = gtk_list_store_new (THUNAR_PERMISSIONS_STORE_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT); + gtk_combo_box_set_model (GTK_COMBO_BOX (chooser->group_combo), GTK_TREE_MODEL (store)); + + /* determine the owner of the new file */ + user = thunar_file_get_user (file); + if (G_LIKELY (user != NULL)) + { + /* determine the group of the new file */ + group = thunar_file_get_group (file); + if (G_LIKELY (group != NULL)) + { + /* check if we have superuser privileges */ + if (G_UNLIKELY (geteuid () == 0)) + { + /* determine all groups in the system */ + user_manager = thunar_vfs_user_manager_get_default (); + groups = thunar_vfs_user_manager_get_all_groups (user_manager); + g_object_unref (G_OBJECT (user_manager)); + } + else + { + /* determine the groups for the user and take a copy */ + groups = g_list_copy (thunar_vfs_user_get_groups (user)); + g_list_foreach (groups, (GFunc) g_object_ref, NULL); + } + + /* sort the groups according to group_compare() */ + groups = g_list_sort_with_data (groups, group_compare, group); + + /* add the groups to the store */ + for (lp = groups, n = 0; lp != NULL; lp = lp->next) + { + /* append a separator after the primary group and after the user-groups (not system groups) */ + if (thunar_vfs_group_get_id (groups->data) == thunar_vfs_group_get_id (group) && lp != groups && n == 0) + { + gtk_list_store_append (store, &iter); + n += 1; + } + else if (lp != groups && thunar_vfs_group_get_id (lp->data) < 100 && n == 1) + { + gtk_list_store_append (store, &iter); + n += 1; + } + + /* append a new item for the group */ + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, + THUNAR_PERMISSIONS_STORE_COLUMN_STOCK_ID, THUNAR_STOCK_GROUP, + THUNAR_PERMISSIONS_STORE_COLUMN_NAME, thunar_vfs_group_get_name (lp->data), + THUNAR_PERMISSIONS_STORE_COLUMN_GID, thunar_vfs_group_get_id (lp->data), + -1); + + /* set the active iter for the combo box if this group is the primary group */ + if (G_UNLIKELY (lp->data == group)) + gtk_combo_box_set_active_iter (GTK_COMBO_BOX (chooser->group_combo), &iter); + } + + /* cleanup */ + g_list_foreach (groups, (GFunc) g_object_unref, NULL); + g_object_unref (G_OBJECT (group)); + g_list_free (groups); + } + + /* determine sane display name for the owner */ + user_name = thunar_vfs_user_get_name (user); + real_name = thunar_vfs_user_get_real_name (user); + if (G_LIKELY (real_name != NULL)) + g_snprintf (buffer, sizeof (buffer), "%s (%s)", real_name, user_name); + else + g_strlcpy (buffer, user_name, sizeof (buffer)); + gtk_label_set_text (GTK_LABEL (chooser->user_label), buffer); + g_object_unref (G_OBJECT (user)); + } + else + { + gtk_label_set_text (GTK_LABEL (chooser->user_label), _("Unknown file owner")); + } + + /* determine the file mode and update the combo boxes */ + mode = thunar_file_get_mode (file); + for (n = 0; n < G_N_ELEMENTS (chooser->access_combos); ++n) + { + g_signal_handlers_block_by_func (G_OBJECT (chooser->access_combos[n]), thunar_permissions_chooser_access_changed, chooser); + gtk_combo_box_set_active (GTK_COMBO_BOX (chooser->access_combos[n]), ((mode >> (n * 3)) & 0007) >> 1); + g_signal_handlers_unblock_by_func (G_OBJECT (chooser->access_combos[n]), thunar_permissions_chooser_access_changed, chooser); + } + + /* update the program setting based on the mode (only visible for regular files) */ + g_signal_handlers_block_by_func (G_OBJECT (chooser->program_button), thunar_permissions_chooser_program_toggled, chooser); + g_object_set (G_OBJECT (chooser->program_button), "visible", thunar_file_is_regular (file), NULL); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (chooser->program_button), (mode & 0111) != 0); + g_signal_handlers_unblock_by_func (G_OBJECT (chooser->program_button), thunar_permissions_chooser_program_toggled, chooser); + + /* release our reference on the new combo store and unblock the combo */ + g_signal_handlers_unblock_by_func (G_OBJECT (chooser->group_combo), thunar_permissions_chooser_group_changed, chooser); + g_object_unref (G_OBJECT (store)); + + /* emit notification on "mutable", so all widgets update their sensitivity */ + g_object_notify (G_OBJECT (chooser), "mutable"); +} + + + +static void +thunar_permissions_chooser_group_changed (ThunarPermissionsChooser *chooser, + GtkWidget *combo) +{ + ThunarVfsGroupId gid; + GtkTreeModel *model; + GtkTreeIter iter; + + g_return_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser)); + g_return_if_fail (chooser->group_combo == combo); + g_return_if_fail (GTK_IS_COMBO_BOX (combo)); + + /* verify that we have a valid file */ + if (G_UNLIKELY (chooser->file == NULL)) + return; + + /* determine the tree model from the combo box */ + model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo)); + + /* determine the iterator for the selected item */ + if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter)) + { + /* determine the group id for the selected item... */ + gtk_tree_model_get (model, &iter, THUNAR_PERMISSIONS_STORE_COLUMN_GID, &gid, -1); + + /* ...and try to change the group to the new gid */ + thunar_permissions_chooser_change_group (chooser, gid); + } +} + + + +static void +thunar_permissions_chooser_program_toggled (ThunarPermissionsChooser *chooser, + GtkWidget *button) +{ + ThunarVfsFileMode mode; + + g_return_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser)); + g_return_if_fail (chooser->program_button == button); + g_return_if_fail (GTK_IS_TOGGLE_BUTTON (button)); + + /* verify that we have a valid file */ + if (G_UNLIKELY (chooser->file == NULL)) + return; + + /* determine the new mode based on the toggle state */ + mode = (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button))) ? 0111 : 0000; + + /* apply the new mode (only the executable bits for files) */ + thunar_permissions_chooser_change_mode (chooser, 0000, 0000, 0111, mode); +} + + + +static ThunarVfsInteractiveJobResponse +thunar_permissions_chooser_job_ask (ThunarPermissionsChooser *chooser, + const gchar *message, + ThunarVfsInteractiveJobResponse choices, + ThunarVfsJob *job) +{ + const gchar *mnemonic; + GtkWidget *toplevel; + GtkWidget *question; + GtkWidget *hbox; + GtkWidget *image; + GtkWidget *label; + GtkWidget *button; + gint response; + gint n; + + g_return_val_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser), THUNAR_VFS_INTERACTIVE_JOB_RESPONSE_CANCEL); + g_return_val_if_fail (g_utf8_validate (message, -1, NULL), THUNAR_VFS_INTERACTIVE_JOB_RESPONSE_CANCEL); + g_return_val_if_fail (THUNAR_VFS_IS_INTERACTIVE_JOB (job), THUNAR_VFS_INTERACTIVE_JOB_RESPONSE_CANCEL); + g_return_val_if_fail (chooser->job == job, THUNAR_VFS_INTERACTIVE_JOB_RESPONSE_CANCEL); + + /* be sure to display the progress bar prior to opening the question dialog */ + gtk_widget_show_now (chooser->job_progress); + + question = g_object_new (GTK_TYPE_DIALOG, + "has-separator", FALSE, + "resizable", FALSE, + "title", _("Question"), + NULL); + + toplevel = gtk_widget_get_toplevel (GTK_WIDGET (chooser)); + if (G_LIKELY (toplevel != NULL)) + gtk_window_set_transient_for (GTK_WINDOW (question), GTK_WINDOW (toplevel)); + + hbox = g_object_new (GTK_TYPE_HBOX, "border-width", 12, "spacing", 12, NULL); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (question)->vbox), hbox, FALSE, FALSE, 0); + gtk_widget_show (hbox); + + image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG); + gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); + gtk_widget_show (image); + + label = g_object_new (GTK_TYPE_LABEL, "label", message, "xalign", 0, "yalign", 0, NULL); + gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); + gtk_widget_show (label); + + /* add the buttons based on the possible choices */ + for (n = 3; n >= 0; --n) + { + response = choices & (1 << n); + if (response == 0) + continue; + + switch (response) + { + case THUNAR_VFS_INTERACTIVE_JOB_RESPONSE_YES: + mnemonic = _("_Yes"); + break; + + case THUNAR_VFS_INTERACTIVE_JOB_RESPONSE_YES_ALL: + mnemonic = _("Yes to _all"); + break; + + case THUNAR_VFS_INTERACTIVE_JOB_RESPONSE_NO: + mnemonic = _("_No"); + break; + + case THUNAR_VFS_INTERACTIVE_JOB_RESPONSE_CANCEL: + mnemonic = _("_Cancel"); + break; + + default: + g_assert_not_reached (); + break; + } + + button = gtk_button_new_with_mnemonic (mnemonic); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_dialog_add_action_widget (GTK_DIALOG (question), button, response); + gtk_widget_show (button); + + gtk_dialog_set_default_response (GTK_DIALOG (question), response); + } + + /* run the question */ + response = gtk_dialog_run (GTK_DIALOG (question)); + gtk_widget_destroy (question); + + /* transform the result as required */ + if (G_UNLIKELY (response <= 0)) + response = THUNAR_VFS_INTERACTIVE_JOB_RESPONSE_CANCEL; + + return response; +} + + + +static void +thunar_permissions_chooser_job_cancel (ThunarPermissionsChooser *chooser) +{ + g_return_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser)); + + /* verify that we have a job to cancel */ + if (G_UNLIKELY (chooser->job == NULL)) + return; + + /* cancel the job (if not already done) */ + thunar_vfs_job_cancel (chooser->job); + + /* disconnect from the job */ + g_signal_handlers_disconnect_matched (chooser->job, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, chooser); + g_object_unref (G_OBJECT (chooser->job)); + chooser->job = NULL; + + /* hide the progress bar */ + gtk_widget_hide (chooser->job_progress); + + /* make the remaining widgets sensitive again */ + gtk_widget_set_sensitive (chooser->table, TRUE); +} + + + +static void +thunar_permissions_chooser_job_error (ThunarPermissionsChooser *chooser, + GError *error, + ThunarVfsJob *job) +{ + GtkWidget *toplevel; + GtkWidget *message; + + g_return_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser)); + g_return_if_fail (error != NULL && error->message != NULL); + g_return_if_fail (THUNAR_VFS_IS_INTERACTIVE_JOB (job)); + g_return_if_fail (chooser->job == job); + + /* be sure to display the progress bar prior to opening the error dialog */ + gtk_widget_show_now (chooser->job_progress); + + /* determine the toplevel widget for the chooser */ + toplevel = gtk_widget_get_toplevel (GTK_WIDGET (chooser)); + if (G_UNLIKELY (toplevel == NULL)) + return; + + /* popup the error message dialog */ + message = gtk_message_dialog_new (GTK_WINDOW (toplevel), + GTK_DIALOG_MODAL + | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + "%s", error->message); + gtk_dialog_run (GTK_DIALOG (message)); + gtk_widget_destroy (message); +} + + + +static void +thunar_permissions_chooser_job_finished (ThunarPermissionsChooser *chooser, + ThunarVfsJob *job) +{ + g_return_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser)); + g_return_if_fail (THUNAR_VFS_IS_INTERACTIVE_JOB (job)); + g_return_if_fail (chooser->job == job); + + /* we can just use job_cancel(), since the job is already done */ + thunar_permissions_chooser_job_cancel (chooser); +} + + + +static void +thunar_permissions_chooser_job_percent (ThunarPermissionsChooser *chooser, + gdouble percent, + ThunarVfsJob *job) +{ + g_return_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser)); + g_return_if_fail (THUNAR_VFS_IS_INTERACTIVE_JOB (job)); + g_return_if_fail (chooser->job == job); + + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (chooser->job_progress), percent / 100.0); + gtk_widget_show (chooser->job_progress); +} + + + +static void +thunar_permissions_chooser_job_start (ThunarPermissionsChooser *chooser, + ThunarVfsJob *job, + gboolean recursive) +{ + g_return_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser)); + g_return_if_fail (THUNAR_VFS_IS_INTERACTIVE_JOB (job)); + g_return_if_fail (chooser->job == NULL); + + /* take a reference to the job and connect signals */ + chooser->job = g_object_ref (G_OBJECT (job)); + g_signal_connect_swapped (G_OBJECT (job), "ask", G_CALLBACK (thunar_permissions_chooser_job_ask), chooser); + g_signal_connect_swapped (G_OBJECT (job), "error", G_CALLBACK (thunar_permissions_chooser_job_error), chooser); + g_signal_connect_swapped (G_OBJECT (job), "finished", G_CALLBACK (thunar_permissions_chooser_job_finished), chooser); + + /* don't connect percent for single file operations */ + if (G_UNLIKELY (recursive)) + g_signal_connect_swapped (G_OBJECT (job), "percent", G_CALLBACK (thunar_permissions_chooser_job_percent), chooser); + + /* setup the progress bar */ + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (chooser->job_progress), 0.0); + + /* make the majority of widgets insensitive if doing recursively */ + gtk_widget_set_sensitive (chooser->table, !recursive); +} + + + +static gboolean +thunar_permissions_chooser_row_separator (GtkTreeModel *model, + GtkTreeIter *iter, + gpointer data) +{ + gchar *name; + + /* determine the value of the "name" column */ + gtk_tree_model_get (model, iter, THUNAR_PERMISSIONS_STORE_COLUMN_NAME, &name, -1); + if (G_LIKELY (name != NULL)) + { + g_free (name); + return FALSE; + } + + return TRUE; +} + + + +/** + * thunar_permissions_chooser_new: + * + * Allocates a new #ThunarPermissionsChooser instance. + * + * Return value: the newly allocated #ThunarPermissionsChooser. + **/ +GtkWidget* +thunar_permissions_chooser_new (void) +{ + return g_object_new (THUNAR_TYPE_PERMISSIONS_CHOOSER, NULL); +} + + + +/** + * thunar_permissions_chooser_get_file: + * @chooser : a #ThunarPermissionsChooser. + * + * Returns the #ThunarFile associated with the specified @chooser. + * + * Return value: the file associated with @chooser. + **/ +ThunarFile* +thunar_permissions_chooser_get_file (ThunarPermissionsChooser *chooser) +{ + g_return_val_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser), NULL); + return chooser->file; +} + + + +/** + * thunar_permissions_chooser_set_file: + * @chooser : a #ThunarPermissionsChooser. + * @file : a #ThunarFile or %NULL. + * + * Associates @chooser with the specified @file. + **/ +void +thunar_permissions_chooser_set_file (ThunarPermissionsChooser *chooser, + ThunarFile *file) +{ + g_return_if_fail (THUNAR_IS_PERMISSIONS_CHOOSER (chooser)); + g_return_if_fail (file == NULL || THUNAR_IS_FILE (file)); + + /* check if we already use that file */ + if (G_UNLIKELY (chooser->file == file)) + return; + + /* disconnect from the previous file */ + if (G_LIKELY (chooser->file != NULL)) + { + g_signal_handlers_disconnect_by_func (G_OBJECT (chooser->file), thunar_permissions_chooser_file_changed, chooser); + g_object_unref (G_OBJECT (chooser->file)); + } + + /* activate the new file */ + chooser->file = file; + + /* connect to the new file */ + if (G_LIKELY (file != NULL)) + { + /* take a reference on the file */ + g_object_ref (G_OBJECT (file)); + + /* stay informed about changes */ + g_signal_connect_swapped (G_OBJECT (file), "changed", G_CALLBACK (thunar_permissions_chooser_file_changed), chooser); + + /* update our state */ + thunar_permissions_chooser_file_changed (chooser, file); + } + + /* notify listeners */ + g_object_notify (G_OBJECT (chooser), "file"); +} + + diff --git a/thunar/thunar-permissions-chooser.h b/thunar/thunar-permissions-chooser.h new file mode 100644 index 000000000..d85a5cf6e --- /dev/null +++ b/thunar/thunar-permissions-chooser.h @@ -0,0 +1,47 @@ +/* $Id$ */ +/*- + * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> + * + * 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., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __THUNAR_PERMISSIONS_CHOOSER_H__ +#define __THUNAR_PERMISSIONS_CHOOSER_H__ + +#include <thunar/thunar-file.h> + +G_BEGIN_DECLS; + +typedef struct _ThunarPermissionsChooserClass ThunarPermissionsChooserClass; +typedef struct _ThunarPermissionsChooser ThunarPermissionsChooser; + +#define THUNAR_TYPE_PERMISSIONS_CHOOSER (thunar_permissions_chooser_get_type ()) +#define THUNAR_PERMISSIONS_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THUNAR_TYPE_PERMISSIONS_CHOOSER, ThunarPermissionsChooser)) +#define THUNAR_PERMISSIONS_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), THUNAR_TYPE_PERMISSIONS_CHOOSER, ThunarPermissionsChooserClass)) +#define THUNAR_IS_PERMISSIONS_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THUNAR_TYPE_PERMISSIONS_CHOOSER)) +#define THUNAR_IS_PERMISSIONS_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), THUNAR_TYPE_PERMISSIONS_CHOOSER)) +#define THUNAR_PERMISSIONS_CHOOSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THUNAR_TYPE_PERMISSIONS_CHOOSER, ThunarPermissionsChooserClass)) + +GType thunar_permissions_chooser_get_type (void) G_GNUC_CONST; + +GtkWidget *thunar_permissions_chooser_new (void) G_GNUC_MALLOC; + +ThunarFile *thunar_permissions_chooser_get_file (ThunarPermissionsChooser *chooser); +void thunar_permissions_chooser_set_file (ThunarPermissionsChooser *chooser, + ThunarFile *file); + +G_END_DECLS; + +#endif /* !__THUNAR_PERMISSIONS_CHOOSER_H__ */ diff --git a/thunar/thunar-permissions-model.c b/thunar/thunar-permissions-model.c deleted file mode 100644 index a5f9c9122..000000000 --- a/thunar/thunar-permissions-model.c +++ /dev/null @@ -1,968 +0,0 @@ -/* $Id$ */ -/*- - * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> - * - * 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., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#ifdef HAVE_MEMORY_H -#include <memory.h> -#endif -#ifdef HAVE_STRING_H -#include <string.h> -#endif - -#include <thunar/thunar-change-group-dialog.h> -#include <thunar/thunar-dialogs.h> -#include <thunar/thunar-permissions-model.h> -#include <thunar/thunar-stock.h> - - - -#define INDEX_TO_MODE_MASK(index) ((1 << (3 - ((index) % 4))) << ((2 - (index / 4)) * 3)) - - - -/* Property identifiers */ -enum -{ - PROP_0, - PROP_FILE, - PROP_MUTABLE, -}; - - - -static void thunar_permissions_model_class_init (ThunarPermissionsModelClass *klass); -static void thunar_permissions_model_tree_model_init (GtkTreeModelIface *iface); -static void thunar_permissions_model_init (ThunarPermissionsModel *model); -static void thunar_permissions_model_finalize (GObject *object); -static void thunar_permissions_model_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static void thunar_permissions_model_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static GtkTreeModelFlags thunar_permissions_model_get_flags (GtkTreeModel *tree_model); -static gint thunar_permissions_model_get_n_columns (GtkTreeModel *tree_model); -static GType thunar_permissions_model_get_column_type (GtkTreeModel *tree_model, - gint column); -static gboolean thunar_permissions_model_get_iter (GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreePath *path); -static GtkTreePath *thunar_permissions_model_get_path (GtkTreeModel *tree_model, - GtkTreeIter *iter); -static void thunar_permissions_model_get_value (GtkTreeModel *tree_model, - GtkTreeIter *iter, - gint column, - GValue *value); -static gboolean thunar_permissions_model_iter_next (GtkTreeModel *tree_model, - GtkTreeIter *iter); -static gboolean thunar_permissions_model_iter_children (GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreeIter *parent); -static gboolean thunar_permissions_model_iter_has_child (GtkTreeModel *tree_model, - GtkTreeIter *iter); -static gint thunar_permissions_model_iter_n_children (GtkTreeModel *tree_model, - GtkTreeIter *iter); -static gboolean thunar_permissions_model_iter_nth_child (GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreeIter *parent, - gint n); -static gboolean thunar_permissions_model_iter_parent (GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreeIter *child); -static void thunar_permissions_model_file_changed (ThunarFile *file, - ThunarPermissionsModel *model); - - - -struct _ThunarPermissionsModelClass -{ - GObjectClass __parent__; -}; - -struct _ThunarPermissionsModel -{ - GObject __parent__; - - gint stamp; - ThunarFile *file; -}; - - - -static const gchar *THUNAR_PERMISSIONS_STOCK_IDS[] = -{ - THUNAR_STOCK_PERMISSIONS_USER, - THUNAR_STOCK_PERMISSIONS_GROUP, - THUNAR_STOCK_PERMISSIONS_OTHER, -}; - - - -static GObjectClass *thunar_permissions_model_parent_class; - - - -GType -thunar_permissions_model_get_type (void) -{ - static GType type = G_TYPE_INVALID; - - if (G_UNLIKELY (type == G_TYPE_INVALID)) - { - static const GTypeInfo info = - { - sizeof (ThunarPermissionsModelClass), - NULL, - NULL, - (GClassInitFunc) thunar_permissions_model_class_init, - NULL, - NULL, - sizeof (ThunarPermissionsModel), - 0, - (GInstanceInitFunc) thunar_permissions_model_init, - NULL, - }; - - static const GInterfaceInfo tree_model_info = - { - (GInterfaceInitFunc) thunar_permissions_model_tree_model_init, - NULL, - NULL, - }; - - type = g_type_register_static (G_TYPE_OBJECT, I_("ThunarPermissionsModel"), &info, 0); - g_type_add_interface_static (type, GTK_TYPE_TREE_MODEL, &tree_model_info); - } - - return type; -} - - - -static void -thunar_permissions_model_class_init (ThunarPermissionsModelClass *klass) -{ - GObjectClass *gobject_class; - - /* determine the parent type class */ - thunar_permissions_model_parent_class = g_type_class_peek_parent (klass); - - gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = thunar_permissions_model_finalize; - gobject_class->get_property = thunar_permissions_model_get_property; - gobject_class->set_property = thunar_permissions_model_set_property; - - /** - * ThunarPermissionsModel:file: - * - * The #ThunarFile whose permissions are managed by this model. - **/ - g_object_class_install_property (gobject_class, - PROP_FILE, - g_param_spec_object ("file", "file", "file", - THUNAR_TYPE_FILE, - EXO_PARAM_READWRITE)); - - /** - * ThunarPermissionsModel:mutable. - * - * Whether the mode of the #ThunarFile whose permissions are managed - * by this model can be changed. - **/ - g_object_class_install_property (gobject_class, - PROP_MUTABLE, - g_param_spec_boolean ("mutable", - "mutable", - "mutable", - FALSE, - EXO_PARAM_READABLE)); -} - - - -static void -thunar_permissions_model_tree_model_init (GtkTreeModelIface *iface) -{ - iface->get_flags = thunar_permissions_model_get_flags; - iface->get_n_columns = thunar_permissions_model_get_n_columns; - iface->get_column_type = thunar_permissions_model_get_column_type; - iface->get_iter = thunar_permissions_model_get_iter; - iface->get_path = thunar_permissions_model_get_path; - iface->get_value = thunar_permissions_model_get_value; - iface->iter_next = thunar_permissions_model_iter_next; - iface->iter_children = thunar_permissions_model_iter_children; - iface->iter_has_child = thunar_permissions_model_iter_has_child; - iface->iter_n_children = thunar_permissions_model_iter_n_children; - iface->iter_nth_child = thunar_permissions_model_iter_nth_child; - iface->iter_parent = thunar_permissions_model_iter_parent; -} - - - -static void -thunar_permissions_model_init (ThunarPermissionsModel *model) -{ - model->stamp = g_random_int (); -} - - - -static void -thunar_permissions_model_finalize (GObject *object) -{ - ThunarPermissionsModel *model = THUNAR_PERMISSIONS_MODEL (object); - thunar_permissions_model_set_file (model, NULL); - (*G_OBJECT_CLASS (thunar_permissions_model_parent_class)->finalize) (object); -} - - - -static void -thunar_permissions_model_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - ThunarPermissionsModel *model = THUNAR_PERMISSIONS_MODEL (object); - - switch (prop_id) - { - case PROP_FILE: - g_value_set_object (value, thunar_permissions_model_get_file (model)); - break; - - case PROP_MUTABLE: - g_value_set_boolean (value, thunar_permissions_model_is_mutable (model)); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - - - -static void -thunar_permissions_model_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - ThunarPermissionsModel *model = THUNAR_PERMISSIONS_MODEL (object); - - switch (prop_id) - { - case PROP_FILE: - thunar_permissions_model_set_file (model, g_value_get_object (value)); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - - - -static GtkTreeModelFlags -thunar_permissions_model_get_flags (GtkTreeModel *tree_model) -{ - return GTK_TREE_MODEL_ITERS_PERSIST; -} - - - -static gint -thunar_permissions_model_get_n_columns (GtkTreeModel *tree_model) -{ - return THUNAR_PERMISSIONS_MODEL_N_COLUMNS; -} - - - -static GType -thunar_permissions_model_get_column_type (GtkTreeModel *tree_model, - gint column) -{ - switch (column) - { - case THUNAR_PERMISSIONS_MODEL_COLUMN_TITLE: - return G_TYPE_STRING; - - case THUNAR_PERMISSIONS_MODEL_COLUMN_ICON: - return G_TYPE_STRING; - - case THUNAR_PERMISSIONS_MODEL_COLUMN_ICON_VISIBLE: - return G_TYPE_BOOLEAN; - - case THUNAR_PERMISSIONS_MODEL_COLUMN_STATE: - return G_TYPE_BOOLEAN; - - case THUNAR_PERMISSIONS_MODEL_COLUMN_STATE_VISIBLE: - return G_TYPE_BOOLEAN; - - case THUNAR_PERMISSIONS_MODEL_COLUMN_MUTABLE: - return G_TYPE_BOOLEAN; - - default: - g_assert_not_reached (); - return G_TYPE_INVALID; - } -} - - - -static gboolean -thunar_permissions_model_get_iter (GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreePath *path) -{ - ThunarPermissionsModel *model = THUNAR_PERMISSIONS_MODEL (tree_model); - guint index; - gint *indices; - - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model), FALSE); - g_return_val_if_fail (gtk_tree_path_get_depth (path) > 0, FALSE); - - /* determine the tree path indices */ - indices = gtk_tree_path_get_indices (path); - - /* determine the base index */ - if (indices[0] < 0 || indices[0] > 2) - return FALSE; - index = indices[0] * 4; - - /* determine the sub index */ - if (gtk_tree_path_get_depth (path) > 1) - { - if (indices[1] < 0 || indices[1] > 2) - return FALSE; - index += (indices[1] + 1); - } - - /* setup the tree iter */ - iter->stamp = model->stamp; - iter->user_data = GUINT_TO_POINTER (index); - - return TRUE; -} - - - -static GtkTreePath* -thunar_permissions_model_get_path (GtkTreeModel *tree_model, - GtkTreeIter *iter) -{ - ThunarPermissionsModel *model = THUNAR_PERMISSIONS_MODEL (tree_model); - GtkTreePath *path; - guint index; - - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model), NULL); - g_return_val_if_fail (iter->stamp == model->stamp, NULL); - - index = GPOINTER_TO_UINT (iter->user_data); - if (G_UNLIKELY (index >= 3 * 4)) - return NULL; - - path = gtk_tree_path_new (); - gtk_tree_path_append_index (path, index / 4); - if ((index % 4) != 0) - gtk_tree_path_append_index (path, (index % 4) - 1); - - return path; -} - - - -static void -thunar_permissions_model_get_value (GtkTreeModel *tree_model, - GtkTreeIter *iter, - gint column, - GValue *value) -{ - ThunarPermissionsModel *model = THUNAR_PERMISSIONS_MODEL (tree_model); - ThunarVfsGroup *group; - ThunarVfsUser *user; - const gchar *real_name; - const gchar *user_name; - guint index; - - g_return_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model)); - - /* initialize the value with the proper type */ - g_value_init (value, gtk_tree_model_get_column_type (tree_model, column)); - - /* verify that we have a valid file */ - if (G_UNLIKELY (model->file == NULL)) - return; - - /* verify that the index is valid */ - index = GPOINTER_TO_UINT (iter->user_data); - if (index >= 3 * 4) - return; - - switch (column) - { - case THUNAR_PERMISSIONS_MODEL_COLUMN_TITLE: - if ((index % 4) == 0) - { - switch (index / 4) - { - case 0: - user = thunar_file_get_user (model->file); - if (G_LIKELY (user != NULL)) - { - user_name = thunar_vfs_user_get_name (user); - real_name = thunar_vfs_user_get_real_name (user); - if (G_LIKELY (strcmp (user_name, real_name) != 0)) - g_value_take_string (value, g_strdup_printf (_("%s (%s)"), real_name, user_name)); - else - g_value_set_string (value, user_name); - g_object_unref (G_OBJECT (user)); - } - else - { - g_value_set_static_string (value, _("Unknown file owner")); - } - break; - - case 1: - group = thunar_file_get_group (model->file); - if (G_LIKELY (group != NULL)) - { - g_value_set_string (value, thunar_vfs_group_get_name (group)); - g_object_unref (G_OBJECT (group)); - } - else - { - g_value_set_static_string (value, _("Unknown file group")); - } - break; - - case 2: - g_value_set_static_string (value, _("All other users")); - break; - } - } - else - { - switch ((index % 4) - 1) - { - case 0: - g_value_set_static_string (value, _("Read")); - break; - - case 1: - g_value_set_static_string (value, _("Write")); - break; - - case 2: - g_value_set_static_string (value, thunar_file_is_directory (model->file) ? _("List folder contents") : _("Execute")); - break; - } - } - break; - - case THUNAR_PERMISSIONS_MODEL_COLUMN_ICON: - g_value_set_static_string (value, THUNAR_PERMISSIONS_STOCK_IDS[index / 4]); - break; - - case THUNAR_PERMISSIONS_MODEL_COLUMN_ICON_VISIBLE: - g_value_set_boolean (value, (index % 4) == 0); - break; - - case THUNAR_PERMISSIONS_MODEL_COLUMN_STATE: - g_value_set_boolean (value, thunar_file_get_mode (model->file) & INDEX_TO_MODE_MASK (index)); - break; - - case THUNAR_PERMISSIONS_MODEL_COLUMN_STATE_VISIBLE: - g_value_set_boolean (value, (index % 4) != 0); - break; - - case THUNAR_PERMISSIONS_MODEL_COLUMN_MUTABLE: - g_value_set_boolean (value, thunar_file_is_chmodable (model->file)); - break; - - default: - g_assert_not_reached (); - break; - } -} - - - -static gboolean -thunar_permissions_model_iter_next (GtkTreeModel *tree_model, - GtkTreeIter *iter) -{ - ThunarPermissionsModel *model = THUNAR_PERMISSIONS_MODEL (tree_model); - guint index = GPOINTER_TO_UINT (iter->user_data); - - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model), FALSE); - g_return_val_if_fail (iter->stamp == model->stamp, FALSE); - - if (index == 0 || index == 4) - index += 4; - else if (((index % 4) == 1 || (index % 4) == 2) && index < 3 * 4) - index += 1; - else - return FALSE; - - iter->user_data = GUINT_TO_POINTER (index); - - return TRUE; -} - - - -static gboolean -thunar_permissions_model_iter_children (GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreeIter *parent) -{ - ThunarPermissionsModel *model = THUNAR_PERMISSIONS_MODEL (tree_model); - guint index = GPOINTER_TO_UINT (parent->user_data); - - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model), FALSE); - g_return_val_if_fail (parent->stamp == model->stamp, FALSE); - - if ((index % 4) == 0 && index < 3 * 4) - { - iter->stamp = model->stamp; - iter->user_data = GUINT_TO_POINTER (index + 1); - return TRUE; - } - - return FALSE; -} - - - -static gboolean -thunar_permissions_model_iter_has_child (GtkTreeModel *tree_model, - GtkTreeIter *iter) -{ - return (gtk_tree_model_iter_n_children (tree_model, iter) > 0); -} - - - -static gint -thunar_permissions_model_iter_n_children (GtkTreeModel *tree_model, - GtkTreeIter *iter) -{ - ThunarPermissionsModel *model = THUNAR_PERMISSIONS_MODEL (tree_model); - - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model), 0); - g_return_val_if_fail (iter == NULL || iter->stamp == model->stamp, 0); - - if (iter == NULL || (GPOINTER_TO_UINT (iter->user_data) % 4) == 0) - return 3; - - return 0; -} - - - -static gboolean -thunar_permissions_model_iter_nth_child (GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreeIter *parent, - gint n) -{ - ThunarPermissionsModel *model = THUNAR_PERMISSIONS_MODEL (tree_model); - guint index; - - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model), FALSE); - g_return_val_if_fail (parent == NULL || parent->stamp == model->stamp, FALSE); - - if (G_LIKELY (n >= 0 && n < 3)) - { - if (parent == NULL) - { - iter->stamp = model->stamp; - iter->user_data = GUINT_TO_POINTER (n * 4); - return TRUE; - } - else - { - index = GPOINTER_TO_UINT (parent->user_data); - if (index == 0 || index == 4 || index == 8) - { - iter->stamp = model->stamp; - iter->user_data = GUINT_TO_POINTER (index + n + 1); - return TRUE; - } - } - } - - return FALSE; -} - - - -static gboolean -thunar_permissions_model_iter_parent (GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreeIter *child) -{ - ThunarPermissionsModel *model = THUNAR_PERMISSIONS_MODEL (tree_model); - guint index = GPOINTER_TO_UINT (child->user_data); - - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model), FALSE); - g_return_val_if_fail (child->stamp == model->stamp, FALSE); - - if (index < 3 * 4 && (index % 4) != 0) - { - iter->stamp = model->stamp; - iter->user_data = GUINT_TO_POINTER ((index / 4) * 4); - return TRUE; - } - - return FALSE; -} - - - -static void -thunar_permissions_model_file_changed (ThunarFile *file, - ThunarPermissionsModel *model) -{ - GtkTreePath *path; - GtkTreeIter iter; - gint index; - - g_return_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model)); - g_return_if_fail (THUNAR_IS_FILE (file)); - g_return_if_fail (file == model->file); - - /* emit "row-changed" for all (virtual) tree items */ - for (index = 0; index < 3 * 4; ++index) - { - /* setup the tree iter */ - iter.stamp = model->stamp; - iter.user_data = GINT_TO_POINTER (index); - - /* notify the view */ - path = gtk_tree_model_get_path (GTK_TREE_MODEL (model), &iter); - gtk_tree_model_row_changed (GTK_TREE_MODEL (model), path, &iter); - gtk_tree_path_free (path); - } - - /* notify listeners of "mutable" */ - g_object_notify (G_OBJECT (model), "mutable"); -} - - - -/** - * thunar_permissions_model_new: - * - * Allocates a new #ThunarPermissionsModel. - * - * Return value: the newly allocated #ThunarPermissionsModel. - **/ -GtkTreeModel* -thunar_permissions_model_new (void) -{ - return g_object_new (THUNAR_TYPE_PERMISSIONS_MODEL, NULL); -} - - - -/** - * thunar_permissions_model_get_file: - * @model : a #ThunarPermissionsModel instance. - * - * Returns the #ThunarFile associated with the @model. - * - * Return value: the #ThunarFile associated with @model. - **/ -ThunarFile* -thunar_permissions_model_get_file (ThunarPermissionsModel *model) -{ - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model), NULL); - return model->file; -} - - - -/** - * thunar_permissions_model_set_file: - * @model : a #ThunarPermissionsModel instance. - * @file : a #ThunarFile instance or %NULL. - * - * Associates the @model with the specified @file. - **/ -void -thunar_permissions_model_set_file (ThunarPermissionsModel *model, - ThunarFile *file) -{ - g_return_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model)); - g_return_if_fail (file == NULL || THUNAR_IS_FILE (file)); - - /* check if we have a new file here */ - if (G_UNLIKELY (model->file == file)) - return; - - /* disconnect from the previous file */ - if (G_LIKELY (model->file != NULL)) - { - g_signal_handlers_disconnect_by_func (G_OBJECT (model->file), thunar_permissions_model_file_changed, model); - g_object_unref (G_OBJECT (model->file)); - } - - /* activate the new file */ - model->file = file; - - /* connect to the new file */ - if (G_LIKELY (file != NULL)) - { - g_object_ref (G_OBJECT (file)); - g_signal_connect (G_OBJECT (file), "changed", G_CALLBACK (thunar_permissions_model_file_changed), model); - thunar_permissions_model_file_changed (file, model); - } - - /* notify listeners */ - g_object_freeze_notify (G_OBJECT (model)); - g_object_notify (G_OBJECT (model), "file"); - g_object_notify (G_OBJECT (model), "mutable"); - g_object_thaw_notify (G_OBJECT (model)); -} - - - -/** - * thunar_permissions_model_is_mutable: - * @model : a #ThunarPermissionsModel instance. - * - * Returns %TRUE if the @model is mutable, that is, if the mode of the - * #ThunarFile associated with the @model can be changed. - * - * Return value: %TRUE if @model is mutable. - **/ -gboolean -thunar_permissions_model_is_mutable (ThunarPermissionsModel *model) -{ - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model), FALSE); - return (model->file != NULL && thunar_file_is_chmodable (model->file)); -} - - - -static void -change_group_activated (GtkAction *action, - ThunarFile *file) -{ - GtkWidget *toplevel; - GtkWidget *widget; - GtkWidget *dialog; - - g_return_if_fail (GTK_IS_ACTION (action)); - g_return_if_fail (THUNAR_IS_FILE (file)); - - /* determine the widget associated with the action */ - widget = g_object_get_data (G_OBJECT (action), "gtk-widget"); - if (G_UNLIKELY (widget == NULL)) - return; - - /* determine the toplevel item for the given widget */ - toplevel = gtk_widget_get_toplevel (widget); - if (G_UNLIKELY (toplevel == NULL)) - return; - - /* popup the "Change Group" dialog */ - dialog = thunar_change_group_dialog_new (); - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (toplevel)); - thunar_change_group_dialog_set_file (THUNAR_CHANGE_GROUP_DIALOG (dialog), file); - gtk_widget_show (dialog); -} - - - -static void -grant_or_deny_activated (GtkAction *action, - ThunarPermissionsModel *model) -{ - GtkTreeIter *iter; - GtkWidget *widget; - GError *error = NULL; - - g_return_if_fail (GTK_IS_ACTION (action)); - g_return_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model)); - - /* determine the tree iterator associated with the action */ - iter = g_object_get_data (G_OBJECT (action), "gtk-tree-iter"); - if (G_UNLIKELY (iter == NULL)) - return; - - /* determine the widget associated with the action */ - widget = g_object_get_data (G_OBJECT (action), "gtk-widget"); - if (G_UNLIKELY (widget == NULL)) - return; - - /* try to toggle the item */ - if (!thunar_permissions_model_toggle (model, iter, &error)) - { - /* display an error to the user (when we get here, we definitely have a valid file!) */ - thunar_dialogs_show_error (widget, error, _("Failed to change permissions of `%s'"), thunar_file_get_display_name (model->file)); - - /* release the error */ - g_error_free (error); - } -} - - - -/** - * thunar_permissions_model_get_actions: - * @model : a #ThunarPermissionsModel instance. - * @widget : the #GtkWidget on which the actions will be invoked. - * @iter : a valid #GtkTreeIter within @model. - * - * Returns the list of #GtkAction<!---->s that can be performed on the - * item referred to by @iter in @model. - * - * The caller is responsible to free the returned list using: - * <informalexample><programlisting> - * g_list_foreach (list, (GFunc) g_object_unref, NULL); - * g_list_free (list); - * </programlisting></informalexample> - * - * Return value: the list of #GtkAction<!---->s that can be performed on - * @iter in @model. - **/ -GList* -thunar_permissions_model_get_actions (ThunarPermissionsModel *model, - GtkWidget *widget, - GtkTreeIter *iter) -{ - ThunarVfsFileMode mode; - GtkAction *action; - GList *actions = NULL; - gint index; - - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model), NULL); - g_return_val_if_fail (iter->stamp == model->stamp, NULL); - g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); - - /* verify that we have a valid file */ - if (G_UNLIKELY (model->file == NULL)) - return NULL; - - /* determine the index for the iterator */ - index = GPOINTER_TO_UINT (iter->user_data); - if (G_UNLIKELY (index >= 3 * 4)) - return NULL; - - /* add appropriate actions depending on the index */ - if (G_UNLIKELY (index == 4)) - { - /* actions for the group item */ - action = gtk_action_new ("thunar-permissions-model-change-group", _("Change _Group..."), NULL, THUNAR_STOCK_PERMISSIONS_GROUP); - g_object_set_data_full (G_OBJECT (action), I_("gtk-widget"), g_object_ref (G_OBJECT (widget)), g_object_unref); - gtk_action_set_sensitive (action, thunar_file_is_chgrpable (model->file)); - g_signal_connect_data (G_OBJECT (action), "activate", G_CALLBACK (change_group_activated), - g_object_ref (G_OBJECT (model->file)), (GClosureNotify) g_object_unref, 0); - actions = g_list_append (actions, action); - } - else if ((index % 4) != 0) - { - /* determine the file's mode */ - mode = thunar_file_get_mode (model->file); - - /* append the "Grant Permission" action */ - action = gtk_action_new ("thunar-permissions-model-grant-permission", _("_Grant Permission"), NULL, GTK_STOCK_YES); - g_object_set_data_full (G_OBJECT (action), I_("gtk-tree-iter"), gtk_tree_iter_copy (iter), (GDestroyNotify) gtk_tree_iter_free); - g_object_set_data_full (G_OBJECT (action), I_("gtk-widget"), g_object_ref (G_OBJECT (widget)), g_object_unref); - gtk_action_set_sensitive (action, thunar_permissions_model_is_mutable (model) && (mode & INDEX_TO_MODE_MASK (index)) == 0); - g_signal_connect_data (G_OBJECT (action), "activate", G_CALLBACK (grant_or_deny_activated), - g_object_ref (G_OBJECT (model)), (GClosureNotify) g_object_unref, 0); - actions = g_list_append (actions, action); - - /* append the "Deny Permission" action */ - action = gtk_action_new ("thunar-permissions-model-deny-permission", _("_Deny Permission"), NULL, GTK_STOCK_NO); - g_object_set_data_full (G_OBJECT (action), I_("gtk-tree-iter"), gtk_tree_iter_copy (iter), (GDestroyNotify) gtk_tree_iter_free); - g_object_set_data_full (G_OBJECT (action), I_("gtk-widget"), g_object_ref (G_OBJECT (widget)), g_object_unref); - gtk_action_set_sensitive (action, thunar_permissions_model_is_mutable (model) && (mode & INDEX_TO_MODE_MASK (index)) != 0); - g_signal_connect_data (G_OBJECT (action), "activate", G_CALLBACK (grant_or_deny_activated), - g_object_ref (G_OBJECT (model)), (GClosureNotify) g_object_unref, 0); - actions = g_list_append (actions, action); - } - - return actions; -} - - - -/** - * thunar_permissions_model_toggle: - * @model : a #ThunarPermissionsModel instance. - * @iter : a valid #GtkTreeIter for @model. - * @error : return location for errors or %NULL. - * - * Toggles the permission flag identified by @iter for the - * #ThunarFile associated with @model. - * - * Return value: %TRUE if the permission flag identified by - * @iter was successfully toggled. - **/ -gboolean -thunar_permissions_model_toggle (ThunarPermissionsModel *model, - GtkTreeIter *iter, - GError **error) -{ - guint index; - guint mask; - guint mode; - - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_MODEL (model), FALSE); - g_return_val_if_fail (error == NULL || *error == NULL, FALSE); - g_return_val_if_fail (iter->stamp == model->stamp, FALSE); - - /* determine the index for the iter */ - index = GPOINTER_TO_UINT (iter->user_data); - - /* check if we're associated with a file and have a valid index */ - if (G_LIKELY (model->file != NULL && (index % 4) != 0)) - { - /* determine the mode and the mode mask */ - mask = INDEX_TO_MODE_MASK (index); - mode = thunar_file_get_mode (model->file); - - /* toggle the bit set in the mode mask */ - if ((mode & mask) != 0) - mode &= ~mask; - else - mode |= mask; - - /* perform the change mode operation */ - return thunar_file_chmod (model->file, mode, error); - } - - return TRUE; -} - - diff --git a/thunar/thunar-permissions-model.h b/thunar/thunar-permissions-model.h deleted file mode 100644 index 1d1628bae..000000000 --- a/thunar/thunar-permissions-model.h +++ /dev/null @@ -1,73 +0,0 @@ -/* $Id$ */ -/*- - * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> - * - * 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., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __THUNAR_PERMISSIONS_MODEL_H__ -#define __THUNAR_PERMISSIONS_MODEL_H__ - -#include <thunar/thunar-file.h> - -G_BEGIN_DECLS; - -typedef struct _ThunarPermissionsModelClass ThunarPermissionsModelClass; -typedef struct _ThunarPermissionsModel ThunarPermissionsModel; - -#define THUNAR_TYPE_PERMISSIONS_MODEL (thunar_permissions_model_get_type ()) -#define THUNAR_PERMISSIONS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THUNAR_TYPE_PERMISSIONS_MODEL, ThunarPermissionsModel)) -#define THUNAR_PERMISSIONS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), THUNAR_TYPE_PERMISSIONS_MODEL, ThunarPermissionsModelClass)) -#define THUNAR_IS_PERMISSIONS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THUNAR_TYPE_PERMISSIONS_MODEL)) -#define THUNAR_IS_PERMISSIONS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), THUNAR_TYPE_PERMISSIONS_MODEL)) -#define THUNAR_PERMISSIONS_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THUNAR_TYPE_PERMISSIONS_MODEL, ThunarPermissionsModelClass)) - -/** - * ThunarPermissionsModelColumn: - * - * Columns provided by the #ThunarPermissionsModel class. - **/ -typedef enum -{ - THUNAR_PERMISSIONS_MODEL_COLUMN_TITLE, - THUNAR_PERMISSIONS_MODEL_COLUMN_ICON, - THUNAR_PERMISSIONS_MODEL_COLUMN_ICON_VISIBLE, - THUNAR_PERMISSIONS_MODEL_COLUMN_STATE, - THUNAR_PERMISSIONS_MODEL_COLUMN_STATE_VISIBLE, - THUNAR_PERMISSIONS_MODEL_COLUMN_MUTABLE, - THUNAR_PERMISSIONS_MODEL_N_COLUMNS, -} ThunarPermissionsModelColumn; - -GType thunar_permissions_model_get_type (void) G_GNUC_CONST; - -GtkTreeModel *thunar_permissions_model_new (void) G_GNUC_MALLOC; - -ThunarFile *thunar_permissions_model_get_file (ThunarPermissionsModel *model); -void thunar_permissions_model_set_file (ThunarPermissionsModel *model, - ThunarFile *file); - -gboolean thunar_permissions_model_is_mutable (ThunarPermissionsModel *model); - -GList *thunar_permissions_model_get_actions (ThunarPermissionsModel *model, - GtkWidget *widget, - GtkTreeIter *iter) G_GNUC_MALLOC; - -gboolean thunar_permissions_model_toggle (ThunarPermissionsModel *model, - GtkTreeIter *iter, - GError **error); - -G_END_DECLS; - -#endif /* !__THUNAR_PERMISSIONS_MODEL_H__ */ diff --git a/thunar/thunar-permissions-view.c b/thunar/thunar-permissions-view.c deleted file mode 100644 index dcb2e0ddf..000000000 --- a/thunar/thunar-permissions-view.c +++ /dev/null @@ -1,572 +0,0 @@ -/* $Id$ */ -/*- - * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> - * - * 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., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <thunar/thunar-advanced-permissions-dialog.h> -#include <thunar/thunar-dialogs.h> -#include <thunar/thunar-pango-extensions.h> -#include <thunar/thunar-permissions-model.h> -#include <thunar/thunar-permissions-view.h> - - - -/* Property identifiers */ -enum -{ - PROP_0, - PROP_FILE, -}; - - - -static void thunar_permissions_view_class_init (ThunarPermissionsViewClass *klass); -static void thunar_permissions_view_init (ThunarPermissionsView *view); -static void thunar_permissions_view_finalize (GObject *object); -static void thunar_permissions_view_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static void thunar_permissions_view_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static gboolean thunar_permissions_view_context_menu (ThunarPermissionsView *view, - GtkTreeIter *iter, - guint button, - guint32 time); -static void thunar_permissions_view_advanced_clicked (GtkWidget *button, - ThunarPermissionsView *view); -static gboolean thunar_permissions_view_button_press_event (GtkWidget *tree_view, - GdkEventButton *event, - ThunarPermissionsView *view); -static gboolean thunar_permissions_view_popup_menu (GtkWidget *tree_view, - ThunarPermissionsView *view); -static void thunar_permissions_view_row_activated (GtkWidget *tree_view, - GtkTreePath *path, - GtkTreeViewColumn *column, - ThunarPermissionsView *view); -static void thunar_permissions_view_toggled (GtkCellRendererToggle *renderer, - const gchar *path_string, - ThunarPermissionsView *view); - - - -struct _ThunarPermissionsViewClass -{ - GtkVBoxClass __parent__; -}; - -struct _ThunarPermissionsView -{ - GtkVBox __parent__; - - ThunarFile *file; - - GtkTooltips *tooltips; - GtkWidget *tree_view; -}; - - - -static GObjectClass *thunar_permissions_view_parent_class; - - - -GType -thunar_permissions_view_get_type (void) -{ - static GType type = G_TYPE_INVALID; - - if (G_UNLIKELY (type == G_TYPE_INVALID)) - { - static const GTypeInfo info = - { - sizeof (ThunarPermissionsViewClass), - NULL, - NULL, - (GClassInitFunc) thunar_permissions_view_class_init, - NULL, - NULL, - sizeof (ThunarPermissionsView), - 0, - (GInstanceInitFunc) thunar_permissions_view_init, - NULL, - }; - - type = g_type_register_static (GTK_TYPE_VBOX, I_("ThunarPermissionsView"), &info, 0); - } - - return type; -} - - - -static void -thunar_permissions_view_class_init (ThunarPermissionsViewClass *klass) -{ - GObjectClass *gobject_class; - - thunar_permissions_view_parent_class = g_type_class_peek_parent (klass); - - gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = thunar_permissions_view_finalize; - gobject_class->get_property = thunar_permissions_view_get_property; - gobject_class->set_property = thunar_permissions_view_set_property; - - /** - * ThunarPermissionsView:file: - * - * The #ThunarFile whose permissions is displayed by this view. - **/ - g_object_class_install_property (gobject_class, - PROP_FILE, - g_param_spec_object ("file", "file", "file", - THUNAR_TYPE_FILE, - EXO_PARAM_READWRITE)); -} - - - -static void -thunar_permissions_view_init (ThunarPermissionsView *view) -{ - GtkTreeViewColumn *column; - GtkCellRenderer *renderer; - GtkTreeModel *model; - GtkWidget *align; - GtkWidget *button; - GtkWidget *hbox; - GtkWidget *image; - GtkWidget *label; - GtkWidget *scrolled_window; - GtkWidget *separator; - - /* allocate tooltips for the permissions view */ - view->tooltips = gtk_tooltips_new (); - exo_gtk_object_ref_sink (GTK_OBJECT (view->tooltips)); - - gtk_box_set_spacing (GTK_BOX (view), 6); - gtk_container_set_border_width (GTK_CONTAINER (view), 12); - - scrolled_window = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); - gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_IN); - gtk_box_pack_start (GTK_BOX (view), scrolled_window, TRUE, TRUE, 0); - gtk_widget_show (scrolled_window); - - view->tree_view = gtk_tree_view_new (); - gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view->tree_view), FALSE); - g_signal_connect (G_OBJECT (view->tree_view), "button-press-event", G_CALLBACK (thunar_permissions_view_button_press_event), view); - g_signal_connect (G_OBJECT (view->tree_view), "popup-menu", G_CALLBACK (thunar_permissions_view_popup_menu), view); - g_signal_connect (G_OBJECT (view->tree_view), "row-activated", G_CALLBACK (thunar_permissions_view_row_activated), view); - gtk_container_add (GTK_CONTAINER (scrolled_window), view->tree_view); - gtk_widget_show (view->tree_view); - - column = gtk_tree_view_column_new (); - gtk_tree_view_column_set_expand (column, TRUE); - gtk_tree_view_append_column (GTK_TREE_VIEW (view->tree_view), column); - - renderer = gtk_cell_renderer_pixbuf_new (); - gtk_tree_view_column_pack_start (column, renderer, FALSE); - gtk_tree_view_column_add_attribute (column, renderer, "stock-id", THUNAR_PERMISSIONS_MODEL_COLUMN_ICON); - gtk_tree_view_column_add_attribute (column, renderer, "visible", THUNAR_PERMISSIONS_MODEL_COLUMN_ICON_VISIBLE); - - renderer = gtk_cell_renderer_toggle_new (); - g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (thunar_permissions_view_toggled), view); - gtk_tree_view_column_pack_start (column, renderer, FALSE); - gtk_tree_view_column_add_attribute (column, renderer, "active", THUNAR_PERMISSIONS_MODEL_COLUMN_STATE); - gtk_tree_view_column_add_attribute (column, renderer, "activatable", THUNAR_PERMISSIONS_MODEL_COLUMN_MUTABLE); - gtk_tree_view_column_add_attribute (column, renderer, "visible", THUNAR_PERMISSIONS_MODEL_COLUMN_STATE_VISIBLE); - - renderer = gtk_cell_renderer_text_new (); - gtk_tree_view_column_pack_start (column, renderer, TRUE); - gtk_tree_view_column_add_attribute (column, renderer, "text", THUNAR_PERMISSIONS_MODEL_COLUMN_TITLE); - - /* setup the permissions model */ - model = thunar_permissions_model_new (); - exo_binding_new (G_OBJECT (view), "file", G_OBJECT (model), "file"); - gtk_tree_view_set_model (GTK_TREE_VIEW (view->tree_view), model); - g_object_unref (G_OBJECT (model)); - - hbox = gtk_hbox_new (FALSE, 6); - gtk_box_pack_start (GTK_BOX (view), hbox, FALSE, FALSE, 0); - gtk_widget_show (hbox); - - label = gtk_label_new (_("For special permissions and for\nadvanced settings, click Advanced.")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f); - gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); - gtk_widget_show (label); - - align = gtk_alignment_new (0.5f, 0.5f, 0.0f, 0.0f); - gtk_box_pack_start (GTK_BOX (hbox), align, FALSE, FALSE, 0); - gtk_widget_show (align); - - button = gtk_button_new_with_mnemonic (_("_Advanced...")); - gtk_tooltips_set_tip (view->tooltips, button, _("Click here for special permissions and for advanced settings."), NULL); - g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (thunar_permissions_view_advanced_clicked), view); - gtk_container_add (GTK_CONTAINER (align), button); - gtk_widget_show (button); - - separator = gtk_hseparator_new (); - exo_binding_new_with_negation (G_OBJECT (model), "mutable", G_OBJECT (separator), "visible"); - gtk_box_pack_start (GTK_BOX (view), separator, FALSE, FALSE, 0); - gtk_widget_show (separator); - - hbox = gtk_hbox_new (FALSE, 6); - exo_binding_new_with_negation (G_OBJECT (model), "mutable", G_OBJECT (hbox), "visible"); - gtk_box_pack_start (GTK_BOX (view), hbox, FALSE, FALSE, 0); - gtk_widget_show (hbox); - - image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DND); - gtk_misc_set_alignment (GTK_MISC (image), 0.5f, 0.0f); - gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); - gtk_widget_show (image); - - label = gtk_label_new (_("You are not the owner of this file, so\nyou cannot change these permissions.")); - gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_italic ()); - gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f); - gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); - gtk_widget_show (label); -} - - - -static void -thunar_permissions_view_finalize (GObject *object) -{ - ThunarPermissionsView *view = THUNAR_PERMISSIONS_VIEW (object); - - /* release the file */ - thunar_permissions_view_set_file (view, NULL); - - /* release the tooltips */ - g_object_unref (G_OBJECT (view->tooltips)); - - (*G_OBJECT_CLASS (thunar_permissions_view_parent_class)->finalize) (object); -} - - - -static void -thunar_permissions_view_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - ThunarPermissionsView *view = THUNAR_PERMISSIONS_VIEW (object); - - switch (prop_id) - { - case PROP_FILE: - g_value_set_object (value, thunar_permissions_view_get_file (view)); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - - - -static void -thunar_permissions_view_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - ThunarPermissionsView *view = THUNAR_PERMISSIONS_VIEW (object); - - switch (prop_id) - { - case PROP_FILE: - thunar_permissions_view_set_file (view, g_value_get_object (value)); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - - - -static gboolean -thunar_permissions_view_context_menu (ThunarPermissionsView *view, - GtkTreeIter *iter, - guint button, - guint32 time) -{ - GtkTreeModel *model; - GMainLoop *loop; - GtkWidget *item; - GtkWidget *menu; - GList *actions; - GList *lp; - - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_VIEW (view), FALSE); - - /* determine the model for the tree view */ - model = gtk_tree_view_get_model (GTK_TREE_VIEW (view->tree_view)); - if (G_UNLIKELY (model == NULL)) - return FALSE; - - /* determine the menu actions for the specified iterator */ - actions = thunar_permissions_model_get_actions (THUNAR_PERMISSIONS_MODEL (model), GTK_WIDGET (view), iter); - if (G_UNLIKELY (actions == NULL)) - return FALSE; - - /* prepare the internal loop */ - loop = g_main_loop_new (NULL, FALSE); - - /* prepare the popup menu */ - menu = gtk_menu_new (); - exo_gtk_object_ref_sink (GTK_OBJECT (menu)); - gtk_menu_set_screen (GTK_MENU (menu), gtk_widget_get_screen (GTK_WIDGET (view))); - g_signal_connect_swapped (G_OBJECT (menu), "deactivate", G_CALLBACK (g_main_loop_quit), loop); - - /* append menu items for all actions */ - for (lp = actions; lp != NULL; lp = lp->next) - { - /* create the menu item */ - item = gtk_action_create_menu_item (GTK_ACTION (lp->data)); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - gtk_widget_show (item); - - /* release the action reference */ - g_object_unref (G_OBJECT (lp->data)); - } - - /* release the action list */ - g_list_free (actions); - - /* run the internal loop */ - gtk_grab_add (menu); - gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, button, time); - g_main_loop_run (loop); - gtk_grab_remove (menu); - - /* clean up */ - g_object_unref (G_OBJECT (menu)); - g_main_loop_unref (loop); - - return TRUE; -} - - - -static void -thunar_permissions_view_advanced_clicked (GtkWidget *button, - ThunarPermissionsView *view) -{ - GtkWidget *toplevel; - GtkWidget *dialog; - - /* determine the toplevel widget for the view */ - toplevel = gtk_widget_get_toplevel (GTK_WIDGET (view)); - if (G_UNLIKELY (toplevel == NULL)) - return; - - /* display the advanced permissions dialog */ - dialog = thunar_advanced_permissions_dialog_new (); - exo_binding_new (G_OBJECT (view), "file", G_OBJECT (dialog), "file"); - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (toplevel)); - gtk_widget_show (dialog); -} - - - -static gboolean -thunar_permissions_view_button_press_event (GtkWidget *tree_view, - GdkEventButton *event, - ThunarPermissionsView *view) -{ - GtkTreeModel *model; - GtkTreePath *path; - GtkTreeIter iter; - - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_VIEW (view), FALSE); - g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), FALSE); - g_return_val_if_fail (view->tree_view == tree_view, FALSE); - - /* determine the path for the click */ - if (event->button == 3 && gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (tree_view), event->x, event->y, &path, NULL, NULL, NULL)) - { - /* select the specified row */ - gtk_tree_view_set_cursor (GTK_TREE_VIEW (tree_view), path, NULL, FALSE); - - /* determine the iterator for the tree path */ - model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view)); - gtk_tree_model_get_iter (model, &iter, path); - gtk_tree_path_free (path); - - /* popup the context menu */ - return thunar_permissions_view_context_menu (view, &iter, event->button, event->time); - } - - return FALSE; -} - - - -static gboolean -thunar_permissions_view_popup_menu (GtkWidget *tree_view, - ThunarPermissionsView *view) -{ - GtkTreeSelection *selection; - GtkTreeIter iter; - - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_VIEW (view), FALSE); - g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), FALSE); - g_return_val_if_fail (view->tree_view == tree_view, FALSE); - - /* determine the selected item */ - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)); - if (gtk_tree_selection_get_selected (selection, NULL, &iter)) - return thunar_permissions_view_context_menu (view, &iter, 0, gtk_get_current_event_time ()); - - return FALSE; -} - - - -static void -thunar_permissions_view_row_activated (GtkWidget *tree_view, - GtkTreePath *path, - GtkTreeViewColumn *column, - ThunarPermissionsView *view) -{ - g_return_if_fail (THUNAR_IS_PERMISSIONS_VIEW (view)); - g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); - g_return_if_fail (view->tree_view == tree_view); - - if (gtk_tree_view_row_expanded (GTK_TREE_VIEW (tree_view), path)) - gtk_tree_view_collapse_row (GTK_TREE_VIEW (tree_view), path); - else - gtk_tree_view_expand_row (GTK_TREE_VIEW (tree_view), path, FALSE); -} - - - -static void -thunar_permissions_view_toggled (GtkCellRendererToggle *renderer, - const gchar *path_string, - ThunarPermissionsView *view) -{ - GtkTreeModel *model; - GtkTreePath *path; - GtkTreeIter iter; - GError *error = NULL; - - g_return_if_fail (GTK_IS_CELL_RENDERER_TOGGLE (renderer)); - g_return_if_fail (THUNAR_IS_PERMISSIONS_VIEW (view)); - g_return_if_fail (path_string != NULL); - - /* determine the path from the string */ - path = gtk_tree_path_new_from_string (path_string); - if (G_UNLIKELY (path == NULL)) - return; - - /* determine the model and the iter */ - model = gtk_tree_view_get_model (GTK_TREE_VIEW (view->tree_view)); - if (gtk_tree_model_get_iter (model, &iter, path)) - { - /* try to toggle the flag identified by the path */ - if (!thunar_permissions_model_toggle (THUNAR_PERMISSIONS_MODEL (model), &iter, &error)) - { - thunar_dialogs_show_error (GTK_WIDGET (view), error, _("Failed to change permissions of `%s'"), thunar_file_get_display_name (view->file)); - g_error_free (error); - } - } - - /* cleanup */ - gtk_tree_path_free (path); -} - - - -/** - * thunar_permissions_view_new: - * - * Allocates a new #ThunarPermissionsView instance. - * - * Return value: the newly allocated #ThunarPermissionsView instance. - **/ -GtkWidget* -thunar_permissions_view_new (void) -{ - return g_object_new (THUNAR_TYPE_PERMISSIONS_VIEW, NULL); -} - - - -/** - * thunar_permissions_view_get_file: - * @view : a #ThunarPermissionsView instance. - * - * Returns the #ThunarFile associated with the specified @view. - * - * Return value: the #ThunarFile associated with @view. - **/ -ThunarFile* -thunar_permissions_view_get_file (ThunarPermissionsView *view) -{ - g_return_val_if_fail (THUNAR_IS_PERMISSIONS_VIEW (view), NULL); - return view->file; -} - - - -/** - * thunar_permissions_view_set_file: - * @view : a #ThunarPermissionsView instance. - * @file : a #ThunarFile instance or %NULL. - * - * Associates the given @view with the specified @file. - **/ -void -thunar_permissions_view_set_file (ThunarPermissionsView *view, - ThunarFile *file) -{ - g_return_if_fail (THUNAR_IS_PERMISSIONS_VIEW (view)); - g_return_if_fail (file == NULL || THUNAR_IS_FILE (file)); - - /* check if we already use that file */ - if (G_UNLIKELY (view->file == file)) - return; - - /* disconnect from the previous file */ - if (G_LIKELY (view->file != NULL)) - g_object_unref (G_OBJECT (view->file)); - - /* activate the new file */ - view->file = file; - - /* connect to the new file */ - if (G_LIKELY (file != NULL)) - g_object_ref (G_OBJECT (file)); - - /* notify listeners */ - g_object_notify (G_OBJECT (view), "file"); -} - - diff --git a/thunar/thunar-permissions-view.h b/thunar/thunar-permissions-view.h deleted file mode 100644 index 170329940..000000000 --- a/thunar/thunar-permissions-view.h +++ /dev/null @@ -1,47 +0,0 @@ -/* $Id$ */ -/*- - * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> - * - * 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., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __THUNAR_PERMISSIONS_VIEW_H__ -#define __THUNAR_PERMISSIONS_VIEW_H__ - -#include <thunar/thunar-file.h> - -G_BEGIN_DECLS; - -typedef struct _ThunarPermissionsViewClass ThunarPermissionsViewClass; -typedef struct _ThunarPermissionsView ThunarPermissionsView; - -#define THUNAR_TYPE_PERMISSIONS_VIEW (thunar_permissions_view_get_type ()) -#define THUNAR_PERMISSIONS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THUNAR_TYPE_PERMISSIONS_VIEW, ThunarPermissionsView)) -#define THUNAR_PERMISSIONS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), THUNAR_TYPE_PERMISSIONS_VIEW, ThunarPermissionsViewClass)) -#define THUNAR_IS_PERMISSIONS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THUNAR_TYPE_PERMISSIONS_VIEW)) -#define THUNAR_IS_PERMISSIONS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), THUNAR_TYPE_PERMISSIONS_VIEW)) -#define THUNAR_PERMISSIONS_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THUNAR_TYPE_PERMISSIONS_VIEW, ThunarPermissionsViewClass)) - -GType thunar_permissions_view_get_type (void) G_GNUC_CONST; - -GtkWidget *thunar_permissions_view_new (void) G_GNUC_MALLOC; - -ThunarFile *thunar_permissions_view_get_file (ThunarPermissionsView *view); -void thunar_permissions_view_set_file (ThunarPermissionsView *view, - ThunarFile *file); - -G_END_DECLS; - -#endif /* !__THUNAR_PERMISSIONS_VIEW_H__ */ diff --git a/thunar/thunar-preferences-dialog.c b/thunar/thunar-preferences-dialog.c index 9b9a88c54..7ca397f26 100644 --- a/thunar/thunar-preferences-dialog.c +++ b/thunar/thunar-preferences-dialog.c @@ -1,6 +1,6 @@ /* $Id$ */ /*- - * Copyright (c) 2005 Benedikt Meurer <benny@xfce.org> + * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> * * 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 @@ -164,6 +164,7 @@ thunar_preferences_dialog_init (ThunarPreferencesDialog *dialog) AtkRelationSet *relations; AtkRelation *relation; AtkObject *object; + GtkWidget *notebook; GtkWidget *button; GtkWidget *combo; GtkWidget *frame; @@ -190,8 +191,19 @@ thunar_preferences_dialog_init (ThunarPreferencesDialog *dialog) GTK_STOCK_HELP, GTK_RESPONSE_HELP, NULL); + notebook = gtk_notebook_new (); + gtk_container_set_border_width (GTK_CONTAINER (notebook), 6); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), notebook, TRUE, TRUE, 0); + gtk_widget_show (notebook); + + + /* + Views + */ + label = gtk_label_new (_("Views")); vbox = g_object_new (GTK_TYPE_VBOX, "border-width", 12, "spacing", 12, NULL); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox, TRUE, TRUE, 0); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox, label); + gtk_widget_show (label); gtk_widget_show (vbox); frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL); @@ -218,7 +230,9 @@ thunar_preferences_dialog_init (ThunarPreferencesDialog *dialog) gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Icon View")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Detailed List View")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Last Active View")); +#if !GTK_CHECK_VERSION(2,9,0) g_signal_connect (G_OBJECT (combo), "changed", G_CALLBACK (g_object_notify), "active"); +#endif exo_mutual_binding_new_full (G_OBJECT (dialog->preferences), "default-view", G_OBJECT (combo), "active", transform_view_string_to_index, transform_view_index_to_string, NULL, NULL); gtk_table_attach (GTK_TABLE (table), combo, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); @@ -268,6 +282,55 @@ thunar_preferences_dialog_init (ThunarPreferencesDialog *dialog) "beside the icon rather than below the icon."), NULL); gtk_table_attach (GTK_TABLE (table), button, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show (button); + + + /* + Advanced + */ + label = gtk_label_new (_("Advanced")); + vbox = g_object_new (GTK_TYPE_VBOX, "border-width", 12, "spacing", 12, NULL); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox, label); + gtk_widget_show (label); + gtk_widget_show (vbox); + + frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL); + gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); + gtk_widget_show (frame); + + label = gtk_label_new (_("Miscellaneous")); + gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ()); + gtk_frame_set_label_widget (GTK_FRAME (frame), label); + gtk_widget_show (label); + + table = gtk_table_new (1, 2, FALSE); + gtk_table_set_row_spacings (GTK_TABLE (table), 6); + gtk_table_set_col_spacings (GTK_TABLE (table), 12); + gtk_container_set_border_width (GTK_CONTAINER (table), 12); + gtk_container_add (GTK_CONTAINER (frame), table); + gtk_widget_show (table); + + label = gtk_label_new_with_mnemonic (_("Apply permissions _recursively:")); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (label); + + combo = gtk_combo_box_new_text (); + gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Ask everytime")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Always")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Never")); +#if !GTK_CHECK_VERSION(2,9,0) + g_signal_connect (G_OBJECT (combo), "changed", G_CALLBACK (g_object_notify), "active"); +#endif + exo_mutual_binding_new (G_OBJECT (dialog->preferences), "misc-recursive-permissions", G_OBJECT (combo), "active"); + gtk_table_attach (GTK_TABLE (table), combo, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo); + gtk_widget_show (combo); + + /* set Atk label relation for the combo */ + object = gtk_widget_get_accessible (combo); + relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label)); + relation = atk_relation_new (&object, 1, ATK_RELATION_LABEL_FOR); + atk_relation_set_add (relations, relation); + g_object_unref (G_OBJECT (relation)); } diff --git a/thunar/thunar-preferences.c b/thunar/thunar-preferences.c index aa85ee3ae..9ff40599e 100644 --- a/thunar/thunar-preferences.c +++ b/thunar/thunar-preferences.c @@ -1,6 +1,6 @@ /* $Id$ */ /*- - * Copyright (c) 2005 Benedikt Meurer <benny@xfce.org> + * Copyright (c) 2005-2006 Benedikt Meurer <benny@xfce.org> * * 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 @@ -41,6 +41,7 @@ #include <tdb/tdb.h> +#include <thunar/thunar-enum-types.h> #include <thunar/thunar-gobject-extensions.h> #include <thunar/thunar-preferences.h> @@ -57,6 +58,7 @@ enum PROP_LAST_LOCATION_BAR, PROP_LAST_SIDE_PANE, PROP_LAST_VIEW, + PROP_MISC_RECURSIVE_PERMISSIONS, N_PROPERTIES, }; @@ -238,6 +240,21 @@ thunar_preferences_class_init (ThunarPreferencesClass *klass) "last-view", "ThunarIconView", EXO_PARAM_READWRITE)); + + /** + * ThunarPreferences:misc-recursive-permissions: + * + * Whether to apply permissions recursively everytime the + * permissions are altered by the user. + **/ + g_object_class_install_property (gobject_class, + PROP_MISC_RECURSIVE_PERMISSIONS, + g_param_spec_enum ("misc-recursive-permissions", + "misc-recursive-permissions", + "misc-recursive-permissions", + THUNAR_TYPE_RECURSIVE_PERMISSIONS, + THUNAR_RECURSIVE_PERMISSIONS_ASK, + EXO_PARAM_READWRITE)); } diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index 5adff7e98..af9414e17 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -34,7 +34,7 @@ #include <thunar/thunar-emblem-chooser.h> #include <thunar/thunar-icon-factory.h> #include <thunar/thunar-pango-extensions.h> -#include <thunar/thunar-permissions-view.h> +#include <thunar/thunar-permissions-chooser.h> #include <thunar/thunar-properties-dialog.h> @@ -197,7 +197,7 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); - gtk_window_set_default_size (GTK_WINDOW (dialog), 350, 430); + gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 430); dialog->notebook = gtk_notebook_new (); gtk_container_set_border_width (GTK_CONTAINER (dialog->notebook), 6); @@ -372,7 +372,7 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog) Permissions chooser */ label = gtk_label_new (_("Permissions")); - chooser = thunar_permissions_view_new (); + chooser = thunar_permissions_chooser_new (); exo_binding_new (G_OBJECT (dialog), "file", G_OBJECT (chooser), "file"); gtk_notebook_append_page (GTK_NOTEBOOK (dialog->notebook), chooser, label); gtk_widget_show (chooser); diff --git a/thunar/thunar-stock.c b/thunar/thunar-stock.c index 9a52a6bce..621b8955a 100644 --- a/thunar/thunar-stock.c +++ b/thunar/thunar-stock.c @@ -36,9 +36,8 @@ static const gchar *thunar_stock_icons[] = { - THUNAR_STOCK_PERMISSIONS_GROUP, - THUNAR_STOCK_PERMISSIONS_OTHER, - THUNAR_STOCK_PERMISSIONS_USER, + THUNAR_STOCK_GROUP, + THUNAR_STOCK_USER, }; diff --git a/thunar/thunar-stock.h b/thunar/thunar-stock.h index 6387bd928..ee3975d44 100644 --- a/thunar/thunar-stock.h +++ b/thunar/thunar-stock.h @@ -22,10 +22,9 @@ G_BEGIN_DECLS; -/* stock icons for the ThunarPermissionsView */ -#define THUNAR_STOCK_PERMISSIONS_GROUP "thunar-permissions-group" -#define THUNAR_STOCK_PERMISSIONS_OTHER "thunar-permissions-other" -#define THUNAR_STOCK_PERMISSIONS_USER "thunar-permissions-user" +/* stock icons for the ThunarPermissionsChooser */ +#define THUNAR_STOCK_GROUP "thunar-group" +#define THUNAR_STOCK_USER "thunar-user" void thunar_stock_init (void) G_GNUC_INTERNAL; -- GitLab