#textdomain wesnoth-lib
###
### Definition of the window to select an addon for installation.
###

[window]
	id = "addon_list"
	description = "Addon selection dialog."

	[resolution]
		definition = "default"

		automatic_placement = "true"
		vertical_placement = "center"
		horizontal_placement = "center"

		[linked_group]
			id = "icon"
			fixed_width = "true"
		[/linked_group]

		[linked_group]
			id = "name"
			fixed_width = "true"
		[/linked_group]

		[linked_group]
			id = "version"
			fixed_width = "true"
		[/linked_group]

		[linked_group]
			id = "author"
			fixed_width = "true"
		[/linked_group]

		[linked_group]
			id = "downloads"
			fixed_width = "true"
		[/linked_group]

		[linked_group]
			id = "size"
			fixed_width = "true"
		[/linked_group]

		[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]
						definition = "title"

						label = "Get Add-ons"
					[/label]

				[/column]

			[/row]

			[row]
				grow_factor = 0

				[column]
					grow_factor = 1

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

					[label]
						definition = "default"

						label = "Choose the add-on to download."
					[/label]

				[/column]

			[/row]

			[row]
				grow_factor = 1

				[column]
					grow_factor = 1

					horizontal_grow = "true"
					vertical_grow = "true"

					[listbox]
						id = "addons"
						definition = "default"
						[header]

							[row]

								[column]
									grow_factor = 1
								 	horizontal_grow = "true"

									border = "all"
									border_size = 5

									[label]
										id = "icon"
										definition = "default"
										linked_group = "icon"

										label = ""
									[/label]

 								[/column]

								[column]
									grow_factor = 1
								 	horizontal_grow = "true"

									border = "all"
									border_size = 5

									[label]
										id = "name"
										definition = "default"
										linked_group = "name"

										label = "Name"
									[/label]

 								[/column]

								[column]
									grow_factor = 1
								 	horizontal_grow = "true"

									border = "all"
									border_size = 5

									[label]
										id = "version"
										definition = "default"
										linked_group = "version"

										label = "Version"
									[/label]

								[/column]

								[column]
									grow_factor = 1
								 	horizontal_grow = "true"

									border = "all"
									border_size = 5

									[label]
										id = "author"
										definition = "default"
										linked_group = "author"

										label = "Author"
									[/label]

								[/column]

								[column]
									grow_factor = 1
								 	horizontal_grow = "true"

									border = "all"
									border_size = 5

									[label]
										id = "downloads"
										definition = "default"
										linked_group = "downloads"

										label = "Downloads"
									[/label]

								[/column]

								[column]
									grow_factor = 1
								 	horizontal_grow = "true"

									border = "all"
									border_size = 5

									[label]
										id = "size"
										definition = "default"
										linked_group = "size"

										label = "Size"
									[/label]

								[/column]

							[/row]

						[/header]

						[list_definition]

							[row]

								[column]
								 	vertical_grow = "true"
								 	horizontal_grow = "true"

									[toggle_panel]
										definition = "default"

										return_value_id = "ok"
										[grid]

											[row]

												[column]
													grow_factor = 1
													horizontal_grow = "true"

													border = "all"
													border_size = 5

													[drawing]
														id = "icon"
														definition = "default"
														linked_group = "icon"

														width = 72
														height = 72

														[draw]

															[image]
																name = "(text)"
																w = "(min(image_original_width, 72))"
																h = "(min(image_original_height, 72))"
															[/image]

														[/draw]

													[/drawing]

												[/column]

												[column]
													grow_factor = 1
													horizontal_grow = "true"

													border = "all"
													border_size = 5

													[label]
														id = "name"
														definition = "default"
														linked_group = "name"
													[/label]

												[/column]

												[column]
													grow_factor = 1
													horizontal_grow = "true"

													border = "all"
													border_size = 5

													[label]
														id = "version"
														definition = "default"
														linked_group = "version"
													[/label]

												[/column]

												[column]
													grow_factor = 1
													horizontal_grow = "true"

													border = "all"
													border_size = 5

													[label]
														id = "author"
														definition = "default"
														linked_group = "author"
													[/label]

												[/column]

												[column]
													grow_factor = 1
													horizontal_grow = "true"

													border = "all"
													border_size = 5

													[label]
														id = "downloads"
														definition = "default"
														linked_group = "downloads"
													[/label]

												[/column]

												[column]
													grow_factor = 1
													horizontal_grow = "true"

													border = "all"
													border_size = 5

													[label]
														id = "size"
														definition = "default"
														linked_group = "size"
													[/label]

												[/column]

											[/row]

										[/grid]

									[/toggle_panel]

								[/column]

							[/row]

						[/list_definition]

					[/listbox]

				[/column]

			[/row]

			[row]
				grow_factor = 0

				[column]
					grow_factor = 1
					horizontal_grow = "true"

					[grid]

						[row]
							grow_factor = 0

							[column]

								[spacer]
									definition = "default"
								[/spacer]

							[/column]

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

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

									label = "Install" # fixme text might change between install and update...
								[/button]

							[/column]

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

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

									label = "Cancel"
								[/button]

							[/column]

						[/row]

					[/grid]

				[/column]

			[/row]

		[/grid]

	[/resolution]

[/window]
