[PATCH] gtk-gui.c: Move the download dialog related code to a new file

Lubomir I. Ivanov neolit123 at gmail.com
Wed Jan 9 10:20:05 PST 2013


this is sensitive stuff, so i may have messed up a little or at least things
may be out of place here and there.

the patch performs the move with minimal changes i.e. so that it compiles +
runs, but not much else.

brief notes:
- new file is called download-dialog.c
- display-gtk.h now exposes some more functions such as update_screen()
and is_default_dive_computer()
- display-gtk.h now includes the OPTIONCALLBACK and UNITCALLBACK macros, but
renamed briefly with a SCREEN_ prefix, since these are related to
update_screen(). the rename was required since OPTIONCALLBACK was also present
in print.c. now..this may not be a good idea, but the only reason for them
to be in the header is because download-dialog.c requires the same
OPTIONCALLBACK and i've simply moved them both as a "couple of similar
macros". this may require changes...
- download_dialog_init() and download_dialog_exit() from download-dialog.c
are used only to retrieve the default DC from the user config. can be
approached differently if the declarations of default_dive_computer_*
are simply made extern in display-gtk.h, which might be a better choice.

please comment on the patch + notes, so that i can improve on it (if required)
and until the mod is acceptable, of course. it moves near 500 LOC from
gtk-gui.c.

lubomir
--

[PATCH] gtk-gui.c: Move the download dialog related code to a new file


More information about the subsurface mailing list