开发者

Finding event handlers in source trees

So, I'm trying to implement a looping mode in the totem movie player. I would like to do this by adding a checkbox under "Edit" that turns looping on.

I'm trying to figure out what code gets called when "Edit" and the "Shuffle Mode" option under it is clicked. Is there any easy way to find where the appropriate event handler is? My usual method of code reading (stepping through it with the debugger) didn't work because this is a GUI program, and as soon as you get to the main loop it doesn't stop until there's a breakpoint, and where to put the breakpoints is basically what I'm trying to find out.

I've been using Netbeans for this, and I should note that I can开发者_开发知识库't use Eclipse.

Thank you.


The UI for Totem and the callback names for each element defined in the GtkBuilder file, data/totem.ui. http://git.gnome.org/browse/totem/tree/data/totem.ui

This file says that the handler for the "Shuffle Mode" action is shuffle_mode_action_callback. Then you can use grep:

grep -r shuffle_mode_action_callback totem-git/src

The result of this command indicates that this function is defined in src/totem-menu.c.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜