Skip to content

problem connecting signals (gir/gtk3) #38

@dg14

Description

@dg14

hi

i've some problems to understand where i fall, because it seems that when i try to connect a callback to a menuitem, when i click on that, it repeats the launching of the callback a number of times equals to the number of elements in that menu.

probably the function that link callbacks needs some work.

example:

var menu1=new gtk.Menu();
var menu1label=new gtk.MenuItem({label: "File"});
var openlabel=new gtk.MenuItem({label:"Open"});
var quitlabel=new gtk.MenuItem({label:"Quit"});
quitlabel.on("select", function() { console.log("quit"); } );
openlabel.on("select", function() { console.log("open"); });
menubar.append(menu1label);  

menu1label.set_submenu(menu1);
menu1.append(openlabel);
menu1.append(quitlabel);
menu1label.show_all();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions