Hello guys, i'm recently into the Gimp Plugin development and I'm trying to
write a plug that shows a new window to interact with the user.
I designed it with Glade 3.6 to make it simple, then I saved the interface in
GtkBuilder format "interface.glade".
But now... I can't figure out how to implement it in my plugin code. Look,
that's what I tried:
That's the 'run' procedure:
static void run (
const gchar *name,
const GimpParam *param,
static GimpParam values;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
/* Setting mandatory output values */
*nreturn_vals = 1;
*return_vals = values;
values.type = GIMP_PDB_STATUS;
values.data.d_status = status;
/* Getting run_mode - we won't display a dialog if
* we are in NONINTERACTIVE mode */
run_mode = param.data.d_int32;
if (run_mode != GIMP_RUN_NONINTERACTIVE)
You see, the last rows calls the 'batch_dialog()' that will make the window
appear, is that:
gimp_ui_init ("batchmygimp", FALSE);
builder = gtk_builder_new ();
gtk_builder_add_from_file (builder, "prova.glade", NULL);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
run = (gimp_dialog_run (GIMP_DIALOG (window)) == GTK_RESPONSE_OK);
printf("run variable = %d\n",run);
And nothing appears when I start it .-.
Is there a plugin that implements Glade in it? So I can give a sight...
Gimp-developer mailing list