Ejemplo n.º 1
0
// NewGTK returns a new client for a GTK ui
func NewGTK(version string) UI {
	coyimVersion = version
	//*.mo files should be in ./i18n/locale_code.utf8/LC_MESSAGES/
	glib.InitI18n("coy", "./i18n")
	gtk.Init(argsWithApplicationName())

	ret := &gtkUI{
		commands: make(chan interface{}, 5),
		toggleConnectAllAutomaticallyRequest: make(chan bool, 100),
		setShowAdvancedSettingsRequest:       make(chan bool, 100),
	}

	var err error
	flags := glib.APPLICATION_FLAGS_NONE
	if *config.MultiFlag {
		flags = glib.APPLICATION_NON_UNIQUE
	}
	ret.app, err = gtk.ApplicationNew("im.coy.CoyIM", flags)
	if err != nil {
		panic(err)
	}

	ret.keySupplier = config.CachingKeySupplier(ret.getMasterPassword)

	ret.accountManager = newAccountManager(ret)

	return ret
}
Ejemplo n.º 2
0
Archivo: ui.go Proyecto: 0x27/coyim
// NewGTK returns a new client for a GTK ui
func NewGTK(version string) UI {
	coyimVersion = version
	//*.mo files should be in ./i18n/locale_code.utf8/LC_MESSAGES/
	glib.InitI18n("coy", "./i18n")
	gtk.Init(argsWithApplicationName())

	ret := &gtkUI{
		commands: make(chan interface{}, 5),
		toggleConnectAllAutomaticallyRequest: make(chan bool, 100),
	}

	ret.applyStyle()
	ret.keySupplier = config.CachingKeySupplier(ret.getMasterPassword)

	ret.accountManager = newAccountManager(ret)

	return ret
}
Ejemplo n.º 3
0
func (*RealGlib) InitI18n(domain string, dir string) {
	glib.InitI18n(domain, dir)
}