1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
DEBIAN-SPECIFIC
Adjust paths to match Debian packaging.
http://bugs.debian.org/299959
https://launchpad.net/bugs/339323
Index: drpython-3.11.0/drAboutDialog.py
===================================================================
--- drpython-3.11.0.orig/drAboutDialog.py 2009-04-06 23:57:01.000000000 +0200
+++ drpython-3.11.0/drAboutDialog.py 2009-04-07 00:07:42.000000000 +0200
@@ -95,7 +95,7 @@
author.SetFont(standardfont)
- credits = drStaticLink(self, 1, ' Credits ', 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 @@
wx.Panel.__init__(self, parent, id)
try:
- f = file(drframe.programdirectory + "/documentation/gpl.html", 'rb')
+ f = file('/usr/share/doc/drpython/documentation/gpl.html', 'rb')
text = f.read()
f.close()
except:
@@ -207,7 +207,7 @@
self.topSizer.Add(wx.lib.stattext.GenStaticText(self, -1, ' '), 0, wx.SHAPED | wx.ALIGN_CENTER_VERTICAL)
- self.topSizer.Add(wx.StaticBitmap(self, -1, wx.BitmapFromImage(wx.Image(parent.programdirectory + "/documentation/drpython.png", wx.BITMAP_TYPE_PNG))), 0, wx.SHAPED | wx.ALIGN_CENTER_VERTICAL)
+ self.topSizer.Add(wx.StaticBitmap(self, -1, 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.0/drScriptMenu.py
===================================================================
--- drpython-3.11.0.orig/drScriptMenu.py 2009-04-06 23:57:00.000000000 +0200
+++ drpython-3.11.0/drScriptMenu.py 2009-04-07 00:07:42.000000000 +0200
@@ -200,7 +200,7 @@
self.scriptcount = 0
if self.parent.prefs.drscriptloadexamples:
self.examplemenu = wx.Menu()
- self.loadscriptsfromfile(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.0/drpython.py
===================================================================
--- drpython-3.11.0.orig/drpython.py 2009-04-06 23:57:01.000000000 +0200
+++ drpython-3.11.0/drpython.py 2009-04-07 00:07:42.000000000 +0200
@@ -162,7 +162,7 @@
self.stcshortcutlist = drShortcutsFile.GetSTCShortcutList()
- self.programdirectory = os.path.dirname(os.path.abspath(sys.argv[0])).replace("\\", "/")
+ self.programdirectory = '/usr/share/drpython'
#Preferences
@@ -2798,8 +2798,7 @@
drAboutDialog.Show(self)
def OnViewHelp(self, event):
- self.ViewURLInBrowser(self.programdirectory + "/documentation/help.html")
-
+ self.ViewURLInBrowser('/usr/share/doc/drpython/documentation/help.html')
def OnViewInLeftPanel(self, event):
self.viewinpaneltarget = 0
Index: drpython-3.11.0/examples/DrScript/drscript.dat
===================================================================
--- drpython-3.11.0.orig/examples/DrScript/drscript.dat 2009-04-06 23:57:01.000000000 +0200
+++ drpython-3.11.0/examples/DrScript/drscript.dat 2009-04-07 00:07:42.000000000 +0200
@@ -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.0/drPreferences.py
===================================================================
--- drpython-3.11.0.orig/drPreferences.py 2009-04-06 23:57:01.000000000 +0200
+++ drpython-3.11.0/drPreferences.py 2009-04-07 00:07:42.000000000 +0200
@@ -526,8 +526,15 @@
self.documentationbrowser = "mozilla"
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://www.amk.ca/python/howto/regex/"
def __getitem__(self, key):
Index: drpython-3.11.0/drPrefsDialog.py
===================================================================
--- drpython-3.11.0.orig/drPrefsDialog.py 2009-04-07 00:08:49.000000000 +0200
+++ drpython-3.11.0/drPrefsDialog.py 2009-04-07 00:09:12.000000000 +0200
@@ -1316,7 +1316,7 @@
self.EndModal(0)
def OnbtnHelp(self, event):
- self.parent.ViewURLInBrowser(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)
|