Re: Gtk3 MacOS (OSX) context menu issues

2015-03-05 Thread Konstantin Dmitriev
2015-03-03 15:01 GMT+06:00 Vest . vest...@gmail.com:
 Hello Konstantin,

 I apologize that I probably cannot help you, but I am curious. Do you have
 this issue, if you run a simple demo, where GtkMenu is used?
 Because it seems that when you move the mouse outside of the menu's
 boundaries, something inside the widget is cleared and the menu receives
 mouse events again.

 Kind regards,
 Vest

Hello, Vest!

Thank you for responding!
I have tested the gtk3-demo and (surprise!) the issue seems to be
100%-reproducible there. Here I have recorded a video -
http://youtu.be/X_xAHhQN_lY
Have tested this with GTK 3.14.8 and 3.14.9. Also tested on 32bit and
64bit. Issue persists.

I have tried to build with X11 backend and issue doesn't happen. So,
it seems to be Quartz-only.

I can provide a bash script that I use to unwrap all environment
(creates MacPorts installation from scratch in the custom location and
builds our application - Synfig Studio).

Any help/advice is appreciated.

Best Regards,
Konstantin.

 On Sat, Feb 28, 2015 at 12:59 PM, Konstantin Dmitriev
 ksee.zelga...@gmail.com wrote:

 Hello!

 My name is Konstantin Dmitriev, I am a maintainer of Synfig Studio
 open-source animation software.

 Recently we have ported our software from Gtk2 to Gtk3. Unfortunately,
 after that we have encountered issues with context menus on OSX - the
 context menus are become insensitive sometimes. This happens randomly,
 but quite often.

 I have recorded a video to illustrate the problem -
 http://www.youtube.com/watch?v=Cscz45WeFEs

 I am stuck with this issue and don't know how to solve it. Any help,
 hints, suggestions are highly appreciated.

 Some information about the build environment:
 Gtk version 3.14.8, everything built through MacPorts environment.
 Gtk backend type: XQuartz.

 I will be happy to provide any additional information.
 Thank you!

 Konstantin.
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to make a GtkButton respond to a key press

2015-03-05 Thread Jim Charlton

On 15-03-05 07:58 PM, Michael Torrie wrote:

Maybe I'm just not reading right, but I cannot figure out how to make a
GtkButton respond to a single key press.  For example, if I made a
simple calculator like the one that comes with Gnome, how can I make it
so when I press '1' on my keyboard, the 1 button presses.  I know how to
make shortcuts with a control key by just putting in an  in the label.
  But not just a bare key press.  Also is it possible to programmatically
depress and then release a GtkButton, simulating a click?  I'd like to
do this to generate some user feedback when the keyboard is used, while
allowing one to still click with a mouse (or finger or whatever) on the
GtkButton.

Pointing me at the right docs would be appreciated.  Gtk3 is fine.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
I presume you have a callback function connected to the button press 
event.  Just create code to intercept the keyboard event and go to a 
callback function that sees what key was pressed and then calls the same 
function that would have been called had the button been pressed.


The first example I found from Google was
http://stackoverflow.com/questions/10134956/in-simple-gtk-key-press-event-example-gdk-shift-mask-seems-to-be-ignored

You can see the code you need to intercept the keyboard event.

I do exactly this sort of thing in programs with the user being able to 
hit a select keyboard key or click the button (although I am using gtkmm3).


jim...   Jim Charlton
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list