UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Submit Patch #4579 Alomst implemented: sorting by columns when selling ufos
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "Not determined".
Issue basics
  • Type of issue
    Submit Patch
  • Category
    General
  • Targetted for
    Not determined
  • Status
    Closed
  • Priority
    3. Normal
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/patches/452 Item 452] imported from sourceforge.net tracker on 2013-01-28 20:39:33

Hi,
This is almost finished task https://sourceforge.net/tracker/?func=detail&aid=1774504&group_id=157793&atid=805245. I don't know how to align buttons on window :) It is one little thing that doesn't work. So, maybe someone could help me and fix this and make code review for me?


===== Comments Ported from Sourceforge =====

====== tmorawski (2009-12-29 20:35:49) ======


====== tmorawski (2009-12-29 20:36:21) ======


====== tlh2000 (2009-12-30 07:49:38) ======

thanks for the patch. i will have a closer look when i'm able to run ufo again. what i'm saying now is only from viewing the diff:

* sorry to say that - but we are (or better i am) very picky about the coding guidelines. your patch does not meet our whitespace guidelines

* also Prefix_Functionname_f functions are only for console callback functions - they don't accept parameters. a function with a parameter is no *_f function.

* we are not using c++ comments, but c comments (to be able to compile in strict ansi mode

besides the coding guidelines i like the idea but i can really only say more if i've seen it in action.

assigning this to bayo - our menu hero - maybe he can think about a more generic way to implement sorting in menus.
====== bayo-fr (2009-12-30 20:45:30) ======

unfortunatly i dont think we can easily create a table of a random number of widgets, additionaly if we want to sort column.
====== tmorawski (2009-12-30 21:58:36) ======

I think we can easy sort the contents of the text node that contains text, numbers. We need to determine value of "cells" in the column that we trying sort. So, we need to find the cells and copy values into temporary array and sort it.

====== tlh2000 (2009-12-31 12:24:38) ======

the text nodes are linked list nowadays in most cases - sorting them is not a real problem of course - we already have functions for this.

the problem is, that we have to find the right connected value with the linked list display texts.

i'm sorry, but bayo knows the menu stuff best, if he says it's not easy doable right now,that's at least nothing we will introduce in 2.3 - if you can come up with something for later versions, please do so - but make sure to discuss with bayo first.
====== geever (2009-12-31 22:29:46) ======

I've cleaned up and finished the patch, thank you. Applied to trunk in r27694. Here is the link for the changeset:
https://sourceforge.net/apps/trac/ufoai/changeset/27694

General sorting of menu nodes is another topic IMHO so I close this ticket.

-geever
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif