This repository has been archived on 2022-06-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2016-10-10 19:16:51 +05:00
|
|
|
package ui
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
// stdlib
|
|
|
|
|
"os"
|
|
|
|
|
"path/filepath"
|
|
|
|
|
"runtime"
|
|
|
|
|
|
|
|
|
|
// other
|
|
|
|
|
"github.com/mattn/go-gtk/gtk"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func (m *MainWindow) initializeMac() {
|
|
|
|
|
if runtime.GOOS == "darwin" {
|
|
|
|
|
dir, _ := filepath.Abs(filepath.Dir(os.Args[0]))
|
|
|
|
|
|
|
|
|
|
gtk.RCParse(dir + "/../Resources/themes/gtkrc-keybindings")
|
|
|
|
|
|
|
|
|
|
// ToDo: theming support and theme seletion in settings.
|
|
|
|
|
gtk.RCParse(dir + "/../Resources/themes/ClearlooksBrave/gtk-2.0/gtkrc")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-11-26 09:35:59 +05:00
|
|
|
func (m *MainWindow) initializeMacAfter() {
|
|
|
|
|
m.toolbar.SetStyle(gtk.TOOLBAR_ICONS)
|
|
|
|
|
}
|
|
|
|
|
|
2016-10-10 19:16:51 +05:00
|
|
|
func (m *MainWindow) initializeMacMenu() {
|
|
|
|
|
// This is a placeholder, in future we will use native mac menu.
|
|
|
|
|
// For now it launches default menu initialization.
|
|
|
|
|
m.InitializeMainMenu()
|
|
|
|
|
}
|