Re: [Gtk-osx-users] menu synchronisation



> Add the following to get the carbon menu item's title and add it to your g_print:
>
> CFStringRef cfstr;
> gchar *label;
> OSStatus err;
> err = CopyMenuItemTextAsCFString(carbon_item->menu, carbon_item->index, &cfstr);
> if (!err) {
>  label = CFStringGetCStringPtr(cfstr, kCFStringEncodingUTF8);
>  g_print ("Menu Item %s active %d\n", label, active);
> }
> else
>  g_print ("Unable to retrieve menu item label, %s\n", carbon_menu_error_string(err));
> if (cfstr)
>  CFRelease (cfstr);
>
> to see that the right menu item is having CheckMenuItem called on it.
>
> (I didn't test that; the docs for Menu Manager are at http://developer.apple.com/legacy/mac/library/documentation/Carbon/Reference/Menu_Manager/Reference/reference.html
> and for CFString at
> http://developer.apple.com/mac/library/documentation/CoreFoundation/Reference/CFStringRef/Reference/reference.html)

could it be that this code is never reached if nothing else in the
submenu has changed?

b.t.w. would it help if I add this code to your testcase program?

Olivier

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Gtk-osx-users mailing list
Gtk-osx-users lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/gtk-osx-users


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