static void
nautilus_file_management_properties_dialog_setup_icon_caption_page (GtkBuilder *builder)
{
	GList *columns;
	int i;
	gboolean writable;

	writable = g_settings_is_writable (nautilus_icon_view_preferences,
					   NAUTILUS_PREFERENCES_ICON_VIEW_CAPTIONS);

	columns = nautilus_get_common_columns ();

	for (i = 0; icon_captions_components[i] != NULL; i++) {
		GtkWidget *combo_box;

		combo_box = GTK_WIDGET (gtk_builder_get_object (builder,
								icon_captions_components[i]));

		create_icon_caption_combo_box_items (GTK_COMBO_BOX_TEXT (combo_box), columns);
		gtk_widget_set_sensitive (combo_box, writable);

		g_signal_connect (combo_box, "changed",
				  G_CALLBACK (icon_captions_changed_callback),
				  builder);
	}

	nautilus_column_list_free (columns);

	update_icon_captions_from_settings (builder);
}
Пример #2
0
GList *
nautilus_get_all_columns (void)
{
	GList *columns = NULL;

	columns = g_list_concat (nautilus_get_common_columns (),
	                         get_trash_columns ());

	return columns;
}
Пример #3
0
GList *
nautilus_get_columns_for_file (NautilusFile *file)
{
	GList *columns;

	columns = nautilus_get_common_columns ();

	if (file != NULL && nautilus_file_is_in_trash (file)) {
		columns = g_list_concat (columns,
		                         get_trash_columns ());
	}

	return columns;
}