#textdomain wesnoth-lib

#define __GUI_GAME_PATHS_ENTRY ID_STEM LABEL
	[row]
		grow_factor = 1

		[column]
			grow_factor = 0

			border = "all"
			border_size = 5
			horizontal_alignment = "left"

			[label]
				definition = "default"

				label = {LABEL}
			[/label]

		[/column]

		[column]
			grow_factor = 1

			border = "all"
			border_size = 5
			horizontal_grow = "true"

			[text_box]
				id = "path_"+{ID_STEM}
				definition = "default"
				label = ""
			[/text_box]

		[/column]

		[column]
			grow_factor = 0

			border = "all"
			border_size = 5
			horizontal_grow = "true"

			[button]
				id = "copy_"+{ID_STEM}
				definition = "action_copy"
				label = _ "filesystem^Copy"
				tooltip = _ "Copy this path to clipboard"
			[/button]

		[/column]

		[column]
			grow_factor = 0

			border = "all"
			border_size = 5
			horizontal_grow = "true"

			[button]
				id = "browse_"+{ID_STEM}
				definition = "action_go"
				label = _ "filesystem^Browse"
				tooltip = _ "Browse this location using a file manager"
			[/button]

		[/column]

	[/row]
#enddef

[window]
	id = "game_paths"
	description = "List of paths used by the game to locate resource and configuration files."

	[resolution]
		definition = "default"

		click_dismiss = "true"
		maximum_width = 800

		[tooltip]
			id = "tooltip_large"
		[/tooltip]

		[helptip]
			id = "tooltip_large"
		[/helptip]

		[grid]

			[row]
				grow_factor = 0

				[column]
					grow_factor = 1

					border = "all"
					border_size = 5
					horizontal_alignment = "left"
					[label]
						id = "title"
						definition = "title"

						label = _ "Game Paths"
					[/label]

				[/column]

			[/row]

			[row]
				grow_factor = 1

				[column]
					grow_factor = 1

					horizontal_grow = "true"

					[grid]

						#
						# NOTE: the following ids must follow the C++ code's expectations
						# (see gui2::tgame_paths::path_map_).
						#

						{__GUI_GAME_PATHS_ENTRY datadir    ( _ "Game data:")}

						{__GUI_GAME_PATHS_ENTRY config     ( _ "Configuration:")}

						{__GUI_GAME_PATHS_ENTRY userdata   ( _ "User data:")}

						{__GUI_GAME_PATHS_ENTRY saves      ( _ "Saved games:")}

						{__GUI_GAME_PATHS_ENTRY addons     ( _ "Add-ons:")}

						{__GUI_GAME_PATHS_ENTRY cache      ( _ "Cache:")}

					[/grid]

				[/column]

			[/row]

			[row]
				grow_factor = 0

				[column]
					horizontal_alignment = "right"

					[grid]

						[row]
							grow_factor = 0

							[column]
								border = "all"
								border_size = 5
								horizontal_alignment = "right"

								[button]
									id = "ok"
									definition = "default"

									label = _ "OK"
								[/button]

							[/column]

						[/row]

					[/grid]

				[/column]

			[/row]


		[/grid]

	[/resolution]

[/window]

#undef __GUI_GAME_PATHS_ENTRY
