Changeset 140
- Timestamp:
- Sat Jan 26 05:33:28 2008
- Files:
-
- branches/mbutscher/work/WikidPad.xrc (modified) (diff)
- branches/mbutscher/work/extensions/KeyBindings.py (modified) (diff)
- branches/mbutscher/work/wikidpad_unicode.iss (modified) (diff)
- branches/mbutscher/work/Consts.py (modified) (diff)
- branches/mbutscher/work/WikidPadHelp/WikidPadHelp.wiki (modified) (diff)
- branches/mbutscher/work/WikidPadHelp/data/WIKIWORDPROPS.grl (modified)
- branches/mbutscher/work/WikidPadHelp/data/UrlLinking.wiki (modified) (diff)
- branches/mbutscher/work/WikidPadHelp/data/WIKIRELATIONS.grl (modified)
- branches/mbutscher/work/WikidPadHelp/data/MigrationBetweenDbTypes.wiki (modified) (diff)
- branches/mbutscher/work/WikidPadHelp/data/OptionsDialog.wiki (modified) (diff)
- branches/mbutscher/work/WikidPadHelp/data/ChangeLog.wiki (modified) (diff)
- branches/mbutscher/work/WikidPadHelp/data/WikiDocumentAttributes.wiki (modified) (diff)
- branches/mbutscher/work/WikidPadHelp/data/WIKIWORDS.grl (modified)
- branches/mbutscher/work/lib/pwiki/WikiTxtCtrl.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/PluginManager.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/Exporters.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/MainAreaPanel.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/WikiFormatting.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/WikiHtmlViewIE.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/timeView/CalendarPanel.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/timeView/TimelinePanel.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/I18nPoUpdater.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/wikidata/WikiDataManager.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/wikidata/original_sqlite/WikiData.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/wikidata/original_sqlite/DbStructure.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/wikidata/compact_sqlite/WikiData.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/wikidata/compact_sqlite/DbStructure.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/wikidata/original_gadfly/WikiData.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/wikidata/original_gadfly/DbStructure.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/wikidata/FileStorage.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/Configuration.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/AdditionalDialogs.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/TempFileSet.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/PersonalWikiFrame.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/WikiHtmlView.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/MainApp.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/StringOps.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/Localization.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/DocPagePresenter.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/WindowsHacks.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/WikiExceptions.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/SqliteThin3.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/WikiTreeCtrl.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/OptionsDialog.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/Ipc.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/Utilities.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/sqlite3api.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/PageAst.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/Importers.py (modified) (diff)
- branches/mbutscher/work/lib/pwiki/DocPages.py (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
branches/mbutscher/work/WikidPad.xrc
r138 r140 1810 1810 <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag> 1811 1811 </object> 1812 <object class="sizeritem"> 1813 <object class="wxFlexGridSizer"> 1814 <cols>2</cols> 1815 <growablecols>1</growablecols> 1816 <object class="sizeritem"> 1817 <object class="wxStaticText"> 1818 <label>Remember expanded tree nodes:</label> 1819 </object> 1820 <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag> 1821 <border>5</border> 1822 </object> 1823 <object class="sizeritem"> 1824 <object class="wxChoice" name="chTreeExpandedNodesRememberDuration"> 1825 <content> 1826 <item>Not at all</item> 1827 <item>While wiki open</item> 1828 <item>Always</item> 1829 </content> 1830 <selection>2</selection> 1831 </object> 1832 <flag>wxALL|wxEXPAND</flag> 1833 <border>5</border> 1834 </object> 1835 </object> 1836 <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag> 1837 </object> 1812 1838 <object class="spacer"> 1813 1839 <size>5,5</size> … … 1875 1901 </object> 1876 1902 <object class="sizeritem"> 1903 <object class="wxStaticLine"/> 1904 <option>0</option> 1905 <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag> 1906 </object> 1907 <object class="sizeritem"> 1877 1908 <object class="wxBoxSizer"> 1878 1909 <orient>wxHORIZONTAL</orient> … … 1881 1912 </object> 1882 1913 <object class="sizeritem"> 1914 <object class="wxFlexGridSizer"> 1915 <cols>2</cols> 1916 <growablecols>1</growablecols> 1917 <object class="sizeritem"> 1918 <object class="wxStaticText"> 1919 <label>Wiki icon:</label> 1920 </object> 1921 <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag> 1922 <border>5</border> 1923 </object> 1924 <object class="sizeritem"> 1925 <object class="wxTextCtrl" name="tfWikiIcon"/> 1926 <flag>wxALL|wxEXPAND</flag> 1927 <border>5</border> 1928 </object> 1929 <object class="sizeritem"> 1930 <object class="wxStaticText"> 1931 <label>Wiki-bound hotkey:</label> 1932 </object> 1933 <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag> 1934 <border>5</border> 1935 </object> 1936 <object class="sizeritem"> 1937 <object class="wxTextCtrl" name="tfHotKeyShowHideByWiki"/> 1938 <flag>wxALL|wxEXPAND</flag> 1939 <border>5</border> 1940 </object> 1941 </object> 1942 <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag> 1943 </object> 1944 </object> 1945 </object> 1946 <object class="wxPanel" name="OptionsPageCwFileStorage"> 1947 <object class="wxBoxSizer"> 1948 <orient>wxVERTICAL</orient> 1949 <object class="sizeritem"> 1883 1950 <object class="wxStaticText" name=""> 1884 1951 <label>File storage identity check</label> … … 1919 1986 <border>5</border> 1920 1987 </object> 1921 <object class="spacer">1922 <size>5,5</size>1923 </object>1924 <object class="sizeritem">1925 <object class="wxFlexGridSizer">1926 <cols>2</cols>1927 <growablecols>1</growablecols>1928 <object class="sizeritem">1929 <object class="wxStaticText">1930 <label>Wiki icon:</label>1931 </object>1932 <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag>1933 <border>5</border>1934 </object>1935 <object class="sizeritem">1936 <object class="wxTextCtrl" name="tfWikiIcon"/>1937 <flag>wxALL|wxEXPAND</flag>1938 <border>5</border>1939 </object>1940 <object class="sizeritem">1941 <object class="wxStaticText">1942 <label>Wiki-bound hotkey:</label>1943 </object>1944 <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag>1945 <border>5</border>1946 </object>1947 <object class="sizeritem">1948 <object class="wxTextCtrl" name="tfHotKeyShowHideByWiki"/>1949 <flag>wxALL|wxEXPAND</flag>1950 <border>5</border>1951 </object>1952 </object>1953 <flag>wxALL|wxEXPAND|wxALIGN_CENTRE_VERTICAL</flag>1954 </object>1955 1988 </object> 1956 1989 </object> … … 3736 3769 <label>Switch Ed./Prev</label> 3737 3770 </object> 3771 <object class="wxMenuItem" name="CMD_CLIPBOARD_COPY_URL_TO_THIS_WIKIWORD"> 3772 <label>Copy URL to clipboard</label> 3773 <help>Copy full "wiki:" URL of the word to clipboard</help> 3774 </object> 3738 3775 </object> 3739 3776 <object class="wxMenu" name="MenuTreectrlWikiWords"> … … 3766 3803 <help>Prepend a new or existing wiki word</help> 3767 3804 </object> 3805 <object class="wxMenuItem" name="CMD_CLIPBOARD_COPY_URL_TO_THIS_WIKIWORD"> 3806 <label>Copy URL to clipboard</label> 3807 <help>Copy full "wiki:" URL of the word to clipboard</help> 3808 </object> 3768 3809 </object> 3769 3810 <object class="wxPanel" name="ExportSubText"> -
branches/mbutscher/work/extensions/KeyBindings.py
r129 r140 27 27 ViewChildren="Ctrl-Down" 28 28 ViewHistory="Ctrl-H" 29 ClipboardCopyUrlToCurrentWikiword="Ctrl-D" 29 30 SetAsRoot="Ctrl-Shift-Q" 30 31 UpHistory="Ctrl-Alt-Up" -
branches/mbutscher/work/wikidpad_unicode.iss
r138 r140 42 42 SolidCompression=true 43 43 AppName=WikidPad 44 AppVerName=WikidPad 1.9beta1 444 AppVerName=WikidPad 1.9beta15 44 44 DefaultDirName={pf}\WikidPad 45 45 DefaultGroupName=WikidPad 46 46 AppID={{22A83C29-58A8-4CAB-8EDC-918D74F8429E} 47 VersionInfoVersion=1.9.14.0 48 VersionInfoTextVersion=WikidPad 1.9beta14 47 VersionInfoVersion=1.9.15.0 48 VersionInfoTextVersion=WikidPad 1.9beta15 49 49 LicenseFile=C:\DATEN\Projekte\Wikidpad\Current\license.txt 50 50 AllowNoIcons=true 51 51 ShowLanguageDialog=yes 52 52 Compression=lzma/ultra 53 OutputBaseFilename=WikidPad-1.9beta1 453 OutputBaseFilename=WikidPad-1.9beta15 53 53 InternalCompressLevel=ultra 54 54 AppCopyright=© 2005-2007 Jason Horman, Michael Butscher, Gerhard Reitmayr -
branches/mbutscher/work/Consts.py
r138 r140 20 20 # (2, 0, 200, 0) is 2.0final 21 21 22 VERSION_TUPLE = ("wikidPad", 1, 9, 14, 0) 23 VERSION_STRING = "wikidPad 1.9beta14" 22 VERSION_TUPLE = ("wikidPad", 1, 9, 15, 0) 23 VERSION_STRING = "wikidPad 1.9beta15" -
branches/mbutscher/work/WikidPadHelp/WikidPadHelp.wiki
r121 r140 3 3 4 4 [main] 5 tree_expandednodes_descriptorpathes_views = 6 tree_expandednodes_rememberduration = 1 5 7 wiki_icon = 6 8 footnotes_as_wikiwords = False 7 9 wikipagetitle_creationmode = 1 10 tree_expandednodes_descriptorpathes_main = 8 11 last_wiki_word = WikidPadHelp 9 12 filestorage_identity_moddatemustmatch = False 10 13 wiki_name = WikidPadHelp 14 tree_last_root_wiki_word = WikidPadHelp 11 15 wiki_database_type = original_gadfly 12 16 wikipagetitleprefix = ++ -
branches/mbutscher/work/WikidPadHelp/data/UrlLinking.wiki
r138 r140 57 57 58 58 59 To create these URLs you can also use in menu "Wiki Words" the function "Copy URL to clipboard" and then paste the URL where you like. 60 61 The above menu entry is also available in context menus for wiki word tree items, tabs and for "anchor: ..." lines in the editor. In the last case the URL contains also the anchor you clicked on. 62 63 59 64 ++ URL Appendix 60 65 You can control details of URL presentation, especially for images, by using an URL appendix. This consists of a '>' character directly after the URL (no space) and some code characters which can be delimited by semicolons. The following codes are defined: -
branches/mbutscher/work/WikidPadHelp/data/MigrationBetweenDbTypes.wiki
r73 r140 1 1 ++ Migration Between Db Types 2 2 3 It is recommended to make a backup before applying the following procedures.3 The following procedure describes how to migrate a wiki from one database type to another. 3 3 4 When migrating you will loose stored searches and the modification and 5 creation dates of the wiki pages! 4 It is recommended to make a backup before applying it. 6 5 7 Definition: The *data-directory* is the directory named "data" in the directory of your wiki.8 6 9 10 Please read and follow every of the following parts which matches your desired migration. 11 12 13 +++ If you migrate from "Compact Sqlite": 14 1. Start WikidPad 15 2. Open your wiki 16 3. Choose "Wiki" -> "Export" -> "Export wiki to .wiki files" 17 4. Select the data-directory of your wiki as target 18 19 20 21 +++ If you migrate from "Original Gadfly": 22 If you are unsure if you want to go back to "Original Gadfly" later you should not delete the Gadfly database files in the data-directory (file "wikidb.gfd", all files with suffix .grl and the complete "index" directory) because they can't be recreated automatically (Sqlite db types can recreate their database files). 23 24 25 26 +++ If you migrate to "Original Gadfly": 27 If no Gadfly database files in the data-directory are present (file "wikidb.gfd", all files with suffix .grl and the complete "index" directory), you must copy them from another wiki with type "Original Gadfly" into the data-directory. 28 29 30 31 +++ For each migration: 32 1. Start WikidPad (if not done already) 33 2. Use "Wiki" -> "Open as Type" to open the wiki to migrate, but choose the new desired db type. 34 35 36 37 +++ If you migrate to "Compact Sqlite": 38 Run "Copy .wiki files to database" from "Wiki" menu. This copies the files from the data-directory into the database which contains the real pages for "Compact Sqlite" data type. 39 40 41 42 +++ For each migration: 43 3. Run "Wiki" -> "Rebuild Wiki" 44 4. Close and possibly reopen WikidPad 45 46 47 48 +++ If you migrate to "Original Gadfly": 49 Other files than the following in the data-directory are not needed by "Original Gadfly" and can therefore be deleted: 50 * file "wikidb.gfd" 51 * all files with suffix .grl 52 * all files with suffix .wiki 53 * the complete "index" directory 54 55 56 +++ If you migrate to "Original Sqlite": 57 Other files than the following in the data-directory are not needed by "Original Sqlite" and can therefore be deleted: 58 * file "wikiovw.sli" 59 * all files with suffix .wiki 60 61 62 +++ If you migrate to "Compact Sqlite": 63 Other files than the following in the data-directory are not needed by "Compact Sqlite" and can therefore be deleted: 64 * file "wiki.sli" 65 66 You can even delete the \*.wiki files, but do not delete the one \*.wiki file in the directory 67 above the data-directory! 7 1. Open dialog from menu "Wiki" -> "Export" -> "Other Export..." 8 2. Set in dialog: 9 10 What to export: Whole wiki 11 Export to: Multipage text 12 Compatible filenames: (Doesn't matter) 13 Format version: 1 14 Write wiki func. page: Check 15 Write saved searches: Check 16 Destination file: (Choose a non existing filename in an existing directory) 17 18 3. Hit OK 19 4. Create a new wiki with same name and the desired new database type 20 5. Delete "WikiSettings" page in the new wiki 21 6. Open dialog from menu "Wiki" -> "Import..." 22 7. Set in dialog: 23 24 Import format: Multipage text 25 Source file: (Same path you gave as destination file above) 26 27 8. Hit OK 28 9. Use menu "Wiki" -> "Rebuild Wiki" 68 29 69 30 31 Now you can close the new wiki, delete or move away the old one and move the new one at its place. 70 32 71 33 -
branches/mbutscher/work/WikidPadHelp/data/OptionsDialog.wiki
r138 r140 303 303 304 304 305 305 306 +++ Current wiki 306 307 These options apply to the active wiki only 307 308 309 310 308 311 *Footnotes as wiki words* 309 312 Interpret [Footnotes] (e.g. "[42]") as wiki words. … … 315 319 Set the default export directory into which exports should go. 316 320 321 *Remember expanded tree nodes* 322 Control if expanded tree nodes should be remembered by WikidPad. This means if you collapse a tree node which contains expanded child nodes yet and expand the node later, the child nodes are expanded again. The following modes are supported: 323 * Not at all: Doesn't remember expanded nodes (like before version 1.9beta15) 324 * While wiki open: Forgets the node states when wiki is closed 325 * Always: Stores the node states in wiki configuration file and restores them on reopening 326 327 It may happen that the mechanism stores expanded nodes which don't exist any longer, e.g. if the link from parent page to a child page is deleted and the child page was represented by an expanded node this is not always recognized by WikidPad, so some "garbage" may be stored. 328 329 By setting the option to "Not at all" then closing the options dialog, then setting the option back to what you had before, all node state information is cleared. The info of the main tree (not the "Views" tree) is also cleared when setting a new root. 330 317 331 *Title prefix* 318 332 Control the heading level of the initial main title of new pages and fill between one and four '+' in this field. Default is "++". … … 327 341 If you came to a not yet created page through a titled link (e.g. [WikiWord| This is the title]) and this option is checked, the link title will be used as title of the page. 328 342 329 *Modif. date must match*330 *Filename must match*331 *Modif. date is enough*332 See [FileStorage].333 334 343 *Wiki icon* 335 344 Set here the name of icon to use in the system tray instead of the default icon. If the field is empty the default icon is used. The icon of the main window is not influenced by this setting (because it does not work). … … 339 348 340 349 350 351 *Modif. date must match* 352 *Filename must match* 353 *Modif. date is enough* 354 See [FileStorage]. 341 355 -
branches/mbutscher/work/WikidPadHelp/data/ChangeLog.wiki
r138 r140 2 2 3 3 4 Dec. 27, 2007 (1.9beta14) 4 Jan. 26, 2008 (1.9beta15) 5 6 * Menu function to copy URL of current wiki word to clipboard. 7 See UrlLinking#++# Wiki:# URLs 8 * Support for ordering tree children by modification date 9 (Sqlite wikis should be rebuilt to speed this up). 10 See WikiDocumentAttributes#*child_sort_order 11 * Now remembers last used tree root and expanded nodes (optional). 12 See OptionsDialog#*Remember# expanded# tree# nodes* 13 * Windows: Hardware buttons on mouse or keyboard to navigate 14 backward/forward in browser are now recognized (doesn't work 15 for external Mozilla preview) 16 * Linux: Assumed file system encoding is now UTF-8 17 18 * Bug fixed: Linux: Some problems with non-ascii characters in pathes 19 (some other issues are there yet) 20 * Bug fixed: Multipage text export used local time instead of GMT time 21 for modif./crea. times of pages 22 23 24 25 Dec. 27, 2007 (1.9beta14, repository revision in "mbutscher" branch: 138) 5 26 6 27 * New letter for time formats (e.g. Statusbar time format option): -
branches/mbutscher/work/WikidPadHelp/data/WikiDocumentAttributes.wiki
r138 r140 150 150 * ascending: Sort alphabetically ascending 151 151 * descending: Sort alphabetically descending 152 * mod_oldest: Sort by modification date, oldest first 153 * mod_newest: Sort by modification date, newest first 152 154 * unsorted: Make no attempt to sort (fastest) 153 155 * natural: Sort in order of appearance of the words on the page (may not always work) -
branches/mbutscher/work/lib/pwiki/WikiTxtCtrl.py
r138 r140 70 70 71 71 def __init__(self, parent, id, txtCtrl, rect, font, presenter, searchInit=None): 72 wx.Frame.__init__(self, parent, id, u"", rect.GetPosition(), 73 rect.GetSize(), wx.NO_BORDER) 72 wx.Frame.__init__(self, parent, id, u"WikidPad i-search", 73 rect.GetPosition(), rect.GetSize(), wx.NO_BORDER) 74 74 75 75 self.txtCtrl = txtCtrl … … 422 422 self.OnActivateNewTabThis) 423 423 wx.EVT_MENU(self, GUI_ID.CMD_ACTIVATE_NEW_TAB_BACKGROUND_THIS, 424 self.OnActivateNewTabBackgroundThis) 424 self.OnActivateNewTabBackgroundThis) 425 426 wx.EVT_MENU(self, GUI_ID.CMD_CLIPBOARD_COPY_URL_TO_THIS_ANCHOR, 427 self.OnClipboardCopyUrlToThisAnchor) 428 425 429 426 430 wx.EVT_MENU(self, GUI_ID.CMD_TEXT_SELECT_ALL, lambda evt: self.SelectAll()) … … 1167 1171 self.contextMenuTokens = tokens 1168 1172 addActivateItem = False 1173 addUrlToClipboardItem = False 1169 1174 for tok in tokens: 1170 1175 if tok.ttype == WikiFormatting.FormatTypes.WikiWord: … … 1175 1180 tok.node.key == u"page": 1176 1181 addActivateItem = True 1177 1182 elif tok.ttype == WikiFormatting.FormatTypes.Anchor: 1183 addUrlToClipboardItem = True 1184 1178 1185 if addActivateItem: 1179 1186 appendToMenuByMenuDesc(menu, _CONTEXT_MENU_INTEXT_ACTIVATE) 1187 1188 if addUrlToClipboardItem: 1189 appendToMenuByMenuDesc(menu, 1190 _CONTEXT_MENU_INTEXT_URL_TO_CLIPBOARD) 1180 1191 1181 1192 appendToMenuByMenuDesc(menu, _CONTEXT_MENU_INTEXT_BOTTOM) … … 1749 1760 self.activateTokens(self.contextMenuTokens, 3) 1750 1761 1762 def OnClipboardCopyUrlToThisAnchor(self, evt): 1763 wikiWord = self.presenter.getWikiWord() 1764 if wikiWord is None: 1765 wx.MessageBox( 1766 _(u"This can only be done for the page of a wiki word"), 1767 _(u'Not a wiki page'), wx.OK, self) 1768 return 1751 1769 1752 # DO NOT DELETE! 1753 # def launchUrl(self, link): # TODO Works only for Windows 1754 # match = WikiFormatting.UrlRE.match(link) 1755 # try: 1756 # link2 = match.group(1) 1757 # 1758 # if link2.startswith("wiki:"): 1759 # if self.pWiki.configuration.getint( 1760 # "main", "new_window_on_follow_wiki_url") == 1: 1761 # os.startfile(link2) 1762 # return True 1763 # else: 1764 # link2 = urllib.url2pathname(link2) 1765 # link2 = link2.replace(u"wiki:", u"") 1766 # if exists(link2): 1767 # self.openWiki(link2, u"") 1768 # return True 1769 # else: 1770 # self.SetStatusText( 1771 # uniToGui(u"Couldn't find wiki: %s" % link2)) 1772 # return False 1773 # elif link2.startswith("file:"): 1774 # link2 = link2.replace(u"file:", u"") 1775 # if "|" in link2: 1776 # # Link is absolute 1777 # filepath = urllib.url2pathname(link2) 1778 # else: 1779 # # Link is relative, cut off leading '/' 1780 # while link2.startswith("/"): 1781 # link2 = link2[1:] 1782 # filepath = urllib.url2pathname(link2) 1783 # filepath = join(self.dataDir, filepath) 1784 # 1785 # if exists(filepath): 1786 # os.startfile(filepath) 1787 # return True 1788 # else: 1789 # self.SetStatusText( 1790 # uniToGui(u"Couldn't find file: %s" % filepath)) 1791 # return False 1792 # else: 1793 # os.startfile(link2) 1794 # except: 1795 # pass 1796 # return False 1770 path = self.presenter.getWikiDocument().getWikiConfigPath() 1771 for tok in self.contextMenuTokens: 1772 if tok.ttype == WikiFormatting.FormatTypes.Anchor: 1773 anchor = tok.grpdict.get("anchorValue", u"") 1774 copyTextToClipboard(pathWordAndAnchorToWikiUrl(path, wikiWord, 1775 anchor)) 1776 return 1797 1777 1798 1778 … … 1825 1805 pageAst = self.getPageAst() 1826 1806 scriptTokens = pageAst.findTypeFlat(SCRIPTFORMAT) 1827 1828 # # get the text of the current page1829 # text = self.GetText()1830 1807 1831 1808 # process script imports … … 1841 1818 pageAst = importPage.getLivePageAst() 1842 1819 scriptTokens += pageAst.findTypeFlat(SCRIPTFORMAT) 1843 1844 # content = importPage.getLiveText()1845 # text += "\n" + content1846 1820 except: 1847 1821 pass … … 2890 2864 """ 2891 2865 2866 _CONTEXT_MENU_INTEXT_URL_TO_CLIPBOARD = \ 2867 u""" 2868 - 2869 Copy anchor URL to clipboard;CMD_CLIPBOARD_COPY_URL_TO_THIS_ANCHOR 2870 """ 2892 2871 2893 2872 _CONTEXT_MENU_INTEXT_BOTTOM = \ … … 2922 2901 N_(u"Activate New Tab Backgrd.") 2923 2902 2903 N_(u"Copy anchor URL to clipboard") 2904 2924 2905 N_(u"Close Tab") 2925 2906 -
branches/mbutscher/work/lib/pwiki/PluginManager.py
r138 r140 3 3 import wx
