[Glade-users] gtkbuilder and menubars

Sorry to trouble you guys again with another question.

I'm using Glade 3.6.7 on Ubuntu linux and writing a program in c language.

I've created a simplified example to illustrate my problem.

I have a UI which consists of window1 which contains a single vbox divided into three compartments: one for 
the menubar, and the remaining two contain a single text entry object each. I saved the file as gtkbuilder 

I want to be able to use the cut, copy, and paste features of the menubar to transfer between entries, or 
even with other appplications.

My question is regarding how to connect up signals and signal handler functions for the menubar so that I can 
use the menubar's cut, copy, and paste.

For the each imagemenuitem corresponding to cut, copy, and paste, I set the Activate signals to be on_cut, 
on_copy, and on_paste, respectively.

In my c program, I then created signal handler functions with the same names.

But I'm all confused as to what data and objects need to be passed.

I attempted to follow the snippets of code provided here:


but I think I don't have a clear enough understanding of the callback operation to use his recommendations.

The program (menubar.c), Makefile, and gtkbuilder file (menubar.glade) are attached.

Any help is appreciated.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: text/x-c
Size: 3080 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/glade-users/attachments/20110506/c3cc11aa/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 425 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/glade-users/attachments/20110506/c3cc11aa/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: menubar.glade
Type: application/x-glade
Size: 4691 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/glade-users/attachments/20110506/c3cc11aa/attachment-0001.bin 

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