Maxime Henrion <mhenr...@gmail.com> writes:

> On Tue, 2010-10-19 at 05:42 +0800, Andy Stewart wrote:
>> Hi Maxime,
>> 
>> Thanks for your patch, i have apply it. :)
>
> Great, thanks!
>
>> BTW, please add documentation and version macro in new patch.
>> Example, signals entryIconPress/entryIconRelease add after GTK+2.16, so
>> we need add 
>> 
>> #if GTK_CHECK_VERSION(2,16,0)
>>   entryIconPress,
>>   entryIconRelease,
>> #endif
>> 
>> #if GTK_CHECK_VERSION(2,16,0)
>> ...
>>   signal define
>> ...
>> #endif
>> 
>> wrap new code make sure old-GTK+ user can compile gtk2hs too. :)
>
> Woops, I indeed forgot about documentation, and protecting users of old
> versions of GTK+.  I'll think of it next time :-).
>
>> Maxime Henrion <mhenr...@gmail.com> writes:
>> 
>> >    Hello all,
>> >
>> >
>> > Here is a patch that adds new signal handlers for the "icon-press" and
>> > "icon-release" signals of the GtkEntry object.  It was a bit trickier
>> > than I expected, because I needed a new connect_* function, which I
>> > foolishly wrote by hand to begin with :-).  Furthermore, this signal
>> > passes along a GdkEventButton * so I had to familiarize myself with the
>> > EventM monad first.
>> >
>> > Anyways, I have been using them and can confirm they work fine.  Funnily
>> > enough, the GTK+ API docs say those signals are given a plain GdkEvent
>> > *, but they really do send a GdkEventButton *...  But I guess we can't
>> > blame them: they're stuck with C :-).
>> Below is GdkEvent define:
>> 
>> union GdkEvent
>> {
>>   GdkEventType              type;
>>   GdkEventAny               any;
>>   GdkEventExpose            expose;
>>   GdkEventNoExpose          no_expose;
>>   GdkEventVisibility        visibility;
>>   GdkEventMotion            motion;
>>   GdkEventButton            button;
>>   GdkEventScroll            scroll;
>>   GdkEventKey               key;
>>   GdkEventCrossing          crossing;
>>   GdkEventFocus             focus_change;
>>   GdkEventConfigure         configure;
>>   GdkEventProperty          property;
>>   GdkEventSelection         selection;
>>   GdkEventOwnerChange       owner_change;
>>   GdkEventProximity         proximity;
>>   GdkEventClient            client;
>>   GdkEventDND               dnd;
>>   GdkEventWindowState       window_state;
>>   GdkEventSetting           setting;
>>   GdkEventGrabBroken        grab_broken;
>> };
>> 
>> Yes, in this situation we need EventButton. 
>> 
>> PS. it's easier to apply if you use command "darcs send -o gtk2hs.patch"
>> generate patch.
>
> No problem, I'll start right now by attaching a patch in darcs format
> that removes now outdated comments about the signals we just
> implemented.
Done, thanks! :)

Cheers,

  -- Andy


------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to