summaryrefslogtreecommitdiffstats
path: root/main/nautilus/009-default-directories.patch
blob: 336d3d0ae90d6de64f5eeea1f4f3a54c9cca2f72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

++ nautilus-2.32.2.1/debian/patches/02_dont_set_default.patch

# Upstream: https://bugzilla.gnome.org/show_bug.cgi?id=637264
# Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/662194
# Description: hide checkbox to remember selection when opening folders
diff --git a/libnautilus-private/nautilus-open-with-dialog.c b/libnautilus-private/nautilus-open-with-dialog.c
index 357e20c..300a92c 100644
--- a/libnautilus-private/nautilus-open-with-dialog.c
+++ b/libnautilus-private/nautilus-open-with-dialog.c
@@ -864,7 +864,7 @@ nautilus_open_with_dialog_init (NautilusOpenWithDialog *dialog)
 
 	/* Add remember this application checkbox - only visible in open mode */
 	dialog->details->checkbox = gtk_check_button_new ();
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->details->checkbox), TRUE);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->details->checkbox), FALSE);
 	gtk_button_set_use_underline (GTK_BUTTON (dialog->details->checkbox), TRUE);
 	gtk_widget_show (GTK_WIDGET (dialog->details->checkbox));
 	gtk_box_pack_start (GTK_BOX (vbox), dialog->details->checkbox, FALSE, FALSE, 0);
@@ -1031,6 +1031,12 @@ set_uri_and_type (NautilusOpenWithDialog *dialog,
 		gtk_label_set_text_with_mnemonic (GTK_LABEL (dialog->details->open_label),
 						  _("_Add"));
 		gtk_window_set_title (GTK_WINDOW (dialog), _("Add Application"));
+	} else {
+		if (g_str_equal (mime_type, "inode/directory")) {
+			gtk_widget_hide (dialog->details->checkbox);
+		} else {
+			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->details->checkbox), TRUE);
+		}
 	}
 
 	gtk_label_set_markup (GTK_LABEL (dialog->details->label), label);