go fmt. Precursor to bug report filing.

This commit is contained in:
Pietro Gagliardi 2014-10-02 10:05:53 -04:00
parent 09db0bffff
commit 982004d050
50 changed files with 1081 additions and 1078 deletions

View File

@ -4,9 +4,9 @@ package ui
import ( import (
"fmt" "fmt"
"reflect"
"syscall" "syscall"
"unsafe" "unsafe"
"reflect"
) )
// #include "winapi_windows.h" // #include "winapi_windows.h"

View File

@ -31,6 +31,7 @@ type Grid interface {
// Align represents the alignment of a Control in its cell of a Grid. // Align represents the alignment of a Control in its cell of a Grid.
type Align uint type Align uint
const ( const (
LeftTop Align = iota LeftTop Align = iota
Center Center
@ -40,6 +41,7 @@ const (
// Side represents a side of a Control to add other Controls to a Grid to. // Side represents a side of a Control to add other Controls to a Grid to.
type Side uint type Side uint
const ( const (
West Side = iota West Side = iota
East East

View File

@ -6,8 +6,8 @@ package ui
import ( import (
"fmt" "fmt"
"unsafe"
"image" "image"
"unsafe"
) )
// #include "gtk_unix.h" // #include "gtk_unix.h"

View File

@ -192,7 +192,6 @@ func (s *stack) getAuxResizeInfo(d *sizing) {
// this is to satisfy Control; nothing to do here // this is to satisfy Control; nothing to do here
} }
// Space returns a null Control intended for padding layouts with blank space. // Space returns a null Control intended for padding layouts with blank space.
// It appears to its owner as a Control of 0x0 size. // It appears to its owner as a Control of 0x0 size.
// //

View File

@ -4,8 +4,8 @@ package ui
import ( import (
"fmt" "fmt"
"unsafe"
"reflect" "reflect"
"unsafe"
) )
// #include "winapi_windows.h" // #include "winapi_windows.h"

View File

@ -3,10 +3,10 @@
package ui package ui
import ( import (
"reflect"
"runtime" "runtime"
"sync" "sync"
"unsafe" "unsafe"
"reflect"
) )
// Go initializes and runs package ui. // Go initializes and runs package ui.

View File

@ -3,8 +3,8 @@
package ui package ui
import ( import (
"fmt"
"bytes" "bytes"
"fmt"
"image" "image"
"image/draw" "image/draw"
_ "image/png" _ "image/png"
@ -58,12 +58,12 @@ var icons = []struct {
data []byte data []byte
name string name string
}{ }{
{ __16x16_categories_applications_accessories_png, "16x16/categories/applications-accessories.png", }, {__16x16_categories_applications_accessories_png, "16x16/categories/applications-accessories.png"},
{ __16x16_places_folder_png, "16x16/places/folder.png", }, {__16x16_places_folder_png, "16x16/places/folder.png"},
{ __16x16_mimetypes_x_office_spreadsheet_png, "16x16/mimetypes/x-office-spreadsheet.png", }, {__16x16_mimetypes_x_office_spreadsheet_png, "16x16/mimetypes/x-office-spreadsheet.png"},
{ __32x32_categories_applications_accessories_png, "32x32/categories/applications-accessories.png", }, {__32x32_categories_applications_accessories_png, "32x32/categories/applications-accessories.png"},
{ __32x32_places_folder_png, "32x32/places/folder.png", }, {__32x32_places_folder_png, "32x32/places/folder.png"},
{ __32x32_mimetypes_x_office_spreadsheet_png, "32x32/mimetypes/x-office-spreadsheet.png", }, {__32x32_mimetypes_x_office_spreadsheet_png, "32x32/mimetypes/x-office-spreadsheet.png"},
} }
// from http://tango.freedesktop.org/releases/tango-icon-theme-0.8.90.tar.gz, which is public domain // from http://tango.freedesktop.org/releases/tango-icon-theme-0.8.90.tar.gz, which is public domain

View File

@ -5,15 +5,15 @@ package ui
// This file is called zz_test.go to keep it separate from the other files in this package (and because go test won't accept just test.go) // This file is called zz_test.go to keep it separate from the other files in this package (and because go test won't accept just test.go)
import ( import (
"fmt"
"flag" "flag"
"reflect" "fmt"
"testing"
"image" "image"
"image/color" "image/color"
"image/draw" "image/draw"
"time" "reflect"
"strings" "strings"
"testing"
"time"
) )
var closeOnClick = flag.Bool("close", false, "close on click") var closeOnClick = flag.Bool("close", false, "close on click")
@ -23,6 +23,7 @@ type dtype struct {
Name string Name string
Address string Address string
} }
var ddata = []dtype{ var ddata = []dtype{
{"alpha", "beta"}, {"alpha", "beta"},
{"gamma", "delta"}, {"gamma", "delta"},
@ -67,6 +68,7 @@ type testwin struct {
type areaHandler struct { type areaHandler struct {
handled bool handled bool
} }
func (a *areaHandler) Paint(r image.Rectangle) *image.RGBA { func (a *areaHandler) Paint(r image.Rectangle) *image.RGBA {
i := image.NewRGBA(r) i := image.NewRGBA(r)
draw.Draw(i, r, &image.Uniform{color.RGBA{128, 0, 128, 255}}, image.ZP, draw.Src) draw.Draw(i, r, &image.Uniform{color.RGBA{128, 0, 128, 255}}, image.ZP, draw.Src)