#186 TypeError when calling GLib::ContentType.get_icon

v1.0_(example)
closed
nobody
None
5
2014-02-23
2014-02-20
neversleep1911
No

GLib::ContentType.get_icon fails with error: "no implicit conversion of Module into String (TypeError)".

1
2
3
4
5
6
7
8
#!/usr/bin/env ruby

require "gtk3"
require "glib2"
require "gio2"

mime_type = "image/jpeg"
icon = Gio::ContentType.get_icon(mime_type)

ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]

gems:

gio2 (2.1.0)
glib2 (2.1.0)
gtk3 (2.1.0)

Discussion

  • Kouhei Sutou
    Kouhei Sutou
    2014-02-21

    • status: open --> closed
     
  • Kouhei Sutou
    Kouhei Sutou
    2014-02-21

    Thanks for your report!
    I've fixed it in master!