Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

Commit

Permalink
changed the notification window to automatically be floating on tiled…
Browse files Browse the repository at this point in the history
… window managers and added a proper error for mime type sniff
  • Loading branch information
Francesco149 committed Oct 28, 2016
1 parent c2edd4c commit 42179bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sharenixlib/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func lockEnd(index int) (err error) {
func Notifyf(expire time.Duration, onInit func(*gtk.Window), format string,
a ...interface{}) (err error) {

win, err := gtk.WindowNew(gtk.WINDOW_TOPLEVEL)
win, err := gtk.WindowNew(gtk.WINDOW_POPUP)
if err != nil {
return
}
Expand Down Expand Up @@ -116,7 +116,7 @@ func Notifyf(expire time.Duration, onInit func(*gtk.Window), format string,
// PANGO_ELLIPSIZE_END automatically limits the text length when the
// window is resized and appends ... at the end
notiftext := fmt.Sprintf(
"<small><b>ShareNix: "+format+"</b></small>", a...)
"ShareNix: "+format, a...)
l.SetSingleLineMode(true)
l.SetMaxWidthChars(60) // workaround for a positioning bug, see below
l.SetEllipsize(pango.ELLIPSIZE_END)
Expand Down
2 changes: 1 addition & 1 deletion sharenixlib/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func escapeQuotes(s string) string {
func SniffMimeType(filePath string) (string, error) {
file, err := os.Open(filePath)
if err != nil {
return "", err
return "", fmt.Errorf("SniffMimeType failed to open file: %s", err)
}
defer file.Close()

Expand Down
2 changes: 1 addition & 1 deletion sharenixlib/sharenix.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import (

const (
ShareNixDebug = true
ShareNixVersion = "ShareNix 0.3.4a"
ShareNixVersion = "ShareNix 0.3.5a"
)

const (
Expand Down

0 comments on commit 42179bf

Please sign in to comment.