URL:
http://gna.org/bugs/?13542
Summary: [Patch] Game scenario properties in property editor
Project: Freeciv
Submitted by: mbook
Submitted on: Thursday 05/21/2009 at 06:04
Category: editor
Severity: 3 - Normal
Priority: 1 - Later
Status: Ready For Test
Assigned to: mbook
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release:
Operating System: None
___
Details:
Attached patch implements the 4 new scenario fields
of the game struct as editable properties of the
game object in the property editor, and a few other
small changes I did not feel like splitting into
separate patches. Depends on RT#40229, GNA#13540.
The main novelty is that the extviewer property
widget is augmented so that the 'description'
property can be edited in a full, multi-line textview.
Some small improvements/changes in nearby code:
- Removed the 'is_scenario' if-test in handle_scenario
_info(), on both the client side and the server side
(this is because the property editor expects that
fields can be set individually).
- Added editable gtktextviews to the types of widgets
allowed to grab keyboard events in toplevel_handler()
in gui_main.c (man was this annoying to track down).
- Updated network capstring due to new packet fields.
- Added error message for missing handler in
extviewer_view_cell_toggled().
- Split up propval_free() into itself and propval_free
_data() (I thought this would be needed, but then it
turned out not to be; I left it anyway for posterity).
- Factored out some common code in extviewer_clear
_widgets() switch cases.
- Fixed typo extviwer (twice).
I'm not sure if the duplicated work in handle_scenario
_info() and handle_edit_game() is ideal. Sure if there
were a specialized gui widget for setting scenario
parameters it would have to use the scenario info
packet, but I think the property editor is enough (I
will fix it up soon so that it is less annoying to
use).
I also noticed that I am basically reimplementing the
delta code in the edit handlers... it would be great
if the handler functions could access the delta
bitfields so that the if-checks would not need to
be run twice, but I suppose the delta compression
could also just be turned off with the 'no-delta'
flag in the packet definitions. I'll check which
solution would be best later.
私のシナリオにある役割が欲しいか。
___
File Attachments:
---
Date: Thursday 05/21/2009 at 06:04 Name: game_scenario_properties.patch
Size: 21kB By: mbook
http://gna.org/bugs/download.php?file_id=5799
___
Reply to this item at:
http://gna.org/bugs/?13542
___
Message sent via/by Gna!
http://gna.org/
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev