View Single Post
Old 12-09-2010, 04:45 PM   #12
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by Mackx View Post
It was not a serious remark, just wanted to keep you busy for any future sleepless nights
Well, now I'm fighting against my missing C++ skills...

How could I get a reference of ZLGtkApplicationWindow in menu.cpp?

EDIT: new code

In ZLGtkApplicationWindow:ZLGtkApplicationWindow, I've added:
Code:
menu_init(this);
And in menu.cpp:
Code:
static ZLGtkApplicationWindow *zlgtkappwin;
...
// initialise popup menu
void menu_init ( ZLGtkApplicationWindow *appwin )
{
    ...
    zlgtkappwin = appwin;
...
And finally, in menu.cpp menu_on_item_activated():
Code:
zlgtkappwin.application().doAction("toggleFullscreen");
but it doesn't work. Compiler shows this error:
Code:
Compiling dr-menu.o ...dr-menu.cpp: In function ‘void menu_on_item_activated(const gchar*, const gchar*, const gchar*, const gchar*)’:
dr-menu.cpp:269: error: request for member ‘application’ in ‘zlgtkappwin’, which is of non-class type ‘ZLGtkApplicationWindow*’
Any hint?


EDIT 2: It's compiling now, have to test on the emu ;-)


EDIT 3: It works! It works!
after some silly issues with the linker menu->fullscreen finally works, so the remaining items should be easy...



Iņigo

Last edited by Iņigo; 12-09-2010 at 07:02 PM.
Iņigo is offline   Reply With Quote