Hi everybody. For a project, I need to exactly know, what some code in Gwyddion is doing to my images. For that reason, I would like to have a look in the source code and follow along the lines belonging to one entry. In my example, I would like to know, what the Correct Data -> Align rows entry in the menu is exactly doing, dependent on the parameters, but I would like to ask this question in general so:
How is it possible to find the exact block of code, that will be run, when I click on a menu entry?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In general by starting from the menu construction code in app/menu.c, finding the callback invoked by the specific menu item and following the code from there.
For the typical case, i.e. the menu item runs some module function and you are not interested in the GUI stuff and bookkeeping that wraps its execution, it is simpler. You start with the on-line module list and find the menu path, which gives you the module name. So you find the module in the source code tree and follow from there. It helps to understand how modules are structured, of course.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everybody. For a project, I need to exactly know, what some code in Gwyddion is doing to my images. For that reason, I would like to have a look in the source code and follow along the lines belonging to one entry. In my example, I would like to know, what the Correct Data -> Align rows entry in the menu is exactly doing, dependent on the parameters, but I would like to ask this question in general so:
How is it possible to find the exact block of code, that will be run, when I click on a menu entry?
In general by starting from the menu construction code in
app/menu.c
, finding the callback invoked by the specific menu item and following the code from there.For the typical case, i.e. the menu item runs some module function and you are not interested in the GUI stuff and bookkeeping that wraps its execution, it is simpler. You start with the on-line module list and find the menu path, which gives you the module name. So you find the module in the source code tree and follow from there. It helps to understand how modules are structured, of course.