这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » STM32 » 给ubuntuGedit安装gedit-source-code-browser

共3条 1/1 1 跳转至

给ubuntuGedit安装gedit-source-code-browser

高工
2019-02-28 16:11:06     打赏

插件链接下载 

https://bugs.launchpad.net/ubuntu/+source/gedit-source-code-browser-plugin/+bug/1242126 

下载这个安装完后还用不了,还要添加下面的补丁


diff -Naur old-plugins/sourcecodebrowser/ctags.py plugins/sourcecodebrowser/ctags.py

--- old-plugins/sourcecodebrowser/ctags.py  2013-11-06 14:02:44.771946459 -0800

+++ plugins/sourcecodebrowser/ctags.py  2013-11-06 14:07:08.623943494 -0800

@@ -88,7 +88,7 @@

         #args = [arg.replace('%20', ' ') for arg in shlex.split(command)] 

         args = shlex.split(command)

         p = subprocess.Popen(args, 0, shell=False, stdout=subprocess.PIPE, executable=executable)

-        symbols = self._parse_text(p.communicate()[0])

+        symbols = self._parse_text(p.communicate()[0].decode("utf-8"))


     def _parse_text(self, text):

         """

diff -Naur old-plugins/sourcecodebrowser/__init__.py plugins/sourcecodebrowser/__init__.py

--- old-plugins/sourcecodebrowser/__init__.py   2013-11-06 14:02:44.771946459 -0800

+++ plugins/sourcecodebrowser/__init__.py   2013-11-06 14:05:53.023944343 -0800

@@ -1,3 +1,11 @@

+import sys, os

+

+path = os.path.dirname(__file__)

+

+if not path in sys.path:

+    sys.path.insert(0, path)

+

 import plugin

 from plugin import SourceCodeBrowserPlugin


+

diff -Naur old-plugins/sourcecodebrowser.plugin plugins/sourcecodebrowser.plugin

--- old-plugins/sourcecodebrowser.plugin    2013-11-06 14:02:44.843946458 -0800

+++ plugins/sourcecodebrowser.plugin    2013-11-06 14:04:07.679945527 -0800

@@ -1,5 +1,5 @@

 [Plugin]

-Loader=python

+Loader=python3

 Module=sourcecodebrowser

 IAge=3

 Name=Source Code Browser





管理员
2019-03-01 09:34:29     打赏
2楼

谢谢楼主分享


院士
2019-03-06 13:35:15     打赏
3楼

学习学习了


共3条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]