Ticket #103: embed_pdf_in_browse.patch

File embed_pdf_in_browse.patch, 733 bytes (added by sayamindu, 15 years ago)

Patch to implement the feature

  • webactivity.py

    diff --git a/webactivity.py b/webactivity.py
    index e17d3b2..aa8c9a9 100644
    a b _profile_version = 0 
    4444_profile_path = os.path.join(activity.get_activity_root(), 'data/gecko')
    4545_version_file = os.path.join(_profile_path, 'version')
    4646
     47_plugin_path = os.path.join(os.environ['SUGAR_BUNDLE_PATH'], 'plugins')
     48_mozplugger_conf_path = os.path.join(os.environ['SUGAR_BUNDLE_PATH'], 'plugins', \
     49                'conf')
     50
     51# Setup some env variables for the embedded PDF viewer
     52os.environ['MOZ_PLUGIN_PATH'] = _plugin_path
     53os.environ['OPERA_DIR'] = _mozplugger_conf_path #XXX
     54
    4755if os.path.exists(_version_file):
    4856    f = open(_version_file)
    4957    _profile_version = int(f.read())