DEBIAN-SPECIFIC
Adjust paths to match Debian packaging.
http://bugs.debian.org/299959
https://launchpad.net/bugs/339323

Index: drpython-3.11.4/drAboutDialog.py
===================================================================
--- drpython-3.11.4.orig/drAboutDialog.py
+++ drpython-3.11.4/drAboutDialog.py
@@ -95,7 +95,7 @@ class drAboutContentPanel(wx.Panel):
 
         author.SetFont(standardfont)
 
-        credits = drStaticLink(self, 1, " Credits ", os.path.join(drframe.programdirectory, "documentation/credits.html"), drframe)
+        credits = drStaticLink(self, 1, " Credits ", "/usr/share/doc/drpython/documentation/credits.html", drframe)
 
         website = drStaticLink(self, 2, " http://drpython.sourceforge.net/ ", "http://drpython.sourceforge.net/", drframe)
 
@@ -138,7 +138,7 @@ class drLicensePanel(wx.Panel):
         wx.Panel.__init__(self, parent, id)
 
         try:
-            f = open(os.path.join(drframe.programdirectory, "documentation/gpl.html"), "rb")
+            f = open("/usr/share/doc/drpython/documentation/gpl.html", "rb")
             text = f.read()
             f.close()
         except:
@@ -225,7 +225,7 @@ class drAboutDialog(wx.Dialog):
         if rootmode:
             iconname = "drpython_root.png"
         self.topSizer.Add(wx.StaticBitmap(self, -1,
-            wx.BitmapFromImage(wx.Image(os.path.join(parent.bitmapdirectory, iconname), wx.BITMAP_TYPE_PNG))),
+            wx.BitmapFromImage(wx.Image("/usr/share/doc/drpython/documentation/drpython.png", wx.BITMAP_TYPE_PNG))),
             0, wx.SHAPED | wx.ALIGN_CENTER_VERTICAL)
 
         self.topSizer.Add(wx.lib.stattext.GenStaticText(self, -1, "  "), 0, wx.SHAPED | wx.ALIGN_CENTER_VERTICAL)
Index: drpython-3.11.4/drScriptMenu.py
===================================================================
--- drpython-3.11.4.orig/drScriptMenu.py
+++ drpython-3.11.4/drScriptMenu.py
@@ -200,7 +200,7 @@ class drScriptMenu(drMenu):
         self.scriptcount = 0
         if self.parent.prefs.drscriptloadexamples:
             self.examplemenu = wx.Menu()
-            self.loadscriptsfromfile(os.path.join(self.programdirectory, "examples/DrScript/drscript.dat"), self.examplemenu, 1)
+            self.loadscriptsfromfile('/usr/share/doc/drpython/examples/DrScript/drscript.dat', self.examplemenu, 1)
             self.AppendMenu(self.ID_EXAMPLE_SCRIPTS, "Examples", self.examplemenu)
             self.AppendSeparator()
 
Index: drpython-3.11.4/drpython.py
===================================================================
--- drpython-3.11.4.orig/drpython.py
+++ drpython-3.11.4/drpython.py
@@ -177,7 +177,7 @@ class DrFrame(wx.Frame):
 
         self.stcshortcutlist = drShortcutsFile.GetSTCShortcutList()
 
-        self.programdirectory = os.path.dirname(os.path.abspath(__file__)).replace('\\', '/')
+        self.programdirectory = '/usr/share/drpython'
 
         #Preferences
 
@@ -2844,7 +2844,7 @@ class DrFrame(wx.Frame):
         drAboutDialog.Show(self, DRPY_VER)
 
     def OnViewHelp(self, event):
-        self.ViewURLInBrowser(os.path.join(self.programdirectory, "documentation/help.html"))
+        self.ViewURLInBrowser('/usr/share/doc/drpython/documentation/help.html')
 
 
     def OnViewInLeftPanel(self, event):
Index: drpython-3.11.4/examples/DrScript/drscript.dat
===================================================================
--- drpython-3.11.4.orig/examples/DrScript/drscript.dat
+++ drpython-3.11.4/examples/DrScript/drscript.dat
@@ -1,8 +1,8 @@
-<path>examples/DrScript/ReverseAssignment.py</path><title>Reverse Assigment</title>
-<path>examples/DrScript/PrintEndOfLineCharactersInPrompt.py</path><title>Print End Of Line Characters In Prompt</title>
+<path>/usr/share/doc/drpython/examples/DrScript/ReverseAssignment.py</path><title>Reverse Assigment</title>
+<path>/usr/share/doc/drpython/examples/DrScript/PrintEndOfLineCharactersInPrompt.py</path><title>Print End Of Line Characters In Prompt</title>
 >Run In Terminal
-	<path>examples/DrScript/RunInTerminal.py</path><title>Run In Terminal</title>
-	<path>examples/DrScript/SetTerminalArgs.py</path><title>Set Arguments For Run In Terminal</title>
+	<path>/usr/share/doc/drpython/examples/DrScript/RunInTerminal.py</path><title>Run In Terminal</title>
+	<path>/usr/share/doc/drpython/examples/DrScript/SetTerminalArgs.py</path><title>Set Arguments For Run In Terminal</title>
 >In Selection
-	<path>examples/DrScript/ReplaceAllInSelection.py</path><title>Replace All In Selection</title>
-	<path>examples/DrScript/SwitcherooInSelection.py</path><title>Switcheroo In Selection</title>
+	<path>/usr/share/doc/drpython/examples/DrScript/ReplaceAllInSelection.py</path><title>Replace All In Selection</title>
+	<path>/usr/share/doc/drpython/examples/DrScript/SwitcherooInSelection.py</path><title>Switcheroo In Selection</title>
Index: drpython-3.11.4/drPreferences.py
===================================================================
--- drpython-3.11.4.orig/drPreferences.py
+++ drpython-3.11.4/drPreferences.py
@@ -529,8 +529,15 @@ class drPreferences:
         self.documentationbrowser = "firefox"
         if self.platform_is_windows:
             self.documentationbrowser = "<os.startfile>"
-        self.documentationpythonlocation = "http://www.python.org/doc/current/"
-        self.documentationwxwidgetslocation = "http://www.wxwidgets.org/docs.htm"
+        if (os.access("/usr/share/doc/python/html/index.html", os.F_OK)):
+            self.documentationpythonlocation = "/usr/share/doc/python/html/index.html"
+        else:
+            self.documentationpythonlocation = "http://www.python.org/doc/current/"
+
+        if (os.access("/usr/share/doc/wx2.6-doc/wx-manual.html/wx2.6-manual_contents.html", os.F_OK)):
+            self.documentationwxwidgetslocation = "/usr/share/doc/wx2.6-doc/wx-manual.html/wx2.6-manual_contents.html"
+        else:
+            self.documentationwxwidgetslocation = "http://www.wxwidgets.org/docs.htm"
         self.documentationrehowtolocation = "http://docs.python.org/howto/regex.html"
 
     def __getitem__(self, key):
Index: drpython-3.11.4/drPrefsDialog.py
===================================================================
--- drpython-3.11.4.orig/drPrefsDialog.py
+++ drpython-3.11.4/drPrefsDialog.py
@@ -1323,7 +1323,7 @@ class drPrefsDialog(wx.Dialog):
         self.EndModal(0)
 
     def OnbtnHelp(self, event):
-        self.parent.ViewURLInBrowser(os.path.join(self.parent.programdirectory, "documentation/preferences.html"))
+        self.parent.ViewURLInBrowser("/usr/share/doc/drpython/documentation/preferences.html")
 
     def OnbtnReset(self, event):
         answer = wx.MessageBox("This will reset all preferences to the program default.\n(You still need to click update and/or save)\nAre you sure you want to do this?", "Reset Preferences", wx.YES_NO | wx.ICON_QUESTION)
