当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 9 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 请问,如何显示一个对象的所有方法?
帖子发表于 : 2012-10-27 22:05 
头像

注册: 2008-06-23 15:19
帖子: 3051
地址: 北欧某国
系统: ���������
送出感谢: 21
接收感谢: 6
我想知道 Gedit.view 和 Gedit.window 中的所有可用的方法,但是相关资料不多,再加上还有许多基类,情况就更复杂了。

请问,如何显示这两个类的所有的方法?

谢谢。


_________________
http://noie.name 网站改版中。


页首
 用户资料  
 
2 楼 
 文章标题 : Re: 请问,如何显示一个对象的所有方法?
帖子发表于 : 2012-10-27 22:07 
头像

注册: 2005-08-14 21:55
帖子: 58428
地址: 长沙
送出感谢: 4
接收感谢: 274
Gedit.... 又不是标准的接口。

平时看devhelp就是嘛。


_________________
● 鸣学


页首
 用户资料  
 
3 楼 
 文章标题 : Re: 请问,如何显示一个对象的所有方法?
帖子发表于 : 2012-10-28 22:29 
头像

注册: 2008-06-23 15:19
帖子: 3051
地址: 北欧某国
系统: ���������
送出感谢: 21
接收感谢: 6
devhelp 当中没有 gedit...

http://translate.googleusercontent.com/translate_c?depth=1&hl=zh-CN&prev=/search%3Fq%3Dgedit%2Bapi%26hl%3Dzh-CN%26safe%3Dstrict%26client%3Dubuntu%26hs%3DVhp%26channel%3Dfs%26prmd%3Dimvns&rurl=translate.google.com.hk&sl=en&twu=1&u=http://developer.gnome.org/gedit/3.6/gedit-gedit-window.html&usg=ALkJrhipOry_q9cDT1WeDvxcT77wDz5lWg

这里是 gedit API 的介绍,不知到从这里面能不能找到更改背景图片的线索。

我想写一个添加背景图片的插件。


_________________
http://noie.name 网站改版中。


页首
 用户资料  
 
4 楼 
 文章标题 : Re: 请问,如何显示一个对象的所有方法?
帖子发表于 : 2012-10-29 15:10 
头像

注册: 2009-03-28 16:10
帖子: 1849
系统: Arch debian win7
送出感谢: 10
接收感谢: 70
直接看源代码,反正是开源的。估计代码量也不算巨大


_________________
为什么我的问题总是没有人回答?

金钱、责任与荣誉:OpenSSL主席谈心脏出血
拥有丰富API接口和广泛程序支持的dropbox云同步,点此注册,开始就比别人多500兆,我的空间也会增加。谢啦
==========我的作品==========
我做的一个面向开发者的gnome-shell扩展,有js基础又想自己调整gnome-shell功能的可以尝试一下
gnome-shell扩展开发入门,gnome-shell扩展系统扫盲帖


页首
 用户资料  
 
5 楼 
 文章标题 : Re: 请问,如何显示一个对象的所有方法?
帖子发表于 : 2012-10-29 16:09 
头像

注册: 2010-01-17 15:39
帖子: 403
系统: Debian Wheezy AMD64
送出感谢: 0 次
接收感谢: 6
GObject本身是有自省的功能的,通过一些接口可以获取一个类所有的属性和信号等内部结构
GIR (GObject Introspection Repository)就是这个功能的典型应用,乃可以通过查看GEdit的GIR文件来分析其类的内部结构


_________________
OS: Debian Wheezy (Testing) for AMD64~~~
Mobile Phone: Nokia N900, OS: Maemo 5.0 (Base on Debian)~~~
本人的项目: RhythmCat(Linux下的音乐播放器.....支持歌词等功能...)
http://code.google.com/p/rhythmcat

RhythmCat 2进行中 (https://github.com/supercatexpert/RhythmCat2/)


页首
 用户资料  
 
6 楼 
 文章标题 : Re: 请问,如何显示一个对象的所有方法?
帖子发表于 : 2012-10-30 10:57 
头像

注册: 2008-06-23 15:19
帖子: 3051
地址: 北欧某国
系统: ���������
送出感谢: 21
接收感谢: 6
supercatexpert 写道:
GObject本身是有自省的功能的,通过一些接口可以获取一个类所有的属性和信号等内部结构
GIR (GObject Introspection Repository)就是这个功能的典型应用,乃可以通过查看GEdit的GIR文件来分析其类的内部结构


很遗憾,我只看到提示:
代码:
no Python documentation found for 'Gedit'

no Python documentation found for 'Gedit.ViewActivatable'

no Python documentation found for 'Gedit.View'


我在网上搜索了一下,我找到了这个:

引用:
You have two choices:
A. I think you need to go back to Unity/gnome2 desktop
B. Update all scriptable/extendable/plugable apps to gnome3/

Gnome3 uses GObject Introspection exclusively to expose an app's API to other tools. The members of the Gedit project contributed to libpeas which is a new plugin/extension system to manage the integration of plugins. It is used by several apps. The gedit team then introduced a plugin API to gedit that simplifies the libpeas API for plugins. The errors you are seeing are because the plugin does not provide the correct methods (GeditAppActivatable, GeditWindowActivatable, GeditViewActivatable) to run with gedit.

All gedit plugin must be rewritten to the new API. Gedit default plugins are already updated, but you need to install the correct version (3.x). Very few plugins work with Gedit 3 at this moment.


https://answers.launchpad.net/ubuntu/+s ... ion/158045

那个 “but you need to install the correct version (3.x).” 是什么意思?是说我要安装 Python 3 吗?


_________________
http://noie.name 网站改版中。


页首
 用户资料  
 
7 楼 
 文章标题 : Re: 请问,如何显示一个对象的所有方法?
帖子发表于 : 2012-10-30 11:17 
头像

注册: 2010-01-17 15:39
帖子: 403
系统: Debian Wheezy AMD64
送出感谢: 0 次
接收感谢: 6
这个指的是乃的Gedit必须是3.x版本的才可以,也就是使用了GIR技术的版本


_________________
OS: Debian Wheezy (Testing) for AMD64~~~
Mobile Phone: Nokia N900, OS: Maemo 5.0 (Base on Debian)~~~
本人的项目: RhythmCat(Linux下的音乐播放器.....支持歌词等功能...)
http://code.google.com/p/rhythmcat

RhythmCat 2进行中 (https://github.com/supercatexpert/RhythmCat2/)


页首
 用户资料  
 
8 楼 
 文章标题 : Re: 请问,如何显示一个对象的所有方法?
帖子发表于 : 2012-10-30 14:04 
头像

注册: 2008-06-23 15:19
帖子: 3051
地址: 北欧某国
系统: ���������
送出感谢: 21
接收感谢: 6
supercatexpert 写道:
这个指的是乃的Gedit必须是3.x版本的才可以,也就是使用了GIR技术的版本

我的 Gedit 似乎是 3.6.0 版的。


_________________
http://noie.name 网站改版中。


页首
 用户资料  
 
9 楼 
 文章标题 : Re: 请问,如何显示一个对象的所有方法?
帖子发表于 : 2012-11-03 12:57 
头像

注册: 2005-08-14 21:55
帖子: 58428
地址: 长沙
送出感谢: 4
接收感谢: 274
你要看你的gedit接口是什么语言的,去官网下载devhelp的包就是。

你应该是想要这样的。


附件:
选区_003.png
选区_003.png [ 17.08 KiB | 被浏览 2996 次 ]

选区_002.png
选区_002.png [ 165.89 KiB | 被浏览 3000 次 ]

选区_001.png
选区_001.png [ 102.29 KiB | 被浏览 3000 次 ]



_________________
● 鸣学
页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 9 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 0 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译