by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 01 07:19
    moll commented #260
  • Jun 30 20:53

    garetxe on master

    gi-gtk-3.0.35 (compare)

  • Jun 30 19:44
    garetxe closed #260
  • Jun 30 19:44
    garetxe commented #260
  • Jun 30 08:51
    moll commented #260
  • Jun 29 23:34
    garetxe reopened #260
  • Jun 29 23:34
    garetxe commented #260
  • Jun 29 22:06
    moll closed #260
  • Jun 29 22:06
    moll commented #260
  • Jun 29 21:36
    garetxe commented #260
  • Jun 29 12:56
    felipebalbi commented #297
  • Jun 29 12:34
    felipebalbi commented #297
  • Jun 29 12:32
    garetxe commented #297
  • Jun 29 12:14
    felipebalbi commented #297
  • Jun 29 11:54
    garetxe commented #297
  • Jun 29 11:41
    felipebalbi commented #297
  • Jun 29 11:40
    felipebalbi commented #297
  • Jun 29 11:30
    felipebalbi commented #297
  • Jun 29 11:06
    garetxe commented #298
  • Jun 29 11:03
    garetxe commented #297
Iñaki
@garetxe
@Kranioceros The same example also shows how to define properties for custom types, see https://github.com/haskell-gi/haskell-gi/blob/master/examples/advanced/CustomContainer.hs#L249
Defining new signals is trickier, and is not supported yet, unfortunately
Ramiro Garay
@Kranioceros
Okay, I see this is all fairly new in the library. It's not as if I really need these features, I'm just following the Gnome Developers tutorial on Gtk application development. Up to this point it has been really straightforward, but probably I should seek alternative solutions to subclassing.
In any case, thank you for taking the time to answer my questions
Iñaki
@garetxe
Sure!
Andri Möll
@moll
Damn that Gitter doesn't seem to have any way of searching the archive. Anywho, I've got a problem with getting any of the Haskell GI libraries to compile on GHC v8.4.3. They (e.g. gi-glib) keep on complaining about not finding Data.GI.CodeGen.CabalHooks. How would one go about debugging this? Thanks in advance!
I initially tried with Haskell-GI v0.21.5 from around April 2019, but it seems to be a problem with v0.22.6, too.
Haskell-GI itself compiles fine. It's only later when it gets to gi-glib that it fails.
Andri Möll
@moll
I saw GitHub issues regarding Stack, but this is with Cabal and its sandbox.
Andri Möll
@moll
Found the problem! I was disabling the static libraries (.as) globally via ~/.cabal/config through library-vanilla: False. This seemed to have broken GI libraries' custom-setup. Running cabal install with --ghc-option=-dynamic solved it.
Andri Möll
@moll
I noticed there have been backwards incompatible changes to Haskell GI lately. Is Haskell GI using semver and that's why it went to v0.22 from v0.21?
Where did v0.22.0–v0.22.2 go though? https://github.com/haskell-gi/haskell-gi/blob/master/ChangeLog.md jumps from v0.21.5 to v0.22.3.
Iñaki
@garetxe

Found the problem! I was disabling the static libraries (.as) globally via ~/.cabal/config through library-vanilla: False. This seemed to have broken GI libraries' custom-setup. Running cabal install with --ghc-option=-dynamic solved it.

Great, thanks for letting me know! I had seen this issue before, but I had no idea what caused it. I always resorted to removing the build cache, and that somehow fixed it.

I noticed there have been backwards incompatible changes to Haskell GI lately. Is Haskell GI using semver and that's why it went to v0.22 from v0.21?

Basically, yes. Although due to the way haskell-gi works, what this really means is the version of the API generated for the bindings, not the API of haskell-gi itself.

Where did v0.22.0–v0.22.2 go though? https://github.com/haskell-gi/haskell-gi/blob/master/ChangeLog.md jumps from v0.21.5 to v0.22.3.

Sorry, that's just me forgetting to update the ChangeLog.md file.

Iñaki
@garetxe
The full list of changes is easy to gather from the git log, I generally add a commit of the form Release haskell-gi-xxx when doing a release
Andri Möll
@moll
Okie. Thx.
Andri Möll
@moll
On topic others, do you by any chance have an idea why WebKit.settingsSetEnableWriteConsoleMessagesToStdout through Haskell seems to fail to have effect? It gets set, but console.logs never get printed to stdout. An independent test for WebKit in C confirms it works. Just in the Haskell runtime it doesn't seem to.
I know WebKit starts a separate process for its rendering. I wonder if it never gets the stdout file handle or what...
Iñaki
@garetxe
Not sure, sorry. The GHC runtime does various subtle things, so it's hard to tell. Are you using -threaded when compiling? If so, would you have a small testcase I could take a look to?
Andri Möll
@moll
I do have -threaded in ghc-options. I'll put a minimal test case up when I get back to it. Thanks for the offer to help!
Andri Möll
@moll
Others as non-construct* functions.
Andri Möll
@moll
Relatedly, I'm trying to construct a WebsiteDataManager and it seems it requires its properties to be set at construction time. Given that I'm not using the label-mechanics of Haskell GI, how would I go about doing so? Initially I thought it'd be Data.GI.Base.Constructible.new and a bunch of of constructWebsiteDataManagerBaseDataDirectorys in an array, but then noticed the former takes some AttrOp thingie and the latter returns GValueConstructs. I take it there's a separate new somewhere that takes GValueConstructrs in an array? Thanks in advance!
It's not often you see a function that takes an array of IOs and wants to do the sequenceing for you... I'm not even sure whether that's weird or convenient. ^_^
santiweight
@santiweight
Hey there - noobie question - is there any support for gradients for backgrounds in haskell-gi. The only thing I can find is -webkit-linear-gradient but it crashes with "not a valid color name" when i put it in my css file
Andri Möll
@moll
https://developer.gnome.org/gtk3/stable/chap-css-overview.html lists it has its own gradient syntax/property.
Or it looks pretty CSS3-like to be honest.
Prefixed properties wouldn't make much sense. GTK isn't a web browser, after all. They just interpret some CSS.
santiweight
@santiweight
is there a way around this to make it easier than a drawingarea. Thank you for the find - im totally new to CSS and very bad at search currently haha
Andri Möll
@moll
Sorry, could you rephrase "easier than a drawing area"?
santiweight
@santiweight
In html I know there's a syntax for color gradients that's (grey 30%, white 30%...) and I'm wondering if I could the same. I think the alternative would be making a DrawingArea widget and then draw shapes on it?? Is that right
Andri Möll
@moll
The link I gave above lists GTK's syntax for gradients. Have you tried that?
santiweight
@santiweight
trying right now
im getting invalid number for color value
Andri Möll
@moll
I've never tried GTK's gradients before. What's the value you're trying?
santiweight
@santiweight
background-color : rgba (grey 30%, white 30%, white)
Andri Möll
@moll
That doesn't look like the gradient syntax in the GTK CSS docs.
How did you come up with that?
santiweight
@santiweight
color: transparent;
background-color: red;
border-top-color: rgb(128,57,0);
border-left-color: rgba(10%,20%,30%,0.5);
border-right-color: #ff00cc;
border-bottom-color: #ffff0000cccc;
from the docs. i think i have some fundamental misunderstanding :/
Andri Möll
@moll
Example 29. Linear gradients lists
button {
  background-image: linear-gradient(45deg, yellow, blue);
}
santiweight
@santiweight
ah
i need control over the specific size of the gradients
so the goal would be to have the box filled 30% one colour 20% antoher etc
oh it seems that syntax does have that
Iñaki
@garetxe

It's not often you see a function that takes an array of IOs and wants to do the sequenceing for you... I'm not even sure whether that's weird or convenient. ^_^

:D Honestly I can't recall why it does that, probably convenience at some point (currently the generated bindings don't use it anymore). I could change it, but I think there are some projects using it, so perhaps not worth making it more "normal".

Hey! Is there a reason https://hackage.haskell.org/package/gi-webkit2-4.0.24/docs/GI-WebKit2-Objects-WebsiteDataManager.html#v:constructWebsiteDataManagerBaseDataDirectory is in the IO monad as opposed to MonadIO as all the other functions are?

No good reason, it should be easy to change. A pull request would be appreciated, otherwise feel free to open an issue so I don't forget to do it.