DarkFenX/Pyfa — pull request #53 by blitzmann (2014-02-24 17:05:02+00:00)
Title: Fleet booster refactoring

This pull request satisfies issue #51: it adds a better way to apply boosters to fits. Features include:

* Right click -> Flag as Booster on fits. This flags the fit as a booster, which enables...
* Icon on fit showing it's a booster
* Drop down in fleet window showing all flagged fits
* Old-style dragging/setting from context menu still works (In case you want to play around with a booster and not flag it as one.)
* Refactoring of fleet window code base: UI elements are stored in `self.fleet`, and simply loops to apply UI elements. This has the benefit of removing some redundancy and allowing quick changes to take place in the future.
* Unspecified commanders also have the character drop down disabled, which better shows that it is not active.

When a fit is applied, the dropdown is replaced with static text of the fit's name. Double click removes the fit as a booster, and displays the drop down again. This is so that we can support dragging non-flagged ships to the window without adding them to the dropdown.

I've tested this extensively today. The DB schema migration works for v1.1.21 databases and most likely for all previous versions. '''However''', I would like this to be tested by a few other people is possible.

Issues:
* I couldn't find a way to size the dropdown horizontally based on the windows width. This causes it to be long and, in some cases, cause horizontal scrollbar. I will continue to look into this, but more input is welcome
* The icon in the fitting list that shows as a booster is actually a button on the toolbar. I tried to play around with it in `sfBrowserItem.py` to get it to not move on Mouse Click and whatnot, to simply acts as an icon, but didn't get very far. Would love for someone to look more into this, as right now people might thinks it's a button that's supposed to do something but doesn't.

Pictures:
Showing new option in fitting context menu, along with new booster button/icon
![finalcontext](https://f.cloud.github.com/assets/3904767/2248061/1bd39588-9d75-11e3-88b7-4e0e66f9eb87.PNG)

Showing new fleet view, with drop downs. Wing commander is currently being applied, and I am selecting a new squad commander with the drop down which is filled with flagged fits. Note: you can still drag/right click fits to add them as boosters:
![finalview](https://f.cloud.github.com/assets/3904767/2248075/48089374-9d75-11e3-95cd-1b7bd6de1372.PNG)