Opened 11 years ago

Closed 9 years ago

Last modified 9 years ago

#60 closed task (released)

Add UI to add/remove/edit weapons in GTK

Reported by: ibboard Owned by:
Priority: major Milestone: WarFoundry 0.1
Component: WarFoundry-GUI-GTK# Version: Unknown or N/A
Keywords: Cc:
Blocked By: Blocking: #86

Description

The WinForms interface is currently slightly ahead of the GTK# interface as it lets users add/edit/remove weapons. We need a matching interface for the GTK# version of the app.

Change History (27)

comment:1 Changed 11 years ago by ibboard

Blocking: 86 added

comment:2 Changed 10 years ago by ibboard

Owner: ibboard deleted

Remove owner so that the team can more easily see bugs. Using default owners seems good at first but is bad practice when a team can be working on any part of the project.

comment:3 Changed 10 years ago by ibboard

Status: newconfirmed

Move tickets to new "confirmed" status to show that they've been checked

comment:4 Changed 9 years ago by ibboard

(In r655) Re #60: Add UI to add/remove/edit weapons in GTK

  • Start to implement Add functionality using a new abstraction concept that keeps the UI dumb and keeps the logic in a cross-toolkit controller

comment:5 Changed 9 years ago by ibboard

(In r656) Re #60: Add UI to add/remove/edit weapons in GTK

  • Remove "not implemented" exceptions and add first implementation of setting equipment list
  • Add widgets to add equipment form
  • Subscribe to Clicked instead of Activated to hook on to correct event
  • Extract tree rendering method into helper class

Also:

  • Improve exception handling of unhandled exceptions (print full stack trace with "caused by" hierarchy)

comment:6 Changed 9 years ago by ibboard

(In r657) Re #60: Add UI to add/remove/edit weapons in GTK

  • Use proper method for making dialog appear

Re #306: Combine equipment lists in GTK#

  • Populate unit equipment lists on unit display widget

comment:7 Changed 9 years ago by ibboard

(In r658) Re #60: Add UI to add/remove/edit weapons in GTK

  • Add selection change notification from equipment list
  • Make ShowControl method return a boolean to say what the user did with it
  • Re-implement ShowControl to use Run() instead of ShowNow() so we can get a response result

comment:8 Changed 9 years ago by ibboard

(In r659) Re #60: Add UI to add/remove/edit weapons in GTK

  • Make some manual changes to the Steic-generated file until MonoDevelop bug 634447 is resolved
  • Add logging to UI
  • Make control close once we're done with it
  • Set values for equipment controls

comment:9 Changed 9 years ago by ibboard

(In r660) Re #60: Add UI to add/remove/edit weapons in GTK

  • Refactor enabling/disabling of radio buttons
  • Handle null selections
  • Move Dispose() to be an interface method and move call out to controller

comment:10 Changed 9 years ago by ibboard

(In r661) Re #60: Add UI to add/remove/edit weapons in GTK

  • Make enabling/disabling fit the values passed (copied from existing WinForms checks)
  • Add extra interface methods and properties to get necessary values from UI to use in command
  • Implement new interface methods
  • Implement command execution
  • Make use of IDisposable interface instead of defining Dispose ourselves

Also:

  • Use existing method of printing exception stack traces in main window

comment:11 Changed 9 years ago by ibboard

(In r662) Re #60: Add UI to add/remove/edit weapons in GTK

  • Fix GTK error about tree model columns by populating the store correctly

comment:12 Changed 9 years ago by ibboard

(In r663) Re #60: Add UI to add/remove/edit weapons in GTK

  • Handle updating of the equipment list on add/remove
  • Move to a ListStore so that we don't get indentation

comment:13 Changed 9 years ago by ibboard

(In r664) Re #60: Add UI to add/remove/edit weapons in GTK

  • Implement Remove button
  • Hack "code-behind" file again to make things work, until MD bug is fixed

comment:14 Changed 9 years ago by ibboard

(In r665) Re #60: Add UI to add/remove/edit weapons in GTK

  • Add events to track equipment amount and amount changing
  • Select most appropriate equipment type by default
  • Add methods an implementation for enabling/disabling Okay button

comment:15 Changed 9 years ago by ibboard

(In r666) Re #60: Add UI to add/remove/edit weapons in GTK

  • Add initial code to keep numeric and percentage in sync

TODO: Allow users to change the non-selected one (e.g. select percentage but set the percentage by incrementing the number)

comment:16 Changed 9 years ago by ibboard

(In r667) * FrmAddEquipment.cs: Re #60: Add UI to add/remove/edit weapons in

GTK

  • Cache more values in the controller so that we don't rely on the UI as a the model/data store
  • Move enable/disable of amount controls to controller (assumes minimum numeric and percentage, so implementation has its own custom implementation to handle "Equip All")
  • AddEquipmentUIControl.cs:
  • IAddEquipmentUI.cs:

comment:17 Changed 9 years ago by ibboard

(In r668) Re #60: Add UI to add/remove/edit weapons in GTK

  • Add most of basic "edit" interface, based on "add" interface

TODO:

  • Set initial values
  • Warn when setting to 0

comment:18 Changed 9 years ago by ibboard

(In r670) Re #60: Add UI to add/remove/edit weapons in GTK

  • Add titles and make dialogs not appear on task list
  • Capture ratio amounts in Control object's local variable, otherwise we get 0s
  • Set initial values when editing equipment
  • Only enable the Edit button when we can edit

comment:19 Changed 9 years ago by ibboard

(In r671) Re #60: Add UI to add/remove/edit weapons in GTK

  • Add a method to determine whether we can change the equipment amount or not

Also:

  • Remove unnecessary library reference

comment:20 Changed 9 years ago by ibboard

Version: Unknown or N/A

Add/Edit/Remove now implemented - just need "replace".

comment:21 Changed 9 years ago by ibboard

(In r672) Re #60: Add UI to add/remove/edit weapons in GTK

  • Rip apart UI controls and put all the common code in a base class
  • Add additional interfaces for common UI behaviour between equipment widgets

Not tested, but should provide a base for Replace widget

comment:22 Changed 9 years ago by ibboard

In [708]:

Re #60: Add UI to add/remove/edit weapons in GTK

  • Add "Replace" dialog

Note: Dialog null refs because of a bad assumption in the base class - base constructor calls SetupUI before Replace constructor has set all of its values

comment:23 Changed 9 years ago by ibboard

In [709]:

Re #60: Add UI to add/remove/edit weapons in GTK

  • Fix errors in replace dialog (move UI setup to just before we show)

Also:

  • Fix missing refresh of army tree on equipment/points value change

comment:24 Changed 9 years ago by ibboard

In [710]:

Re #60: Add UI to add/remove/edit weapons in GTK

  • Fix widget enabling/disabling (sometimes enabling ratio input for numeric limit)
  • Correct behaviour of Edit dialog (setting wrong value on edit)
  • Add setting of limits based on specific equipment item to base dialog controller
  • Make sure that we catch all radio button click events from Edit dialog
  • Add ability to ignore and listen to widgets to make sure that changes don't cascade

TODO: See if code can be tidied up and common classes created

comment:25 Changed 9 years ago by ibboard

Closing ticket - Extra "TODO" task can be completed later.

comment:26 Changed 9 years ago by ibboard

Resolution: fixed
Status: confirmedclosed

Closing ticket - Extra "TODO" task can be completed later.

comment:27 Changed 9 years ago by ibboard

Resolution: fixedreleased

Released in WF GTK v0.1 beta 1

Note: See TracTickets for help on using tickets.