Hi Axel,
I have build a simple file-manager that base one gio, works well, and
much much faster than GnomeVFS, looks screenshot:
http://farm5.static.flickr.com/4027/4584389024_782b1e09ee_o.png
After i test all GIO APIs, i will request you merge my branch
(https://patch-tag.com/r/AndyStewart/gio-branch/home) to main
repository.
I think those patches are high quality.
The biggest cause to merge gio branch is `System` APIs (GHC) can't
cross-platform well, speical unicode problem, some `System` functions
can't handle unicode filepath on Unix.
Code logic is too complicated even i can use utf8-string decode/encode filepath.
GIO give user easy and cross-platform APIs to handle files (advanced
vfs), and integrate with gtk+ module perfect.
But before merge, it's need fix something in `gtk` packages:
Currently, i wirte below to gio.cabal:
------------------------------> gio.cabal start <------------------------------
x-Types-Forward: Graphics.UI.GtkInternals
......
build-depends: base >= 4, array, containers, haskell98, mtl,
bytestring,
glib >= 0.10.5 && < 0.11,
gtk >= 0.10.5 && < 0.11
......
------------------------------> gio.cabal end <------------------------------
Because gio modules need `Graphics.UI.Gtk.Signals`, and
`Graphics.UI.Gtk.Signals` just expose in GtkInternal.chs.
So we need setup above in gio.cabal
Okay, let's see the real problem,
Because have some necessary gtk+ functions (`iconThemeLookupByGicon` in my
previous patch) need gio Types, so we need add "gio >= 0.10.5 && < 0.11"
in option `build-depends` of gtk.cabal
Do you see? gtk.cabal need `gio`, and gio.cabal `gtk`, so can't compile.
And right way is `gtk` depend `gio` and `gio` just depend `glib`.
The only *neat* solution to fix is move
`gtk2hs/gtk/Graphics/UI/Gtk/Signals.chs`
to
`gtk2hs/glib/System/Glib/Callback.chs` (or better name),
because Signals.chs need `General/Threading.hs` (hsgthread.c and hsgthread.h),
so we need move below files to somewhere under `glib` packages.
gtk2hs/gtk/Graphics/UI/Gtk/Signals
gtk2hs/gtk/Graphics/UI/Gtk/General/Threading.hs
gtk2hs/gtk/Graphics/UI/Gtk/General/hsgthread.h
gtk2hs/gtk/Graphics/UI/Gtk/General/hsgthread.c
I have check above files, them just need System.Glib, so move to `glib`
package is safety.
After move above files, we make all packages that need Signals depend
`glib`, then we can fix conflict problem between `gio` and `gtk`.
We need change all modules import `System.Glib.Callback` instead
`Graphics.UI.Gtk.Signals`, i think this change won't break user's code,
because user don't import `Graphics.UI.Gtk.Signals`
I can't think better solution than above.
What do you think?
Cheers,
-- Andy
------------------------------------------------------------------------------
_______________________________________________
Gtk2hs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel