Axel Simon | 15 May 10:16 2014
Picon

webkit woes

Hi Daniel,

I'm attaching a patch to fix a parsing issue that gtk's c2hs has on Mac OS. I've tried to compile koral's
webkit problem but I'm still struggling.

Cheers,
Axel

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel
Axel Simon | 15 May 10:16 2014
Picon

webkit woes

Hi Daniel,

I'm attaching a patch to fix a parsing issue that gtk's c2hs has on Mac OS. I've tried to compile koral's
webkit problem but I'm still struggling.

Cheers,
Axel

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel
Donald Allen | 19 Feb 02:17 2014
Picon

Popup menu trouble

I am trying to pop up a menu when the right button is pressed with the cursor in a particular treeview. I set up the event handler as follows:

-- Handle buttonPressEvent within the view
on view buttonPressEvent (tryEvent (do button <- eventButton
                                       theTime <- eventTime
                                       case button of
                                          RightButton -> liftIO (mouseButtonPressed theTime accountRegister globals)
                                          _ -> stopEvent))

and

mouseButtonPressed :: TimeStamp -> AccountRegister -> Globals -> IO ()
mouseButtonPressed theTime accountRegister globals
   = do menu <- menuNew
        print "mouseButtonPressed called"
        print ("time", theTime)
        menuItem <- menuItemNewWithLabel "New transaction (ctrl-n)"
        on menuItem menuItemActivated (newTransaction accountRegister globals)
        menuShellAppend menu menuItem
        menuItem <- menuItemNewWithLabel "Duplicate selected transaction (ctrl-d)"
        menuShellAppend menu menuItem
        widgetShowAll menu
        print "about to call menuPopup"
        menuPopup menu (Just (RightButton, theTime))

The first time I press the right button, the menu appears for perhaps 10 seconds and then disappears. During that time, I can click 'New transaction' and the right thing happens. The second time I press the right button, the menu appears very briefly, less than a second and then disappears. Subsequent right clicks behave the same. In other words, useless.

The debugging prints in mouseButtonPressed all appear in response to the right clicks. The event time advances, as you would expect.

I'm at a complete loss as to what might be causing this and can't continue with my project if this is not solved. Any suggestions would be appreciated.

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel
Donald Allen | 13 Feb 19:40 2014
Picon

Some issues

Graphics.UI.Gtk.Windows.Dialog

The documentation says "the two primary areas of the window can be
accessed using dialogGetUpper and dialogGetActionArea." There is no
dialogGetUpper. Is it now dialogGetContentArea?

The documentation says "The top section is a VBox,". If dialogGetUpper
has been replaced by dialogGetContentArea, the latter returns an IO
Widget, not a Vbox and Widget is not in the ContainerClass. So how do
put something in the content area? In the C version of my project,
which of course uses gtk3 directly, I simply do a gtk_container_add to
the content area of the dialog. Works fine. The Haskell compiler won't
allow this, because, as I said above, Widget is not in the
ContainerClass, so I can't do a containerAdd. Can someone enlighten me
as to how one adds, say, a calendar, to the container area of a
dialog?

Graphics.UI.Gtk.Misc.Calendar

In the Signals section, we have

onDaySelected :: CalendarClass self => self -> IO () -> IO (ConnectId self)

This is a function, not a signal. It cannot be used with 'on'. I
suspect what is going on here is that a change has been made from
functions like this, with the signal name embedded in the function, to
use of 'on', which takes a signal as an argument. The latter makes
much more sense to me, a better design, in my opinion. But it looks
like the transition is only partly done. If I'm right about this, it
would really be helpful to warn users of this, and refer them to
documentation for how to use the old-style and new-style signal
connection. Perhaps I missed it, but I've found nothing in the
documentation that says anything about this. Or perhaps I've got this
wrong, in which case I'd appreciate an explanation.

/Don Allen

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
Donald Allen | 24 Jan 15:52 2014
Picon

Error when adding nodes to a tree store in response to testExpandRow

I've written a personal finance manager, having become dissatisfied
with Gnucash after many years of use. My own system, Newcash, is
written in C/GTK3/Sqlite3 (I will be making it available via github
when the documentation is ready). In recent months, I've become
interested in Haskell (I've written a lot of Lisp and Scheme code over
the years) and I re-wrote the Newcash report generator (originally
written in Python to process Gnucash's xml file and thus was pretty
ugly and needed re-writing) in Haskell. Enthusiastic about the
language and pleased with the performance of the report generator, I
decided to experiment with re-writing Newcash itself in Haskell, for
all the reasons that Haskell is to be preferred to C.

But I've run into a show-stopper. Here's the situation: the Newcash
initial window displays the tree of accounts. Not wanting to endure
long startup times (a big issue with Gnucash), I initially want to
populate the tree model with the root, its children, and its
grandchildren. The root gets expanded, so the children are visible,
but the grandchildren are present, so the children are expandable. A
callback is set up to handle the TreeView's testExpandRow signal,
indicating that the user has requested expansion of one of the nodes.
I do this initial setup of the accounts window prior to calling
mainGUI the first time. This all works fine.

The trouble starts if I try to expand one of the root's children by
clicking it. The root's grandchildren are already present, but
callback attached to the testExpandRow needs to add the grandchildren
of the clicked node, so that if it has children, it will appear
expandable. The callback receives both an iter and a path to the
clicked node. It uses the path in a loop that adds the grandchildren
of the clicked node to the TreeStore. This succeeds, but when the
callback returns, I get an error message:

** (Newcash:920): CRITICAL **: gtk2hs_store_iter_has_child: assertion
'iter->stamp == store->stamp' failed

and the display fails to refresh, with the clicked node expanded. If I
click the same node again, it expands correctly (the grandchildren are
already present, courtesy of the response to the previous click).

I'm guessing that the iter being passed to the callback (which I don't
use; as mentioned before, the insertion of the grandchildren is done
using the path derived from the path of the clicked node, using
treeStoreInsert) has a time-stamp as of the time the first
testExpandRow signal was issued. In response to that signal, I add
some nodes to the store. I'm guessing that doing so updates the
time-stamp on the store and that the two time-stamps are compared upon
return from signal processing, and they are no longer equal. The
second click does nothing to the store (my callback is smart enough to
know that a node has already been processed and doesn't add its
grandchildren twice), so the second time the node is clicked, the
time-stamp comparison works.

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
Hamish Mackenzie | 18 Nov 03:19 2013
Picon

Gtk2Hs 0.12.5.0

I am keen to get updated Gtk2Hs packages into Hackage (so that I can do the 
same for Leksah).

If someone grants me (HamishMackenzie) access, I would be happy to upload 
candidate packages to Hackage.

I have updated the version numbers and pointed the Source-Repository 
fields to point at github 
https://github.com/gtk2hs/gtk2hs/commit/b6769ccd7627147c115c5b615d96704d6368bb57

I am not aware of any outstanding bugs.

To make it easier to install Gtk2Hs on Windows I have added the header 
files, import libraries and pkg-config files to the latest Leksah binary 
installer.

To build Gtk2Hs on Windows

 * Download Leksah binary - current one is...
      http://www.leksah.org/packages/leksah-0.13.2.8-ghc-7.6.3.exe
 * Install Leksah in C:\Leksah (or another dir without spaces in the path)
 * Add C:\Leksah\bin to your PATH
 * Follow the instructions here... https://github.com/gtk2hs/gtk2hs

I would like to do the same for OS X, but the Leksah OS X binary uses the 
macports libiconv (so it would not work with the standard builds of GHC).

Thanks,
Hamish

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
Hamish Mackenzie | 5 Oct 09:36 2013
Picon

Moving gtk2hs, gtksourceview and webkit to git and github

Ben suggested it might be a good way to make it easier for people to contribute.  I agree.  There are lots of
great tools for git (I use SmartGit all the time) and we can set up Travis-CI.

+1

Hamish
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
Ben Gamari | 22 Sep 17:00 2013
Picon

Package name and gtk3


Since Daniel Wagner's patch[1] from 11 July 2012, gtk/gtk.cabal in the
gtk2hs repository declares the package name to be gtk3. This is a fine
approach to take for differentiating the Gtk3 bindings from their Gtk2
counterparts but the implementation needs to be finished.

In addition to editing gtk.cabal, the patch also adds gtk.cabal-0 and
gtk.cabal-3. The naming of these files is quite mysterious (why does the
Gtk 2 cabal file end in "-0"?) and it's completely unclear how to
convince cabal-install to build bindings for a given Gtk version short
of copying one of these files over gtk.cabal. At very least, we need to
add some notes to INSTALL describing how to build both the Gtk3 and
Gtk2 bindings.

Really, it would be better if things were laid out in such a way that
the desired workflow was apparent to a moderately experienced Haskeller.
One way to accomplish this would be,

  * remove gtk/gtk.cabal
  * move gtk/gtk.cabal-0 to gtk2/gtk.cabal and gtk/gtk.cabal-3 to
    gtk3/gtk3.cabal
  * possibly rename gtk/ to gtk-common/ to suggest to the user that this
    directory contains no package of its own
  * add hs-source-dirs definitions pointing to gtk/ to both files
  * move Gtk2/3 specific files in gtk-common/ to the appropriate
    version-specific directory
  * Of course, update installation documentation in INSTALL

Thoughts?

Cheers,

- Ben

[1] https://github.com/bgamari/gtk2hs/commit/adf06373654d32b5b5838b813807faeb8bb3819b
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel
Ben Gamari | 18 Sep 15:40 2013
Picon

Cabal 1.18


After having demonstrated to myself repeatedly that I'm incapable of
operating Darcs correctly, I finally broke down and imported Gtk2hs
into Git. My cabal-1.18 branch[1] has the current state of my work to
get Gtk2hs building with Cabal 1.18. My intention is to export these
patches to apply against my Darcs tree when they are
ready. Unfortunately, it's not clear to me how to manage various Cabal
changes made in interfaces used by Gtk2HsSetup.hs (in particular
programFindLocation) without breaking backwards compatibility. This is
particularly problematic as Gtk2HsSetup.hs apparently doesn't have
access to the CPP macros typically defined by Cabal.

Cheers,

- Ben

[1] http://github.com/bgamari/gtk2hs/tree/cabal-1.18
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Gtk2hs-users mailing list
Gtk2hs-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-users
bgamari.foss | 7 Sep 04:05 2013
Picon

darcs patch: Cabal-1.18: Hide Distribution.Simple.Uti... (and 2 more)

Attached are two patches adding Cabal 1.18 compatibility and another
updating some uses of the old IOError interfaces from GHC <7.6.

3 patches for repository http://code.haskell.org/gtk2hs:

Fri Sep  6 22:01:08 EDT 2013  bgamari <at> gmail.com
  * Cabal-1.18: Hide Distribution.Simple.Utils.moreRecentFile

Fri Sep  6 22:01:41 EDT 2013  bgamari <at> gmail.com
  * pango/Gtk2HsSetup: Update programFindLocation usage for Cabal 1.18

Fri Sep  6 22:02:43 EDT 2013  bgamari <at> gmail.com
  * c2hs: Update IOError usage for GHC >= 7.6
Attachment (patch-preview.txt): text/x-darcs-patch, 6352 bytes
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel
Oliver Batchelor | 5 Sep 05:48 2013
Picon

Build script changes for Cabal-1.18

Hi guys,

I made a patch for a couple of small build script changes which let me compile with cabal 1.18. 
One of them at least would not be backward compatible (seems new argument to a findProgramLocation)

On the other hand, the gtk package fails to compile with:

Graphics/UI/Gtk/Printing/PrintOperation.chs:409:6:
    Couldn't match expected type `Ptr ()' with actual type `Window'
    In the return type of a call of `toWindow'


On lines 409, 504 and 530.


Cheers,
Oliver
Attachment (cabal1.18.dpatch): application/octet-stream, 21 KiB
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Gmane