Ignore:
Timestamp:
12/04/13 17:52:41 (11 years ago)
Author:
jts21
Message:

Add settings package which uses reflection to allow changing settings without hard coding the code to change every setting.

  • Currently only works for String/Int/Boolean/Double values
  • Supports default values by looking for fields with the prefix 'default', and will reset unset values to their default if a default exists.
  • For more complex settings (e.g. proxy settings), there is a "onParsed()" callback which can be used to run additional code, and (in the case of the password widget) parse abnormal items.
  • Some of the settings code in FrameUtils.ParseProfile has already been commented out since it's handled by default with the new Settings package. The rest could be moved over to UserSettings.onParsed(). Given the number of settings that remain to be moved, it may be a good idea to add the possibility for setting-specific onParsed() callbacks (could be done quite easily, similarly to how default values are handled).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/items/widgets/JfxBrowser.java

    r569 r570  
    2828import org.expeditee.gui.FreeItems;
    2929import org.expeditee.gui.MessageBay;
    30 import org.expeditee.gui.UserSettings;
    3130import org.expeditee.io.WebParser;
    3231import org.expeditee.items.Item;
    3332import org.expeditee.items.Text;
    3433import org.expeditee.reflection.JavaFX;
     34import org.expeditee.settings.network.NetworkSettings;
    3535
    3636/**
     
    418418                                (firstSpace != -1 && firstSpace < firstSQ)) {      // no '/' or '?'             -> search
    419419                                // make it a search
    420                                 actualURL = UserSettings.searchEngine + url;
     420                                actualURL = NetworkSettings.searchEngine + url;
    421421                        } else {
    422422                                // add the missing protocol
Note: See TracChangeset for help on using the changeset viewer.