nautilus r15060 - in trunk: . src/file-manager
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r15060 - in trunk: . src/file-manager
- Date: Fri, 6 Mar 2009 10:37:55 +0000 (UTC)
Author: alexl
Date: Fri Mar 6 10:37:54 2009
New Revision: 15060
URL: http://svn.gnome.org/viewvc/nautilus?rev=15060&view=rev
Log:
2009-03-06 Alexander Larsson <alexl redhat com>
Bug 569668 â Don't allow changing default app for folders
* src/file-manager/fm-properties-window.c:
Don't show "open with" tab for folders. Accidentally changing
the folder handler causes all sorts of weird issues when
e.g. opening folders from the panel.
Modified:
trunk/ChangeLog
trunk/src/file-manager/fm-properties-window.c
Modified: trunk/src/file-manager/fm-properties-window.c
==============================================================================
--- trunk/src/file-manager/fm-properties-window.c (original)
+++ trunk/src/file-manager/fm-properties-window.c Fri Mar 6 10:37:54 2009
@@ -5038,27 +5038,34 @@
should_show_open_with (FMPropertiesWindow *window)
{
NautilusFile *file;
+
+ /* Don't show open with tab for desktop special icons (trash, etc)
+ * or desktop files. We don't get the open-with menu for these anyway.
+ *
+ * Also don't show it for folders. Changing the default app for folders
+ * leads to all sort of hard to understand errors.
+ */
if (is_multi_file_window (window)) {
if (!file_list_attributes_identical (window->details->original_files,
"mime_type")) {
return FALSE;
} else {
- /* Don't show open with tab for desktop special icons (trash, etc)
- * or desktop files. We don't get the open-with menu for these anyway.
- */
GList *l;
for (l = window->details->original_files; l; l = l->next) {
- if (is_a_special_file (NAUTILUS_FILE (l->data))) {
+ file = NAUTILUS_FILE (l->data);
+ if (nautilus_file_is_directory (file) ||
+ is_a_special_file (file)) {
return FALSE;
}
}
}
} else {
file = get_original_file (window);
- if (is_a_special_file (file)) {
+ if (nautilus_file_is_directory (file) ||
+ is_a_special_file (file)) {
return FALSE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]