> I'd suggest a few changes in the implementation, to better match the > existing code: > > - Instead of a global variable (especially one without a "g" or other > prefix to make it obvious), just add a MythContext method, similar to > GetShareDir() -- maybe GetConfDir().
I thought along those lines originally, but it looked to me like it was a chicken/egg issue since currently all of the path selection for .mythtv dir is done prior to creating the context object. If I'm missing something here, let me know, it does seem like a central routine would be better, I just don't see how to make it a part of that object. There may be a way though - if I moved all of the logic for calculating the directory path into the MythContext new(), and ONLY supported the environment var below, that might solve this. Simplest would be to still keep things done out front, but do something similar to MythContext::DBError so it can be used prior to MythContext object being created. > - Allow absolute paths instead of confining it to the home directory. > You can always set it to "$HOME/.mythtv-fullscreen" or > whatever, but it > should be more flexible. Fair enough, will be quite a bit larger patch though. What do you think - if starts with a /, is absolute, otherwise assume relative to homedir? > - MythContext accepts an environment variable to change the install > prefix (used by GetShareDir() and others), so perhaps the conf dir > should be set by an environment variable too. That way, you > don't have > to add separate patches for mythfrontend, setup, etc. I'll look at adding that, and also updating the usage output, since I forgot to add something there. > With these changes, I'd support the addition of such a feature. > > - Jer > > P.S. Style comment: please keep lines wrapped to 80 characters, and > convert all tabs to spaces before making a patch. Will do. >
_______________________________________________ mythtv-dev mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
