Beispiel #1
0
// ShowItems opens the GUI and displays the given item icon config.
//
func (gc *Bridge) ShowItems(icon gldi.Icon, container *gldi.Container, moduleInstance *gldi.ModuleInstance, showPage int) {
	confpath := ""
	if icon != nil {
		confpath = icon.ConfigPath()

	} else if container != nil { // A main dock that is not the first one. Use the dedicated conf file.
		confpath = globals.CurrentThemePath(container.ToCairoDock().GetDockName() + ".conf")
	}

	if confpath == "" {
		gc.Log.Info("ShowGui unmatched", "icon", icon != nil, "- container", container != nil, "- moduleInstance", moduleInstance != nil, "- page", showPage)

	} else {
		gc.Create()
		if gc.Widget != nil {
			gc.Widget.SelectIcons(confpath)
		}
	}
	// cairo_dock_items_widget_select_item (ITEMS_WIDGET (pCategory->pCdWidget), pIcon, pContainer, pModuleInstance, iShowPage);
}