command line arguments altered
This commit is contained in:
4
main.go
4
main.go
@@ -108,8 +108,8 @@ var (
|
|||||||
var cssFileName = flag.String("s", "drawer.css", "Styling: css file name")
|
var cssFileName = flag.String("s", "drawer.css", "Styling: css file name")
|
||||||
var targetOutput = flag.String("o", "", "name of the Output to display the menu on")
|
var targetOutput = flag.String("o", "", "name of the Output to display the menu on")
|
||||||
var displayVersion = flag.Bool("v", false, "display Version information")
|
var displayVersion = flag.Bool("v", false, "display Version information")
|
||||||
var iconSizeLarge = flag.Int("isl", 64, "Icon Size Large")
|
var iconSize = flag.Int("is", 64, "Icon Size")
|
||||||
var iconSizeSmall = flag.Int("iss", 16, "Icon Size Small")
|
var fsColumns = flag.Uint("fscol", 2, "File Search result COLumns")
|
||||||
var columnsNumber = flag.Uint("c", 6, "number of Columns")
|
var columnsNumber = flag.Uint("c", 6, "number of Columns")
|
||||||
var itemSpacing = flag.Uint("spacing", 20, "icon spacing")
|
var itemSpacing = flag.Uint("spacing", 20, "icon spacing")
|
||||||
var lang = flag.String("lang", "", "force lang, e.g. \"en\", \"pl\"")
|
var lang = flag.String("lang", "", "force lang, e.g. \"en\", \"pl\"")
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ func setUpPinnedFlowBox() *gtk.FlowBox {
|
|||||||
entry := id2entry[desktopID]
|
entry := id2entry[desktopID]
|
||||||
|
|
||||||
btn, _ := gtk.ButtonNew()
|
btn, _ := gtk.ButtonNew()
|
||||||
pixbuf, _ := createPixbuf(entry.Icon, *iconSizeLarge)
|
pixbuf, _ := createPixbuf(entry.Icon, *iconSize)
|
||||||
img, err := gtk.ImageNewFromPixbuf(pixbuf)
|
img, err := gtk.ImageNewFromPixbuf(pixbuf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
println(err, entry.Icon)
|
println(err, entry.Icon)
|
||||||
@@ -219,7 +219,7 @@ func flowBoxButton(entry desktopEntry) *gtk.Button {
|
|||||||
button, _ := gtk.ButtonNew()
|
button, _ := gtk.ButtonNew()
|
||||||
button.SetAlwaysShowImage(true)
|
button.SetAlwaysShowImage(true)
|
||||||
|
|
||||||
pixbuf, _ := createPixbuf(entry.Icon, *iconSizeLarge)
|
pixbuf, _ := createPixbuf(entry.Icon, *iconSize)
|
||||||
img, _ := gtk.ImageNewFromPixbuf(pixbuf)
|
img, _ := gtk.ImageNewFromPixbuf(pixbuf)
|
||||||
button.SetImage(img)
|
button.SetImage(img)
|
||||||
button.SetImagePosition(gtk.POS_TOP)
|
button.SetImagePosition(gtk.POS_TOP)
|
||||||
@@ -268,7 +268,6 @@ func setUpFileSearchResult() *gtk.FlowBox {
|
|||||||
cancelClose()
|
cancelClose()
|
||||||
})
|
})
|
||||||
fileSearchResultWrapper.PackStart(flowBox, false, false, 10)
|
fileSearchResultWrapper.PackStart(flowBox, false, false, 10)
|
||||||
flowBox.ShowAll() // TODO: check if necessary here
|
|
||||||
|
|
||||||
return flowBox
|
return flowBox
|
||||||
}
|
}
|
||||||
@@ -362,7 +361,7 @@ func searchUserDir(dir string) {
|
|||||||
fileSearchResultFlowBox.Hide()
|
fileSearchResultFlowBox.Hide()
|
||||||
|
|
||||||
statusLabel.SetText(fmt.Sprintf("%v results", fileSearchResultFlowBox.GetChildren().Length()))
|
statusLabel.SetText(fmt.Sprintf("%v results", fileSearchResultFlowBox.GetChildren().Length()))
|
||||||
num := uint(fileSearchResultFlowBox.GetChildren().Length() / 3)
|
num := uint(fileSearchResultFlowBox.GetChildren().Length() / *fsColumns)
|
||||||
fileSearchResultFlowBox.SetMinChildrenPerLine(num + 1)
|
fileSearchResultFlowBox.SetMinChildrenPerLine(num + 1)
|
||||||
fileSearchResultFlowBox.SetMaxChildrenPerLine(num + 1)
|
fileSearchResultFlowBox.SetMaxChildrenPerLine(num + 1)
|
||||||
//While moving focus with arrow keys we want buttons to get focus directly
|
//While moving focus with arrow keys we want buttons to get focus directly
|
||||||
|
|||||||
Reference in New Issue
Block a user