Git Repositories

2006-01-04 Benedikt Meurer <benny@xfce.org>
authorBenedikt Meurer <benny@xfce.org>
Wed, 4 Jan 2006 18:26:33 +0000 (18:26 +0000)
committerBenedikt Meurer <benny@xfce.org>
Wed, 4 Jan 2006 18:26:33 +0000 (18:26 +0000)
* docs/reference/thunar-vfs/thunar-vfs-sections.txt,
  thunar-vfs/thunar-vfs-info.{c,h}, thunar-vfs/thunar-vfs.symbols,
  docs/reference/thunar-vfs/tmpl/thunar-vfs-info.sgml: Add method
  thunar_vfs_info_chmod() to change the permissions of a file
  identified by a given ThunarVfsInfo.
* thunar-vfs/thunar-vfs-info.{c,h}, thunar-vfs/thunar-vfs.symbols,
  docs/reference/thunar-vfs/thunar-vfs-sections.txt,
  docs/reference/thunar-vfs/tmpl/thunar-vfs-info.sgml: Add method
  thunar_vfs_info_chgrp() to change the group id of a file identified
  by a given ThunarVfsInfo.
* thunar-vfs/thunar-vfs-user.c(thunar_vfs_user_load): Properly
  substitute '&' in real names.
* icons/16x16/, icons/Makefile.am, configure.in.in, thunar/Makefile.am,
  thunar/thunar-stock.{c,h}: Add stock icons thunar-permissions-user,
  thunar-permissions-group and thunar-permissions-other.
* thunar-uca/thunar-uca-plugin.c: Don't display debug messages unless
  G_ENABLE_DEBUG is defined.
* thunar-vfs/thunar-vfs-user.{c,h}, thunar-vfs/thunar-vfs.symbols,
  docs/reference/thunar-vfs/thunar-vfs-sections.txt,
  docs/reference/thunar-vfs/tmpl/thunar-vfs-user-manager.sgml: Add new
  method thunar_vfs_user_manager_get_all_groups() to retrieve all groups
  known to the ThunarVfsUserManager.
* 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-file.{c,h},
  thunar/thunar-properties-dialog.c: Add permissions tab to the
  file properties dialog.
* po/POTFILES.in: Add new files.
* po/*.po: Merge new strings.
* tdb/tdbtool.c(print_rec): Fix printf format.

(Old svn revision: 19296)

42 files changed:
ChangeLog
configure.in.in
docs/reference/thunar-vfs/thunar-vfs-sections.txt
docs/reference/thunar-vfs/tmpl/thunar-vfs-info.sgml
docs/reference/thunar-vfs/tmpl/thunar-vfs-user-manager.sgml
icons/16x16/Makefile.am [new file with mode: 0644]
icons/16x16/stock_thunar-permissions-group.png [new file with mode: 0644]
icons/16x16/stock_thunar-permissions-other.png [new file with mode: 0644]
icons/16x16/stock_thunar-permissions-user.png [new file with mode: 0644]
icons/Makefile.am
po/POTFILES.in
po/ca.po
po/de.po
po/el.po
po/es.po
po/fr.po
po/hu.po
po/it.po
po/ja.po
po/pt_BR.po
tdb/tdbtool.c
thunar-uca/thunar-uca-plugin.c
thunar-vfs/thunar-vfs-info.c
thunar-vfs/thunar-vfs-info.h
thunar-vfs/thunar-vfs-user.c
thunar-vfs/thunar-vfs-user.h
thunar-vfs/thunar-vfs.symbols
thunar/Makefile.am
thunar/main.c
thunar/thunar-advanced-permissions-dialog.c [new file with mode: 0644]
thunar/thunar-advanced-permissions-dialog.h [new file with mode: 0644]
thunar/thunar-change-group-dialog.c [new file with mode: 0644]
thunar/thunar-change-group-dialog.h [new file with mode: 0644]
thunar/thunar-file.c
thunar/thunar-file.h
thunar/thunar-permissions-model.c [new file with mode: 0644]
thunar/thunar-permissions-model.h [new file with mode: 0644]
thunar/thunar-permissions-view.c [new file with mode: 0644]
thunar/thunar-permissions-view.h [new file with mode: 0644]
thunar/thunar-properties-dialog.c
thunar/thunar-stock.c [new file with mode: 0644]
thunar/thunar-stock.h [new file with mode: 0644]

index d5e7991..79ff263 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+2006-01-04     Benedikt Meurer <benny@xfce.org>
+
+       * docs/reference/thunar-vfs/thunar-vfs-sections.txt,
+         thunar-vfs/thunar-vfs-info.{c,h}, thunar-vfs/thunar-vfs.symbols,
+         docs/reference/thunar-vfs/tmpl/thunar-vfs-info.sgml: Add method
+         thunar_vfs_info_chmod() to change the permissions of a file
+         identified by a given ThunarVfsInfo.
+       * thunar-vfs/thunar-vfs-info.{c,h}, thunar-vfs/thunar-vfs.symbols,
+         docs/reference/thunar-vfs/thunar-vfs-sections.txt,
+         docs/reference/thunar-vfs/tmpl/thunar-vfs-info.sgml: Add method
+         thunar_vfs_info_chgrp() to change the group id of a file identified
+         by a given ThunarVfsInfo.
+       * thunar-vfs/thunar-vfs-user.c(thunar_vfs_user_load): Properly
+         substitute '&' in real names.
+       * icons/16x16/, icons/Makefile.am, configure.in.in, thunar/Makefile.am,
+         thunar/thunar-stock.{c,h}: Add stock icons thunar-permissions-user,
+         thunar-permissions-group and thunar-permissions-other.
+       * thunar-uca/thunar-uca-plugin.c: Don't display debug messages unless
+         G_ENABLE_DEBUG is defined.
+       * thunar-vfs/thunar-vfs-user.{c,h}, thunar-vfs/thunar-vfs.symbols,
+         docs/reference/thunar-vfs/thunar-vfs-sections.txt,
+         docs/reference/thunar-vfs/tmpl/thunar-vfs-user-manager.sgml: Add new
+         method thunar_vfs_user_manager_get_all_groups() to retrieve all groups
+         known to the ThunarVfsUserManager.
+       * 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-file.{c,h},
+         thunar/thunar-properties-dialog.c: Add permissions tab to the
+         file properties dialog.
+       * po/POTFILES.in: Add new files.
+       * po/*.po: Merge new strings.
+       * tdb/tdbtool.c(print_rec): Fix printf format.
+
 2006-01-02     Benedikt Meurer <benny@xfce.org>
 
        * thunar-uca/thunar-uca-model.c: Include <locale.h> to get LC_MESSAGES
index 0a2424c..e4fcc6b 100644 (file)
@@ -375,6 +375,7 @@ docs/reference/thunarx/version.xml
 examples/Makefile
 examples/tex-open-terminal/Makefile
 icons/Makefile
+icons/16x16/Makefile
 icons/24x24/Makefile
 icons/48x48/Makefile
 po/Makefile.in
index 9ff5809..270015a 100644 (file)
@@ -30,6 +30,8 @@ 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
@@ -311,6 +313,7 @@ ThunarVfsUserManager
 thunar_vfs_user_manager_get_default
 thunar_vfs_user_manager_get_group_by_id
 thunar_vfs_user_manager_get_user_by_id
+thunar_vfs_user_manager_get_all_groups
 <SUBSECTION Standard>
 ThunarVfsUserManagerClass
 THUNAR_VFS_TYPE_USER_MANAGER
index 5b8bf1c..5cda7de 100644 (file)
@@ -79,6 +79,28 @@ 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>
 
index 8640b3d..164cbf1 100644 (file)
@@ -51,3 +51,12 @@ ThunarVfsUserManager
 @Returns: 
 
 
+<!-- ##### FUNCTION thunar_vfs_user_manager_get_all_groups ##### -->
+<para>
+
+</para>
+
+@manager: 
+@Returns: 
+
+
diff --git a/icons/16x16/Makefile.am b/icons/16x16/Makefile.am
new file mode 100644 (file)
index 0000000..bbbc899
--- /dev/null
@@ -0,0 +1,12 @@
+# $Id$
+
+iconsdir = $(datadir)/icons/hicolor/16x16/stock/generic
+icons_DATA =                                                           \
+       stock_thunar-permissions-group.png                              \
+       stock_thunar-permissions-other.png                              \
+       stock_thunar-permissions-user.png
+
+EXTRA_DIST =                                                           \
+       $(icons_DATA)
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/icons/16x16/stock_thunar-permissions-group.png b/icons/16x16/stock_thunar-permissions-group.png
new file mode 100644 (file)
index 0000000..ed2d33b
Binary files /dev/null and b/icons/16x16/stock_thunar-permissions-group.png differ
diff --git a/icons/16x16/stock_thunar-permissions-other.png b/icons/16x16/stock_thunar-permissions-other.png
new file mode 100644 (file)
index 0000000..320d55d
Binary files /dev/null and b/icons/16x16/stock_thunar-permissions-other.png differ
diff --git a/icons/16x16/stock_thunar-permissions-user.png b/icons/16x16/stock_thunar-permissions-user.png
new file mode 100644 (file)
index 0000000..397cd73
Binary files /dev/null and b/icons/16x16/stock_thunar-permissions-user.png differ
index 4f736ce..18dcae1 100644 (file)
@@ -1,6 +1,7 @@
 # $Id$
 
 SUBDIRS =                                                              \
+       16x16                                                           \
        24x24                                                           \
        48x48
 
index 525faba..6c85459 100644 (file)
@@ -29,7 +29,9 @@ 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
@@ -38,9 +40,6 @@ thunar/thunar-details-view.c
 thunar/thunar-dialogs.c
 thunar/thunar-dnd.c
 thunar/thunar-emblem-chooser.c
-thunar/thunar-shortcuts-model.c
-thunar/thunar-shortcuts-pane.c
-thunar/thunar-shortcuts-view.c
 thunar/thunar-file.c
 thunar/thunar-folder.c
 thunar/thunar-gdk-pixbuf-extensions.c
@@ -59,13 +58,19 @@ 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-preferences-dialog.c
 thunar/thunar-preferences.c
 thunar/thunar-progress-dialog.c
 thunar/thunar-properties-dialog.c
+thunar/thunar-shortcuts-model.c
+thunar/thunar-shortcuts-pane.c
+thunar/thunar-shortcuts-view.c
 thunar/thunar-side-pane.c
 thunar/thunar-standard-view.c
 thunar/thunar-statusbar.c
+thunar/thunar-stock.c
 thunar/thunar-text-renderer.c
 thunar/thunar-thumbnail-generator.c
 thunar/thunar-view.c
index 1a9ee16..217337f 100644 (file)
--- 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-02 02:20+0900\n"
+"POT-Creation-Date: 2006-01-04 18:34+0100\n"
 "PO-Revision-Date: 2005-12-20 14:28+0900\n"
 "Last-Translator: Pau Rul·lan Ferragut <paurullan@bulma.net>\n"
 "Language-Team: Catalan <ca@dodds.net>\n"
@@ -16,23 +16,23 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n!=1;\n"
 
-#: ../thunar-vfs/thunar-vfs-info.c:261
+#: ../thunar-vfs/thunar-vfs-info.c:362
 msgid "No Exec field specified"
 msgstr "No ha especificat un camp executable"
 
-#: ../thunar-vfs/thunar-vfs-info.c:269
+#: ../thunar-vfs/thunar-vfs-info.c:370
 msgid "Unable to parse file"
 msgstr "No s'ha pogut analitzar el fitxer"
 
-#: ../thunar-vfs/thunar-vfs-info.c:359
+#: ../thunar-vfs/thunar-vfs-info.c:460
 msgid "Invalid file name"
 msgstr "El nom del fitxer no és vàlid"
 
-#: ../thunar-vfs/thunar-vfs-info.c:381
+#: ../thunar-vfs/thunar-vfs-info.c:482
 msgid "Invalid desktop file"
 msgstr "El nom de l'escriptori no és vàlid"
 
-#: ../thunar-vfs/thunar-vfs-info.c:615
+#: ../thunar-vfs/thunar-vfs-info.c:716
 #, c-format
 msgid "Failed to stat file `%s': %s"
 msgstr ""
@@ -145,7 +145,7 @@ msgid "copy of %s"
 msgstr ""
 
 #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703
-#: ../thunar/thunar-properties-dialog.c:629
+#: ../thunar/thunar-properties-dialog.c:643
 #, c-format
 msgid "link to %s"
 msgstr ""
@@ -257,10 +257,62 @@ msgid "Failed to create symbolic `%s'"
 msgstr ""
 
 #. setup application name
-#: ../thunar/main.c:47 ../thunar/thunar-window.c:404
+#: ../thunar/main.c:48 ../thunar/thunar-window.c:404
 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"
@@ -287,11 +339,25 @@ 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:171 ../thunar/thunar-statusbar.c:190
+#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190
 msgid "File"
 msgstr "Fitxer"
 
@@ -437,7 +503,11 @@ msgstr ""
 msgid "Name"
 msgstr "Nom"
 
+#.
+#. Permissions chooser
+#.
 #: ../thunar/thunar-details-view.c:197
+#: ../thunar/thunar-properties-dialog.c:382
 msgid "Permissions"
 msgstr "Permisos"
 
@@ -483,35 +553,15 @@ msgstr "_Enllaça aquí"
 msgid "Unable to execute file `%s'"
 msgstr "No s'ha pogut analitzar el fitxer"
 
-#. append the remove menu item
-#: ../thunar/thunar-shortcuts-view.c:319
-msgid "_Remove Shortcut"
-msgstr ""
-
-#. append the rename menu item
-#: ../thunar/thunar-shortcuts-view.c:334
-msgid "Re_name Shortcut"
-msgstr ""
-
-#: ../thunar/thunar-shortcuts-view.c:654
-#, c-format
-msgid "The path '%s' does not refer to a directory"
-msgstr ""
-
-#. display an error message to the user
-#: ../thunar/thunar-shortcuts-view.c:673
-msgid "Failed to add new shortcut"
-msgstr ""
-
-#: ../thunar/thunar-file.c:762
+#: ../thunar/thunar-file.c:775
 msgid "The root folder has no parent"
 msgstr ""
 
-#: ../thunar/thunar-file.c:954
+#: ../thunar/thunar-file.c:1032
 msgid "Filesystem"
 msgstr "Sistema de fitxers"
 
-#: ../thunar/thunar-file.c:978
+#: ../thunar/thunar-file.c:1056
 msgid "Home"
 msgstr "Inici"
 
@@ -739,7 +789,7 @@ msgstr ""
 msgid "Whether to display hidden files"
 msgstr ""
 
-#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:627
+#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641
 msgid "broken link"
 msgstr ""
 
@@ -825,6 +875,77 @@ msgstr ""
 msgid "The icon size for the path entry"
 msgstr ""
 
+#: ../thunar/thunar-permissions-model.c:440
+#, c-format
+msgid "%s (%s)"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:447
+msgid "Unknown file owner"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:460
+msgid "Unknown file group"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:465
+msgid "All other users"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:474
+msgid "Read"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:478
+msgid "Write"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:482
+msgid "List folder contents"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "Execute"
+msgstr "_Executa"
+
+#. actions for the group item
+#: ../thunar/thunar-permissions-model.c:884
+msgid "Change _Group..."
+msgstr ""
+
+#. append the "Grant Permission" action
+#: ../thunar/thunar-permissions-model.c:897
+#, fuzzy
+msgid "_Grant Permission"
+msgstr "Permisos"
+
+#. append the "Deny Permission" action
+#: ../thunar/thunar-permissions-model.c:906
+#, fuzzy
+msgid "_Deny Permission"
+msgstr "Permisos"
+
+#: ../thunar/thunar-permissions-view.c:213
+msgid ""
+"For special permissions and for\n"
+"advanced settings, click Advanced."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:222
+msgid "_Advanced..."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:223
+msgid "Click here for special permissions and for advanced settings."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:243
+msgid ""
+"You are not the owner of this file, so\n"
+"you cannot change these permissions."
+msgstr ""
+
 #: ../thunar/thunar-preferences-dialog.c:184
 #, fuzzy
 msgid "File Manager Preferences"
@@ -943,71 +1064,91 @@ msgid_plural "(%lu seconds remaining)"
 msgstr[0] ""
 msgstr[1] ""
 
-#: ../thunar/thunar-properties-dialog.c:172
+#: ../thunar/thunar-properties-dialog.c:173
 msgid "The file displayed by the dialog"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:217
+#: ../thunar/thunar-properties-dialog.c:220
 msgid "General"
 msgstr "General"
 
-#: ../thunar/thunar-properties-dialog.c:234
+#: ../thunar/thunar-properties-dialog.c:237
 msgid "Name:"
 msgstr "Nom:"
 
 #.
 #. Second box (kind)
 #.
-#: ../thunar/thunar-properties-dialog.c:259
+#: ../thunar/thunar-properties-dialog.c:262
 msgid "Kind:"
 msgstr ""
 
 #.
 #. Third box (modified, accessed)
 #.
-#: ../thunar/thunar-properties-dialog.c:284
+#: ../thunar/thunar-properties-dialog.c:287
 msgid "Modified:"
 msgstr "Modificat:"
 
-#: ../thunar/thunar-properties-dialog.c:297
+#: ../thunar/thunar-properties-dialog.c:300
 msgid "Accessed:"
 msgstr "Accedit:"
 
 #.
 #. Fourth box (volume, size)
 #.
-#: ../thunar/thunar-properties-dialog.c:321
+#: ../thunar/thunar-properties-dialog.c:324
 msgid "Volume:"
 msgstr "Volum:"
 
-#: ../thunar/thunar-properties-dialog.c:344
+#: ../thunar/thunar-properties-dialog.c:347
 msgid "Size:"
 msgstr "Mida:"
 
 #.
 #. Emblem chooser
 #.
-#: ../thunar/thunar-properties-dialog.c:368
+#: ../thunar/thunar-properties-dialog.c:371
 msgid "Emblems"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:604
+#: ../thunar/thunar-properties-dialog.c:618
 #, c-format
 msgid "%s Info"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:685
+#: ../thunar/thunar-properties-dialog.c:699
 #, c-format
 msgid "%s (%u Bytes)"
 msgstr ""
 
 #. display an error message
-#: ../thunar/thunar-properties-dialog.c:731
+#: ../thunar/thunar-properties-dialog.c:745
 #: ../thunar/thunar-standard-view.c:2170
 #, fuzzy, c-format
 msgid "Failed to rename `%s'"
 msgstr "No s'ha pogut eliminar %s."
 
+#. append the remove menu item
+#: ../thunar/thunar-shortcuts-view.c:319
+msgid "_Remove Shortcut"
+msgstr ""
+
+#. append the rename menu item
+#: ../thunar/thunar-shortcuts-view.c:334
+msgid "Re_name Shortcut"
+msgstr ""
+
+#: ../thunar/thunar-shortcuts-view.c:654
+#, c-format
+msgid "The path '%s' does not refer to a directory"
+msgstr ""
+
+#. display an error message to the user
+#: ../thunar/thunar-shortcuts-view.c:673
+msgid "Failed to add new shortcut"
+msgstr ""
+
 #: ../thunar/thunar-standard-view.c:253
 msgid "File Context Menu"
 msgstr ""
@@ -1661,25 +1802,25 @@ msgstr "Seleccioneu una aplicació"
 msgid "Image Files"
 msgstr "Fitxers"
 
-#: ../thunar-uca/thunar-uca-model.c:767
+#: ../thunar-uca/thunar-uca-model.c:770
 #, c-format
 msgid "Unknown element <%s>"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:785
+#: ../thunar-uca/thunar-uca-model.c:788
 msgid "End element handler called while in root context"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:873
+#: ../thunar-uca/thunar-uca-model.c:876
 #, c-format
 msgid "Unknown closing element <%s>"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:1298
+#: ../thunar-uca/thunar-uca-model.c:1301
 msgid "Failed to determine save location for uca.xml"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:1414
+#: ../thunar-uca/thunar-uca-model.c:1417
 msgid "Command not configured"
 msgstr ""
 
index fa11bb9..bd79ba2 100644 (file)
--- 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-02 02:20+0900\n"
+"POT-Creation-Date: 2006-01-04 18:34+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,23 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ../thunar-vfs/thunar-vfs-info.c:261
+#: ../thunar-vfs/thunar-vfs-info.c:362
 msgid "No Exec field specified"
 msgstr ""
 
-#: ../thunar-vfs/thunar-vfs-info.c:269
+#: ../thunar-vfs/thunar-vfs-info.c:370
 msgid "Unable to parse file"
 msgstr ""
 
-#: ../thunar-vfs/thunar-vfs-info.c:359
+#: ../thunar-vfs/thunar-vfs-info.c:460
 msgid "Invalid file name"
 msgstr ""
 
-#: ../thunar-vfs/thunar-vfs-info.c:381
+#: ../thunar-vfs/thunar-vfs-info.c:482
 msgid "Invalid desktop file"
 msgstr ""
 
-#: ../thunar-vfs/thunar-vfs-info.c:615
+#: ../thunar-vfs/thunar-vfs-info.c:716
 #, c-format
 msgid "Failed to stat file `%s': %s"
 msgstr ""
@@ -138,7 +138,7 @@ msgid "copy of %s"
 msgstr ""
 
 #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703
-#: ../thunar/thunar-properties-dialog.c:629
+#: ../thunar/thunar-properties-dialog.c:643
 #, c-format
 msgid "link to %s"
 msgstr ""
@@ -250,10 +250,62 @@ msgid "Failed to create symbolic `%s'"
 msgstr ""
 
 #. setup application name
-#: ../thunar/main.c:47 ../thunar/thunar-window.c:404
+#: ../thunar/main.c:48 ../thunar/thunar-window.c:404
 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"
@@ -279,11 +331,25 @@ 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:171 ../thunar/thunar-statusbar.c:190
+#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190
 msgid "File"
 msgstr ""
 
@@ -433,7 +499,11 @@ msgstr ""
 msgid "Name"
 msgstr "Name"
 
+#.
+#. Permissions chooser
+#.
 #: ../thunar/thunar-details-view.c:197
+#: ../thunar/thunar-properties-dialog.c:382
 msgid "Permissions"
 msgstr "Berechtigungen"
 
@@ -479,36 +549,15 @@ msgstr ""
 msgid "Unable to execute file `%s'"
 msgstr ""
 
-#. append the remove menu item
-#: ../thunar/thunar-shortcuts-view.c:319
-msgid "_Remove Shortcut"
-msgstr ""
-
-#. append the rename menu item
-#: ../thunar/thunar-shortcuts-view.c:334
-msgid "Re_name Shortcut"
-msgstr ""
-
-#: ../thunar/thunar-shortcuts-view.c:654
-#, c-format
-msgid "The path '%s' does not refer to a directory"
-msgstr ""
-
-#. display an error message to the user
-#: ../thunar/thunar-shortcuts-view.c:673
-#, fuzzy
-msgid "Failed to add new shortcut"
-msgstr "Andere Anwendung..."
-
-#: ../thunar/thunar-file.c:762
+#: ../thunar/thunar-file.c:775
 msgid "The root folder has no parent"
 msgstr ""
 
-#: ../thunar/thunar-file.c:954
+#: ../thunar/thunar-file.c:1032
 msgid "Filesystem"
 msgstr "Dateisystem"
 
-#: ../thunar/thunar-file.c:978
+#: ../thunar/thunar-file.c:1056
 msgid "Home"
 msgstr ""
 
@@ -736,7 +785,7 @@ msgstr ""
 msgid "Whether to display hidden files"
 msgstr ""
 
-#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:627
+#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641
 msgid "broken link"
 msgstr ""
 
@@ -822,6 +871,76 @@ 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"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:460
+msgid "Unknown file group"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:465
+msgid "All other users"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:474
+msgid "Read"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:478
+msgid "Write"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:482
+msgid "List folder contents"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:482
+msgid "Execute"
+msgstr ""
+
+#. actions for the group item
+#: ../thunar/thunar-permissions-model.c:884
+msgid "Change _Group..."
+msgstr ""
+
+#. append the "Grant Permission" action
+#: ../thunar/thunar-permissions-model.c:897
+#, fuzzy
+msgid "_Grant Permission"
+msgstr "Berechtigungen"
+
+#. append the "Deny Permission" action
+#: ../thunar/thunar-permissions-model.c:906
+#, fuzzy
+msgid "_Deny Permission"
+msgstr "Berechtigungen"
+
+#: ../thunar/thunar-permissions-view.c:213
+msgid ""
+"For special permissions and for\n"
+"advanced settings, click Advanced."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:222
+msgid "_Advanced..."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:223
+msgid "Click here for special permissions and for advanced settings."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:243
+msgid ""
+"You are not the owner of this file, so\n"
+"you cannot change these permissions."
+msgstr ""
+
 #: ../thunar/thunar-preferences-dialog.c:184
 #, fuzzy
 msgid "File Manager Preferences"
@@ -940,71 +1059,92 @@ msgid_plural "(%lu seconds remaining)"
 msgstr[0] ""
 msgstr[1] ""
 
-#: ../thunar/thunar-properties-dialog.c:172
+#: ../thunar/thunar-properties-dialog.c:173
 msgid "The file displayed by the dialog"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:217
+#: ../thunar/thunar-properties-dialog.c:220
 msgid "General"
 msgstr "Allgemein"
 
-#: ../thunar/thunar-properties-dialog.c:234
+#: ../thunar/thunar-properties-dialog.c:237
 msgid "Name:"
 msgstr "Name:"
 
 #.
 #. Second box (kind)
 #.
-#: ../thunar/thunar-properties-dialog.c:259
+#: ../thunar/thunar-properties-dialog.c:262
 msgid "Kind:"
 msgstr ""
 
 #.
 #. Third box (modified, accessed)
 #.
-#: ../thunar/thunar-properties-dialog.c:284
+#: ../thunar/thunar-properties-dialog.c:287
 msgid "Modified:"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:297
+#: ../thunar/thunar-properties-dialog.c:300
 msgid "Accessed:"
 msgstr ""
 
 #.
 #. Fourth box (volume, size)
 #.
-#: ../thunar/thunar-properties-dialog.c:321
+#: ../thunar/thunar-properties-dialog.c:324
 msgid "Volume:"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:344
+#: ../thunar/thunar-properties-dialog.c:347
 msgid "Size:"
 msgstr "Größe:"
 
 #.
 #. Emblem chooser
 #.
-#: ../thunar/thunar-properties-dialog.c:368
+#: ../thunar/thunar-properties-dialog.c:371
 msgid "Emblems"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:604
+#: ../thunar/thunar-properties-dialog.c:618
 #, c-format
 msgid "%s Info"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:685
+#: ../thunar/thunar-properties-dialog.c:699
 #, c-format
 msgid "%s (%u Bytes)"
 msgstr "%s (%u Byte)"
 
 #. display an error message
-#: ../thunar/thunar-properties-dialog.c:731
+#: ../thunar/thunar-properties-dialog.c:745
 #: ../thunar/thunar-standard-view.c:2170
 #, c-format
 msgid "Failed to rename `%s'"
 msgstr ""
 
+#. append the remove menu item
+#: ../thunar/thunar-shortcuts-view.c:319
+msgid "_Remove Shortcut"
+msgstr ""
+
+#. append the rename menu item
+#: ../thunar/thunar-shortcuts-view.c:334
+msgid "Re_name Shortcut"
+msgstr ""
+
+#: ../thunar/thunar-shortcuts-view.c:654
+#, c-format
+msgid "The path '%s' does not refer to a directory"
+msgstr ""
+
+#. display an error message to the user
+#: ../thunar/thunar-shortcuts-view.c:673
+#, fuzzy
+msgid "Failed to add new shortcut"
+msgstr "Andere Anwendung..."
+
 #: ../thunar/thunar-standard-view.c:253
 msgid "File Context Menu"
 msgstr ""
@@ -1643,25 +1783,25 @@ msgstr "Andere Anwendung..."
 msgid "Image Files"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:767
+#: ../thunar-uca/thunar-uca-model.c:770
 #, c-format
 msgid "Unknown element <%s>"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:785
+#: ../thunar-uca/thunar-uca-model.c:788
 msgid "End element handler called while in root context"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:873
+#: ../thunar-uca/thunar-uca-model.c:876
 #, c-format
 msgid "Unknown closing element <%s>"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:1298
+#: ../thunar-uca/thunar-uca-model.c:1301
 msgid "Failed to determine save location for uca.xml"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:1414
+#: ../thunar-uca/thunar-uca-model.c:1417
 msgid "Command not configured"
 msgstr ""
 
index 54c3475..86ed584 100644 (file)
--- 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-02 02:20+0900\n"
+"POT-Creation-Date: 2006-01-04 18:34+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,23 @@ msgstr ""
 "X-Poedit-Country: GREECE\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: ../thunar-vfs/thunar-vfs-info.c:261
+#: ../thunar-vfs/thunar-vfs-info.c:362
 msgid "No Exec field specified"
 msgstr "Δεν έχει οριστεί το πεδίο Exec"
 
-#: ../thunar-vfs/thunar-vfs-info.c:269
+#: ../thunar-vfs/thunar-vfs-info.c:370
 msgid "Unable to parse file"
 msgstr "Δεν ήταν δυνατή η ανάγνωση του αρχείου"
 
-#: ../thunar-vfs/thunar-vfs-info.c:359
+#: ../thunar-vfs/thunar-vfs-info.c:460
 msgid "Invalid file name"
 msgstr "Μη έγκυρο όνομα αρχείου"
 
-#: ../thunar-vfs/thunar-vfs-info.c:381
+#: ../thunar-vfs/thunar-vfs-info.c:482
 msgid "Invalid desktop file"
 msgstr "Μη έγκυρο αρχείο συντόμευσης"
 
-#: ../thunar-vfs/thunar-vfs-info.c:615
+#: ../thunar-vfs/thunar-vfs-info.c:716
 #, c-format
 msgid "Failed to stat file `%s': %s"
 msgstr ""
@@ -149,7 +149,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:629
+#: ../thunar/thunar-properties-dialog.c:643
 #, c-format
 msgid "link to %s"
 msgstr "δεσμός προς το %s"
@@ -261,10 +261,62 @@ msgid "Failed to create symbolic `%s'"
 msgstr "Δεν είναι δυνατή η δημιουργία συμβολικού δεσμού `%s'"
 
 #. setup application name
-#: ../thunar/main.c:47 ../thunar/thunar-window.c:404
+#: ../thunar/main.c:48 ../thunar/thunar-window.c:404
 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"
@@ -290,11 +342,25 @@ 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:171 ../thunar/thunar-statusbar.c:190
+#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190
 msgid "File"
 msgstr "Αρχείο"
 
@@ -439,7 +505,11 @@ msgstr "Εισάγετε νέο όνομα:"
 msgid "Name"
 msgstr "Όνομα"
 
+#.
+#. Permissions chooser
+#.
 #: ../thunar/thunar-details-view.c:197
+#: ../thunar/thunar-properties-dialog.c:382
 msgid "Permissions"
 msgstr "Δικαιώματα"
 
@@ -485,35 +555,15 @@ msgstr "Δ_ημιουργία δεσμού εδώ"
 msgid "Unable to execute file `%s'"
 msgstr "Δεν ήταν δυνατή η εκτέλεση του αρχείου `%s'"
 
-#. append the remove menu item
-#: ../thunar/thunar-shortcuts-view.c:319
-msgid "_Remove Shortcut"
-msgstr "_Απομάκρυνση Συντόμευσης"
-
-#. append the rename menu item
-#: ../thunar/thunar-shortcuts-view.c:334
-msgid "Re_name Shortcut"
-msgstr "Μετο_νομασία Συντόμευσης"
-
-#: ../thunar/thunar-shortcuts-view.c:654
-#, c-format
-msgid "The path '%s' does not refer to a directory"
-msgstr "Η διαδρομή '%s' δεν αντιστοιχεί σε κατάλογο"
-
-#. display an error message to the user
-#: ../thunar/thunar-shortcuts-view.c:673
-msgid "Failed to add new shortcut"
-msgstr "Η προσθήκη νέας συντόμευσης απέτυχε"
-
-#: ../thunar/thunar-file.c:762
+#: ../thunar/thunar-file.c:775
 msgid "The root folder has no parent"
 msgstr "Ο ριζικός φάκελος δεν έχει γονεϊκό φάκελο"
 
-#: ../thunar/thunar-file.c:954
+#: ../thunar/thunar-file.c:1032
 msgid "Filesystem"
 msgstr "Σύστημα αρχείων"
 
-#: ../thunar/thunar-file.c:978
+#: ../thunar/thunar-file.c:1056
 msgid "Home"
 msgstr "Αρχή"
 
@@ -741,7 +791,7 @@ msgstr "Προβολή κρυφών"
 msgid "Whether to display hidden files"
 msgstr "Αν θα προβάλλονται τα κρυφά αρχεία"
 
-#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:627
+#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641
 msgid "broken link"
 msgstr "σπασμένος δεσμός"
 
@@ -827,6 +877,78 @@ 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"
+
+#: ../thunar/thunar-permissions-model.c:447
+msgid "Unknown file owner"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:460
+msgid "Unknown file group"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:465
+msgid "All other users"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:474
+msgid "Read"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:478
+msgid "Write"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "List folder contents"
+msgstr "Φόρτωμα περιεχομένων φακέλου..."
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "Execute"
+msgstr "_Εκτέλεση"
+
+#. actions for the group item
+#: ../thunar/thunar-permissions-model.c:884
+msgid "Change _Group..."
+msgstr ""
+
+#. append the "Grant Permission" action
+#: ../thunar/thunar-permissions-model.c:897
+#, fuzzy
+msgid "_Grant Permission"
+msgstr "Δικαιώματα"
+
+#. append the "Deny Permission" action
+#: ../thunar/thunar-permissions-model.c:906
+#, fuzzy
+msgid "_Deny Permission"
+msgstr "Δικαιώματα"
+
+#: ../thunar/thunar-permissions-view.c:213
+msgid ""
+"For special permissions and for\n"
+"advanced settings, click Advanced."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:222
+msgid "_Advanced..."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:223
+msgid "Click here for special permissions and for advanced settings."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:243
+msgid ""
+"You are not the owner of this file, so\n"
+"you cannot change these permissions."
+msgstr ""
+
 #: ../thunar/thunar-preferences-dialog.c:184
 msgid "File Manager Preferences"
 msgstr "Προτιμήσεις Διαχειριστή Αρχείων"
@@ -945,71 +1067,91 @@ msgid_plural "(%lu seconds remaining)"
 msgstr[0] "(απομένει %lu δευτερόλεπτο)"
 msgstr[1] "(απομένουν %lu δευτερόλεπτα)"
 
-#: ../thunar/thunar-properties-dialog.c:172
+#: ../thunar/thunar-properties-dialog.c:173
 msgid "The file displayed by the dialog"
 msgstr "Το αρχείο που απεικονίζεται από το διάλογο"
 
-#: ../thunar/thunar-properties-dialog.c:217
+#: ../thunar/thunar-properties-dialog.c:220
 msgid "General"
 msgstr "Γενικές"
 
-#: ../thunar/thunar-properties-dialog.c:234
+#: ../thunar/thunar-properties-dialog.c:237
 msgid "Name:"
 msgstr "Όνομα:"
 
 #.
 #. Second box (kind)
 #.
-#: ../thunar/thunar-properties-dialog.c:259
+#: ../thunar/thunar-properties-dialog.c:262
 msgid "Kind:"
 msgstr "Είδος:"
 
 #.
 #. Third box (modified, accessed)
 #.
-#: ../thunar/thunar-properties-dialog.c:284
+#: ../thunar/thunar-properties-dialog.c:287
 msgid "Modified:"
 msgstr "Τροποποιήθηκε:"
 
-#: ../thunar/thunar-properties-dialog.c:297
+#: ../thunar/thunar-properties-dialog.c:300
 msgid "Accessed:"
 msgstr "Προσπελάστηκε:"
 
 #.
 #. Fourth box (volume, size)
 #.
-#: ../thunar/thunar-properties-dialog.c:321
+#: ../thunar/thunar-properties-dialog.c:324
 msgid "Volume:"
 msgstr "Τόμος:"
 
-#: ../thunar/thunar-properties-dialog.c:344
+#: ../thunar/thunar-properties-dialog.c:347
 msgid "Size:"
 msgstr "Μέγεθος:"
 
 #.
 #. Emblem chooser
 #.
-#: ../thunar/thunar-properties-dialog.c:368
+#: ../thunar/thunar-properties-dialog.c:371
 msgid "Emblems"
 msgstr "Εμβλήματα"
 
-#: ../thunar/thunar-properties-dialog.c:604
+#: ../thunar/thunar-properties-dialog.c:618
 #, c-format
 msgid "%s Info"
 msgstr "%s Πληροφορίες"
 
-#: ../thunar/thunar-properties-dialog.c:685
+#: ../thunar/thunar-properties-dialog.c:699
 #, c-format
 msgid "%s (%u Bytes)"
 msgstr "%s (%u Bytes)"
 
 #. display an error message
-#: ../thunar/thunar-properties-dialog.c:731
+#: ../thunar/thunar-properties-dialog.c:745
 #: ../thunar/thunar-standard-view.c:2170
 #, c-format
 msgid "Failed to rename `%s'"
 msgstr "Η μετονομασία του `%s' απέτυχε"
 
+#. append the remove menu item
+#: ../thunar/thunar-shortcuts-view.c:319
+msgid "_Remove Shortcut"
+msgstr "_Απομάκρυνση Συντόμευσης"
+
+#. append the rename menu item
+#: ../thunar/thunar-shortcuts-view.c:334
+msgid "Re_name Shortcut"
+msgstr "Μετο_νομασία Συντόμευσης"
+
+#: ../thunar/thunar-shortcuts-view.c:654
+#, c-format
+msgid "The path '%s' does not refer to a directory"
+msgstr "Η διαδρομή '%s' δεν αντιστοιχεί σε κατάλογο"
+
+#. display an error message to the user
+#: ../thunar/thunar-shortcuts-view.c:673
+msgid "Failed to add new shortcut"
+msgstr "Η προσθήκη νέας συντόμευσης απέτυχε"
+
 #: ../thunar/thunar-standard-view.c:253
 msgid "File Context Menu"
 msgstr ""
@@ -1651,25 +1793,25 @@ msgstr "Επιλογή Εικονιδίου"
 msgid "Image Files"
 msgstr "Εικόνες"
 
-#: ../thunar-uca/thunar-uca-model.c:767
+#: ../thunar-uca/thunar-uca-model.c:770
 #, c-format
 msgid "Unknown element <%s>"
 msgstr "Άγνωστο στοιχείο <%s>"
 
-#: ../thunar-uca/thunar-uca-model.c:785
+#: ../thunar-uca/thunar-uca-model.c:788
 msgid "End element handler called while in root context"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:873
+#: ../thunar-uca/thunar-uca-model.c:876
 #, c-format
 msgid "Unknown closing element <%s>"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:1298
+#: ../thunar-uca/thunar-uca-model.c:1301
 msgid "Failed to determine save location for uca.xml"
 msgstr "Ο προσδιορισμός της τοποθεσίας αποθήκευσης για το uca.xml απέτυχε"
 
-#: ../thunar-uca/thunar-uca-model.c:1414
+#: ../thunar-uca/thunar-uca-model.c:1417
 msgid "Command not configured"
 msgstr "Η εντολή δεν έχει ρυθμιστεί"
 
index a691db5..1f21ed3 100644 (file)
--- 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-02 02:20+0900\n"
+"POT-Creation-Date: 2006-01-04 18:34+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,23 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms:  nplurals=2; plural=(n != 1);\n"
 
-#: ../thunar-vfs/thunar-vfs-info.c:261
+#: ../thunar-vfs/thunar-vfs-info.c:362
 msgid "No Exec field specified"
 msgstr "Campo de ejecución no especificado"
 
-#: ../thunar-vfs/thunar-vfs-info.c:269
+#: ../thunar-vfs/thunar-vfs-info.c:370
 msgid "Unable to parse file"
 msgstr "Imposible interpretar archivo"
 
-#: ../thunar-vfs/thunar-vfs-info.c:359
+#: ../thunar-vfs/thunar-vfs-info.c:460
 msgid "Invalid file name"
 msgstr "Nombre de archivo inválido"
 
-#: ../thunar-vfs/thunar-vfs-info.c:381
+#: ../thunar-vfs/thunar-vfs-info.c:482
 msgid "Invalid desktop file"
 msgstr ""
 
-#: ../thunar-vfs/thunar-vfs-info.c:615
+#: ../thunar-vfs/thunar-vfs-info.c:716
 #, fuzzy, c-format
 msgid "Failed to stat file `%s': %s"
 msgstr "Imposible renombrar %s."
@@ -148,7 +148,7 @@ msgid "copy of %s"
 msgstr ""
 
 #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703
-#: ../thunar/thunar-properties-dialog.c:629
+#: ../thunar/thunar-properties-dialog.c:643
 #, c-format
 msgid "link to %s"
 msgstr ""
@@ -260,10 +260,62 @@ msgid "Failed to create symbolic `%s'"
 msgstr "Imposible crear el enlace de %s."
 
 #. setup application name
-#: ../thunar/main.c:47 ../thunar/thunar-window.c:404
+#: ../thunar/main.c:48 ../thunar/thunar-window.c:404
 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
@@ -291,11 +343,25 @@ 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:171 ../thunar/thunar-statusbar.c:190
+#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190
 msgid "File"
 msgstr "Archivo"
 
@@ -446,7 +512,11 @@ msgstr ""
 msgid "Name"
 msgstr "Nombre"
 
+#.
+#. Permissions chooser
+#.
 #: ../thunar/thunar-details-view.c:197
+#: ../thunar/thunar-properties-dialog.c:382
 msgid "Permissions"
 msgstr "Permisos"
 
@@ -493,39 +563,16 @@ msgstr ""
 msgid "Unable to execute file `%s'"
 msgstr "No se puede ejecutar el archivo \"%s\"."
 
-#. append the remove menu item
-#: ../thunar/thunar-shortcuts-view.c:319
-#, fuzzy
-msgid "_Remove Shortcut"
-msgstr "_Borrar marcador"
-
-#. append the rename menu item
-#: ../thunar/thunar-shortcuts-view.c:334
-#, fuzzy
-msgid "Re_name Shortcut"
-msgstr "Re_nombrar marcador"
-
-#: ../thunar/thunar-shortcuts-view.c:654
-#, c-format
-msgid "The path '%s' does not refer to a directory"
-msgstr ""
-
-#. display an error message to the user
-#: ../thunar/thunar-shortcuts-view.c:673
-#, fuzzy
-msgid "Failed to add new shortcut"
-msgstr "No se puede añadir el marcador"
-
-#: ../thunar/thunar-file.c:762
+#: ../thunar/thunar-file.c:775
 msgid "The root folder has no parent"
 msgstr ""
 
-#: ../thunar/thunar-file.c:954
+#: ../thunar/thunar-file.c:1032
 msgid "Filesystem"
 msgstr "Raíz"
 
 # msgstr "Sistema de archivos"
-#: ../thunar/thunar-file.c:978
+#: ../thunar/thunar-file.c:1056
 msgid "Home"
 msgstr "Casa"
 
@@ -754,7 +801,7 @@ msgstr "Mostrar ocultos"
 msgid "Whether to display hidden files"
 msgstr ""
 
-#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:627
+#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641
 msgid "broken link"
 msgstr ""
 
@@ -840,6 +887,78 @@ 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"
+
+#: ../thunar/thunar-permissions-model.c:447
+msgid "Unknown file owner"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:460
+msgid "Unknown file group"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:465
+msgid "All other users"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:474
+msgid "Read"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:478
+msgid "Write"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "List folder contents"
+msgstr "Cargando el contenido de la carpeta..."
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "Execute"
+msgstr "Ejecutar"
+
+#. actions for the group item
+#: ../thunar/thunar-permissions-model.c:884
+msgid "Change _Group..."
+msgstr ""
+
+#. append the "Grant Permission" action
+#: ../thunar/thunar-permissions-model.c:897
+#, fuzzy
+msgid "_Grant Permission"
+msgstr "Permisos"
+
+#. append the "Deny Permission" action
+#: ../thunar/thunar-permissions-model.c:906
+#, fuzzy
+msgid "_Deny Permission"
+msgstr "Permisos"
+
+#: ../thunar/thunar-permissions-view.c:213
+msgid ""
+"For special permissions and for\n"
+"advanced settings, click Advanced."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:222
+msgid "_Advanced..."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:223
+msgid "Click here for special permissions and for advanced settings."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:243
+msgid ""
+"You are not the owner of this file, so\n"
+"you cannot change these permissions."
+msgstr ""
+
 #: ../thunar/thunar-preferences-dialog.c:184
 #, fuzzy
 msgid "File Manager Preferences"
@@ -961,71 +1080,94 @@ msgid_plural "(%lu seconds remaining)"
 msgstr[0] ""
 msgstr[1] ""
 
-#: ../thunar/thunar-properties-dialog.c:172
+#: ../thunar/thunar-properties-dialog.c:173
 msgid "The file displayed by the dialog"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:217
+#: ../thunar/thunar-properties-dialog.c:220
 msgid "General"
 msgstr "General"
 
-#: ../thunar/thunar-properties-dialog.c:234
+#: ../thunar/thunar-properties-dialog.c:237
 msgid "Name:"
 msgstr "Nombre:"
 
 #.
 #. Second box (kind)
 #.
-#: ../thunar/thunar-properties-dialog.c:259
+#: ../thunar/thunar-properties-dialog.c:262
 msgid "Kind:"
 msgstr "Tipo:"
 
 #.
 #. Third box (modified, accessed)
 #.
-#: ../thunar/thunar-properties-dialog.c:284
+#: ../thunar/thunar-properties-dialog.c:287
 msgid "Modified:"
 msgstr "Modificado:"
 
-#: ../thunar/thunar-properties-dialog.c:297
+#: ../thunar/thunar-properties-dialog.c:300
 msgid "Accessed:"
 msgstr "Accedido:"
 
 #.
 #. Fourth box (volume, size)
 #.
-#: ../thunar/thunar-properties-dialog.c:321
+#: ../thunar/thunar-properties-dialog.c:324
 msgid "Volume:"
 msgstr "Volumen:"
 
-#: ../thunar/thunar-properties-dialog.c:344
+#: ../thunar/thunar-properties-dialog.c:347
 msgid "Size:"
 msgstr "Tamaño:"
 
 #.
 #. Emblem chooser
 #.
-#: ../thunar/thunar-properties-dialog.c:368
+#: ../thunar/thunar-properties-dialog.c:371
 msgid "Emblems"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:604
+#: ../thunar/thunar-properties-dialog.c:618
 #, c-format
 msgid "%s Info"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:685
+#: ../thunar/thunar-properties-dialog.c:699
 #, c-format
 msgid "%s (%u Bytes)"
 msgstr "%s (%u Bytes)"
 
 #. display an error message
-#: ../thunar/thunar-properties-dialog.c:731
+#: ../thunar/thunar-properties-dialog.c:745
 #: ../thunar/thunar-standard-view.c:2170
 #, fuzzy, c-format
 msgid "Failed to rename `%s'"
 msgstr "Imposible renombrar %s."
 
+#. append the remove menu item
+#: ../thunar/thunar-shortcuts-view.c:319
+#, fuzzy
+msgid "_Remove Shortcut"
+msgstr "_Borrar marcador"
+
+#. append the rename menu item
+#: ../thunar/thunar-shortcuts-view.c:334
+#, fuzzy
+msgid "Re_name Shortcut"
+msgstr "Re_nombrar marcador"
+
+#: ../thunar/thunar-shortcuts-view.c:654
+#, c-format
+msgid "The path '%s' does not refer to a directory"
+msgstr ""
+
+#. display an error message to the user
+#: ../thunar/thunar-shortcuts-view.c:673
+#, fuzzy
+msgid "Failed to add new shortcut"
+msgstr "No se puede añadir el marcador"
+
 #: ../thunar/thunar-standard-view.c:253
 msgid "File Context Menu"
 msgstr "Menú contextual de archivo"
@@ -1704,26 +1846,26 @@ msgstr "Otra aplicación..."
 msgid "Image Files"
 msgstr "_Pegar archivos"
 
-#: ../thunar-uca/thunar-uca-model.c:767
+#: ../thunar-uca/thunar-uca-model.c:770
 #, c-format
 msgid "Unknown element <%s>"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:785
+#: ../thunar-uca/thunar-uca-model.c:788
 msgid "End element handler called while in root context"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:873
+#: ../thunar-uca/thunar-uca-model.c:876
 #, c-format
 msgid "Unknown closing element <%s>"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:1298
+#: ../thunar-uca/thunar-uca-model.c:1301
 #, fuzzy
 msgid "Failed to determine save location for uca.xml"
 msgstr "Imposible renombrar %s."
 
-#: ../thunar-uca/thunar-uca-model.c:1414
+#: ../thunar-uca/thunar-uca-model.c:1417
 msgid "Command not configured"
 msgstr ""
 
index 5f2f772..03f4fd0 100644 (file)
--- 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-02 02:20+0900\n"
+"POT-Creation-Date: 2006-01-04 18:34+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,23 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 
-#: ../thunar-vfs/thunar-vfs-info.c:261
+#: ../thunar-vfs/thunar-vfs-info.c:362
 msgid "No Exec field specified"
 msgstr "Aucun champ Exec spécifié"
 
-#: ../thunar-vfs/thunar-vfs-info.c:269
+#: ../thunar-vfs/thunar-vfs-info.c:370
 msgid "Unable to parse file"
 msgstr "Impossible d'analyser le fichier"
 
-#: ../thunar-vfs/thunar-vfs-info.c:359
+#: ../thunar-vfs/thunar-vfs-info.c:460
 msgid "Invalid file name"
 msgstr "Nom de fichier invalide"
 
-#: ../thunar-vfs/thunar-vfs-info.c:381
+#: ../thunar-vfs/thunar-vfs-info.c:482
 msgid "Invalid desktop file"
 msgstr "Fichier de bureau invalide"
 
-#: ../thunar-vfs/thunar-vfs-info.c:615
+#: ../thunar-vfs/thunar-vfs-info.c:716
 #, c-format
 msgid "Failed to stat file `%s': %s"
 msgstr "Échec pour récupérer le statut du fichier `%s' : %s"
@@ -147,7 +147,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:629
+#: ../thunar/thunar-properties-dialog.c:643
 #, c-format
 msgid "link to %s"
 msgstr "lien vers %s"
@@ -259,10 +259,62 @@ msgid "Failed to create symbolic `%s'"
 msgstr "Échec à la création du lien symbolique `%s'"
 
 #. setup application name
-#: ../thunar/main.c:47 ../thunar/thunar-window.c:404
+#: ../thunar/main.c:48 ../thunar/thunar-window.c:404
 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"
@@ -288,11 +340,25 @@ 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:171 ../thunar/thunar-statusbar.c:190
+#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190
 msgid "File"
 msgstr "Fichier"
 
@@ -437,7 +503,11 @@ msgstr "Entrer le nouveau nom :"
 msgid "Name"
 msgstr "Nom"
 
+#.
+#. Permissions chooser
+#.
 #: ../thunar/thunar-details-view.c:197
+#: ../thunar/thunar-properties-dialog.c:382
 msgid "Permissions"
 msgstr "Permissions"
 
@@ -483,35 +553,15 @@ msgstr "_Lier ici"
 msgid "Unable to execute file `%s'"
 msgstr "Impossible d'exécuter le fichier `%s'"
 
-#. append the remove menu item
-#: ../thunar/thunar-shortcuts-view.c:319
-msgid "_Remove Shortcut"
-msgstr "_Supprimer raccourci"
-
-#. append the rename menu item
-#: ../thunar/thunar-shortcuts-view.c:334
-msgid "Re_name Shortcut"
-msgstr "_Renommer raccourci"
-
-#: ../thunar/thunar-shortcuts-view.c:654
-#, c-format
-msgid "The path '%s' does not refer to a directory"
-msgstr "Le chemin '%s' ne fait pas référence à un répertoire"
-
-#. display an error message to the user
-#: ../thunar/thunar-shortcuts-view.c:673
-msgid "Failed to add new shortcut"
-msgstr "Échec à l'ajout d'un nouveau raccourci"
-
-#: ../thunar/thunar-file.c:762
+#: ../thunar/thunar-file.c:775
 msgid "The root folder has no parent"
 msgstr "Le dossier racine n'a pas de père"
 
-#: ../thunar/thunar-file.c:954
+#: ../thunar/thunar-file.c:1032
 msgid "Filesystem"
 msgstr "Système de fichier"
 
-#: ../thunar/thunar-file.c:978
+#: ../thunar/thunar-file.c:1056
 msgid "Home"
 msgstr "Répertoire personnel"
 
@@ -740,7 +790,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:627
+#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641
 msgid "broken link"
 msgstr "lien cassé"
 
@@ -826,6 +876,78 @@ 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"
+
+#: ../thunar/thunar-permissions-model.c:447
+msgid "Unknown file owner"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:460
+msgid "Unknown file group"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:465
+msgid "All other users"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:474
+msgid "Read"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:478
+msgid "Write"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "List folder contents"
+msgstr "Chargement du contenu du dossier..."
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "Execute"
+msgstr "_Exécuter"
+
+#. actions for the group item
+#: ../thunar/thunar-permissions-model.c:884
+msgid "Change _Group..."
+msgstr ""
+
+#. append the "Grant Permission" action
+#: ../thunar/thunar-permissions-model.c:897
+#, fuzzy
+msgid "_Grant Permission"
+msgstr "Permissions"
+
+#. append the "Deny Permission" action
+#: ../thunar/thunar-permissions-model.c:906
+#, fuzzy
+msgid "_Deny Permission"
+msgstr "Permissions"
+
+#: ../thunar/thunar-permissions-view.c:213
+msgid ""
+"For special permissions and for\n"
+"advanced settings, click Advanced."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:222
+msgid "_Advanced..."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:223
+msgid "Click here for special permissions and for advanced settings."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:243
+msgid ""
+"You are not the owner of this file, so\n"
+"you cannot change these permissions."
+msgstr ""
+
 #: ../thunar/thunar-preferences-dialog.c:184
 msgid "File Manager Preferences"
 msgstr "Préférences du gestionnaire de fichier"
@@ -950,71 +1072,91 @@ msgid_plural "(%lu seconds remaining)"
 msgstr[0] "(%lu seconde restante)"
 msgstr[1] "(%lu secondes restantes)"
 
-#: ../thunar/thunar-properties-dialog.c:172
+#: ../thunar/thunar-properties-dialog.c:173
 msgid "The file displayed by the dialog"
 msgstr "La fichier affiché par la fenêtre de dialogue"
 
-#: ../thunar/thunar-properties-dialog.c:217
+#: ../thunar/thunar-properties-dialog.c:220
 msgid "General"
 msgstr "Général"
 
-#: ../thunar/thunar-properties-dialog.c:234
+#: ../thunar/thunar-properties-dialog.c:237
 msgid "Name:"
 msgstr "Nom :"
 
 #.
 #. Second box (kind)
 #.
-#: ../thunar/thunar-properties-dialog.c:259
+#: ../thunar/thunar-properties-dialog.c:262
 msgid "Kind:"
 msgstr "Type :"
 
 #.
 #. Third box (modified, accessed)
 #.
-#: ../thunar/thunar-properties-dialog.c:284
+#: ../thunar/thunar-properties-dialog.c:287
 msgid "Modified:"
 msgstr "Modifié :"
 
-#: ../thunar/thunar-properties-dialog.c:297
+#: ../thunar/thunar-properties-dialog.c:300
 msgid "Accessed:"
 msgstr "Accédé :"
 
 #.
 #. Fourth box (volume, size)
 #.
-#: ../thunar/thunar-properties-dialog.c:321
+#: ../thunar/thunar-properties-dialog.c:324
 msgid "Volume:"
 msgstr "Volume :"
 
-#: ../thunar/thunar-properties-dialog.c:344
+#: ../thunar/thunar-properties-dialog.c:347
 msgid "Size:"
 msgstr "Taille :"
 
 #.
 #. Emblem chooser
 #.
-#: ../thunar/thunar-properties-dialog.c:368
+#: ../thunar/thunar-properties-dialog.c:371
 msgid "Emblems"
 msgstr "Emblèmes"
 
-#: ../thunar/thunar-properties-dialog.c:604
+#: ../thunar/thunar-properties-dialog.c:618
 #, c-format
 msgid "%s Info"
 msgstr "Info %s"
 
-#: ../thunar/thunar-properties-dialog.c:685
+#: ../thunar/thunar-properties-dialog.c:699
 #, c-format
 msgid "%s (%u Bytes)"
 msgstr "%s (%u octets)"
 
 #. display an error message
-#: ../thunar/thunar-properties-dialog.c:731
+#: ../thunar/thunar-properties-dialog.c:745
 #: ../thunar/thunar-standard-view.c:2170
 #, c-format
 msgid "Failed to rename `%s'"
 msgstr "Échec au changement de nom de `%s'"
 
+#. append the remove menu item
+#: ../thunar/thunar-shortcuts-view.c:319
+msgid "_Remove Shortcut"
+msgstr "_Supprimer raccourci"
+
+#. append the rename menu item
+#: ../thunar/thunar-shortcuts-view.c:334
+msgid "Re_name Shortcut"
+msgstr "_Renommer raccourci"
+
+#: ../thunar/thunar-shortcuts-view.c:654
+#, c-format
+msgid "The path '%s' does not refer to a directory"
+msgstr "Le chemin '%s' ne fait pas référence à un répertoire"
+
+#. display an error message to the user
+#: ../thunar/thunar-shortcuts-view.c:673
+msgid "Failed to add new shortcut"
+msgstr "Échec à l'ajout d'un nouveau raccourci"
+
 #: ../thunar/thunar-standard-view.c:253
 msgid "File Context Menu"
 msgstr "Menu contextuel de fichier"
@@ -1685,25 +1827,25 @@ msgstr "Sélectionner une icône"
 msgid "Image Files"
 msgstr "Fichiers image"
 
-#: ../thunar-uca/thunar-uca-model.c:767
+#: ../thunar-uca/thunar-uca-model.c:770
 #, c-format
 msgid "Unknown element <%s>"
 msgstr "Élément <%s> inconnu"
 
-#: ../thunar-uca/thunar-uca-model.c:785
+#: ../thunar-uca/thunar-uca-model.c:788
 msgid "End element handler called while in root context"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:873
+#: ../thunar-uca/thunar-uca-model.c:876
 #, c-format
 msgid "Unknown closing element <%s>"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:1298
+#: ../thunar-uca/thunar-uca-model.c:1301
 msgid "Failed to determine save location for uca.xml"
 msgstr "Échec à la détermination du lieu d'enregistrement pour uca.xml"
 
-#: ../thunar-uca/thunar-uca-model.c:1414
+#: ../thunar-uca/thunar-uca-model.c:1417
 msgid "Command not configured"
 msgstr "Commande non configurée"
 
index 598a281..f88a999 100644 (file)
--- 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-02 02:20+0900\n"
+"POT-Creation-Date: 2006-01-04 18:34+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,24 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ../thunar-vfs/thunar-vfs-info.c:261
+#: ../thunar-vfs/thunar-vfs-info.c:362
 msgid "No Exec field specified"
 msgstr ""
 
-#: ../thunar-vfs/thunar-vfs-info.c:269
+#: ../thunar-vfs/thunar-vfs-info.c:370
 #, fuzzy
 msgid "Unable to parse file"
 msgstr "Nem nyitható meg e fájl: %s"
 
-#: ../thunar-vfs/thunar-vfs-info.c:359
+#: ../thunar-vfs/thunar-vfs-info.c:460
 msgid "Invalid file name"
 msgstr ""
 
-#: ../thunar-vfs/thunar-vfs-info.c:381
+#: ../thunar-vfs/thunar-vfs-info.c:482
 msgid "Invalid desktop file"
 msgstr ""
 
-#: ../thunar-vfs/thunar-vfs-info.c:615
+#: ../thunar-vfs/thunar-vfs-info.c:716
 #, fuzzy, c-format
 msgid "Failed to stat file `%s': %s"
 msgstr "Nem törölhető: %s"
@@ -148,7 +148,7 @@ msgid "copy of %s"
 msgstr ""
 
 #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703
-#: ../thunar/thunar-properties-dialog.c:629
+#: ../thunar/thunar-properties-dialog.c:643
 #, c-format
 msgid "link to %s"
 msgstr ""
@@ -260,10 +260,62 @@ msgid "Failed to create symbolic `%s'"
 msgstr "Nem hozható létre e szimlink: %s"
 
 #. setup application name
-#: ../thunar/main.c:47 ../thunar/thunar-window.c:404
+#: ../thunar/main.c:48 ../thunar/thunar-window.c:404
 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
@@ -292,11 +344,25 @@ 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:171 ../thunar/thunar-statusbar.c:190
+#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190
 msgid "File"
 msgstr "Fájl"
 
@@ -449,7 +515,11 @@ msgstr ""
 msgid "Name"
 msgstr "Név"
 
+#.
+#. Permissions chooser
+#.
 #: ../thunar/thunar-details-view.c:197
+#: ../thunar/thunar-properties-dialog.c:382
 msgid "Permissions"
 msgstr "Jogok"
 
@@ -496,36 +566,15 @@ msgstr ""
 msgid "Unable to execute file `%s'"
 msgstr "Nem lehet másolni a fájlt: %s"
 
-#. append the remove menu item
-#: ../thunar/thunar-shortcuts-view.c:319
-msgid "_Remove Shortcut"
-msgstr ""
-
-#. append the rename menu item
-#: ../thunar/thunar-shortcuts-view.c:334
-msgid "Re_name Shortcut"
-msgstr ""
-
-#: ../thunar/thunar-shortcuts-view.c:654
-#, c-format
-msgid "The path '%s' does not refer to a directory"
-msgstr ""
-
-#. display an error message to the user
-#: ../thunar/thunar-shortcuts-view.c:673
-#, fuzzy
-msgid "Failed to add new shortcut"
-msgstr "Nem törölhető: %s"
-
-#: ../thunar/thunar-file.c:762
+#: ../thunar/thunar-file.c:775
 msgid "The root folder has no parent"
 msgstr ""
 
-#: ../thunar/thunar-file.c:954
+#: ../thunar/thunar-file.c:1032
 msgid "Filesystem"
 msgstr "Fájlrendszer"
 
-#: ../thunar/thunar-file.c:978
+#: ../thunar/thunar-file.c:1056
 msgid "Home"
 msgstr "Saját könyvtár"
 
@@ -757,7 +806,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:627
+#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641
 msgid "broken link"
 msgstr ""
 
@@ -844,6 +893,78 @@ 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"
+
+#: ../thunar/thunar-permissions-model.c:447
+msgid "Unknown file owner"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:460
+msgid "Unknown file group"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:465
+msgid "All other users"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:474
+msgid "Read"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:478
+msgid "Write"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "List folder contents"
+msgstr "Mappa beolvasása..."
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "Execute"
+msgstr "Minden fájl kiválasztása"
+
+#. actions for the group item
+#: ../thunar/thunar-permissions-model.c:884
+msgid "Change _Group..."
+msgstr ""
+
+#. append the "Grant Permission" action
+#: ../thunar/thunar-permissions-model.c:897
+#, fuzzy
+msgid "_Grant Permission"
+msgstr "Jogok"
+
+#. append the "Deny Permission" action
+#: ../thunar/thunar-permissions-model.c:906
+#, fuzzy
+msgid "_Deny Permission"
+msgstr "Jogok"
+
+#: ../thunar/thunar-permissions-view.c:213
+msgid ""
+"For special permissions and for\n"
+"advanced settings, click Advanced."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:222
+msgid "_Advanced..."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:223
+msgid "Click here for special permissions and for advanced settings."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:243
+msgid ""
+"You are not the owner of this file, so\n"
+"you cannot change these permissions."
+msgstr ""
+
 #: ../thunar/thunar-preferences-dialog.c:184
 #, fuzzy
 msgid "File Manager Preferences"
@@ -965,71 +1086,92 @@ msgid_plural "(%lu seconds remaining)"
 msgstr[0] ""
 msgstr[1] ""
 
-#: ../thunar/thunar-properties-dialog.c:172
+#: ../thunar/thunar-properties-dialog.c:173
 msgid "The file displayed by the dialog"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:217
+#: ../thunar/thunar-properties-dialog.c:220
 msgid "General"
 msgstr "Általános"
 
-#: ../thunar/thunar-properties-dialog.c:234
+#: ../thunar/thunar-properties-dialog.c:237
 msgid "Name:"
 msgstr "Név"
 
 #.
 #. Second box (kind)
 #.
-#: ../thunar/thunar-properties-dialog.c:259
+#: ../thunar/thunar-properties-dialog.c:262
 msgid "Kind:"
 msgstr "Típus:"
 
 #.
 #. Third box (modified, accessed)
 #.
-#: ../thunar/thunar-properties-dialog.c:284
+#: ../thunar/thunar-properties-dialog.c:287
 msgid "Modified:"
 msgstr "Módosítva:"
 
-#: ../thunar/thunar-properties-dialog.c:297
+#: ../thunar/thunar-properties-dialog.c:300
 msgid "Accessed:"
 msgstr "Megnyitva:"
 
 #.
 #. Fourth box (volume, size)
 #.
-#: ../thunar/thunar-properties-dialog.c:321
+#: ../thunar/thunar-properties-dialog.c:324
 msgid "Volume:"
 msgstr "Kötet:"
 
-#: ../thunar/thunar-properties-dialog.c:344
+#: ../thunar/thunar-properties-dialog.c:347
 msgid "Size:"
 msgstr "Méret:"
 
 #.
 #. Emblem chooser
 #.
-#: ../thunar/thunar-properties-dialog.c:368
+#: ../thunar/thunar-properties-dialog.c:371
 msgid "Emblems"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:604
+#: ../thunar/thunar-properties-dialog.c:618
 #, c-format
 msgid "%s Info"
 msgstr "%s Info"
 
-#: ../thunar/thunar-properties-dialog.c:685
+#: ../thunar/thunar-properties-dialog.c:699
 #, c-format
 msgid "%s (%u Bytes)"
 msgstr "%s (%u bájt)"
 
 #. display an error message
-#: ../thunar/thunar-properties-dialog.c:731
+#: ../thunar/thunar-properties-dialog.c:745
 #: ../thunar/thunar-standard-view.c:2170
 #, fuzzy, c-format
 msgid "Failed to rename `%s'"
 msgstr "Nem törölhető: %s"
 
+#. append the remove menu item
+#: ../thunar/thunar-shortcuts-view.c:319
+msgid "_Remove Shortcut"
+msgstr ""
+
+#. append the rename menu item
+#: ../thunar/thunar-shortcuts-view.c:334
+msgid "Re_name Shortcut"
+msgstr ""
+
+#: ../thunar/thunar-shortcuts-view.c:654
+#, c-format
+msgid "The path '%s' does not refer to a directory"
+msgstr ""
+
+#. display an error message to the user
+#: ../thunar/thunar-shortcuts-view.c:673
+#, fuzzy
+msgid "Failed to add new shortcut"
+msgstr "Nem törölhető: %s"
+
 #: ../thunar/thunar-standard-view.c:253
 #, fuzzy
 msgid "File Context Menu"
@@ -1708,26 +1850,26 @@ msgstr "_Hely megnyitása..."
 msgid "Image Files"
 msgstr "Fájlok beillesztése"
 
-#: ../thunar-uca/thunar-uca-model.c:767
+#: ../thunar-uca/thunar-uca-model.c:770
 #, c-format
 msgid "Unknown element <%s>"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:785
+#: ../thunar-uca/thunar-uca-model.c:788
 msgid "End element handler called while in root context"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:873
+#: ../thunar-uca/thunar-uca-model.c:876
 #, c-format
 msgid "Unknown closing element <%s>"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:1298
+#: ../thunar-uca/thunar-uca-model.c:1301
 #, fuzzy
 msgid "Failed to determine save location for uca.xml"
 msgstr "Nem sikerült meghatározni a szülő URI-t ehhez: %s"
 
-#: ../thunar-uca/thunar-uca-model.c:1414
+#: ../thunar-uca/thunar-uca-model.c:1417
 msgid "Command not configured"
 msgstr ""
 
index d5ce2ac..adc4956 100644 (file)
--- 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-02 02:20+0900\n"
+"POT-Creation-Date: 2006-01-04 18:34+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,23 @@ msgstr ""
 "X-Poedit-Country: ITALY\n"
 "X-Poedit-SourceCharset: utf-8\n"
 
-#: ../thunar-vfs/thunar-vfs-info.c:261
+#: ../thunar-vfs/thunar-vfs-info.c:362
 msgid "No Exec field specified"
 msgstr "Campo Exec non specificato"
 
-#: ../thunar-vfs/thunar-vfs-info.c:269
+#: ../thunar-vfs/thunar-vfs-info.c:370
 msgid "Unable to parse file"
 msgstr "Impossibile fare il parsing del file"
 
-#: ../thunar-vfs/thunar-vfs-info.c:359
+#: ../thunar-vfs/thunar-vfs-info.c:460
 msgid "Invalid file name"
 msgstr "Nome del file non valido"
 
-#: ../thunar-vfs/thunar-vfs-info.c:381
+#: ../thunar-vfs/thunar-vfs-info.c:482
 msgid "Invalid desktop file"
 msgstr "Desktop file non valido"
 
-#: ../thunar-vfs/thunar-vfs-info.c:615
+#: ../thunar-vfs/thunar-vfs-info.c:716
 #, c-format
 msgid "Failed to stat file `%s': %s"
 msgstr "Stat del file `%s' fallito: %s"
@@ -151,7 +151,7 @@ msgid "copy of %s"
 msgstr ""
 
 #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703
-#: ../thunar/thunar-properties-dialog.c:629
+#: ../thunar/thunar-properties-dialog.c:643
 #, c-format
 msgid "link to %s"
 msgstr ""
@@ -263,10 +263,62 @@ msgid "Failed to create symbolic `%s'"
 msgstr "Impossibile creare link simbolico `%s'"
 
 #. setup application name
-#: ../thunar/main.c:47 ../thunar/thunar-window.c:404
+#: ../thunar/main.c:48 ../thunar/thunar-window.c:404
 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"
@@ -292,11 +344,25 @@ 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:171 ../thunar/thunar-statusbar.c:190
+#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190
 msgid "File"
 msgstr "File"
 
@@ -447,7 +513,11 @@ msgstr ""
 msgid "Name"
 msgstr "Nome"
 
+#.
+#. Permissions chooser
+#.
 #: ../thunar/thunar-details-view.c:197
+#: ../thunar/thunar-properties-dialog.c:382
 msgid "Permissions"
 msgstr "Permessi"
 
@@ -494,35 +564,15 @@ msgstr "Collega qui"
 msgid "Unable to execute file `%s'"
 msgstr "Impossibile eseguire il file `%s'"
 
-#. append the remove menu item
-#: ../thunar/thunar-shortcuts-view.c:319
-msgid "_Remove Shortcut"
-msgstr "_Rimuovi shortcut"
-
-#. append the rename menu item
-#: ../thunar/thunar-shortcuts-view.c:334
-msgid "Re_name Shortcut"
-msgstr "Ri_nomina shortcut"
-
-#: ../thunar/thunar-shortcuts-view.c:654
-#, c-format
-msgid "The path '%s' does not refer to a directory"
-msgstr "La path '%s' non si riferisce ad una directory"
-
-#. display an error message to the user
-#: ../thunar/thunar-shortcuts-view.c:673
-msgid "Failed to add new shortcut"
-msgstr "Impossibile aggiungere nuovo shortcut"
-
-#: ../thunar/thunar-file.c:762
+#: ../thunar/thunar-file.c:775
 msgid "The root folder has no parent"
 msgstr ""
 
-#: ../thunar/thunar-file.c:954
+#: ../thunar/thunar-file.c:1032
 msgid "Filesystem"
 msgstr "Filesystem"
 
-#: ../thunar/thunar-file.c:978
+#: ../thunar/thunar-file.c:1056
 msgid "Home"
 msgstr "Home"
 
@@ -754,7 +804,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:627
+#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641
 msgid "broken link"
 msgstr ""
 
@@ -842,6 +892,78 @@ 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"
+
+#: ../thunar/thunar-permissions-model.c:447
+msgid "Unknown file owner"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:460
+msgid "Unknown file group"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:465
+msgid "All other users"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:474
+msgid "Read"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:478
+msgid "Write"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "List folder contents"
+msgstr "Caricamento dei contenuti della cartella in corso..."
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "Execute"
+msgstr "_Esegui"
+
+#. actions for the group item
+#: ../thunar/thunar-permissions-model.c:884
+msgid "Change _Group..."
+msgstr ""
+
+#. append the "Grant Permission" action
+#: ../thunar/thunar-permissions-model.c:897
+#, fuzzy
+msgid "_Grant Permission"
+msgstr "Permessi"
+
+#. append the "Deny Permission" action
+#: ../thunar/thunar-permissions-model.c:906
+#, fuzzy
+msgid "_Deny Permission"
+msgstr "Permessi"
+
+#: ../thunar/thunar-permissions-view.c:213
+msgid ""
+"For special permissions and for\n"
+"advanced settings, click Advanced."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:222
+msgid "_Advanced..."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:223
+msgid "Click here for special permissions and for advanced settings."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:243
+msgid ""
+"You are not the owner of this file, so\n"
+"you cannot change these permissions."
+msgstr ""
+
 #: ../thunar/thunar-preferences-dialog.c:184
 msgid "File Manager Preferences"
 msgstr "Preferenze del File Manager"
@@ -959,71 +1081,91 @@ msgid_plural "(%lu seconds remaining)"
 msgstr[0] ""
 msgstr[1] ""
 
-#: ../thunar/thunar-properties-dialog.c:172
+#: ../thunar/thunar-properties-dialog.c:173
 msgid "The file displayed by the dialog"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:217
+#: ../thunar/thunar-properties-dialog.c:220
 msgid "General"
 msgstr "Generale"
 
-#: ../thunar/thunar-properties-dialog.c:234
+#: ../thunar/thunar-properties-dialog.c:237
 msgid "Name:"
 msgstr "Nome:"
 
 #.
 #. Second box (kind)
 #.
-#: ../thunar/thunar-properties-dialog.c:259
+#: ../thunar/thunar-properties-dialog.c:262
 msgid "Kind:"
 msgstr "Tipo:"
 
 #.
 #. Third box (modified, accessed)
 #.
-#: ../thunar/thunar-properties-dialog.c:284
+#: ../thunar/thunar-properties-dialog.c:287
 msgid "Modified:"
 msgstr "Modificato:"
 
-#: ../thunar/thunar-properties-dialog.c:297
+#: ../thunar/thunar-properties-dialog.c:300
 msgid "Accessed:"
 msgstr "Acceduto:"
 
 #.
 #. Fourth box (volume, size)
 #.
-#: ../thunar/thunar-properties-dialog.c:321
+#: ../thunar/thunar-properties-dialog.c:324
 msgid "Volume:"
 msgstr "Volume:"
 
-#: ../thunar/thunar-properties-dialog.c:344
+#: ../thunar/thunar-properties-dialog.c:347
 msgid "Size:"
 msgstr "Dimensione:"
 
 #.
 #. Emblem chooser
 #.
-#: ../thunar/thunar-properties-dialog.c:368
+#: ../thunar/thunar-properties-dialog.c:371
 msgid "Emblems"
 msgstr ""
 
-#: ../thunar/thunar-properties-dialog.c:604
+#: ../thunar/thunar-properties-dialog.c:618
 #, c-format
 msgid "%s Info"
 msgstr "Informazioni su %s"
 
-#: ../thunar/thunar-properties-dialog.c:685
+#: ../thunar/thunar-properties-dialog.c:699
 #, c-format
 msgid "%s (%u Bytes)"
 msgstr "%s (%u Byte)"
 
 #. display an error message
-#: ../thunar/thunar-properties-dialog.c:731
+#: ../thunar/thunar-properties-dialog.c:745
 #: ../thunar/thunar-standard-view.c:2170
 #, c-format
 msgid "Failed to rename `%s'"
 msgstr "Impossibile rinominare `%s'"
 
+#. append the remove menu item
+#: ../thunar/thunar-shortcuts-view.c:319
+msgid "_Remove Shortcut"
+msgstr "_Rimuovi shortcut"
+
+#. append the rename menu item
+#: ../thunar/thunar-shortcuts-view.c:334
+msgid "Re_name Shortcut"
+msgstr "Ri_nomina shortcut"
+
+#: ../thunar/thunar-shortcuts-view.c:654
+#, c-format
+msgid "The path '%s' does not refer to a directory"
+msgstr "La path '%s' non si riferisce ad una directory"
+
+#. display an error message to the user
+#: ../thunar/thunar-shortcuts-view.c:673
+msgid "Failed to add new shortcut"
+msgstr "Impossibile aggiungere nuovo shortcut"
+
 #: ../thunar/thunar-standard-view.c:253
 msgid "File Context Menu"
 msgstr ""
@@ -1672,25 +1814,25 @@ msgstr "Seleziona un'icona"
 msgid "Image Files"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:767
+#: ../thunar-uca/thunar-uca-model.c:770
 #, c-format
 msgid "Unknown element <%s>"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:785
+#: ../thunar-uca/thunar-uca-model.c:788
 msgid "End element handler called while in root context"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:873
+#: ../thunar-uca/thunar-uca-model.c:876
 #, c-format
 msgid "Unknown closing element <%s>"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:1298
+#: ../thunar-uca/thunar-uca-model.c:1301
 msgid "Failed to determine save location for uca.xml"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:1414
+#: ../thunar-uca/thunar-uca-model.c:1417
 msgid "Command not configured"
 msgstr ""
 
index d4aa393..fcd38f2 100644 (file)
--- 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: 2005-12-31 01:18+0900\n"
+"POT-Creation-Date: 2006-01-04 18:34+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,23 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: ../thunar-vfs/thunar-vfs-info.c:261
+#: ../thunar-vfs/thunar-vfs-info.c:362
 msgid "No Exec field specified"
 msgstr "実行コマンドが指定されていません。"
 
-#: ../thunar-vfs/thunar-vfs-info.c:269
+#: ../thunar-vfs/thunar-vfs-info.c:370
 msgid "Unable to parse file"
 msgstr "ファイルを解析できません。"
 
-#: ../thunar-vfs/thunar-vfs-info.c:359
+#: ../thunar-vfs/thunar-vfs-info.c:460
 msgid "Invalid file name"
 msgstr "無効なファイル名です。"
 
-#: ../thunar-vfs/thunar-vfs-info.c:381
+#: ../thunar-vfs/thunar-vfs-info.c:482
 msgid "Invalid desktop file"
 msgstr "無効なデスクトップファイルです。"
 
-#: ../thunar-vfs/thunar-vfs-info.c:615
+#: ../thunar-vfs/thunar-vfs-info.c:716
 #, c-format
 msgid "Failed to stat file `%s': %s"
 msgstr "ファイル「%s」の状態を取得するのに失敗しました: %s"
@@ -155,7 +155,7 @@ msgstr "%s のコピー"
 
 # FIXME:
 #: ../thunar-vfs/thunar-vfs-xfer.c:158 ../thunar/thunar-list-model.c:703
-#: ../thunar/thunar-properties-dialog.c:629
+#: ../thunar/thunar-properties-dialog.c:643
 #, c-format
 msgid "link to %s"
 msgstr "%s へのリンク"
@@ -272,10 +272,62 @@ msgstr "リンク「%s」の作成に失敗しました。"
 
 # XXX: transliteration?
 #. setup application name
-#: ../thunar/main.c:47 ../thunar/thunar-window.c:404
+#: ../thunar/main.c:48 ../thunar/thunar-window.c:404
 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"
@@ -301,11 +353,25 @@ 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:171 ../thunar/thunar-statusbar.c:190
+#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190
 msgid "File"
 msgstr "ファイル"
 
@@ -450,7 +516,11 @@ msgstr "新しい名前を入力して下さい:"
 msgid "Name"
 msgstr "名前"
 
+#.
+#. Permissions chooser
+#.
 #: ../thunar/thunar-details-view.c:197
+#: ../thunar/thunar-properties-dialog.c:382
 msgid "Permissions"
 msgstr "アクセス権"
 
@@ -496,35 +566,15 @@ msgstr "ここにリンク(_L)"
 msgid "Unable to execute file `%s'"
 msgstr "ファイル「%s」を実行できません。"
 
-#. append the remove menu item
-#: ../thunar/thunar-shortcuts-view.c:319
-msgid "_Remove Shortcut"
-msgstr "ショートカットを削除(_R)"
-
-#. append the rename menu item
-#: ../thunar/thunar-shortcuts-view.c:334
-msgid "Re_name Shortcut"
-msgstr "ショートカットの名前を変更(_N)"
-
-#: ../thunar/thunar-shortcuts-view.c:654
-#, c-format
-msgid "The path '%s' does not refer to a directory"
-msgstr "パス「%s」はフォルダを参照していません。"
-
-#. display an error message to the user
-#: ../thunar/thunar-shortcuts-view.c:673
-msgid "Failed to add new shortcut"
-msgstr "ショートカットの追加に失敗しました。"
-
-#: ../thunar/thunar-file.c:762
+#: ../thunar/thunar-file.c:775
 msgid "The root folder has no parent"
 msgstr "ルートフォルダに上位のフォルダがありません。"
 
-#: ../thunar/thunar-file.c:954
+#: ../thunar/thunar-file.c:1032
 msgid "Filesystem"
 msgstr "ファイルシステム"
 
-#: ../thunar/thunar-file.c:978
+#: ../thunar/thunar-file.c:1056
 msgid "Home"
 msgstr "ホーム"
 
@@ -753,7 +803,7 @@ msgstr "隠しファイルを表示"
 msgid "Whether to display hidden files"
 msgstr "隠しファイルを表示するかを指定します。"
 
-#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:627
+#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641
 msgid "broken link"
 msgstr "壊れたリンク"
 
@@ -836,6 +886,78 @@ 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です。"
+
+#: ../thunar/thunar-permissions-model.c:447
+msgid "Unknown file owner"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:460
+msgid "Unknown file group"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:465
+msgid "All other users"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:474
+msgid "Read"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:478
+msgid "Write"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "List folder contents"
+msgstr "フォルダの内容を読み込んでいます..."
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "Execute"
+msgstr "実行(_E)"
+
+#. actions for the group item
+#: ../thunar/thunar-permissions-model.c:884
+msgid "Change _Group..."
+msgstr ""
+
+#. append the "Grant Permission" action
+#: ../thunar/thunar-permissions-model.c:897
+#, fuzzy
+msgid "_Grant Permission"
+msgstr "アクセス権"
+
+#. append the "Deny Permission" action
+#: ../thunar/thunar-permissions-model.c:906
+#, fuzzy
+msgid "_Deny Permission"
+msgstr "アクセス権"
+
+#: ../thunar/thunar-permissions-view.c:213
+msgid ""
+"For special permissions and for\n"
+"advanced settings, click Advanced."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:222
+msgid "_Advanced..."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:223
+msgid "Click here for special permissions and for advanced settings."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:243
+msgid ""
+"You are not the owner of this file, so\n"
+"you cannot change these permissions."
+msgstr ""
+
 #: ../thunar/thunar-preferences-dialog.c:184
 msgid "File Manager Preferences"
 msgstr "ファイルマネージャーの環境設定"
@@ -956,44 +1078,44 @@ msgid "(%lu second remaining)"
 msgid_plural "(%lu seconds remaining)"
 msgstr[0] "(残り %lu 秒)"
 
-#: ../thunar/thunar-properties-dialog.c:172
+#: ../thunar/thunar-properties-dialog.c:173
 msgid "The file displayed by the dialog"
 msgstr "ダイアログに表示されているファイルです"
 
-#: ../thunar/thunar-properties-dialog.c:217
+#: ../thunar/thunar-properties-dialog.c:220
 msgid "General"
 msgstr "一般"
 
-#: ../thunar/thunar-properties-dialog.c:234
+#: ../thunar/thunar-properties-dialog.c:237
 msgid "Name:"
 msgstr "名前:"
 
 #.
 #. Second box (kind)
 #.
-#: ../thunar/thunar-properties-dialog.c:259
+#: ../thunar/thunar-properties-dialog.c:262
 msgid "Kind:"
 msgstr "種類:"
 
 #.
 #. Third box (modified, accessed)
 #.
-#: ../thunar/thunar-properties-dialog.c:284
+#: ../thunar/thunar-properties-dialog.c:287
 msgid "Modified:"
 msgstr "変更日時:"
 
-#: ../thunar/thunar-properties-dialog.c:297
+#: ../thunar/thunar-properties-dialog.c:300
 msgid "Accessed:"
 msgstr "アクセス日時:"
 
 #.
 #. Fourth box (volume, size)
 #.
-#: ../thunar/thunar-properties-dialog.c:321
+#: ../thunar/thunar-properties-dialog.c:324
 msgid "Volume:"
 msgstr "容量:"
 
-#: ../thunar/thunar-properties-dialog.c:344
+#: ../thunar/thunar-properties-dialog.c:347
 msgid "Size:"
 msgstr "サイズ:"
 
@@ -1001,27 +1123,47 @@ msgstr "サイズ:"
 #.
 #. Emblem chooser
 #.
-#: ../thunar/thunar-properties-dialog.c:368
+#: ../thunar/thunar-properties-dialog.c:371
 msgid "Emblems"
 msgstr "エンブレム"
 
-#: ../thunar/thunar-properties-dialog.c:604
+#: ../thunar/thunar-properties-dialog.c:618
 #, c-format
 msgid "%s Info"
 msgstr "%s の情報"
 
-#: ../thunar/thunar-properties-dialog.c:685
+#: ../thunar/thunar-properties-dialog.c:699
 #, c-format
 msgid "%s (%u Bytes)"
 msgstr "%s (%u バイト)"
 
 #. display an error message
-#: ../thunar/thunar-properties-dialog.c:731
+#: ../thunar/thunar-properties-dialog.c:745
 #: ../thunar/thunar-standard-view.c:2170
 #, c-format
 msgid "Failed to rename `%s'"
 msgstr "「%s」の名前変更に失敗しました。"
 
+#. append the remove menu item
+#: ../thunar/thunar-shortcuts-view.c:319
+msgid "_Remove Shortcut"
+msgstr "ショートカットを削除(_R)"
+
+#. append the rename menu item
+#: ../thunar/thunar-shortcuts-view.c:334
+msgid "Re_name Shortcut"
+msgstr "ショートカットの名前を変更(_N)"
+
+#: ../thunar/thunar-shortcuts-view.c:654
+#, c-format
+msgid "The path '%s' does not refer to a directory"
+msgstr "パス「%s」はフォルダを参照していません。"
+
+#. display an error message to the user
+#: ../thunar/thunar-shortcuts-view.c:673
+msgid "Failed to add new shortcut"
+msgstr "ショートカットの追加に失敗しました。"
+
 #: ../thunar/thunar-standard-view.c:253
 msgid "File Context Menu"
 msgstr "ファイルの右クリックメニュー"
@@ -1682,25 +1824,25 @@ msgstr "アイコンを選択して下さい"
 msgid "Image Files"
 msgstr "画像ファイル"
 
-#: ../thunar-uca/thunar-uca-model.c:767
+#: ../thunar-uca/thunar-uca-model.c:770
 #, c-format
 msgid "Unknown element <%s>"
 msgstr "不明な要素 <%s> があります"
 
-#: ../thunar-uca/thunar-uca-model.c:785
+#: ../thunar-uca/thunar-uca-model.c:788
 msgid "End element handler called while in root context"
 msgstr "ルートコンテキストで終了要素ハンドラーが呼び出されました。"
 
-#: ../thunar-uca/thunar-uca-model.c:873
+#: ../thunar-uca/thunar-uca-model.c:876
 #, c-format
 msgid "Unknown closing element <%s>"
 msgstr "不明な閉じ要素 <%s> があります"
 
-#: ../thunar-uca/thunar-uca-model.c:1298
+#: ../thunar-uca/thunar-uca-model.c:1301
 msgid "Failed to determine save location for uca.xml"
 msgstr "ファイル「uca.xml」を保存する場所を確定するのに失敗しました。"
 
-#: ../thunar-uca/thunar-uca-model.c:1414
+#: ../thunar-uca/thunar-uca-model.c:1417
 msgid "Command not configured"
 msgstr "コマンドが設定されていません。"
 
index e3d3c96..66802fe 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Thunar 0.1.4svn\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-01-02 02:20+0900\n"
+"POT-Creation-Date: 2006-01-04 18:34+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,23 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms:  nplurals=2; plural=(n != 1);\n"
 
-#: ../thunar-vfs/thunar-vfs-info.c:261
+#: ../thunar-vfs/thunar-vfs-info.c:362
 msgid "No Exec field specified"
 msgstr "Nenhum campo Exec especificado"
 
-#: ../thunar-vfs/thunar-vfs-info.c:269
+#: ../thunar-vfs/thunar-vfs-info.c:370
 msgid "Unable to parse file"
 msgstr "Incapaz de \"parse\" arquivo"
 
-#: ../thunar-vfs/thunar-vfs-info.c:359
+#: ../thunar-vfs/thunar-vfs-info.c:460
 msgid "Invalid file name"
 msgstr "Nome de arquivo inválido"
 
-#: ../thunar-vfs/thunar-vfs-info.c:381
+#: ../thunar-vfs/thunar-vfs-info.c:482
 msgid "Invalid desktop file"
 msgstr "Arquivo de área de trabalho inválido"
 
-#: ../thunar-vfs/thunar-vfs-info.c:615
+#: ../thunar-vfs/thunar-vfs-info.c:716
 #, c-format
 msgid "Failed to stat file `%s': %s"
 msgstr "Falha em \"stat\" arquivo `%s': %s"
@@ -147,7 +147,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:629
+#: ../thunar/thunar-properties-dialog.c:643
 #, c-format
 msgid "link to %s"
 msgstr "link para %s"
@@ -259,10 +259,62 @@ msgid "Failed to create symbolic `%s'"
 msgstr "Falha em criar simbólico `%s'"
 
 #. setup application name
-#: ../thunar/main.c:47 ../thunar/thunar-window.c:404
+#: ../thunar/main.c:48 ../thunar/thunar-window.c:404
 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"
@@ -288,11 +340,25 @@ 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:171 ../thunar/thunar-statusbar.c:190
+#: ../thunar/thunar-properties-dialog.c:172 ../thunar/thunar-statusbar.c:190
 msgid "File"
 msgstr "Arquivo"
 
@@ -437,7 +503,11 @@ msgstr "Entre com o novo nome:"
 msgid "Name"
 msgstr "Nome"
 
+#.
+#. Permissions chooser
+#.
 #: ../thunar/thunar-details-view.c:197
+#: ../thunar/thunar-properties-dialog.c:382
 msgid "Permissions"
 msgstr "Permissões"
 
@@ -483,38 +553,15 @@ msgstr "_Ligue aqui"
 msgid "Unable to execute file `%s'"
 msgstr "Incapaz de executar arquivo `%s'"
 
-#. append the remove menu item
-#: ../thunar/thunar-shortcuts-view.c:319
-#, fuzzy
-msgid "_Remove Shortcut"
-msgstr "_Remover Favorito"
-
-#. append the rename menu item
-#: ../thunar/thunar-shortcuts-view.c:334
-#, fuzzy
-msgid "Re_name Shortcut"
-msgstr "Re_nomear Favorito"
-
-#: ../thunar/thunar-shortcuts-view.c:654
-#, c-format
-msgid "The path '%s' does not refer to a directory"
-msgstr "O caminho '%s' não se refere a um diretório"
-
-#. display an error message to the user
-#: ../thunar/thunar-shortcuts-view.c:673
-#, fuzzy
-msgid "Failed to add new shortcut"
-msgstr "Falha em adicionar novo favorito"
-
-#: ../thunar/thunar-file.c:762
+#: ../thunar/thunar-file.c:775
 msgid "The root folder has no parent"
 msgstr "A pasta raiz não tem parente"
 
-#: ../thunar/thunar-file.c:954
+#: ../thunar/thunar-file.c:1032
 msgid "Filesystem"
 msgstr "Sistema de Arquivos"
 
-#: ../thunar/thunar-file.c:978
+#: ../thunar/thunar-file.c:1056
 msgid "Home"
 msgstr "Pasta Inicial"
 
@@ -742,7 +789,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:627
+#: ../thunar/thunar-list-model.c:701 ../thunar/thunar-properties-dialog.c:641
 msgid "broken link"
 msgstr "ligação quebrada"
 
@@ -828,6 +875,78 @@ 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"
+
+#: ../thunar/thunar-permissions-model.c:447
+msgid "Unknown file owner"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:460
+msgid "Unknown file group"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:465
+msgid "All other users"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:474
+msgid "Read"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:478
+msgid "Write"
+msgstr ""
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "List folder contents"
+msgstr "Carregando conteúdos de pasta..."
+
+#: ../thunar/thunar-permissions-model.c:482
+#, fuzzy
+msgid "Execute"
+msgstr "_Executar"
+
+#. actions for the group item
+#: ../thunar/thunar-permissions-model.c:884
+msgid "Change _Group..."
+msgstr ""
+
+#. append the "Grant Permission" action
+#: ../thunar/thunar-permissions-model.c:897
+#, fuzzy
+msgid "_Grant Permission"
+msgstr "Permissões"
+
+#. append the "Deny Permission" action
+#: ../thunar/thunar-permissions-model.c:906
+#, fuzzy
+msgid "_Deny Permission"
+msgstr "Permissões"
+
+#: ../thunar/thunar-permissions-view.c:213
+msgid ""
+"For special permissions and for\n"
+"advanced settings, click Advanced."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:222
+msgid "_Advanced..."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:223
+msgid "Click here for special permissions and for advanced settings."
+msgstr ""
+
+#: ../thunar/thunar-permissions-view.c:243
+msgid ""
+"You are not the owner of this file, so\n"
+"you cannot change these permissions."
+msgstr ""
+
 #: ../thunar/thunar-preferences-dialog.c:184
 msgid "File Manager Preferences"
 msgstr "Preferências de Gerenciador de Arquivo"
@@ -951,71 +1070,94 @@ msgid_plural "(%lu seconds remaining)"
 msgstr[0] "(Restando %lu segundo)"
 msgstr[1] "(Restando %lu segundos)"
 
-#: ../thunar/thunar-properties-dialog.c:172
+#: ../thunar/thunar-properties-dialog.c:173
 msgid "The file displayed by the dialog"
 msgstr "O arquivo mostrado pelo diálogo"
 
-#: ../thunar/thunar-properties-dialog.c:217
+#: ../thunar/thunar-properties-dialog.c:220
 msgid "General"
 msgstr "Geral"
 
-#: ../thunar/thunar-properties-dialog.c:234
+#: ../thunar/thunar-properties-dialog.c:237
 msgid "Name:"
 msgstr "Nome:"
 
 #.
 #. Second box (kind)
 #.
-#: ../thunar/thunar-properties-dialog.c:259
+#: ../thunar/thunar-properties-dialog.c:262
 msgid "Kind:"
 msgstr "Tipo:"
 
 #.
 #. Third box (modified, accessed)
 #.
-#: ../thunar/thunar-properties-dialog.c:284
+#: ../thunar/thunar-properties-dialog.c:287
 msgid "Modified:"
 msgstr "Modificado:"
 
-#: ../thunar/thunar-properties-dialog.c:297
+#: ../thunar/thunar-properties-dialog.c:300
 msgid "Accessed:"
 msgstr "Acessado:"
 
 #.
 #. Fourth box (volume, size)
 #.
-#: ../thunar/thunar-properties-dialog.c:321
+#: ../thunar/thunar-properties-dialog.c:324
 msgid "Volume:"
 msgstr "Volume:"
 
-#: ../thunar/thunar-properties-dialog.c:344
+#: ../thunar/thunar-properties-dialog.c:347
 msgid "Size:"
 msgstr "Tamanho:"
 
 #.
 #. Emblem chooser
 #.
-#: ../thunar/thunar-properties-dialog.c:368
+#: ../thunar/thunar-properties-dialog.c:371
 msgid "Emblems"
 msgstr "Emblemas"
 
-#: ../thunar/thunar-properties-dialog.c:604
+#: ../thunar/thunar-properties-dialog.c:618
 #, c-format
 msgid "%s Info"
 msgstr "Informação %s"
 
-#: ../thunar/thunar-properties-dialog.c:685
+#: ../thunar/thunar-properties-dialog.c:699
 #, c-format
 msgid "%s (%u Bytes)"
 msgstr "%s (%u Bytes)"
 
 #. display an error message
-#: ../thunar/thunar-properties-dialog.c:731
+#: ../thunar/thunar-properties-dialog.c:745
 #: ../thunar/thunar-standard-view.c:2170
 #, c-format
 msgid "Failed to rename `%s'"
 msgstr "Falha em renomear `%s'"
 
+#. append the remove menu item
+#: ../thunar/thunar-shortcuts-view.c:319
+#, fuzzy
+msgid "_Remove Shortcut"
+msgstr "_Remover Favorito"
+
+#. append the rename menu item
+#: ../thunar/thunar-shortcuts-view.c:334
+#, fuzzy
+msgid "Re_name Shortcut"
+msgstr "Re_nomear Favorito"
+
+#: ../thunar/thunar-shortcuts-view.c:654
+#, c-format
+msgid "The path '%s' does not refer to a directory"
+msgstr "O caminho '%s' não se refere a um diretório"
+
+#. display an error message to the user
+#: ../thunar/thunar-shortcuts-view.c:673
+#, fuzzy
+msgid "Failed to add new shortcut"
+msgstr "Falha em adicionar novo favorito"
+
 #: ../thunar/thunar-standard-view.c:253
 msgid "File Context Menu"
 msgstr "Menu de Contexto de Arquivo"
@@ -1675,26 +1817,26 @@ msgstr "Selecione uma Aplicação"
 msgid "Image Files"
 msgstr "C_olar Arquivos"
 
-#: ../thunar-uca/thunar-uca-model.c:767
+#: ../thunar-uca/thunar-uca-model.c:770
 #, c-format
 msgid "Unknown element <%s>"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:785
+#: ../thunar-uca/thunar-uca-model.c:788
 msgid "End element handler called while in root context"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:873
+#: ../thunar-uca/thunar-uca-model.c:876
 #, c-format
 msgid "Unknown closing element <%s>"
 msgstr ""
 
-#: ../thunar-uca/thunar-uca-model.c:1298
+#: ../thunar-uca/thunar-uca-model.c:1301
 #, fuzzy
 msgid "Failed to determine save location for uca.xml"
 msgstr "Falha em determinar informação de arquivo para `%s'"
 
-#: ../thunar-uca/thunar-uca-model.c:1414
+#: ../thunar-uca/thunar-uca-model.c:1417
 msgid "Command not configured"
 msgstr ""
 
index 6f98669..d537dee 100644 (file)
@@ -342,9 +342,9 @@ static void delete_tdb(void)
 
 static int print_rec(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, void *state)
 {
-  fprintf(pDumpFile,"\nkey %d bytes\n", key.dsize);
+  fprintf(pDumpFile,"\nkey %u bytes\n", (unsigned) key.dsize);
   print_asc((unsigned char*)key.dptr, key.dsize);
-  fprintf(pDumpFile,"\ndata %d bytes\n", dbuf.dsize);
+  fprintf(pDumpFile,"\ndata %u bytes\n", (unsigned) dbuf.dsize);
   print_data((unsigned char*)dbuf.dptr, dbuf.dsize);
   return 0;
 }
index 9953e19..889375a 100644 (file)
@@ -45,7 +45,7 @@ thunar_extension_initialize (ThunarxProviderPlugin *plugin)
       return;
     }
 
-#ifndef G_DISABLE_CHECKS
+#ifdef G_ENABLE_DEBUG
   g_message ("Initializing ThunarUca extension");
 #endif
 
@@ -64,7 +64,7 @@ thunar_extension_initialize (ThunarxProviderPlugin *plugin)
 G_MODULE_EXPORT void
 thunar_extension_shutdown (void)
 {
-#ifndef G_DISABLE_CHECKS
+#ifdef G_ENABLE_DEBUG
   g_message ("Shutting down ThunarUca extension");
 #endif
 }
index 08af567..5445a80 100644 (file)
@@ -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
@@ -193,6 +193,107 @@ 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.
  * @screen    : a #GdkScreen or %NULL to use the default #GdkScreen.
index 1146c1f..6e9519c 100644 (file)
@@ -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
@@ -102,6 +102,14 @@ 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,
index 84d708a..65b57d1 100644 (file)
@@ -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
@@ -307,6 +307,8 @@ thunar_vfs_user_load (ThunarVfsUser *user)
   ThunarVfsUserManager *manager;
   struct passwd        *pw;
   const gchar          *s;
+  gchar                *name;
+  gchar                *t;
 
   g_return_if_fail (user->name == NULL);
 
@@ -326,6 +328,22 @@ thunar_vfs_user_load (ThunarVfsUser *user)
       else if (pw->pw_gecos[0] != '\0')
         user->real_name = g_strdup (pw->pw_gecos);
 
+      /* substitute '&' in the real_name with the account name */
+      if (G_LIKELY (user->real_name != NULL && strchr (user->real_name, '&') != NULL))
+        {
+          /* generate a version of the username with the first char upper'd */
+          name = g_strdup (user->name);
+          name[0] = g_ascii_toupper (name[0]);
+
+          /* replace all occurances of '&' */
+          t = exo_str_replace (user->real_name, "&", name);
+          g_free (user->real_name);
+          user->real_name = t;
+
+          /* clean up */
+          g_free (name);
+        }
+
       g_object_unref (G_OBJECT (manager));
     }
   else
@@ -608,7 +626,7 @@ thunar_vfs_user_manager_finalize (GObject *object)
   /* unload the passwd file */
   endpwent ();
 
-  G_OBJECT_CLASS (thunar_vfs_user_manager_parent_class)->finalize (object);
+  (*G_OBJECT_CLASS (thunar_vfs_user_manager_parent_class)->finalize) (object);
 }
 
 
@@ -758,5 +776,48 @@ thunar_vfs_user_manager_get_user_by_id (ThunarVfsUserManager *manager,
 
 
 
+/**
+ * thunar_vfs_user_manager_get_all_groups:
+ * @manager : a #ThunarVfsUserManager.
+ *
+ * Returns the list of all #ThunarVfsGroup<!---->s in the system
+ * that are known to the @manager.
+ *
+ * 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 all groups known to the @manager.
+ **/
+GList*
+thunar_vfs_user_manager_get_all_groups (ThunarVfsUserManager *manager)
+{
+  ThunarVfsGroup *group;
+  struct group   *grp;
+  GList          *groups = NULL;
+
+  g_return_val_if_fail (THUNAR_VFS_IS_USER_MANAGER (manager), NULL);
+
+  /* iterate through all groups in the system */
+  for (;;)
+    {
+      /* lookup the next group */
+      grp = getgrent ();
+      if (G_UNLIKELY (grp == NULL))
+        break;
+
+      /* lookup our version of the group */
+      group = thunar_vfs_user_manager_get_group_by_id (manager, grp->gr_gid);
+      if (G_LIKELY (group != NULL))
+        groups = g_list_append (groups, group);
+    }
+
+  return groups;
+}
+
+
+
 #define __THUNAR_VFS_USER_C__
 #include <thunar-vfs/thunar-vfs-aliasdef.c>
index d1d6c05..c6edbdb 100644 (file)
@@ -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
@@ -80,6 +80,8 @@ ThunarVfsGroup       *thunar_vfs_user_manager_get_group_by_id (ThunarVfsUserMana
 ThunarVfsUser        *thunar_vfs_user_manager_get_user_by_id  (ThunarVfsUserManager *manager,
                                                                ThunarVfsUserId       id);
 
+GList                *thunar_vfs_user_manager_get_all_groups  (ThunarVfsUserManager *manager) G_GNUC_MALLOC;
+
 G_END_DECLS;
 
 #endif /* !__THUNAR_VFS_USER_H__ */
index b0cb718..9feea55 100644 (file)
@@ -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
@@ -76,6 +76,8 @@ 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
@@ -267,6 +269,7 @@ thunar_vfs_user_manager_get_type
 thunar_vfs_user_manager_get_default
 thunar_vfs_user_manager_get_group_by_id
 thunar_vfs_user_manager_get_user_by_id
+thunar_vfs_user_manager_get_all_groups G_GNUC_MALLOC
 #endif
 #endif
 
index b51dff6..a07a258 100644 (file)
@@ -24,8 +24,12 @@ 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                                          \
@@ -87,6 +91,10 @@ Thunar_SOURCES =                                                     \
        thunar-open-with-action.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-preferences-dialog.c                                     \
        thunar-preferences-dialog.h                                     \
        thunar-preferences.c                                            \
@@ -102,6 +110,8 @@ Thunar_SOURCES =                                                    \
        thunar-standard-view-ui.h                                       \
        thunar-statusbar.c                                              \
        thunar-statusbar.h                                              \
+       thunar-stock.c                                                  \
+       thunar-stock.h                                                  \
        thunar-text-renderer.c                                          \
        thunar-text-renderer.h                                          \
        thunar-thumbnail-frame.c                                        \
index 0aa8fa8..93e5517 100644 (file)
@@ -1,6 +1,6 @@
 /* $Id$ */
 /*-
- * Copyright (c) 2005 os-cillation e.K.
+ * Copyright (c) 2005-2006 os-cillation e.K.
  *
  * Written by Benedikt Meurer <benny@xfce.org>.
  *
@@ -29,6 +29,7 @@
 #endif
 
 #include <thunar/thunar-application.h>
+#include <thunar/thunar-stock.h>
 
 
 
@@ -63,6 +64,9 @@ main (int argc, char **argv)
   /* initialize the ThunarVFS library */
   thunar_vfs_init ();
 
+  /* initialize the thunar stock items/icons */
+  thunar_stock_init ();
+
   /* acquire a reference on the global application */
   application = thunar_application_get ();
 
diff --git a/thunar/thunar-advanced-permissions-dialog.c b/thunar/thunar-advanced-permissions-dialog.c
new file mode 100644 (file)
index 0000000..8be9c7e
--- /dev/null
@@ -0,0 +1,478 @@
+/* $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
new file mode 100644 (file)
index 0000000..8372e10
--- /dev/null
@@ -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_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
new file mode 100644 (file)
index 0000000..a0c52c8
--- /dev/null
@@ -0,0 +1,531 @@
+/* $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
new file mode 100644 (file)
index 0000000..ec6fb80
--- /dev/null
@@ -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_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__ */
index 5c1e0df..106a3ec 100644 (file)
@@ -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
 #include <config.h>
 #endif
 
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
 #endif
@@ -33,6 +37,9 @@
 #ifdef HAVE_TIME_H
 #include <time.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 #include <thunar/thunar-file.h>
 
@@ -107,6 +114,7 @@ static void               thunar_file_watch_free               (gpointer
 
 static ThunarVfsUserManager *user_manager;
 static ThunarVfsMonitor     *monitor;
+static ThunarVfsUserId       effective_user_id;
 static ThunarMetafile       *metafile;
 static GObjectClass         *thunar_file_parent_class;
 static GHashTable           *file_cache;
@@ -212,6 +220,9 @@ thunar_file_class_init (ThunarFileClass *klass)
   /* grab a reference on the user manager */
   user_manager = thunar_vfs_user_manager_get_default ();
 
+  /* determine the effective user id of the process */
+  effective_user_id = geteuid ();
+
   gobject_class = G_OBJECT_CLASS (klass);
   gobject_class->dispose = thunar_file_dispose;
   gobject_class->finalize = thunar_file_finalize;
@@ -526,7 +537,9 @@ thunar_file_denies_access_permission (const ThunarFile *file,
   if (G_UNLIKELY (user == NULL))
     return FALSE;
 
-  // FIXME: We should add a superuser check here!
+  /* root is allowed to do everything */
+  if (G_UNLIKELY (effective_user_id == 0))
+    return FALSE;
 
   if (thunar_vfs_user_is_me (user))
     {
@@ -769,6 +782,71 @@ 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.
  * @screen    : a #GdkScreen.
@@ -1210,6 +1288,48 @@ 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.
+ *
+ * Determines whether the owner of the current process is allowed
+ * to changed the file mode of @file.
+ *
+ * Return value: %TRUE if the mode of @file can be changed.
+ **/
+gboolean
+thunar_file_is_chmodable (const ThunarFile *file)
+{
+  g_return_val_if_fail (THUNAR_IS_FILE (file), FALSE);
+
+  /* we can only change the mode if we the euid is
+   *   a) equal to the file owner id
+   * or
+   *   b) the super-user id.
+   */
+  return (effective_user_id == 0 || effective_user_id == file->info->uid);
+}
+
+
+
+/**
  * thunar_file_is_executable:
  * @file : a #ThunarFile instance.
  *
index 3d8912f..e2e218d 100644 (file)
@@ -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
@@ -119,6 +119,14 @@ 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,
@@ -155,6 +163,8 @@ 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);
 gboolean                         thunar_file_is_renameable        (const ThunarFile       *file);
diff --git a/thunar/thunar-permissions-model.c b/thunar/thunar-permissions-model.c
new file mode 100644 (file)
index 0000000..a5f9c91
--- /dev/null
@@ -0,0 +1,968 @@
+/* $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
new file mode 100644 (file)
index 0000000..1d1628b
--- /dev/null
@@ -0,0 +1,73 @@
+/* $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
new file mode 100644 (file)
index 0000000..77d0005
--- /dev/null
@@ -0,0 +1,570 @@
+/* $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-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_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
new file mode 100644 (file)
index 0000000..1703299
--- /dev/null
@@ -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_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__ */
index de98909..7202619 100644 (file)
@@ -33,6 +33,7 @@
 #include <thunar/thunar-dialogs.h>
 #include <thunar/thunar-emblem-chooser.h>
 #include <thunar/thunar-icon-factory.h>
+#include <thunar/thunar-permissions-view.h>
 #include <thunar/thunar-properties-dialog.h>
 
 
@@ -204,8 +205,10 @@ 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);
 
   dialog->notebook = gtk_notebook_new ();
+  gtk_container_set_border_width (GTK_CONTAINER (dialog->notebook), 6);
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), dialog->notebook, TRUE, TRUE, 0);
   gtk_widget_show (dialog->notebook);
 
@@ -373,6 +376,17 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog)
   gtk_widget_show (label);
 
 
+  /*
+     Permissions chooser
+   */
+  label = gtk_label_new (_("Permissions"));
+  chooser = thunar_permissions_view_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);
+  gtk_widget_show (label);
+
+
   /* release the shared pango attribute list */
   pango_attr_list_unref (attr_list_bold);
 }
diff --git a/thunar/thunar-stock.c b/thunar/thunar-stock.c
new file mode 100644 (file)
index 0000000..9a52a6b
--- /dev/null
@@ -0,0 +1,94 @@
+/* $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
+
+#ifdef HAVE_MEMORY_H
+#include <memory.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include <gtk/gtk.h>
+
+#include <thunar/thunar-stock.h>
+
+
+
+static const gchar *thunar_stock_icons[] =
+{
+  THUNAR_STOCK_PERMISSIONS_GROUP,
+  THUNAR_STOCK_PERMISSIONS_OTHER,
+  THUNAR_STOCK_PERMISSIONS_USER,
+};
+
+
+
+/**
+ * thunar_stock_init:
+ *
+ * Initializes the stock icons used by the Thunar
+ * file manager.
+ **/
+void
+thunar_stock_init (void)
+{
+  GtkIconFactory *icon_factory;
+  GtkIconSource  *icon_source;
+  GtkIconSet     *icon_set;
+  gchar           icon_name[128];
+  guint           n;
+
+  /* allocate a new icon factory for the thunar stock icons */
+  icon_factory = gtk_icon_factory_new ();
+
+  /* all icon names start with "stock_" */
+  memcpy (icon_name, "stock_", sizeof ("stock_") - 1);
+
+  /* allocate an icon source */
+  icon_source = gtk_icon_source_new ();
+
+  /* register our stock icons */
+  for (n = 0; n < G_N_ELEMENTS (thunar_stock_icons); ++n)
+    {
+      /* determine the icon name */
+      strcpy (icon_name + (sizeof ("stock_") - 1), thunar_stock_icons[n]);
+      gtk_icon_source_set_icon_name (icon_source, icon_name);
+
+      /* setup the icon set */
+      icon_set = gtk_icon_set_new ();
+      gtk_icon_set_add_source (icon_set, icon_source);
+      gtk_icon_factory_add (icon_factory, thunar_stock_icons[n], icon_set);
+      gtk_icon_set_unref (icon_set);
+    }
+
+  /* register our icon factory as default */
+  gtk_icon_factory_add_default (icon_factory);
+
+  /* cleanup */
+  g_object_unref (G_OBJECT (icon_factory));
+  gtk_icon_source_free (icon_source);
+}
+
+
+
+
diff --git a/thunar/thunar-stock.h b/thunar/thunar-stock.h
new file mode 100644 (file)
index 0000000..6387bd9
--- /dev/null
@@ -0,0 +1,34 @@
+/* $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_STOCK_H__
+#define __THUNAR_STOCK_H__
+
+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"
+
+void thunar_stock_init (void) G_GNUC_INTERNAL;
+
+G_END_DECLS;
+
+#endif /* !__THUNAR_STOCK_H__ */