Example #1
0
func dialogNoPlugins() {
	// Need to keep the string as it is for translation.
	str := "No plug-in were found.\nPlug-ins provide most of the functionalities (animations, applets, views, etc).\nSee http://glx-dock.org for more information.\nThere is almost no meaning in running the dock without them and it's probably due to a problem with the installation of these plug-ins.\nBut if you really want to use the dock without these plug-ins, you can launch the dock with the '-f' option to no longer have this message.\n"
	icon := gldi.IconsGetAnyWithoutDialog()
	container := globals.Maindock().ToContainer()
	iconpath := globals.FileCairoDockIcon()
	dialog.ShowTemporaryWithIcon(tran.Slate(str), icon, container, 0, iconpath)
}
Example #2
0
func dialogChangelog() {
	str := getChangelog()
	if str == "" {
		return
	}
	log.Info("", str) // Also show it on console.
	// TODO: icon shouldn't be nil, grab first icon.
	// 			Icon *pFirstIcon = cairo_dock_get_first_icon (g_pMainDock->icons);
	dialog.NewDialog(nil, globals.Maindock().Container(), cdtype.DialogData{
		Message:   str,
		Icon:      globals.FileCairoDockIcon(),
		UseMarkup: true})
}
Example #3
0
// ListIconsMainDock builds the list of icons in the maindock.
//
func (Data) ListIconsMainDock() (list []datatype.Field) {
	for _, icon := range globals.Maindock().Icons() {
		if !icon.IsTaskbar() && !icon.IsSeparatorAuto() && icon.GetParentDockName() == datatype.KeyMainDock {
			iconer := IconConf{icon}

			name, img := iconer.DefaultNameIcon()
			list = append(list, datatype.Field{
				Key:  icon.ConfigPath(),
				Name: name,
				Icon: img,
			})
		}
	}
	return list
}
Example #4
0
// Install downloads and extract an external archive to package dir.
//
func (v *AppletDownload) Install(options string) error {
	// Using the "drop data signal" trick to ask the Dbus applet to work for us.
	// Only way I found for now to interact with it and let it know it will have
	// a new applet to handle. As a bonus, it also activate the applet, which
	// will toggle the activated button with the UpdateModuleState signal.
	url := packages.DistantURL + v.SrvTag + "/" + v.DisplayedName + "/" + v.DisplayedName + ".tar.gz"
	gldi.EmitSignalDropData(globals.Maindock().Container(), url, nil, 0)

	v.app = gldi.ModuleGet(v.DisplayedName)
	if v.app == nil {
		return errors.New("install failed: v.DisplayedName")
	}

	externalUserDir := globals.DirDockData(cdglobal.AppletsDirName)
	v.SetInstalled(externalUserDir)
	return nil

	// return v.AppletPackage.Install(options)
}