tags:

views:

13

answers:

1

Hello.
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.

+1  A: 

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.

Krzysztof Kosiński