Hi folks,
----- edit: I just realize, this is in the wrong sub board: pleas shift it. Thanks ------
I am new here. I've started recently to write my own gimp plugins. My goal is to create mirror images. With the plugin I want to shift the image and mirrored copy synchronously. The gegl kaleidoscope already does something similar, but with at least 2 mirrors.
By now I have come so far:
My plugin can create additional layers with masks in 2 groups in my image, so that each group contains half the mirror image.
I can create a plugin window containing some buttons +100, +20 ...., -20, -100 and by clicking these buttons, my layers are shifted
so
shift20_button.connect("clicked", self.shift20_button_clicked, 20)
works fine.
What I would like to achieve is a horizontal scale (that i can already create) that does the job instead of the buttons.
The GTK reference and examples on the internet tell me, there is a "value_changed" signal, a scale emits, which can be used to start the next action.
I've tried the following with x_scale beeing a horizontal scale in my plugin, that I can shift, and changes the value (which I can check with val = x_scale.get_value()" after a button clicked).:
g_signal_connect(x_scale, "value_changed", do_something, NULL)
as well as:
g_signal_connect(G_OBJECT(x_scale), "value_changed", G_CALLBACK(do_something), NULL)
as well as:
x_scale.connect("value_changed", do_something)
and:
gtk_signal_connect(x_scale, "value_changed", do_something)
none of theses brings me to the solution I want.
With the third option, the "do_something" code is executed once on the plugin startup, but the plugin stops at the end of "do_something".
I tried to replace "x_scale" by "x_adj" which is the adjustment of "x_scale". --> same results
I exchanged "value_changed" by "value-changed" and 'value_changed' as I found other examples with these spellings. --> no effect
On
https://gimp-werkstatt-forum.de I got the hint to ask here.
Thanks in advance,
TerraX