[Xfce4-commits] Fix typo in German translation
Updating branch refs/heads/master to 750822b39022f850c8618d7c0fde5636f7276a0b (commit) from 286e4a3568aff4f5775d7e0f6c9c1bcb4a6b7b02 (commit) commit 750822b39022f850c8618d7c0fde5636f7276a0b Author: Guido Berhoerster Date: Thu Oct 4 08:47:38 2012 +0200 Fix typo in German translation po/de.po |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/po/de.po b/po/de.po index 1969a80..ca70c7b 100644 --- a/po/de.po +++ b/po/de.po @@ -115,7 +115,7 @@ msgstr "Version anzeigen und Programm beenden" #: ../xfce4-mixer/main.c:130 #, c-format msgid "xfce4-mixer: Failed to initialize xfconf: %s\n" -msgstr "xfce4-mixer: Konnte xfconf nicht initialisieren: %s" +msgstr "xfce4-mixer: Konnte xfconf nicht initialisieren: %s\n" #: ../xfce4-mixer/xfce-mixer-container.c:218 msgid "_Playback" ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Update Indonesian (id) translation
Updating branch refs/heads/master to 286e4a3568aff4f5775d7e0f6c9c1bcb4a6b7b02 (commit) from 2815cda6cf075e2871a89e33d0e067bcb78f873d (commit) commit 286e4a3568aff4f5775d7e0f6c9c1bcb4a6b7b02 Author: Guido Berhoerster Date: Wed Oct 3 23:24:44 2012 +0200 Update Indonesian (id) translation po/id.po | 164 +++-- 1 files changed, 41 insertions(+), 123 deletions(-) diff --git a/po/id.po b/po/id.po index 9259730..f3e5295 100644 --- a/po/id.po +++ b/po/id.po @@ -2,16 +2,17 @@ # Copyright (C) 2008 THE xfce4-mixer'S COPYRIGHT HOLDER # This file is distributed under the same license as the xfce package. # Andhika Padmawan , 2008. +# Guido Berhoerster , 2012. # msgid "" msgstr "" "Project-Id-Version: xfce4-mixer\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-09-29 13:30+\n" -"PO-Revision-Date: 2009-01-27 22:24+0700\n" -"Last-Translator: Andhika Padmawan \n" +"PO-Revision-Date: 2012-10-03 21:22+0200\n" +"Last-Translator: Guido Berhoerster \n" "Language-Team: \n" -"Language: \n" +"Language: id\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -19,24 +20,23 @@ msgstr "" #. Add menu item for muting #: ../panel-plugin/xfce-mixer-plugin.c:306 msgid "_Mute" -msgstr "" +msgstr "_Bisu" #: ../panel-plugin/xfce-mixer-plugin.c:314 msgid "_Run Audio Mixer" -msgstr "" +msgstr "_Jalankan Audio Mixer" #: ../panel-plugin/xfce-mixer-plugin.c:581 ../xfce4-mixer/main.c:148 msgid "" "GStreamer was unable to detect any sound devices. Some sound system specific " "GStreamer packages may be missing. It may also be a permissions problem." msgstr "" -"GStreamer tak dapat mendeteksi kartu suara apapun. Beberapa sistem suara " -"spesifik GStreamer mungkin hilang. Atau mungkin juga masalah hak akses." +"GStreamer tak dapat mendeteksi kartu suara apapun. Beberapa paket GStreamer " +"untuk sistem suara tak diinstall. Atau mungkin juga masalah hak akses." #: ../panel-plugin/xfce-mixer-plugin.c:931 -#, fuzzy msgid "No command defined" -msgstr "Tak ada perintah klik-kiri yang ditentukan" +msgstr "Tak ada perintah yang ditentukan" #. Generate error message and insert the current command #: ../panel-plugin/xfce-mixer-plugin.c:939 @@ -47,38 +47,34 @@ msgid "" "providing the full path to the command." msgstr "" "Tak dapat mengeksekusi perintah \"%s\". Pastikan bahwa lokasi perintah ikut " -"disertakan dalam variabel lingkungan ALAMAT atau anda menyediakan alamat " -"penuh ke perintah." +"disertakan dalam variabel lingkungan PATH atau Anda menyediakan lokasi " +"lengkap ke perintah." #: ../panel-plugin/xfce-plugin-dialog.c:150 -#, fuzzy msgid "Audio Mixer Plugin" -msgstr "Plugin Mixer" +msgstr "Plugin Audio Mixer" #: ../panel-plugin/xfce-plugin-dialog.c:152 -#, fuzzy msgid "Configure the sound card and mixer track" -msgstr "Atur kartu suara anda dan kendalikan volume jalur terpilih" +msgstr "Atur kartu suara dan jalur mixer" #: ../panel-plugin/xfce-plugin-dialog.c:165 #: ../xfce4-mixer/xfce-mixer-window.c:185 -#, fuzzy msgid "Sound _card:" -msgstr "Kartu suara:" +msgstr "Kartu _suara:" #: ../panel-plugin/xfce-plugin-dialog.c:174 -#, fuzzy msgid "Mixer _track:" -msgstr "Jalur mixer" +msgstr "_Jalur mixer:" #: ../panel-plugin/xfce-volume-button.c:854 msgid "No valid device and/or element." -msgstr "" +msgstr "Tak ada device dan/atau jalur." #: ../panel-plugin/xfce-volume-button.c:859 #, c-format msgid "%s: muted" -msgstr "" +msgstr "%s: bisu" #: ../panel-plugin/xfce-volume-button.c:861 #, c-format @@ -91,19 +87,18 @@ msgstr "%s: %i%%" #: ../xfce4-mixer/xfce-mixer-window.c:413 #: ../xfce4-mixer/xfce-mixer-window.c:427 #: ../xfce4-mixer/xfce4-mixer.desktop.in.h:1 -#, fuzzy msgid "Audio Mixer" -msgstr "Mixer" +msgstr "Audio Mixer" #: ../panel-plugin/mixer.desktop.in.h:2 #: ../xfce4-mixer/xfce4-mixer.desktop.in.h:2 msgid "Adjust volume levels" -msgstr "" +msgstr "Sesuaikan tingkat volume" #: ../libxfce4mixer/libxfce4mixer.c:422 #, c-format msgid "Unknown Volume Control %d" -msgstr "Kontrol Volume %d Tak Dikenal" +msgstr "Kendali Volume %d Tak Dikenal" #: ../xfce4-mixer/main.c:86 msgid "Enable debugging output" @@ -111,75 +106,73 @@ msgstr "" #: ../xfce4-mixer/main.c:87 msgid "Show version and exit" -msgstr "" +msgstr "Tampilkan versi dan keluar" #: ../xfce4-mixer/main.c:130 -#, fuzzy, c-format +#, c-format msgid "xfce4-mixer: Failed to initialize xfconf: %s\n" -msgstr "Gagal menginisialisasi xfconf: %s" +msgstr "xfce4-mixer: Gagal menginisialisasi xfconf: %s\n" #: ../xfce4-mixer/xfce-mixer-container.c:218 -#, fuzzy msgid "_Playback" -msgstr "Putar kembali" +msgstr "_Playback" #: ../xfce4-mixer/xfce-mixer-container.c:218 -#, fuzzy msgid "C_apture" -msgstr "Tangkap" +msgstr "_Rekam" #: ../xfce4-mixer/xfce-mixer-container.c:218 -#, fuzzy msgid "S_witches" -msgstr "Tukar" +msgstr "_Tombol-tombol" #: ../xfce4
[Xfce4-commits] Update German (de) translation
Updating branch refs/heads/master to 2815cda6cf075e2871a89e33d0e067bcb78f873d (commit) from fd37934307aff01b5704c7deba6aabf269831689 (commit) commit 2815cda6cf075e2871a89e33d0e067bcb78f873d Author: Guido Berhoerster Date: Wed Oct 3 10:19:10 2012 +0200 Update German (de) translation po/de.po | 140 ++--- 1 files changed, 32 insertions(+), 108 deletions(-) diff --git a/po/de.po b/po/de.po index b70ecce..1969a80 100644 --- a/po/de.po +++ b/po/de.po @@ -5,14 +5,15 @@ # Jannis Pohlmann , 2008. # Fabian Nowak , 2008 # Enrico Tröger , 2009. +# Guido Berhoerster , 2012. # msgid "" msgstr "" -"Project-Id-Version: xfce4-mixer 4.6.0\n" +"Project-Id-Version: xfce4-mixer 4.10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-09-29 13:30+\n" -"PO-Revision-Date: 2009-01-31 16:03+0100\n" -"Last-Translator: Enrico Tröger \n" +"PO-Revision-Date: 2012-10-03 07:28+0200\n" +"Last-Translator: Guido Berhoerster \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" @@ -23,11 +24,11 @@ msgstr "" #. Add menu item for muting #: ../panel-plugin/xfce-mixer-plugin.c:306 msgid "_Mute" -msgstr "" +msgstr "_Stummschalten" #: ../panel-plugin/xfce-mixer-plugin.c:314 msgid "_Run Audio Mixer" -msgstr "" +msgstr "_Mixer öffnen" #: ../panel-plugin/xfce-mixer-plugin.c:581 ../xfce4-mixer/main.c:148 msgid "" @@ -39,9 +40,8 @@ msgstr "" "Problem mit den Benutzerrechten sein." #: ../panel-plugin/xfce-mixer-plugin.c:931 -#, fuzzy msgid "No command defined" -msgstr "Kein Befehl für den Linksklick definiert" +msgstr "Kein Befehl definiert" #. Generate error message and insert the current command #: ../panel-plugin/xfce-mixer-plugin.c:939 @@ -55,36 +55,30 @@ msgstr "" "existiert und der angegebene Pfad korrekt ist." #: ../panel-plugin/xfce-plugin-dialog.c:150 -#, fuzzy msgid "Audio Mixer Plugin" -msgstr "Lautstärkeregelung" +msgstr "Lautstärkeregler-Plugin" #: ../panel-plugin/xfce-plugin-dialog.c:152 -#, fuzzy msgid "Configure the sound card and mixer track" -msgstr "" -"Konfigurieren Sie Ihre Soundkarte(n) und regeln Sie die Lautstärke " -"ausgewählter Elemente" +msgstr "Konfigurieren Sie die Soundkarte und das Element" #: ../panel-plugin/xfce-plugin-dialog.c:165 #: ../xfce4-mixer/xfce-mixer-window.c:185 -#, fuzzy msgid "Sound _card:" -msgstr "Soundkarte:" +msgstr "_Soundkarte:" #: ../panel-plugin/xfce-plugin-dialog.c:174 -#, fuzzy msgid "Mixer _track:" -msgstr "Element" +msgstr "Element:" #: ../panel-plugin/xfce-volume-button.c:854 msgid "No valid device and/or element." -msgstr "" +msgstr "Kein gültiges Gerät und/oder Element." #: ../panel-plugin/xfce-volume-button.c:859 #, c-format msgid "%s: muted" -msgstr "" +msgstr "%s: stumm" #: ../panel-plugin/xfce-volume-button.c:861 #, c-format @@ -97,14 +91,13 @@ msgstr "%s: %i%%" #: ../xfce4-mixer/xfce-mixer-window.c:413 #: ../xfce4-mixer/xfce-mixer-window.c:427 #: ../xfce4-mixer/xfce4-mixer.desktop.in.h:1 -#, fuzzy msgid "Audio Mixer" -msgstr "Lautstärkeregelung" +msgstr "Lautstärkeregler" #: ../panel-plugin/mixer.desktop.in.h:2 #: ../xfce4-mixer/xfce4-mixer.desktop.in.h:2 msgid "Adjust volume levels" -msgstr "" +msgstr "Lautstärke einstellen" #: ../libxfce4mixer/libxfce4mixer.c:422 #, c-format @@ -113,36 +106,32 @@ msgstr "Unbekannter Lautstärkeregler %d" #: ../xfce4-mixer/main.c:86 msgid "Enable debugging output" -msgstr "" +msgstr "Ausgabe zur Fehlerdiagnose aktivieren" #: ../xfce4-mixer/main.c:87 msgid "Show version and exit" -msgstr "" +msgstr "Version anzeigen und Programm beenden" #: ../xfce4-mixer/main.c:130 -#, fuzzy, c-format +#, c-format msgid "xfce4-mixer: Failed to initialize xfconf: %s\n" -msgstr "Konnte xfconf nicht initialisieren. Grund: %s" +msgstr "xfce4-mixer: Konnte xfconf nicht initialisieren: %s" #: ../xfce4-mixer/xfce-mixer-container.c:218 -#, fuzzy msgid "_Playback" -msgstr "Wiedergabe" +msgstr "_Wiedergabe" #: ../xfce4-mixer/xfce-mixer-container.c:218 -#, fuzzy msgid "C_apture" -msgstr "Aufnahme" +msgstr "_Aufnahme" #: ../xfce4-mixer/xfce-mixer-container.c:218 -#, fuzzy msgid "S_witches" -msgstr "Schalter" +msgstr "_Schalter" #: ../xfce4-mixer/xfce-mixer-container.c:218 -#, fuzzy msgid "_Options" -msgstr "Optionen" +msgstr "_Optionen" #: ../xfce4-mixer/xfce-mixer-container.c:390 msgid "No controls visible" @@ -150,13 +139,15 @@ msgstr "Keine Bedienelemente sichtbar" #: ../xfce4-mixer/xfce-mixer-container.c:401 msgid "No controls visible" -msgstr "" +msgstr "Keine Bedienelemente sichtbar" #: ../xfce4-mixer/xfce-mixer-container.c:409 msgid "" "In order to toggle the visibility of mixer controls, open the \"Select " "Controls\" dialog." msgstr "" +"Um bestimmte Elementen anzuzeigen oder zu verbergen, öffnen Sie den Dialog " +"»Elemente auswählen«." #: ../xfce4-mixer/xfce-mixer-controls-dialog.c:118 msgid "Select Controls" @@ -164,28 +155,28 @@ msgstr "El
[Xfce4-commits] Add some attributes on common used functions.
Updating branch refs/heads/master to 2a3729f01a987562d142c8ca99623f60d83d3f17 (commit) from 956b0f8960c39e939c6915edab5b425c07dc815e (commit) commit 2a3729f01a987562d142c8ca99623f60d83d3f17 Author: Nick Schermer Date: Wed Oct 3 22:02:01 2012 +0200 Add some attributes on common used functions. thunar/thunar-file.h | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/thunar/thunar-file.h b/thunar/thunar-file.h index 76db5d4..9bfce8f 100644 --- a/thunar/thunar-file.h +++ b/thunar/thunar-file.h @@ -107,9 +107,9 @@ ThunarFile *thunar_file_get (GFile *file ThunarFile *thunar_file_get_for_uri (const gchar *uri, GError **error); -GFile*thunar_file_get_file (const ThunarFile *file); +GFile*thunar_file_get_file (const ThunarFile *file) G_GNUC_PURE; -GFileInfo*thunar_file_get_info (const ThunarFile *file); +GFileInfo*thunar_file_get_info (const ThunarFile *file) G_GNUC_PURE; ThunarFile *thunar_file_get_parent (const ThunarFile *file, GError **error); @@ -137,7 +137,7 @@ GdkDragAction thunar_file_accepts_drop (ThunarFile *file GdkDragAction *suggested_action_return); guint64 thunar_file_get_date (const ThunarFile *file, -ThunarFileDateType date_type); +ThunarFileDateType date_type) G_GNUC_PURE; gchar*thunar_file_get_date_string (const ThunarFile *file, ThunarFileDateType date_type, @@ -152,7 +152,7 @@ ThunarUser *thunar_file_get_user (const ThunarFile *file const gchar *thunar_file_get_content_type (const ThunarFile *file); const gchar *thunar_file_get_symlink_target (const ThunarFile *file); -const gchar *thunar_file_get_basename (const ThunarFile *file); +const gchar *thunar_file_get_basename (const ThunarFile *file) G_GNUC_CONST; gboolean thunar_file_is_symlink (const ThunarFile *file); guint64 thunar_file_get_size (const ThunarFile *file); GAppInfo *thunar_file_get_default_handler (const ThunarFile *file); @@ -179,7 +179,7 @@ gboolean thunar_file_is_regular (const ThunarFile *file gboolean thunar_file_is_trashed (const ThunarFile *file); gboolean thunar_file_is_desktop_file (const ThunarFile *file, gboolean *is_secure); -const gchar *thunar_file_get_display_name (const ThunarFile *file); +const gchar *thunar_file_get_display_name (const ThunarFile *file) G_GNUC_CONST; gchar*thunar_file_get_deletion_date(const ThunarFile *file, ThunarDateStyle date_style) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Make ThunarFile structure private.
Updating branch refs/heads/master to 956b0f8960c39e939c6915edab5b425c07dc815e (commit) from 2172fa840c7606cd18e6758456e8dc40e5845adf (commit) commit 956b0f8960c39e939c6915edab5b425c07dc815e Author: Nick Schermer Date: Wed Oct 3 21:54:47 2012 +0200 Make ThunarFile structure private. Not used, only through macros. This gives better type checking esp with debugging enabled. thunar/thunar-file.c | 91 +- thunar/thunar-file.h | 72 --- 2 files changed, 98 insertions(+), 65 deletions(-) diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index 2ceff15..dfd2977 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -137,6 +137,32 @@ static guint file_signals[LAST_SIGNAL]; +struct _ThunarFileClass +{ + GObjectClass __parent__; + + /* signals */ + void (*destroy) (ThunarFile *file); +}; + +struct _ThunarFile +{ + GObject__parent__; + + /*< private >*/ + GFileMonitor *monitor; + GFileInfo *info; + GFile *gfile; + gchar *custom_icon_name; + gchar *display_name; + gchar *basename; + gchar *thumbnail_path; + guint flags; + guint is_mounted : 1; +}; + + + G_DEFINE_TYPE_WITH_CODE (ThunarFile, thunar_file, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (THUNARX_TYPE_FILE_INFO, thunar_file_info_init)) @@ -327,7 +353,7 @@ thunar_file_info_get_name (ThunarxFileInfo *file_info) static gchar* thunar_file_info_get_uri (ThunarxFileInfo *file_info) { - return thunar_file_dup_uri (file_info); + return thunar_file_dup_uri (THUNAR_FILE (file_info)); } @@ -910,6 +936,51 @@ thunar_file_load (ThunarFile *file, } } + +/** + * thunar_file_get_file: + * @file : a #ThunarFile instance. + * + * Returns the #GFile that refers to the location of @file. + * + * The returned #GFile is owned by @file and must not be released + * with g_object_unref(). + * + * Return value: the #GFile corresponding to @file. + **/ +GFile * +thunar_file_get_file (const ThunarFile *file) +{ + _thunar_return_val_if_fail (THUNAR_IS_FILE (file), NULL); + _thunar_return_val_if_fail (G_IS_FILE (file->gfile), NULL); + return file->gfile; +} + + + +/** + * thunar_file_get_info: + * @file : a #ThunarFile instance. + * + * Returns the #GFileInfo for @file. + * + * Note, that there's no reference taken for the caller on the + * returned #GFileInfo, so if you need the object for a longer + * perioud, you'll need to take a reference yourself using the + * g_object_ref() method. + * + * Return value: the #GFileInfo for @file or %NULL. + **/ +GFileInfo * +thunar_file_get_info (const ThunarFile *file) +{ + _thunar_return_val_if_fail (THUNAR_IS_FILE (file), NULL); + _thunar_return_val_if_fail (file->info == NULL || G_IS_FILE_INFO (file->info), NULL); + return file->info; +} + + + /** * thunar_file_get_parent: * @file : a #ThunarFile instance. @@ -2845,6 +2916,24 @@ thunar_file_get_thumbnail_path (ThunarFile *file) /** + * thunar_file_get_thumb_state: + * @file : a #ThunarFile. + * + * Returns the current #ThunarFileThumbState for @file. This + * method is intended to be used by #ThunarIconFactory only. + * + * Return value: the #ThunarFileThumbState for @file. + **/ +ThunarFileThumbState +thunar_file_get_thumb_state (const ThunarFile *file) +{ + _thunar_return_val_if_fail (THUNAR_IS_FILE (file), THUNAR_FILE_THUMB_STATE_UNKNOWN); + return (file->flags & THUNAR_FILE_THUMB_STATE_MASK); +} + + + +/** * thunar_file_set_thumb_state: * @file: a #ThunarFile. * @thumb_state : the new #ThunarFileThumbState. diff --git a/thunar/thunar-file.h b/thunar/thunar-file.h index 0c8085f..76db5d4 100644 --- a/thunar/thunar-file.h +++ b/thunar/thunar-file.h @@ -98,29 +98,7 @@ typedef enum /*< flags >*/ #define THUNAR_FILE_EMBLEM_NAME_CANT_WRITE "emblem-nowrite" #define THUNAR_FILE_EMBLEM_NAME_DESKTOP "emblem-desktop" -struct _ThunarFileClass -{ - GObjectClass __parent__; - - /* signals */ - void (*destroy) (ThunarFile *file); -}; -struct _ThunarFile -{ - GObject__parent__; - - /*< private >*/ - GFileMonitor *monitor; - GFileInfo *info; - GFile *gfile; - gchar *custom_icon_name; - gchar *display_name; - gchar *basename; - gchar *thumbnail_path; - guint flags; - guint is_mounted : 1; -}; GType thunar_file_get_type (void) G_GNUC_CONST; @@ -129,6 +107,10 @@ ThunarFile *thunar_file_get (GFile *file ThunarFile *thunar_file_get_for_uri (const gchar *uri, GError **error); +GFile*thunar_file_get_file (const ThunarFile *file); + +GFileInfo*thunar_file_get_info (const ThunarFile *file); + ThunarFile
[Xfce4-commits] Only change file mode if old and new differ.
Updating branch refs/heads/master to 2172fa840c7606cd18e6758456e8dc40e5845adf (commit) from 1ec8ff89ec5a3314fcd6a57f1475654ddecc9875 (commit) commit 2172fa840c7606cd18e6758456e8dc40e5845adf Author: Nick Schermer Date: Wed Oct 3 21:42:09 2012 +0200 Only change file mode if old and new differ. thunar/thunar-io-jobs.c | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/thunar/thunar-io-jobs.c b/thunar/thunar-io-jobs.c index 6db1b8b..4f2d540 100644 --- a/thunar/thunar-io-jobs.c +++ b/thunar/thunar-io-jobs.c @@ -1093,12 +1093,15 @@ retry_chown: * information) into account */ new_mode = ((old_mode & ~mask) | mode) & 0; - /* try to change the file mode */ - g_file_set_attribute_uint32 (lp->data, - G_FILE_ATTRIBUTE_UNIX_MODE, new_mode, - G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, - exo_job_get_cancellable (EXO_JOB (job)), - &err); + if (old_mode != new_mode) +{ + /* try to change the file mode */ + g_file_set_attribute_uint32 (lp->data, + G_FILE_ATTRIBUTE_UNIX_MODE, new_mode, + G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, + exo_job_get_cancellable (EXO_JOB (job)), + &err); +} /* check if there was a recoverable error */ if (err != NULL && !exo_job_is_cancelled (EXO_JOB (job))) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Add secure desktop file launching (bug #5012).
Updating branch refs/heads/master to 1ec8ff89ec5a3314fcd6a57f1475654ddecc9875 (commit) from 5c2bf770b6ad5a4d7259a60e692483d4a1ea087d (commit) commit 1ec8ff89ec5a3314fcd6a57f1475654ddecc9875 Author: Nick Schermer Date: Wed Oct 3 21:38:32 2012 +0200 Add secure desktop file launching (bug #5012). Only allow direct execution of desktop files in an XDG directory and if they are executable. thunar/thunar-chooser-dialog.c |1 + thunar/thunar-dialogs.c | 102 thunar/thunar-dialogs.h | 45 thunar/thunar-dnd.c |2 +- thunar/thunar-file.c| 217 -- thunar/thunar-file.h|5 +- thunar/thunar-launcher.c| 12 +-- thunar/thunar-permissions-chooser.c |1 + thunar/thunar-properties-dialog.c |2 +- 9 files changed, 263 insertions(+), 124 deletions(-) diff --git a/thunar/thunar-chooser-dialog.c b/thunar/thunar-chooser-dialog.c index 7052d4f..1c778f2 100644 --- a/thunar/thunar-chooser-dialog.c +++ b/thunar/thunar-chooser-dialog.c @@ -483,6 +483,7 @@ thunar_chooser_dialog_response (GtkDialog *widget, /* create launch context */ context = gdk_app_launch_context_new (); gdk_app_launch_context_set_screen (context, gtk_widget_get_screen (GTK_WIDGET (dialog))); + gdk_app_launch_context_set_timestamp (context, gtk_get_current_event_time ()); /* create fake file list */ list.data = thunar_file_get_file (dialog->file); list.next = list.prev = NULL; diff --git a/thunar/thunar-dialogs.c b/thunar/thunar-dialogs.c index 0021d2d..296bb0c 100644 --- a/thunar/thunar-dialogs.c +++ b/thunar/thunar-dialogs.c @@ -731,3 +731,105 @@ thunar_dialogs_show_job_error (GtkWindow *parent, g_string_free (primary, TRUE); } + + +gboolean +thunar_dialogs_show_insecure_program (gpointer parent, + const gchar *primary, + ThunarFile *file, + const gchar *command) +{ + GdkScreen *screen; + GtkWindow *window; + gintresponse; + GtkWidget *dialog; + GString*secondary; + ThunarFileMode old_mode; + ThunarFileMode new_mode; + GFileInfo *info; + GError *err = NULL; + + _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE); + _thunar_return_val_if_fail (g_utf8_validate (command, -1, NULL), FALSE); + + /* parse the parent window and screen */ + screen = thunar_util_parse_parent (parent, &window); + + /* secondary text */ + secondary = g_string_new (NULL); + g_string_append_printf (secondary, _("The desktop file \"%s\" is in an insecure location " + "and not marked as executable. If you do not trust " + "this program, click Cancel."), + thunar_file_get_display_name (file)); + g_string_append (secondary, "\n\n"); + if (exo_str_looks_like_an_uri (command)) +g_string_append_printf (secondary, G_KEY_FILE_DESKTOP_KEY_URL"=%s", command); + else +g_string_append_printf (secondary, G_KEY_FILE_DESKTOP_KEY_EXEC"=%s", command); + + /* allocate and display the error message dialog */ + dialog = gtk_message_dialog_new (window, + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_NONE, + "%s", primary); + gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Launch Anyway"), GTK_RESPONSE_OK); + if (thunar_file_is_chmodable (file)) +gtk_dialog_add_button (GTK_DIALOG (dialog), _("Mark _Executable"), GTK_RESPONSE_APPLY); + gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL); + if (screen != NULL && window == NULL) +gtk_window_set_screen (GTK_WINDOW (dialog), screen); + gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", secondary->str); + g_string_free (secondary, TRUE); + response = gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + + /* check if we should make the file executable */ + if (response == GTK_RESPONSE_APPLY) +{ + /* try to query information about the file */ + info = g_file_query_info (thunar_file_get_file (file), +G_FILE_ATTRIBUTE_UNIX_MODE, +G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, +NULL, &err); + + if (G_LIKELY (info != NULL)) +{ + if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_UNIX_MODE)) +{ + /* determine the current mode */ + old_mode = g_file_info_get_attr
[Xfce4-commits] Fix mirror-mode in combobox
Updating branch refs/heads/bluesabre/display-settings to d8328e75cb8a86109824612b7760ac58e4405000 (commit) from 6a475140ae2519e84570f60ecfdee8f4e842b94f (commit) commit d8328e75cb8a86109824612b7760ac58e4405000 Author: ochosi Date: Wed Oct 3 15:24:17 2012 +0200 Fix mirror-mode in combobox dialogs/display-settings/main.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c index d99df8d..0640404 100644 --- a/dialogs/display-settings/main.c +++ b/dialogs/display-settings/main.c @@ -321,8 +321,8 @@ display_setting_positions_changed (GtkComboBox *combobox, case XFCE_RANDR_PLACEMENT_MIRROR: // Mirror Display -XFCE_RANDR_POS_X (xfce_randr) = selected_x; -XFCE_RANDR_POS_Y (xfce_randr) = selected_y; +XFCE_RANDR_POS_X (xfce_randr) = current_x; +XFCE_RANDR_POS_Y (xfce_randr) = current_y; break; default: ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits