[duplicate code] Refactor SimpleConfigure(Fetch|Push)Dialog
These two classes were a bad case of copy-paste programming. Resolve
code duplication by factoring out common things into a common super
class, give dialogs an image to make them look better in the dark
theme, and catch exceptions in RefSpecDialog.
Use actions instead of buttons for the, well, _actions_ available on
refspecs, use them in a context menu, and register the actions. Thus
copy/paste/etc. can be handled the standard way without having to
add a key listener to the table. Make the buttons use these actions,
and make the buttons respect the action enablement.
Remove the last remnants of the ADVANCED_MODE preference. Originally
these dialogs had an expandable section for advanced configuration,
and that preference recorded whether it was expanded. However, in
commit
6514813 on 2012-03-15, this whole expandable section was
removed and thus there was no way anymore to set that preference
to any value. But the dialogs still tested it... which means the
"Modify..." button would basically never appear. Now it is always
present.
Note that there is more not so obvious "duplication" regarding
RefSpecDialog and SimpleFetchRefSpecWizard. It seems to me these are
two different implementations for basically the same functionality.
I plan to clean that up in a later commit, which is why in
RefSpecDialog I only added catching (and ignoring) exceptions, but
didn't add some mechanism to display warnings or errors. Thus the
current behavior is unchanged, except for not logging exceptions
during typing.
Change-Id: Ice317a210461e71f71b633227f39907ca651b86d
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>