mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2026-03-22 03:42:42 +01:00
Reunicon icons from ~/apps/Menu/
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
"log"
|
||||
//"encoding/json"
|
||||
//"path/filepath"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/veandco/go-sdl2/sdl"
|
||||
"github.com/veandco/go-sdl2/ttf"
|
||||
@@ -264,6 +264,27 @@ func (self *MainScreen) ExtraName(name string) string {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//ExecPackage is all-in-one folder ,Name.sh,Name.png,etc
|
||||
func (self *MainScreen) IsExecPackage(dirname string ) bool {
|
||||
files,err := ioutil.ReadDir(dirname)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
return false
|
||||
}
|
||||
|
||||
bname := filepath.Base(dirname)
|
||||
bname = self.ExtraName(bname)
|
||||
|
||||
for _,v := range files {
|
||||
if v.Name() == bname+".sh" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func (self *MainScreen) IsPluginPackage(dirname string ) bool {
|
||||
ret := false
|
||||
files,err := ioutil.ReadDir(dirname)
|
||||
|
||||
Reference in New Issue
Block a user