nautilus-autorun: show combo box with ask/ignore/folder even when no mime apps found

Having a choice is even more important when there is no default.

diff --git a/libnautilus-private/nautilus-autorun.c b/libnautilus-private/nautilus-autorun.c
--- a/libnautilus-private/nautilus-autorun.c
+++ b/libnautilus-private/nautilus-autorun.c
@@ -473,6 +473,62 @@
 					 G_TYPE_STRING,
 					 G_TYPE_INT);
 
+	if (include_ask) {
+		gtk_list_store_append (list_store, &iter);
+		pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
+						   GTK_STOCK_DIALOG_QUESTION,
+						   icon_size,
+						   0,
+						   NULL);
+		gtk_list_store_set (list_store, &iter, 
+					COLUMN_AUTORUN_PIXBUF, pixbuf, 
+					COLUMN_AUTORUN_NAME, _("Ask what to do"), 
+					COLUMN_AUTORUN_APP_INFO, NULL, 
+					COLUMN_AUTORUN_X_CONTENT_TYPE, x_content_type,
+					COLUMN_AUTORUN_ITEM_TYPE, AUTORUN_ASK,
+					-1);
+		g_object_unref (pixbuf);
+	}
+	
+	gtk_list_store_append (list_store, &iter);
+	pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
+					   GTK_STOCK_CLOSE,
+					   icon_size,
+					   0,
+					   NULL);
+	gtk_list_store_set (list_store, &iter, 
+				COLUMN_AUTORUN_PIXBUF, pixbuf, 
+				COLUMN_AUTORUN_NAME, _("Do Nothing"), 
+				COLUMN_AUTORUN_APP_INFO, NULL, 
+				COLUMN_AUTORUN_X_CONTENT_TYPE, x_content_type,
+				COLUMN_AUTORUN_ITEM_TYPE, AUTORUN_IGNORE,
+				-1);
+	g_object_unref (pixbuf);		
+
+	gtk_list_store_append (list_store, &iter);
+	pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
+					   "folder-open",
+					   icon_size,
+					   0,
+					   NULL);
+	gtk_list_store_set (list_store, &iter, 
+				COLUMN_AUTORUN_PIXBUF, pixbuf, 
+				COLUMN_AUTORUN_NAME, _("Open Folder"), 
+				COLUMN_AUTORUN_APP_INFO, NULL, 
+				COLUMN_AUTORUN_X_CONTENT_TYPE, x_content_type,
+				COLUMN_AUTORUN_ITEM_TYPE, AUTORUN_OPEN_FOLDER,
+				-1);
+	g_object_unref (pixbuf);		
+
+	gtk_list_store_append (list_store, &iter);
+	gtk_list_store_set (list_store, &iter, 
+				COLUMN_AUTORUN_PIXBUF, NULL, 
+				COLUMN_AUTORUN_NAME, NULL, 
+				COLUMN_AUTORUN_APP_INFO, NULL, 
+				COLUMN_AUTORUN_X_CONTENT_TYPE, NULL,
+				COLUMN_AUTORUN_ITEM_TYPE, AUTORUN_SEP,
+				-1);
+
 	/* no apps installed */
 	if (num_apps == 0) {
 		gtk_list_store_append (list_store, &iter);
@@ -493,62 +549,6 @@
 				    -1);
 		g_object_unref (pixbuf);
 	} else {	
-		if (include_ask) {
-			gtk_list_store_append (list_store, &iter);
-			pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
-							   GTK_STOCK_DIALOG_QUESTION,
-							   icon_size,
-							   0,
-							   NULL);
-			gtk_list_store_set (list_store, &iter, 
-					    COLUMN_AUTORUN_PIXBUF, pixbuf, 
-					    COLUMN_AUTORUN_NAME, _("Ask what to do"), 
-					    COLUMN_AUTORUN_APP_INFO, NULL, 
-					    COLUMN_AUTORUN_X_CONTENT_TYPE, x_content_type,
-					    COLUMN_AUTORUN_ITEM_TYPE, AUTORUN_ASK,
-					    -1);
-			g_object_unref (pixbuf);
-		}
-		
-		gtk_list_store_append (list_store, &iter);
-		pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
-						   GTK_STOCK_CLOSE,
-						   icon_size,
-						   0,
-						   NULL);
-		gtk_list_store_set (list_store, &iter, 
-				    COLUMN_AUTORUN_PIXBUF, pixbuf, 
-				    COLUMN_AUTORUN_NAME, _("Do Nothing"), 
-				    COLUMN_AUTORUN_APP_INFO, NULL, 
-				    COLUMN_AUTORUN_X_CONTENT_TYPE, x_content_type,
-				    COLUMN_AUTORUN_ITEM_TYPE, AUTORUN_IGNORE,
-				    -1);
-		g_object_unref (pixbuf);		
-
-		gtk_list_store_append (list_store, &iter);
-		pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
-						   "folder-open",
-						   icon_size,
-						   0,
-						   NULL);
-		gtk_list_store_set (list_store, &iter, 
-				    COLUMN_AUTORUN_PIXBUF, pixbuf, 
-				    COLUMN_AUTORUN_NAME, _("Open Folder"), 
-				    COLUMN_AUTORUN_APP_INFO, NULL, 
-				    COLUMN_AUTORUN_X_CONTENT_TYPE, x_content_type,
-				    COLUMN_AUTORUN_ITEM_TYPE, AUTORUN_OPEN_FOLDER,
-				    -1);
-		g_object_unref (pixbuf);		
-
-		gtk_list_store_append (list_store, &iter);
-		gtk_list_store_set (list_store, &iter, 
-				    COLUMN_AUTORUN_PIXBUF, NULL, 
-				    COLUMN_AUTORUN_NAME, NULL, 
-				    COLUMN_AUTORUN_APP_INFO, NULL, 
-				    COLUMN_AUTORUN_X_CONTENT_TYPE, NULL,
-				    COLUMN_AUTORUN_ITEM_TYPE, AUTORUN_SEP,
-				    -1);
-
 		for (l = app_info_list, n = include_ask ? 4 : 3; l != NULL; l = l->next, n++) {
 			GIcon *icon;
 			NautilusIconInfo *icon_info;
@@ -634,45 +634,40 @@
 					NULL);
 	gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (combo_box), combo_box_separator_func, NULL, NULL);
 
-	if (num_apps == 0) {
+	gtk_widget_set_sensitive (combo_box, TRUE);
+	if (pref_ask && include_ask) {
 		gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0);
-		gtk_widget_set_sensitive (combo_box, FALSE);
+	} else if (pref_ignore) {
+		gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), include_ask ? 1 : 0);
+	} else if (pref_open_folder) {
+		gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), include_ask ? 2 : 1);
+	} else if (set_active != -1) {
+		gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), set_active);
 	} else {
-		gtk_widget_set_sensitive (combo_box, TRUE);
-		if (pref_ask && include_ask) {
-			gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0);
-		} else if (pref_ignore) {
-			gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), include_ask ? 1 : 0);
-		} else if (pref_open_folder) {
-			gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), include_ask ? 2 : 1);
-		} else if (set_active != -1) {
-			gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), set_active);
-		} else {
-			gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), include_ask ? 1 : 0);
-		}
+		gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), include_ask ? 1 : 0);
+	}
 
-		/* See if we have an old data around */
-		data = g_object_get_data (G_OBJECT (combo_box), "nautilus_autorun_combobox_data");
-		if (data) {
-			new_data = FALSE;
-			g_free (data->x_content_type);
-		} else {
-			data = g_new0 (NautilusAutorunComboBoxData, 1);
-		}
-	
-		data->x_content_type = g_strdup (x_content_type);
-		data->include_ask = include_ask;
-		data->include_open_with_other_app = include_open_with_other_app;
-		data->update_settings = update_settings;
-		data->changed_cb = changed_cb;
-		data->user_data = user_data;
-		data->combo_box = combo_box;
-		if (data->changed_signal_id == 0) {
-			data->changed_signal_id = g_signal_connect (G_OBJECT (combo_box),
-								    "changed",
-								    G_CALLBACK (combo_box_changed),
-								    data);
-		}
+	/* See if we have an old data around */
+	data = g_object_get_data (G_OBJECT (combo_box), "nautilus_autorun_combobox_data");
+	if (data) {
+		new_data = FALSE;
+		g_free (data->x_content_type);
+	} else {
+		data = g_new0 (NautilusAutorunComboBoxData, 1);
+	}
+
+	data->x_content_type = g_strdup (x_content_type);
+	data->include_ask = include_ask;
+	data->include_open_with_other_app = include_open_with_other_app;
+	data->update_settings = update_settings;
+	data->changed_cb = changed_cb;
+	data->user_data = user_data;
+	data->combo_box = combo_box;
+	if (data->changed_signal_id == 0) {
+		data->changed_signal_id = g_signal_connect (G_OBJECT (combo_box),
+								"changed",
+								G_CALLBACK (combo_box_changed),
+								data);
 	}
 
 	if (new_data) {
