Hi Tim,
I've applied your patch. It will be in the next release.
Thanks,
Axel
On 11.02.2012, at 19:36, Tim Docker wrote:
> Hi Axel,
>
> My own code is now dependent on this patch. Does it look ok? Can it be
> included in the next release?
>
> thanks,
>
> Tim
>
> On 30/01/12 21:18, Tim Docker wrote:
>> I attach a patch. Please let me know if it is suitable.
>>
>> Tim
>>
>> On 28/01/12 00:19, Axel Simon wrote:
>>> Hi Tim,
>>>
>>> On 27.01.2012, at 13:42, Tim Docker wrote:
>>>
>>>> Hi,
>>>>
>>>> I am attempting to use widgetModifyBase to change the background of a
>>>> text entry, and then restore it again later. It's not clear to me how
>>>> the restore should be done. It looks like the function should be taking
>>>> (Maybe Color), and indeed the comment suggests this - see below.
>>>>
>>>> According to the gtk c library documentation, a null pointer for color
>>>> should be passed in to undo previous calls.
>>>>
>>>> Am I missing something, or is this an oversight in the implementation?
>>>>
>>>
>>> Yes, this is an oversight. The right thing would be to add
>>> widgetRestoreBase, widgetRestoreText, widgetRestoreFg, widgetRestorBg in
>>> order not to break the existing API. In case you feel like implementing
>>> them (with docs, please) then we'll gladly apply a patch.
>>>
>>> Cheers,
>>> Axel
>>>
>>>> Thanks,
>>>>
>>>> Tim
>>>>
>>>>
>>>> widgetModifyBase :: WidgetClass self => self
>>>> -> StateType -- ^ @state@ - the state for which to set the base color.
>>>> -> Color -- ^ @color@ - the color to assign (does not need to be
>>>> -- allocated), or @Nothing@ to undo the effect of
>>>> previous calls
>>>> -- to of 'widgetModifyBase'.
>>>> -> IO ()
>>>> widgetModifyBase self state color =
>>>> with color $ \colorPtr ->
>>>> {# call gtk_widget_modify_base #}
>>>> (toWidget self)
>>>> ((fromIntegral . fromEnum) state)
>>>> (castPtr colorPtr)
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>>
>>>> Try before you buy = See our experts in action!
>>>> The most comprehensive online learning library for Microsoft developers
>>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>>>> Metro Style Apps, more. Free future releases when you subscribe now!
>>>> http://p.sf.net/sfu/learndevnow-dev2
>>>> _______________________________________________
>>>> Gtk2hs-devel mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel
>>>
>>
>
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Gtk2hs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel