'close' popup on notebook pages



Hello.

Somewhere in my code I'm using a notebook and I'd like to make it possible
to close any random page by right-clicking on it's tab and choosing
"Close" or something from there.

I'm enabling the popup menu, creating a new vbox (and I've also tried labels,
buttons, menuitems and others) and passing that as the menu_label argument
to gtk_notebook_append_page_menu(). This makes right-clicking on the page
tab display the "Close" label, but I can't seem to catch any signal when that
happens. I've tried catching "clicked" and "activated", but none of these
works ( btw, I am calling g_signal_connect(the_label, "<whatever>",
some, thing) ).

Is it possible to assign any action to the menu item(s) or should I stop
looking. And if it's possible, can anyone give me a hint to what I'm not
doing or doing wrong ?

Here's a snip from my code:

     mitem = gtk_menu_item_new_with_label("CLose");
        g_signal_connect(GTK_OBJECT(mitem), "activate", G_CALLBACK
(close_page), vbox);
     gtk_notebook_append_page_menu(GTK_NOTEBOOK(notebook), vbox,
gtk_label_new("Favorites"), mitem);

-
Thanks in advance for any pointers (and please bear with me if I'm asking
things the wrong way or something because I'm sort of new to this)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]