<URL: http://bugs.freeciv.org/Ticket/Display.html?id=23523 >
WARNING: this is the first time I code for Windows, the first time I use a tracker system and probably the biggest thing I've worked on. So please be kind, I'm willing to correct the mistakes I've made. Patch against 2.0.8 from the download page. From my naive web browsing of the devel branches, the affected file has not changed afterwards. Line 887-888 needs _WIN32_IE defined to be >= 0x0300. Which is the lower version supported? If they are to stay, that define should be included somewhere. I don't know where to put it. If it's to be in the configure scripts, I don't even know how to do it. The line adds two extended styles to the listview. The first one extends selections to full rows, instead of keeping them just for the first column items. The second one allows reordering of columns by drag and drop. I don't care much about HEADERDRAGDROP, I find it just a nicety, the ordering is not remembered when the dialog is closed. I like FULLROWSELECT, though, and if it is accepted I'd like to see it in other places, like the production dialog. Both can be wiped without much loss, anyway. I changed a few GetDlgItem(hWnd,ID_CITYREP_LIST) to the global variable we have. If this is bad practice, please tell me. I haven't deleted the HWND parameters that are made superfluous with that change, though. Some actions were limited to a maximum of 256 of the selected cities. I've used dinamically allocated arrays, so now they're not. Again, if that was a feature, remember to say it. When you configure the dialog to not show a column by which you have sorted the cities, these are reordered by a shown column in the next update of the dialog. In the current version the sort order is kept, so you can show a column, sort by that column and hide it again. If that's the way it must be, it can be brought back. The implementation of get_selected_cities may lead to memory leaks, as the caller must free an array allocated inside. If this is really seen as a risk, what's the preferred interface? There's flicker during the automatic column sizing. This can be solved by calculating the best size and changing it only when appropriate. What I do now is to ask the column to resize itself so that all its items fit and, if that shrinks it, restore its previous width. Center, popup, buy and change buttons now start disabled (there's nothing selected). Window size and position are remembered when it's closed and used when opened again (though not minimized/maximized state). Return/doubleclick popups selected cities' dialogs. Selection is remembered through updates. Implemented hilite_cities_from_canvas and toggle_city_hilite. Got rid of Refresh button. I've tried to follow the coding style while leaving untouched the parts that don't follow it in the original. Oh, yes, and Courier is no more (in this dialog). ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com
cityreplv.diff.gz
Description: GNU Zip compressed data
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev