def create(self, notebook):
	Setup.setup_profile_check(self)
	self.window.set_size_request(450,310)   # TODO Correct size

	# Frame - Select Profile Frame
	select_profile_frame = create_page(self, notebook, 'Select Profile', 100, 75)


		# Select Profile Window (scrolled)
	select_profile_window = gtk.ScrolledWindow()
	select_profile_window.set_border_width(10)
	select_profile_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
	select_profile_window.show()
	select_profile_frame.add(select_profile_window)
			# Select Profile ListStore
			  # Profile Name       = String
 	self.select_profile_liststore = gtk.ListStore(str,str)
	self.select_profile_treeview = gtk.TreeView(self.select_profile_liststore)
	select_profile_column_1 = gtk.TreeViewColumn('Profile')
	self.select_profile_treeview.append_column(select_profile_column_1)
	select_profile_window.add(self.select_profile_treeview)
	self.select_profile_treeview.show()

	for i in range(0,len(self.profiles)):
		self.select_profile_liststore.append([self.profiles[i],self.ini[i]])


		# Add Mouse Click event to select_profile_treeview
	self.select_profile_treeview.add_events(gtk.gdk.BUTTON_PRESS_MASK)
	self.select_profile_treeview.connect('event',profile_selection, self)

        	# create a CellRenderers to render the data
        self.cell1  = gtk.CellRendererText()

        	# set background color property
        self.cell1.set_property('cell-background', 'white')

        	# add the cells to the columns
	select_profile_column_1.pack_start(self.cell1, False)

        	# set the cell attributes to the appropriate liststore column
        select_profile_column_1.set_attributes(self.cell1, text=0)


	# INSTALL SETUP INFO
	if sys.platform != 'win32':
		install_types = GLOBAL.LINUX_INSTALL_TYPES
		install_types_default = GLOBAL.LINUX_INSTALL_TYPES_DEFAULT
	else:
		install_types = GLOBAL.WINDOWS_INSTALL_TYPES
		install_types_default = GLOBAL.WINDOWS_INSTALL_TYPES_DEFAULT


	# Frame - Create Profile Frame
	create_profile_frame = create_page(self, notebook, 'Create Profile', 100, 75)

		# Table
	create_profile_table = gtk.Table(rows=1,columns=1, homogeneous=False)
	create_profile_table.show()
	create_profile_frame.add(create_profile_table)

			# Profile Name
	profile_name_label = label_create("Profile Name")
	self.profile_name = gtk.Entry(max=0)
	self.profile_name.show()
	create_profile_table.attach(profile_name_label, 0,1,0,1, gtk.FILL,gtk.FILL,10,10)
	create_profile_table.attach(self.profile_name, 1,2,0,1, gtk.FILL,gtk.FILL,10,10)
			# Install Type
	install_type_label = label_create("Install Type")
	self.install_type_combobox = combobox_setup(None, None, None, install_types_default, install_types)
	self.install_type_combobox.connect("changed", install_type_selection, self)
	create_profile_table.attach(install_type_label, 0,1,1,2, gtk.FILL,gtk.FILL,10,10)
	create_profile_table.attach(self.install_type_combobox, 1,2,1,2, gtk.FILL,gtk.FILL,10,10)
			# Spring Binary
	spring_binary_label = label_create('Spring Binary')
	self.spring_binary = gtk.Entry(max=0)
	self.spring_binary.set_text('spring')
	self.spring_binary.show()
	create_profile_table.attach(spring_binary_label, 0,1,2,3, gtk.FILL,gtk.FILL,10,10)
	create_profile_table.attach(self.spring_binary, 1,2,2,3, gtk.FILL,gtk.FILL,10,10)
			# Datadir Location
	self.spring_datadir_label = label_create('Spring Datadir')
	self.spring_datadir = gtk.Entry(max=0)
	self.spring_datadir.show()
	create_profile_table.attach(self.spring_datadir_label, 0,1,3,4, gtk.FILL,gtk.FILL,10,10)
	create_profile_table.attach(self.spring_datadir, 1,2,3,4, gtk.FILL,gtk.FILL,10,10)
			# Spring-GUI Background
	background_label = label_create('Spring GUI Background')
	self.background = gtk.Entry(max=0)
	self.background.show()
	create_profile_table.attach(background_label, 0,1,4,5, gtk.FILL,gtk.FILL,10,10)
	create_profile_table.attach(self.background, 1,2,4,5, gtk.FILL,gtk.FILL,10,10)
				# Default -> Background
	if os.path.isfile (GLOBAL.SPRING_GUI_BACKGROUND):
		self.background.set_text(GLOBAL.SPRING_GUI_BACKGROUND)


			# Button -> Save
	save_button = gtk.Button(label=None, stock=gtk.STOCK_SAVE)
	save_button.connect("clicked", Setup.profile_save, self)
	save_button.show()
	create_profile_table.attach(save_button, 2,3,0,1, 0,0,0,0)

			# Button -> Spring Binary
	spring_binary_button = gtk.Button(label=None, stock=gtk.STOCK_OPEN)
	spring_binary_button.connect("clicked", spring_binary_location, self)
	spring_binary_button.show()
	create_profile_table.attach(spring_binary_button, 2,3,2,3, 0,0,0,0)

			# Button -> Spring GUI Background
	background_button = gtk.Button(label=None, stock=gtk.STOCK_OPEN)
	background_button.connect("clicked", spring_gui_background_location, self)
	background_button.show()
	create_profile_table.attach(background_button, 2,3,4,5, 0,0,0,0)

	# Default Selection
	install_type_selection(self.install_type_combobox, self)
Beispiel #2
0
def create(self, notebook):
    Setup.setup_profile_check(self)
    self.window.set_size_request(450, 310)  # TODO Correct size

    # Frame - Select Profile Frame
    select_profile_frame = create_page(self, notebook, 'Select Profile', 100,
                                       75)

    # Select Profile Window (scrolled)
    select_profile_window = gtk.ScrolledWindow()
    select_profile_window.set_border_width(10)
    select_profile_window.set_policy(gtk.POLICY_AUTOMATIC,
                                     gtk.POLICY_AUTOMATIC)
    select_profile_window.show()
    select_profile_frame.add(select_profile_window)
    # Select Profile ListStore
    # Profile Name       = String
    self.select_profile_liststore = gtk.ListStore(str, str)
    self.select_profile_treeview = gtk.TreeView(self.select_profile_liststore)
    select_profile_column_1 = gtk.TreeViewColumn('Profile')
    self.select_profile_treeview.append_column(select_profile_column_1)
    select_profile_window.add(self.select_profile_treeview)
    self.select_profile_treeview.show()

    for i in range(0, len(self.profiles)):
        self.select_profile_liststore.append([self.profiles[i], self.ini[i]])

        # Add Mouse Click event to select_profile_treeview
    self.select_profile_treeview.add_events(gtk.gdk.BUTTON_PRESS_MASK)
    self.select_profile_treeview.connect('event', profile_selection, self)

    # create a CellRenderers to render the data
    self.cell1 = gtk.CellRendererText()

    # set background color property
    self.cell1.set_property('cell-background', 'white')

    # add the cells to the columns
    select_profile_column_1.pack_start(self.cell1, False)

    # set the cell attributes to the appropriate liststore column
    select_profile_column_1.set_attributes(self.cell1, text=0)

    # INSTALL SETUP INFO
    if sys.platform != 'win32':
        install_types = GLOBAL.LINUX_INSTALL_TYPES
        install_types_default = GLOBAL.LINUX_INSTALL_TYPES_DEFAULT
    else:
        install_types = GLOBAL.WINDOWS_INSTALL_TYPES
        install_types_default = GLOBAL.WINDOWS_INSTALL_TYPES_DEFAULT

    # Frame - Create Profile Frame
    create_profile_frame = create_page(self, notebook, 'Create Profile', 100,
                                       75)

    # Table
    create_profile_table = gtk.Table(rows=1, columns=1, homogeneous=False)
    create_profile_table.show()
    create_profile_frame.add(create_profile_table)

    # Profile Name
    profile_name_label = label_create("Profile Name")
    self.profile_name = gtk.Entry(max=0)
    self.profile_name.show()
    create_profile_table.attach(profile_name_label, 0, 1, 0, 1, gtk.FILL,
                                gtk.FILL, 10, 10)
    create_profile_table.attach(self.profile_name, 1, 2, 0, 1, gtk.FILL,
                                gtk.FILL, 10, 10)
    # Install Type
    install_type_label = label_create("Install Type")
    self.install_type_combobox = combobox_setup(None, None, None,
                                                install_types_default,
                                                install_types)
    self.install_type_combobox.connect("changed", install_type_selection, self)
    create_profile_table.attach(install_type_label, 0, 1, 1, 2, gtk.FILL,
                                gtk.FILL, 10, 10)
    create_profile_table.attach(self.install_type_combobox, 1, 2, 1, 2,
                                gtk.FILL, gtk.FILL, 10, 10)
    # Spring Binary
    spring_binary_label = label_create('Spring Binary')
    self.spring_binary = gtk.Entry(max=0)
    self.spring_binary.set_text('spring')
    self.spring_binary.show()
    create_profile_table.attach(spring_binary_label, 0, 1, 2, 3, gtk.FILL,
                                gtk.FILL, 10, 10)
    create_profile_table.attach(self.spring_binary, 1, 2, 2, 3, gtk.FILL,
                                gtk.FILL, 10, 10)
    # Datadir Location
    self.spring_datadir_label = label_create('Spring Datadir')
    self.spring_datadir = gtk.Entry(max=0)
    self.spring_datadir.show()
    create_profile_table.attach(self.spring_datadir_label, 0, 1, 3, 4,
                                gtk.FILL, gtk.FILL, 10, 10)
    create_profile_table.attach(self.spring_datadir, 1, 2, 3, 4, gtk.FILL,
                                gtk.FILL, 10, 10)
    # Spring-GUI Background
    background_label = label_create('Spring GUI Background')
    self.background = gtk.Entry(max=0)
    self.background.show()
    create_profile_table.attach(background_label, 0, 1, 4, 5, gtk.FILL,
                                gtk.FILL, 10, 10)
    create_profile_table.attach(self.background, 1, 2, 4, 5, gtk.FILL,
                                gtk.FILL, 10, 10)
    # Default -> Background
    if os.path.isfile(GLOBAL.SPRING_GUI_BACKGROUND):
        self.background.set_text(GLOBAL.SPRING_GUI_BACKGROUND)

        # Button -> Save
    save_button = gtk.Button(label=None, stock=gtk.STOCK_SAVE)
    save_button.connect("clicked", Setup.profile_save, self)
    save_button.show()
    create_profile_table.attach(save_button, 2, 3, 0, 1, 0, 0, 0, 0)

    # Button -> Spring Binary
    spring_binary_button = gtk.Button(label=None, stock=gtk.STOCK_OPEN)
    spring_binary_button.connect("clicked", spring_binary_location, self)
    spring_binary_button.show()
    create_profile_table.attach(spring_binary_button, 2, 3, 2, 3, 0, 0, 0, 0)

    # Button -> Spring GUI Background
    background_button = gtk.Button(label=None, stock=gtk.STOCK_OPEN)
    background_button.connect("clicked", spring_gui_background_location, self)
    background_button.show()
    create_profile_table.attach(background_button, 2, 3, 4, 5, 0, 0, 0, 0)

    # Default Selection
    install_type_selection(self.install_type_combobox, self)
def create(self, notebook):
		# Frame - General
	general_frame = create_page(self, notebook, 'General', 100, 75)
			# Table
	general_table = gtk.Table(rows=2,columns=1, homogeneous=False)
	general_table.show()
	general_frame.add(general_table)
				# Name
	name_label = label_create('Name')
	self.player_name = gtk.Entry(max=0)
	self.player_name.set_text(Config.get_option(self.conf_temp, 'GAME', 'name', 'Player'))
	self.player_name.show()
	general_table.attach(name_label, 0,1,0,1, gtk.FILL,gtk.FILL,10,10)
	general_table.attach(self.player_name, 1,2,0,1, gtk.FILL,gtk.FILL,10,10)

		# Frame - Graphics
	graphics_frame = create_page(self, notebook, 'Graphics', 100, 75)
			# Table
	graphics_table = gtk.Table(rows=1,columns=2, homogeneous=False)
	graphics_table.show()
	graphics_frame.add(graphics_table)
				# Resolution
	resolution_label = label_create("Resolution")
	self.resolution_combobox = combobox_setup(self.conf_temp, 'GAME', 'XResolution', GLOBAL.Resolution_Default, GLOBAL.Resolution)
	graphics_table.attach(resolution_label, 0,1,0,1, gtk.FILL,gtk.FILL,10,10)
	graphics_table.attach(self.resolution_combobox, 1,2,0,1, gtk.FILL,gtk.FILL,10,10)
				# Fullscreen
	fullscreen_label = label_create("Fullscreen")
	self.fullscreen_combobox = combobox_setup(self.conf_temp, 'GAME', 'Fullscreen', GLOBAL.Fullscreen_Default, GLOBAL.Fullscreen)
	graphics_table.attach(fullscreen_label, 0,1,1,2, gtk.FILL,gtk.FILL,10,10)
	graphics_table.attach(self.fullscreen_combobox, 1,2,1,2, gtk.FILL,gtk.FILL,10,10)
				# Shadows
	shadows_label = label_create("Shadows")
	self.shadows_combobox = combobox_setup(self.conf_temp, 'GAME', 'Shadows', GLOBAL.Shadows_Default, GLOBAL.Shadows)
	graphics_table.attach(shadows_label, 0,1,2,3, gtk.FILL,gtk.FILL,10,10)
	graphics_table.attach(self.shadows_combobox, 1,2,2,3, gtk.FILL,gtk.FILL,10,10)
				# Fullscreen Anti-Aliasing
	fsaa_label = label_create("FSAA")
	fsaa_value = float(Config.get_option(self.conf_temp, 'GAME', 'FSAA',GLOBAL.FSAA_Default))
	if fsaa_value != 0:
		fsaa_value = float(Config.get_option(self.conf_temp, 'GAME', 'FSAALevel',GLOBAL.FSAALevel_Default))
	fsaa_adjustment = gtk.Adjustment(fsaa_value, GLOBAL.FSAALevel[0], GLOBAL.FSAALevel[1], GLOBAL.FSAALevel[2], GLOBAL.FSAALevel[3], page_size=0)
	self.fsaa_spinner = gtk.SpinButton(fsaa_adjustment, 0, 0)
	self.fsaa_spinner.show()
	graphics_table.attach(fsaa_label, 0,1,3,4, gtk.FILL,gtk.FILL,10,10)
	graphics_table.attach(self.fsaa_spinner, 1,2,3,4, gtk.FILL,gtk.FILL,10,10)


		# Frame - Adv Graphics
	adv_graphics_frame = create_page(self, notebook, 'Adv Graphics', 100,75)
			# Table
	adv_graphics_table = gtk.Table(rows=2, columns=4, homogeneous=False)
	adv_graphics_table.show()
	adv_graphics_frame.add(adv_graphics_table)
				# 'GroundDecals'
	ground_decals_label = label_create("Ground Decals")
	self.ground_decals_spinner = spinner_create(self.conf_temp, 'GroundDecals', GLOBAL.Ground_Decals_Default, GLOBAL.Ground_Decals)
	adv_graphics_table.attach(ground_decals_label, 0,1,0,1, gtk.FILL,gtk.FILL,10,10)
	adv_graphics_table.attach(self.ground_decals_spinner, 1,2,0,1, gtk.FILL,gtk.FILL,10,10)
				# GroundDetail
	ground_detail_label = label_create("Ground Detail")
	self.ground_detail_spinner = spinner_create(self.conf_temp, 'GroundDetail', GLOBAL.Ground_Detail_Default, GLOBAL.Ground_Detail)
	adv_graphics_table.attach(ground_detail_label, 0,1,1,2, gtk.FILL,gtk.FILL,10,10)
	adv_graphics_table.attach(self.ground_detail_spinner, 1,2,1,2, gtk.FILL,gtk.FILL,10,10)

				# GrassDetail
	grass_detail_label = label_create("Grass Detail")
	self.grass_detail_spinner = spinner_create(self.conf_temp, 'GrassDetail', GLOBAL.Grass_Detail_Default, GLOBAL.Grass_Detail)
	adv_graphics_table.attach(grass_detail_label, 0,1,2,3, gtk.FILL,gtk.FILL,10,10)
	adv_graphics_table.attach(self.grass_detail_spinner, 1,2,2,3, gtk.FILL,gtk.FILL,10,10)
				# MaxParticles
	max_particles_label = label_create("Max Particles")
	self.max_particles_spinner = spinner_create(self.conf_temp, 'MaxParticles', GLOBAL.Max_Particles_Default, GLOBAL.Max_Particles)
	adv_graphics_table.attach(max_particles_label, 0,1,3,4, gtk.FILL,gtk.FILL,10,10)
	adv_graphics_table.attach(self.max_particles_spinner, 1,2,3,4, gtk.FILL,gtk.FILL,10,10)
				# UnitLodDist
	unit_lod_distance_label = label_create("Unit Lod Distance")
	self.unit_lod_distance_spinner = spinner_create(self.conf_temp, 'UnitIconDist', GLOBAL.Unit_Lod_Dist_Default, GLOBAL.Unit_Lod_Dist)
	adv_graphics_table.attach(unit_lod_distance_label, 0,1,4,5, gtk.FILL,gtk.FILL,10,10)
	adv_graphics_table.attach(self.unit_lod_distance_spinner, 1,2,4,5, gtk.FILL,gtk.FILL,10,10)


		# Frame - Adv Shaders
	adv_shaders_frame = create_page(self, notebook, 'Adv Shaders', 100,75)
			# Table
	adv_shaders_table = gtk.Table(rows=1, columns=3, homogeneous=False)
	adv_shaders_table.show()
	adv_shaders_frame.add(adv_shaders_table)
				# AdvSky
	adv_sky_label = label_create("Advanced Sky")
	self.adv_sky_combobox = combobox_setup(self.conf_temp, 'GAME', 'AdvSky', GLOBAL.Adv_Sky_Default, GLOBAL.Adv_Sky)
	adv_shaders_table.attach(adv_sky_label, 0,1,0,1, gtk.FILL,gtk.FILL,10,10)
	adv_shaders_table.attach(self.adv_sky_combobox, 1,2,0,1, gtk.FILL,gtk.FILL,10,10)
				# DynamicSky
	dynamic_sky_label = label_create("Dynamic Sky")
	self.dynamic_sky_combobox = combobox_setup(self.conf_temp, 'GAME', 'DynamicSky', GLOBAL.Dynamic_Sky_Default, GLOBAL.Dynamic_Sky)
	adv_shaders_table.attach(dynamic_sky_label, 0,1,1,2, gtk.FILL,gtk.FILL,10,10)
	adv_shaders_table.attach(self.dynamic_sky_combobox, 1,2,1,2, gtk.FILL,gtk.FILL,10,10)
				# AdvUnitShading
	adv_unit_shading_label = label_create("Adv Unit Shading")
	self.adv_unit_shading_combobox = combobox_setup(self.conf_temp, 'GAME', 'AdvUnitShading', GLOBAL.Adv_Unit_Shading_Default, GLOBAL.Adv_Unit_Shading)
	adv_shaders_table.attach(adv_unit_shading_label, 0,1,2,3, gtk.FILL,gtk.FILL,10,10)
	adv_shaders_table.attach(self.adv_unit_shading_combobox, 1,2,2,3, gtk.FILL,gtk.FILL,10,10)

				# ReflectiveWater
	reflective_water_label = label_create("Reflective Water")
	self.reflective_water_combobox = combobox_setup(self.conf_temp, 'GAME', 'ReflectiveWater', GLOBAL.Reflective_Water_Default, GLOBAL.Reflective_Water)
	adv_shaders_table.attach(reflective_water_label, 0,1,3,4, gtk.FILL,gtk.FILL,10,10)
	adv_shaders_table.attach(self.reflective_water_combobox, 1,2,3,4, gtk.FILL,gtk.FILL,10,10)



	# Sound
	sound_frame = create_page(self, notebook, 'Sound', 100,75)
			# Table - Debug
	sound_table = gtk.Table(rows=1, columns=4, homogeneous=False)
	sound_table.show()
	sound_frame.add(sound_table)
				# Sound Volume
	sound_volume_label = label_create("Sound Volume")
	self.sound_volume_spinner = spinner_create(self.conf_temp, 'SoundVolume', GLOBAL.Sound_Volume_Default, GLOBAL.Sound_Volume)
	sound_table.attach(sound_volume_label, 0,1,0,1, gtk.FILL,gtk.FILL,10,10)
	sound_table.attach(self.sound_volume_spinner, 1,2,0,1, gtk.FILL,gtk.FILL,10,10)
				# MaxSounds
	max_sounds_label = label_create("Max Sounds")
	self.max_sounds_spinner = spinner_create(self.conf_temp, 'MaxSounds', GLOBAL.Max_Sounds_Default, GLOBAL.Max_Sounds)
	sound_table.attach(max_sounds_label, 0,1,1,2, gtk.FILL,gtk.FILL,10,10)
	sound_table.attach(self.max_sounds_spinner, 1,2,1,2, gtk.FILL,gtk.FILL,10,10)



	# Debug
	debug_frame = create_page(self, notebook, 'Debug', 100,75)
			# Table - Debug
	debug_table = gtk.Table(rows=1, columns=4, homogeneous=False)
	debug_table.show()
	debug_frame.add(debug_table)
				# VerboseLevel
	verbose_level_label = label_create("Verbose Level")
	self.verbose_level_spinner = spinner_create(self.conf_temp, 'VerboseLevel', GLOBAL.Verbose_Level_Default, GLOBAL.Verbose_Level)
	debug_table.attach(verbose_level_label, 0,1,0,1, gtk.FILL,gtk.FILL,10,10)
	debug_table.attach(self.verbose_level_spinner, 1,2,0,1, gtk.FILL,gtk.FILL,10,10)
				# CatchAIExceptions
	catch_ai_exceptions_label = label_create("Catch AI Exceptions")
	self.catch_ai_exceptions_combobox = combobox_setup(self.conf_temp, 'GAME', 'CatchAIExceptions', GLOBAL.Catch_AI_Exceptions_Default, GLOBAL.Catch_AI_Exceptions)
	debug_table.attach(catch_ai_exceptions_label, 0,1,1,2, gtk.FILL,gtk.FILL,10,10)
	debug_table.attach(self.catch_ai_exceptions_combobox, 1,2,1,2, gtk.FILL,gtk.FILL,10,10)
Beispiel #4
0
def create(self, notebook):
	unitsync.Init(True,1)

	player_name = Config.get_option(self.conf_temp, 'GAME', 'name', 'Player')

		# Frame - Players
	player_frame = create_page(self, notebook, 'Players', 100,75)
			# Table - Player
	player_table = gtk.Table(rows=2, columns=2, homogeneous=False)
	player_table.show()
	player_frame.add(player_table)
			# Player Window (scrolled)
	player_window = gtk.ScrolledWindow()
	player_window.set_border_width(10)
	player_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
	player_window.show()
	player_table.attach(player_window,0,1,0,2, gtk.SHRINK|gtk.FILL|gtk.EXPAND,gtk.SHRINK|gtk.FILL|gtk.EXPAND,10,10)
				# Player ListStore
				  # Ready       = Icon
				  # Name        = String & Icon for Rank
				  # Team        = Number  Need Colour Display Somehow  FIX FIX FIX
				  # Side        = String
				  # Ally        = Number
				  # Bonus	= int
				  # AI          = String
				  # AI Owner    = String
				  # AI Location = String
#	self.player_liststore = gtk.ListStore(gtk.gdk.Pixbuf, str, gtk.gdk.Pixbuf, int, int, str, str, int)
# FIX player_liststore to also use images for rank & side image along with side in text & Ready Icon Status
 	self.player_liststore = gtk.ListStore(str, str, int, str, int, int, str, str, str)
	self.player_treeview = gtk.TreeView(self.player_liststore)
	self.player_column_0 = gtk.TreeViewColumn('Ready')
	self.player_column_1 = gtk.TreeViewColumn('Name')
	self.player_column_2 = gtk.TreeViewColumn('Army')
	self.player_column_3 = gtk.TreeViewColumn('Side')
	self.player_column_4 = gtk.TreeViewColumn('Ally')
	self.player_column_5 = gtk.TreeViewColumn('Bonus')
	self.player_column_6 = gtk.TreeViewColumn('AI')
	self.player_column_7 = gtk.TreeViewColumn('AI Owner')
	self.player_column_8 = gtk.TreeViewColumn('AI Location')

	self.player_treeview.append_column(self.player_column_0)
	self.player_treeview.append_column(self.player_column_1)
	self.player_treeview.append_column(self.player_column_2)
	self.player_treeview.append_column(self.player_column_3)
	self.player_treeview.append_column(self.player_column_4)
	self.player_treeview.append_column(self.player_column_5)
	self.player_treeview.append_column(self.player_column_6)
	self.player_treeview.append_column(self.player_column_7)
	self.player_treeview.append_column(self.player_column_8)
	player_window.add(self.player_treeview)
	self.player_treeview.show()

	# Add Mouse Click event to player_treeview
	self.player_treeview.add_events(gtk.gdk.BUTTON_PRESS_MASK)
#	self.player_treeview.connect('cursor-changed',player_popup_menu, self)
	self.player_treeview.connect('event',player_popup_menu, self)

        # create a CellRenderers to render the data
        self.cell0  = gtk.CellRendererPixbuf()
        self.cell1  = gtk.CellRendererText()
#        self.cell1a = gtk.CellRendererPixbuf()   # TODO Image for Rank
        self.cell2  = gtk.CellRendererText()
        self.cell3  = gtk.CellRendererText()
#        self.cell3a = gtk.CellRendererPixbuf()   # TODO Image for Side
        self.cell4  = gtk.CellRendererText()
        self.cell5  = gtk.CellRendererText()
        self.cell6  = gtk.CellRendererText()
        self.cell7  = gtk.CellRendererText()
        self.cell8  = gtk.CellRendererText()

        # set background color property
		# add code to define background colour if peep = ai ?
        self.cell0.set_property('cell-background', 'white')
        self.cell1.set_property('cell-background', 'white')
#        self.cell1a.set_property('cell-background', 'white')
        self.cell2.set_property('cell-background', 'white')
        self.cell3.set_property('cell-background', 'white')
#        self.cell3a.set_property('cell-background', 'white')
        self.cell4.set_property('cell-background', 'white')
        self.cell5.set_property('cell-background', 'white')
        self.cell6.set_property('cell-background', 'white')
        self.cell7.set_property('cell-background', 'white')
        self.cell8.set_property('cell-background', 'white')

        # add the cells to the columns
	self.player_column_0.pack_start(self.cell0, False)
	self.player_column_1.pack_start(self.cell1, False)
#	self.player_column_1.pack_start(self.cell1a, True)
	self.player_column_2.pack_start(self.cell2, False)
	self.player_column_3.pack_start(self.cell3, False)
#	self.player_column_3a.pack_start(self.cell3, True)
	self.player_column_4.pack_start(self.cell4, False)
	self.player_column_5.pack_start(self.cell5, False)
	self.player_column_6.pack_start(self.cell6, False)
	self.player_column_7.pack_start(self.cell7, False)
	self.player_column_8.pack_start(self.cell8, False)

        # set the cell attributes to the appropriate liststore column
#        self.player_column_0.set_attributes(self.cell0, text=0)
        self.player_column_1.set_attributes(self.cell1, text=1)
        self.player_column_2.set_attributes(self.cell2, text=2)
        self.player_column_3.set_attributes(self.cell3, text=3)
        self.player_column_4.set_attributes(self.cell4, text=4)
        self.player_column_5.set_attributes(self.cell5, text=5)
        self.player_column_6.set_attributes(self.cell6, text=6)
        self.player_column_7.set_attributes(self.cell7, text=7)
        self.player_column_8.set_attributes(self.cell8, text=8)

        # make treeview searchable
        self.player_treeview.set_search_column(0)

        # Allow sorting on the column
        self.player_column_1.set_sort_column_id(1)
        self.player_column_2.set_sort_column_id(2)
        self.player_column_3.set_sort_column_id(3)
        self.player_column_4.set_sort_column_id(4)
        self.player_column_5.set_sort_column_id(5)
        self.player_column_6.set_sort_column_id(6)
        self.player_column_7.set_sort_column_id(7)
        self.player_column_8.set_sort_column_id(8)



			# Map Preview 2
	self.map_preview2 = gtk.Image()
	self.map_preview2.show()
	player_table.attach(self.map_preview2, 1,2,0,1, gtk.FILL, gtk.FILL,0,0)




        # Options NoteBook
        options_notebook = gtk.Notebook()
        options_notebook.set_tab_pos(gtk.POS_TOP)
        player_table.attach(options_notebook, 1,2,1,2, gtk.FILL,gtk.FILL,10,10)
        options_notebook.show()
		# Frame - Options
	options_frame = create_page(self, options_notebook, 'Options', 350, 50)
				# Table
	options_table = gtk.Table(rows=1, columns=1, homogeneous =False)
	options_table.show()
	options_frame.add(options_table)
					# GameMode
	game_mode_label = label_create("Commander Dies")
	options_table.attach(game_mode_label,0,2,0,1, gtk.FILL,gtk.FILL,10,10)

	self.game_mode = combobox_setup(None, None, None, GLOBAL.GAME_MODES_DEFAULT, GLOBAL.GAME_MODES)
	options_table.attach(self.game_mode, 2,4,0,1, gtk.FILL,gtk.FILL,10,10)
					# Starting Positions
	starting_positions_label = label_create("Starting Position")
	options_table.attach(starting_positions_label,0,2,1,2, gtk.FILL,gtk.FILL,10,10)
	self.starting_positions = combobox_setup(None, None, None, GLOBAL.STARTING_POSITIONS_DEFAULT, GLOBAL.STARTING_POSITIONS)
	options_table.attach(self.starting_positions, 2,4,1,2, gtk.FILL,gtk.FILL,10,10)
		# Frame - Resources
	resources_frame = create_page(self, options_notebook, 'Resources', 100, 50)
				# Table
	resources_table = gtk.Table(rows=1, columns=1, homogeneous =False)
	resources_table.show()
	resources_frame.add(resources_table)
					# Start Metal
	start_metal_label = label_create("Metal")
	resources_table.attach(start_metal_label, 0,1,0,1, gtk.FILL,gtk.FILL,10,10)
# FIX add default values to GLOBAL.py
	start_metal_value = 2000
	start_metal_adjustment = gtk.Adjustment(start_metal_value, lower=0, upper=12000, step_incr=100, page_incr=1000, page_size=0)
	self.start_metal_spinner = gtk.SpinButton(start_metal_adjustment, 0, 0)
	self.start_metal_spinner.show()
	resources_table.attach(self.start_metal_spinner, 1,2,0,1, gtk.FILL,gtk.FILL,10,10)
					# Start Energy
	start_energy_label = label_create("Energy")
	resources_table.attach(start_energy_label, 2,3,0,1, gtk.FILL,gtk.FILL,10,10)
# FIX add default values to GLOBAL.py
	start_energy_value = 2000
	start_energy_adjustment = gtk.Adjustment(start_energy_value, lower=0, upper=12000, step_incr=100, page_incr=1000, page_size=0)
	self.start_energy_spinner = gtk.SpinButton(start_energy_adjustment, 0, 0)
	self.start_energy_spinner.show()
	resources_table.attach(self.start_energy_spinner, 3,4,0,1, gtk.FILL,gtk.FILL,10,10)
					# Max Units
	max_units_label = label_create("Max Units")
	resources_table.attach(max_units_label, 0,1,1,2, gtk.FILL,gtk.FILL,10,10)
# FIX add default values to GLOBAL.py
	max_units_value = 500
	max_units_adjustment = gtk.Adjustment(max_units_value, lower=0, upper=5000, step_incr=100, page_incr=1000, page_size=0)
	self.max_units_spinner = gtk.SpinButton(max_units_adjustment, 0, 0)
	self.max_units_spinner.show()
	resources_table.attach(self.max_units_spinner, 1,2,1,2, gtk.FILL,gtk.FILL,10,10)
		# Frame - Debug
	debug_frame = create_page(self, options_notebook, 'Debug', 100, 50)
				# Table
	debug_table = gtk.Table(rows=1, columns=1, homogeneous =False)
	debug_table.show()
	debug_frame.add(debug_table)
					# Gdb Backtrace
	gdb_backtrace_label = label_create("Gdb Backtrace")
	debug_table.attach(gdb_backtrace_label,0,1,0,1, gtk.FILL,gtk.FILL,10,10)

	self.gdb_backtrace = combobox_setup(None, None, None, GLOBAL.GDB_BACKTRACE_DEFAULT, GLOBAL.GDB_BACKTRACE)
	debug_table.attach(self.gdb_backtrace, 1,2,0,1, gtk.FILL,gtk.FILL,10,10)


		# Notebook - Map / Mod
	map_frame = create_page(self, notebook, 'Map', 100, 75)
					# Table - Map
	map_table = gtk.Table(rows=2, columns=2, homogeneous=False)
	map_table.show()
	map_frame.add(map_table)
						# Map Preview
	self.map_preview = gtk.Image()
	self.map_preview.show()
	map_table.attach(self.map_preview, 0,1,0,1, 0,0,60,10) # FIX
						# Map Description
	self.map_description = label_create("")
	self.map_description.set_line_wrap(1)
	map_table.attach(self.map_description, 0,1,1,2, gtk.SHRINK,gtk.SHRINK,0,0)


								# Map

						# Map Window (scrolled)
	map_window = gtk.ScrolledWindow()
	map_window.set_border_width(10)
	map_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
	map_window.show()
	map_table.attach(map_window, 0,1,2,3, gtk.EXPAND|gtk.FILL,gtk.EXPAND|gtk.FILL,0,0)  # FIX
				# Map ListStore
				  # Name             = str
				  # Players          = int
				  # Height           = int
				  # Width            = int
				  # Min Wind         = int
				  # Max Wind         = int
				  # Tidal            = int
				  # Extractor Radius = int
				  # Max Metal        = str
				  # Gravity          = str
 	self.map_liststore = gtk.ListStore(str, int, int, int, int, int, int, int, str, str)
	self.map_treeview = gtk.TreeView(self.map_liststore)
	self.map_column_1 = gtk.TreeViewColumn('Name')
	self.map_column_2 = gtk.TreeViewColumn('Players')
	self.map_column_3 = gtk.TreeViewColumn('Height')
	self.map_column_4 = gtk.TreeViewColumn('Width')
	self.map_column_5 = gtk.TreeViewColumn('Min Wind')
	self.map_column_6 = gtk.TreeViewColumn('Max Wind')
	self.map_column_7 = gtk.TreeViewColumn('Tidal')
	self.map_column_8 = gtk.TreeViewColumn('Extractor Radius')
	self.map_column_9 = gtk.TreeViewColumn('Max Metal')
	self.map_column_10 = gtk.TreeViewColumn('Gravity')
	self.map_treeview.append_column(self.map_column_1)
	self.map_treeview.append_column(self.map_column_2)
	self.map_treeview.append_column(self.map_column_3)
	self.map_treeview.append_column(self.map_column_4)
	self.map_treeview.append_column(self.map_column_5)
	self.map_treeview.append_column(self.map_column_6)
	self.map_treeview.append_column(self.map_column_7)
	self.map_treeview.append_column(self.map_column_8)
	self.map_treeview.append_column(self.map_column_9)
	self.map_treeview.append_column(self.map_column_10)
	map_window.add(self.map_treeview)
	self.map_treeview.show()

	# Add Mouse Click event to map_treeview
	self.map_treeview.add_events(gtk.gdk.BUTTON_PRESS_MASK)
	self.map_treeview.connect('button_press_event',map_preview_check, self)

        # create a CellRenderers to render the data
        self.map_cell_1  = gtk.CellRendererText()
        self.map_cell_2  = gtk.CellRendererText()
        self.map_cell_3  = gtk.CellRendererText()
        self.map_cell_4  = gtk.CellRendererText()
        self.map_cell_5  = gtk.CellRendererText()
        self.map_cell_6  = gtk.CellRendererText()
        self.map_cell_7  = gtk.CellRendererText()
        self.map_cell_8  = gtk.CellRendererText()
        self.map_cell_9  = gtk.CellRendererText()
        self.map_cell_10  = gtk.CellRendererText()

        # set background color property
		# add code to define background colour if peep = ai ?
        self.map_cell_1.set_property('cell-background', 'white')
        self.map_cell_2.set_property('cell-background', 'white')
        self.map_cell_3.set_property('cell-background', 'white')
        self.map_cell_4.set_property('cell-background', 'white')
        self.map_cell_5.set_property('cell-background', 'white')
        self.map_cell_6.set_property('cell-background', 'white')
        self.map_cell_7.set_property('cell-background', 'white')
        self.map_cell_8.set_property('cell-background', 'white')
        self.map_cell_9.set_property('cell-background', 'white')
        self.map_cell_10.set_property('cell-background', 'white')

        # add the cells to the columns
	self.map_column_1.pack_start(self.map_cell_1, False)
	self.map_column_2.pack_start(self.map_cell_2, True)
	self.map_column_3.pack_start(self.map_cell_3, True)
	self.map_column_4.pack_start(self.map_cell_4, True)
	self.map_column_5.pack_start(self.map_cell_5, True)
	self.map_column_6.pack_start(self.map_cell_6, True)
	self.map_column_7.pack_start(self.map_cell_7, True)
	self.map_column_8.pack_start(self.map_cell_8, True)
	self.map_column_9.pack_start(self.map_cell_9, True)
	self.map_column_10.pack_start(self.map_cell_10, True)

        # set the cell attributes to the appropriate liststore column
        self.map_column_1.set_attributes(self.map_cell_1, text=0)
        self.map_column_2.set_attributes(self.map_cell_2, text=1)
        self.map_column_3.set_attributes(self.map_cell_3, text=2)
        self.map_column_4.set_attributes(self.map_cell_4, text=3)
        self.map_column_5.set_attributes(self.map_cell_5, text=4)
        self.map_column_6.set_attributes(self.map_cell_6, text=5)
        self.map_column_7.set_attributes(self.map_cell_7, text=6)
        self.map_column_8.set_attributes(self.map_cell_8, text=7)
        self.map_column_9.set_attributes(self.map_cell_9, text=8)
        self.map_column_10.set_attributes(self.map_cell_10, text=8)


        # Allow sorting on the column
        self.map_column_1.set_sort_column_id(0)
        self.map_column_2.set_sort_column_id(1)
        self.map_column_3.set_sort_column_id(2)
        self.map_column_4.set_sort_column_id(3)
        self.map_column_5.set_sort_column_id(4)
        self.map_column_6.set_sort_column_id(5)
        self.map_column_7.set_sort_column_id(6)
        self.map_column_8.set_sort_column_id(7)
        self.map_column_9.set_sort_column_id(8)
        self.map_column_10.set_sort_column_id(9)


	# Read Map Index & Add Map List
	map_checksum_list = Config.list_sections(self.map_index)
	for i in range(0,len(map_checksum_list)):
		count = int(Config.get_option(self.map_index, map_checksum_list[i], 'MAP_COUNT', None))
		for p in range(1,count+1):
			map_data = Index_Map.map_info(self, map_checksum_list[i], p)
			i = str(i)
			self.map_liststore.append([ map_data[("NAME")][:-4],
						map_data[("PLAYERS")],
						map_data[("HEIGHT")],
						map_data[("WIDTH")],
						map_data[("MIN WIND")],
						map_data[("MAX WIND")],
						map_data[("TIDAL STRENGTH")],
						map_data[("EXTRACTOR RADIUS")],
						map_data[("MAX METAL")],
						map_data[("GRAVITY")] ])
			i = int(i)



#FIX Add Code for profiles
# This line is just defaulting mod selection to first iter

	map_treeselection = self.map_treeview.get_selection()
	map_treeselection.select_iter(self.map_liststore.get_iter_first())
	map_preview_check(None, None, self, True)


		# Frame - Mod
	mod_frame = create_page(self, notebook, 'Mod', 100, 75)
					# Table - Mod
	mod_table = gtk.Table(rows=2, columns=2, homogeneous=False)
	mod_table.show()
	mod_frame.add(mod_table)
						# Mod Window (scrolled)
	mod_window = gtk.ScrolledWindow()
	mod_window.set_border_width(10)
	mod_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
	mod_window.show()
	mod_table.attach(mod_window, 0,1,0,1)
				# mod ListStore
				  # Mod Name       = String
				  # Mod Checksum   = String
 	self.mod_liststore = gtk.ListStore(str,str)
	self.mod_treeview = gtk.TreeView(self.mod_liststore)
	self.mod_column_1 = gtk.TreeViewColumn('Mod Name')
	self.mod_treeview.append_column(self.mod_column_1)
	mod_window.add(self.mod_treeview)
	self.mod_treeview.show()

#	mod_names = Battle.mod_names(self)
#	for i in range (0,len(mod_names)):
#		self.mod_liststore.append([mod_names[i]])


	# Read Map Index & Add Map List
	mod_checksum_list = Config.list_sections(self.mod_index)
	for i in range(0,len(mod_checksum_list)):
		self.mod_liststore.append([Index_Mod.mod_archive_name(self,mod_checksum_list[i]), mod_checksum_list[i]])



#FIX Add Code for profiles
# This line is just defaulting mod selection to first iter

	mod_treeselection = self.mod_treeview.get_selection()
	mod_treeselection.select_iter(self.mod_liststore.get_iter_first())

	# Add Mouse Click event to mod_treeview
	self.mod_treeview.add_events(gtk.gdk.BUTTON_PRESS_MASK)
	self.mod_treeview.connect('cursor-changed',mod_selection, self)
# FIX ^^

# Add code to get unit sides and apply to self.old_sides
	self.old_sides = Index_Mod.mod_archive_sides(self)

        # create a CellRenderers to render the data
        self.cell1  = gtk.CellRendererText()

        # set background color property
		# add code to define background colour if peep = ai ?
        self.cell1.set_property('cell-background', 'white')

        # add the cells to the columns
	self.mod_column_1.pack_start(self.cell1, False)

        # set the cell attributes to the appropriate liststore column
        self.mod_column_1.set_attributes(self.cell1, text=0)

        # make treeview searchable
        self.mod_treeview.set_search_column(0)



						# Frame - Unit Browser
	unit_browser_frame = frame_create("Unit Browser")
	unit_browser_frame.show()
	mod_table.attach(unit_browser_frame, 0,2,1,2)


		# Frame - Restricted Units
	disabled_units_frame = create_page(self, notebook, 'Restricted Units', 100, 75)
		# Frame - Download Maps/Mods
	download_map_mods_frame = create_page(self, notebook, 'Download Maps / Mods', 100, 75)
					# Table - Download Maps/Mods
	download_map_mods_table = gtk.Table(rows=2, columns=2, homogeneous=False)
	download_map_mods_table.show()
	download_map_mods_frame.add(download_map_mods_table)
Beispiel #5
0
def create(self, notebook):
    # Frame - General
    general_frame = create_page(self, notebook, 'General', 100, 75)
    # Table
    general_table = gtk.Table(rows=2, columns=1, homogeneous=False)
    general_table.show()
    general_frame.add(general_table)
    # Name
    name_label = label_create('Name')
    self.player_name = gtk.Entry(max=0)
    self.player_name.set_text(
        Config.get_option(self.conf_temp, 'GAME', 'name', 'Player'))
    self.player_name.show()
    general_table.attach(name_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL, 10, 10)
    general_table.attach(self.player_name, 1, 2, 0, 1, gtk.FILL, gtk.FILL, 10,
                         10)

    # Frame - Graphics
    graphics_frame = create_page(self, notebook, 'Graphics', 100, 75)
    # Table
    graphics_table = gtk.Table(rows=1, columns=2, homogeneous=False)
    graphics_table.show()
    graphics_frame.add(graphics_table)
    # Resolution
    resolution_label = label_create("Resolution")
    self.resolution_combobox = combobox_setup(self.conf_temp, 'GAME',
                                              'XResolution',
                                              GLOBAL.Resolution_Default,
                                              GLOBAL.Resolution)
    graphics_table.attach(resolution_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL, 10,
                          10)
    graphics_table.attach(self.resolution_combobox, 1, 2, 0, 1, gtk.FILL,
                          gtk.FILL, 10, 10)
    # Fullscreen
    fullscreen_label = label_create("Fullscreen")
    self.fullscreen_combobox = combobox_setup(self.conf_temp, 'GAME',
                                              'Fullscreen',
                                              GLOBAL.Fullscreen_Default,
                                              GLOBAL.Fullscreen)
    graphics_table.attach(fullscreen_label, 0, 1, 1, 2, gtk.FILL, gtk.FILL, 10,
                          10)
    graphics_table.attach(self.fullscreen_combobox, 1, 2, 1, 2, gtk.FILL,
                          gtk.FILL, 10, 10)
    # Shadows
    shadows_label = label_create("Shadows")
    self.shadows_combobox = combobox_setup(self.conf_temp, 'GAME', 'Shadows',
                                           GLOBAL.Shadows_Default,
                                           GLOBAL.Shadows)
    graphics_table.attach(shadows_label, 0, 1, 2, 3, gtk.FILL, gtk.FILL, 10,
                          10)
    graphics_table.attach(self.shadows_combobox, 1, 2, 2, 3, gtk.FILL,
                          gtk.FILL, 10, 10)
    # Fullscreen Anti-Aliasing
    fsaa_label = label_create("FSAA")
    fsaa_value = float(
        Config.get_option(self.conf_temp, 'GAME', 'FSAA', GLOBAL.FSAA_Default))
    if fsaa_value != 0:
        fsaa_value = float(
            Config.get_option(self.conf_temp, 'GAME', 'FSAALevel',
                              GLOBAL.FSAALevel_Default))
    fsaa_adjustment = gtk.Adjustment(fsaa_value,
                                     GLOBAL.FSAALevel[0],
                                     GLOBAL.FSAALevel[1],
                                     GLOBAL.FSAALevel[2],
                                     GLOBAL.FSAALevel[3],
                                     page_size=0)
    self.fsaa_spinner = gtk.SpinButton(fsaa_adjustment, 0, 0)
    self.fsaa_spinner.show()
    graphics_table.attach(fsaa_label, 0, 1, 3, 4, gtk.FILL, gtk.FILL, 10, 10)
    graphics_table.attach(self.fsaa_spinner, 1, 2, 3, 4, gtk.FILL, gtk.FILL,
                          10, 10)

    # Frame - Adv Graphics
    adv_graphics_frame = create_page(self, notebook, 'Adv Graphics', 100, 75)
    # Table
    adv_graphics_table = gtk.Table(rows=2, columns=4, homogeneous=False)
    adv_graphics_table.show()
    adv_graphics_frame.add(adv_graphics_table)
    # 'GroundDecals'
    ground_decals_label = label_create("Ground Decals")
    self.ground_decals_spinner = spinner_create(self.conf_temp, 'GroundDecals',
                                                GLOBAL.Ground_Decals_Default,
                                                GLOBAL.Ground_Decals)
    adv_graphics_table.attach(ground_decals_label, 0, 1, 0, 1, gtk.FILL,
                              gtk.FILL, 10, 10)
    adv_graphics_table.attach(self.ground_decals_spinner, 1, 2, 0, 1, gtk.FILL,
                              gtk.FILL, 10, 10)
    # GroundDetail
    ground_detail_label = label_create("Ground Detail")
    self.ground_detail_spinner = spinner_create(self.conf_temp, 'GroundDetail',
                                                GLOBAL.Ground_Detail_Default,
                                                GLOBAL.Ground_Detail)
    adv_graphics_table.attach(ground_detail_label, 0, 1, 1, 2, gtk.FILL,
                              gtk.FILL, 10, 10)
    adv_graphics_table.attach(self.ground_detail_spinner, 1, 2, 1, 2, gtk.FILL,
                              gtk.FILL, 10, 10)

    # GrassDetail
    grass_detail_label = label_create("Grass Detail")
    self.grass_detail_spinner = spinner_create(self.conf_temp, 'GrassDetail',
                                               GLOBAL.Grass_Detail_Default,
                                               GLOBAL.Grass_Detail)
    adv_graphics_table.attach(grass_detail_label, 0, 1, 2, 3, gtk.FILL,
                              gtk.FILL, 10, 10)
    adv_graphics_table.attach(self.grass_detail_spinner, 1, 2, 2, 3, gtk.FILL,
                              gtk.FILL, 10, 10)
    # MaxParticles
    max_particles_label = label_create("Max Particles")
    self.max_particles_spinner = spinner_create(self.conf_temp, 'MaxParticles',
                                                GLOBAL.Max_Particles_Default,
                                                GLOBAL.Max_Particles)
    adv_graphics_table.attach(max_particles_label, 0, 1, 3, 4, gtk.FILL,
                              gtk.FILL, 10, 10)
    adv_graphics_table.attach(self.max_particles_spinner, 1, 2, 3, 4, gtk.FILL,
                              gtk.FILL, 10, 10)
    # UnitLodDist
    unit_lod_distance_label = label_create("Unit Lod Distance")
    self.unit_lod_distance_spinner = spinner_create(
        self.conf_temp, 'UnitIconDist', GLOBAL.Unit_Lod_Dist_Default,
        GLOBAL.Unit_Lod_Dist)
    adv_graphics_table.attach(unit_lod_distance_label, 0, 1, 4, 5, gtk.FILL,
                              gtk.FILL, 10, 10)
    adv_graphics_table.attach(self.unit_lod_distance_spinner, 1, 2, 4, 5,
                              gtk.FILL, gtk.FILL, 10, 10)

    # Frame - Adv Shaders
    adv_shaders_frame = create_page(self, notebook, 'Adv Shaders', 100, 75)
    # Table
    adv_shaders_table = gtk.Table(rows=1, columns=3, homogeneous=False)
    adv_shaders_table.show()
    adv_shaders_frame.add(adv_shaders_table)
    # AdvSky
    adv_sky_label = label_create("Advanced Sky")
    self.adv_sky_combobox = combobox_setup(self.conf_temp, 'GAME', 'AdvSky',
                                           GLOBAL.Adv_Sky_Default,
                                           GLOBAL.Adv_Sky)
    adv_shaders_table.attach(adv_sky_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL, 10,
                             10)
    adv_shaders_table.attach(self.adv_sky_combobox, 1, 2, 0, 1, gtk.FILL,
                             gtk.FILL, 10, 10)
    # DynamicSky
    dynamic_sky_label = label_create("Dynamic Sky")
    self.dynamic_sky_combobox = combobox_setup(self.conf_temp, 'GAME',
                                               'DynamicSky',
                                               GLOBAL.Dynamic_Sky_Default,
                                               GLOBAL.Dynamic_Sky)
    adv_shaders_table.attach(dynamic_sky_label, 0, 1, 1, 2, gtk.FILL, gtk.FILL,
                             10, 10)
    adv_shaders_table.attach(self.dynamic_sky_combobox, 1, 2, 1, 2, gtk.FILL,
                             gtk.FILL, 10, 10)
    # AdvUnitShading
    adv_unit_shading_label = label_create("Adv Unit Shading")
    self.adv_unit_shading_combobox = combobox_setup(
        self.conf_temp, 'GAME', 'AdvUnitShading',
        GLOBAL.Adv_Unit_Shading_Default, GLOBAL.Adv_Unit_Shading)
    adv_shaders_table.attach(adv_unit_shading_label, 0, 1, 2, 3, gtk.FILL,
                             gtk.FILL, 10, 10)
    adv_shaders_table.attach(self.adv_unit_shading_combobox, 1, 2, 2, 3,
                             gtk.FILL, gtk.FILL, 10, 10)

    # ReflectiveWater
    reflective_water_label = label_create("Reflective Water")
    self.reflective_water_combobox = combobox_setup(
        self.conf_temp, 'GAME', 'ReflectiveWater',
        GLOBAL.Reflective_Water_Default, GLOBAL.Reflective_Water)
    adv_shaders_table.attach(reflective_water_label, 0, 1, 3, 4, gtk.FILL,
                             gtk.FILL, 10, 10)
    adv_shaders_table.attach(self.reflective_water_combobox, 1, 2, 3, 4,
                             gtk.FILL, gtk.FILL, 10, 10)

    # Sound
    sound_frame = create_page(self, notebook, 'Sound', 100, 75)
    # Table - Debug
    sound_table = gtk.Table(rows=1, columns=4, homogeneous=False)
    sound_table.show()
    sound_frame.add(sound_table)
    # Sound Volume
    sound_volume_label = label_create("Sound Volume")
    self.sound_volume_spinner = spinner_create(self.conf_temp, 'SoundVolume',
                                               GLOBAL.Sound_Volume_Default,
                                               GLOBAL.Sound_Volume)
    sound_table.attach(sound_volume_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL, 10,
                       10)
    sound_table.attach(self.sound_volume_spinner, 1, 2, 0, 1, gtk.FILL,
                       gtk.FILL, 10, 10)
    # MaxSounds
    max_sounds_label = label_create("Max Sounds")
    self.max_sounds_spinner = spinner_create(self.conf_temp, 'MaxSounds',
                                             GLOBAL.Max_Sounds_Default,
                                             GLOBAL.Max_Sounds)
    sound_table.attach(max_sounds_label, 0, 1, 1, 2, gtk.FILL, gtk.FILL, 10,
                       10)
    sound_table.attach(self.max_sounds_spinner, 1, 2, 1, 2, gtk.FILL, gtk.FILL,
                       10, 10)

    # Debug
    debug_frame = create_page(self, notebook, 'Debug', 100, 75)
    # Table - Debug
    debug_table = gtk.Table(rows=1, columns=4, homogeneous=False)
    debug_table.show()
    debug_frame.add(debug_table)
    # VerboseLevel
    verbose_level_label = label_create("Verbose Level")
    self.verbose_level_spinner = spinner_create(self.conf_temp, 'VerboseLevel',
                                                GLOBAL.Verbose_Level_Default,
                                                GLOBAL.Verbose_Level)
    debug_table.attach(verbose_level_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL, 10,
                       10)
    debug_table.attach(self.verbose_level_spinner, 1, 2, 0, 1, gtk.FILL,
                       gtk.FILL, 10, 10)
    # CatchAIExceptions
    catch_ai_exceptions_label = label_create("Catch AI Exceptions")
    self.catch_ai_exceptions_combobox = combobox_setup(
        self.conf_temp, 'GAME', 'CatchAIExceptions',
        GLOBAL.Catch_AI_Exceptions_Default, GLOBAL.Catch_AI_Exceptions)
    debug_table.attach(catch_ai_exceptions_label, 0, 1, 1, 2, gtk.FILL,
                       gtk.FILL, 10, 10)
    debug_table.attach(self.catch_ai_exceptions_combobox, 1, 2, 1, 2, gtk.FILL,
                       gtk.FILL, 10, 10)