Axel, looks gnus have some problem that haven't send this mail. How do you think "split Gtk.Signals.chs from gtk package" ?
I have push IconTheme patch, but still can't use `iconThemeLookupByGicon`, that's need write `gio` in `build-depends` of gtk.cabal. But gio.cabal need Gtk.Signals, so i need write `gtk` in `build-depends` of gio.cabal. It's conflict between gio and gtk. I think all code in Gtk.Signals should just depend on `glib` and not `gtk`, module `General.Threading` is same. After split, not just gtk2hs-base project can use those Signals, any project that need GObject-Signal can use those Signals. I have make GIO APIs works, but i don't know how to merge those patches if don't fix this problem. If you haven't time to do this, tell me your plan, i do it. Cheers, -- Andy Andy Stewart <lazycat.mana...@gmail.com> writes: > 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: > 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 > ...... > > 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 Gtk2hs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel