lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Pavel,


I'm using GLib 2.0 (I'm not using Gnome but Lxde + some gnome goodies like gdu) ... and again you solved my issue.

The following code is working :

cfg_filename = GLib.get_user_config_dir() .. "/IMAPNotifyMe.conf"
local config = GLib.KeyFile()

if not config:load_from_file( cfg_filename, GLib.KeyFileFlags.KEEP_COMMENTS ) then
    print("*W* Unable to load configuration\n*W* Default settings")
    config:set_integer("Default", "port", 993)
    config:set_string("Default", "protocol", "sslv3")
    config:set_integer("Default", "timeout", 5)
    config:set_string("Default", "mailbox", "Inbox")
    config:set_integer("Default", "refresh", 5)
end

I'm now close to release my 1st Lua/Gtk application, thanks again.

Bye

Laurent