[Glade-users] libglade event mask problem
Bruce Alderson
mx@warpedvisions.org
Wed, 26 Nov 2003 13:59:02 -0800
This is a multi-part message in MIME format.
--------------000801010409070808090007
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
I'm pretty sure I've encountered this with Gtk2-perl/GladeXML too, while
porting the Gtk scribble tutorial to use the perl libglade wrapper. I
hadn't gotten back to it since I encountered it, and will check later if
this fixes the problem.
Thanks,
Damon Chaplin wrote:
>On Wed, 2003-11-26 at 20:40, Pedro Abelleira Seco wrote:
>
>
>>Hi, list
>>
>>I'm having a little problem with libglade. In my test
>>case I have a simple app: a window with a DrawingArea
>>inside. The "button_press_event" is connected with a
>>callback, the GDK_BUTTON_PRESS_MASK and everything
>>works right. It works if I use the glade-generated C
>>code or use libglade to load the interface
>>dinamically.
>>
>>Now, when I _add_ GDK_BUTTON_MOTION_MASK to the event
>>mask the dinamic version stops getting events but the
>>rebuilded static version works ok. The file inteface.c
>>contains
>>
>>gtk_widget_set_events (drawingarea1,
>>GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK);
>>
>>so the event mask is what I want. I attach the
>>testcase I'm using.
>>
>>
>
>If you remove the spaces in this line in the .glade file it works:
>
> <property name="events">GDK_BUTTON_MOTION_MASK |
>GDK_BUTTON_PRESS_MASK</property>
>
>
>It looks like glade_flags_from_string() in libglade can't handle spaces.
>I've added a bug for it:
> http://bugzilla.gnome.org/show_bug.cgi?id=128013
>
>Thanks for the report,
>
>Damon
>
>
>_______________________________________________
>Glade-users maillist - Glade-users@lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/glade-users
>
>
--------------000801010409070808090007
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
I'm pretty sure I've encountered this with Gtk2-perl/GladeXML too,
while porting the Gtk scribble tutorial to use the perl libglade
wrapper. I hadn't gotten back to it since I encountered it, and will
check later if this fixes the problem.<br>
<br>
Thanks,<br>
<br>
<br>
Damon Chaplin wrote:<br>
<blockquote type="cite" cite="mid1069881529.2712.24.camel@snowflake">
<pre wrap="">On Wed, 2003-11-26 at 20:40, Pedro Abelleira Seco wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi, list
I'm having a little problem with libglade. In my test
case I have a simple app: a window with a DrawingArea
inside. The "button_press_event" is connected with a
callback, the GDK_BUTTON_PRESS_MASK and everything
works right. It works if I use the glade-generated C
code or use libglade to load the interface
dinamically.
Now, when I _add_ GDK_BUTTON_MOTION_MASK to the event
mask the dinamic version stops getting events but the
rebuilded static version works ok. The file inteface.c
contains
gtk_widget_set_events (drawingarea1,
GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK);
so the event mask is what I want. I attach the
testcase I'm using.
</pre>
</blockquote>
<pre wrap=""><!---->
If you remove the spaces in this line in the .glade file it works:
<property name="events">GDK_BUTTON_MOTION_MASK |
GDK_BUTTON_PRESS_MASK</property>
It looks like glade_flags_from_string() in libglade can't handle spaces.
I've added a bug for it:
<a class="moz-txt-link-freetext" href="http://bugzilla.gnome.org/show_bug.cgi?id=128013">http://bugzilla.gnome.org/show_bug.cgi?id=128013</a>
Thanks for the report,
Damon
_______________________________________________
Glade-users maillist - <a class="moz-txt-link-abbreviated" href="mailto:Glade-users@lists.ximian.com">Glade-users@lists.ximian.com</a>
<a class="moz-txt-link-freetext" href="http://lists.ximian.com/mailman/listinfo/glade-users">http://lists.ximian.com/mailman/listinfo/glade-users</a>
</pre>
</blockquote>
<br>
</body>
</html>
--------------000801010409070808090007--