Give the user more flexibility by Konubinix · Pull Request #150 · uzbl/uzbl

@Konubinix

…nstead of

hardcoding their value.

* (uzbl/plugins/cookies.py) Use the value from the environment variables
  UZBL_COOKIE_FILE and UZBL_SESSION_COOKIE_FILE if they exist
* (examples/config/config) Load the session cookies using
  UZBL_SESSION_COOKIE_FILE instead of hardcoding the value

The scripts, the plugins and the configuration file don't make use of the same
mechanism to set variables. The default values for the session cookies where not
coherent between those: the plugins and the configuration file hardcoded the
value ${XDG_DATA_HOME}/session-cookies.txt while the scripts could override this
value by setting the environment variable UZBL_SESSION_COOKIE_FILE (see the
examples/data/scripts/util/uzbl-dir.sh file). This caused strange behavior when
the user would set the UZBL_SESSION_COOKIE_FILE variable since the scripts did
not reach the session cookies at the same location than the uzbl-core and the
cookies plugin.

This patch makes sure that the configuration file and the cookies plugin also
take into account the environment variable UZBL_SESSION_COOKIE_FILE so that the
behavior remain coherent with the scripts.