Re: Nemiver-project
- From: Dodji Seketeli <dodji seketeli org>
- To: The mailing list of the Nemiver project <nemiver-list gnome org>
- Subject: Re: Nemiver-project
- Date: Sun, 02 Dec 2012 12:19:24 +0100
Hello Esras,
> Okay,i took a look at "Tooltip delay is way too long" bug.
OK, it looks like you are not against trying to hack on this bug
then. :-)
> I really want to be developer of this project.
:-)
> Where can i find the code?
The set of widgets you see and use to debug a program in the Nemiver
window is called a "debugging perspective". It's a set of graphical
components that collaborate to provide the user with a debugging
experience. So that is where the code that handles the variable (or
expression) tooltip is located.
The type (class) that abstracts the debugging perspective is
nemiver::DBGPerspective. What a surprise. :-) It's located in the
file src/persp/dbgperspective/nmv-dbg-perspective.cc.
In the perspective, the widget that displays the source code is named
the source editor. That type that abstracts it is
nemiver::SourceEditor. There is one SourceEditor per source file
displayed by the DBGPerspective; the perspective can of course display
a list of source files, so it can handle multiple instances of
SourceEditor.
For each SourceEditor, there is a timer that counts from DELAY number
of seconds to zero, while the mouse is immobile. When the timer
reaches zero, the debugging perspective launches the expression
tooltip widget and asks it to display the value of the expression (I
historically called that the value of the variable) that is at the
current mouse position. The function to do that is
DBGPespective::try_to_request_show_variable_value_at_position.
Note that the function that is called when the timer reaches zero is
DBGPerspective::on_mouse_immobile_timer_signal. It's that function
that calls
DBGPespective::try_to_request_show_variable_value_at_position. in
gtkmm speak, the function
DBGPerspective::on_mouse_immobile_timer_signal is called a 'callback
slot', or a 'callback function', if you prefer.
That callback is 'installed' by the function
DBGPerspective::restart_mouse_immobile_timer, that says basically
"Count from 1 second to zero, and when you reach zero, invoke the
function
DBGPespective::try_to_request_show_variable_value_at_position".
What we want is to turn that 'one second' into a preference option
that can be set by the user.
For that, you need to use the preference dialog by clicking on Edit ->
Preferences and by looking at how that window is organized.
Once you've done that, you can look at the code of that preference
dialog in src/persp/dbgperspective/nmv-preferences-dialog.cc and try
to understand how it matches what you see in the dialog.
Once you understand how to add a new preference, you just have to do
that for the tooltip delay.
> How can i do a job in this bug?
I hope I gave you enough to get you started. Now you need to dive
into the code from there. I don't know how much you know about gtk+,
gtkmm, c++. But in any case, I guess this needs to be a dialog; you
try to search for things starting from the information I give you. If
you have more questions, please ask them and I (or others on the list)
will try to answer.
Happy hacking. :-)
--
Dodji
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]