Temporary disabled all modals on Linuxes due to mattn/go-gtk#289.
This commit is contained in:
parent
6495e90737
commit
ea8bdde224
@ -34,13 +34,17 @@ type Launcher struct {
|
|||||||
|
|
||||||
func (l *Launcher) CheckForLaunchedUrbanTerror() error {
|
func (l *Launcher) CheckForLaunchedUrbanTerror() error {
|
||||||
if l.launched {
|
if l.launched {
|
||||||
mbox_string := "Game is launched.\n\nCannot quit, because game is launched.\nQuit Urban Terror to exit URTrator!"
|
// Temporary disable all these modals on Linux.
|
||||||
m := gtk.NewMessageDialog(nil, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
// See https://github.com/mattn/go-gtk/issues/289.
|
||||||
m.Response(func() {
|
if runtime.GOOS != "linux" {
|
||||||
m.Destroy()
|
mbox_string := "Game is launched.\n\nCannot quit, because game is launched.\nQuit Urban Terror to exit URTrator!"
|
||||||
})
|
m := gtk.NewMessageDialog(nil, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
||||||
m.Run()
|
m.Response(func() {
|
||||||
return errors.New("User didn't select valid profile, mismatch with server's version.")
|
m.Destroy()
|
||||||
|
})
|
||||||
|
m.Run()
|
||||||
|
return errors.New("User didn't select valid profile, mismatch with server's version.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -14,6 +14,7 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
// Local
|
// Local
|
||||||
@ -205,12 +206,16 @@ func (f *FavoriteDialog) saveFavorite() error {
|
|||||||
//ctx.Requester.Pooler.UpdateSpecificServer(f.server)
|
//ctx.Requester.Pooler.UpdateSpecificServer(f.server)
|
||||||
|
|
||||||
if len(f.server_address.GetText()) == 0 {
|
if len(f.server_address.GetText()) == 0 {
|
||||||
mbox_string := "Server address is empty.\n\nServers without address cannot be added."
|
// Temporary disable all these modals on Linux.
|
||||||
m := gtk.NewMessageDialog(f.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
// See https://github.com/mattn/go-gtk/issues/289.
|
||||||
m.Response(func() {
|
if runtime.GOOS != "linux" {
|
||||||
m.Destroy()
|
mbox_string := "Server address is empty.\n\nServers without address cannot be added."
|
||||||
})
|
m := gtk.NewMessageDialog(f.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
||||||
m.Run()
|
m.Response(func() {
|
||||||
|
m.Destroy()
|
||||||
|
})
|
||||||
|
m.Run()
|
||||||
|
}
|
||||||
return errors.New("No server address specified")
|
return errors.New("No server address specified")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,12 +229,16 @@ func (f *FavoriteDialog) saveFavorite() error {
|
|||||||
f.server.Port = port
|
f.server.Port = port
|
||||||
|
|
||||||
if len(f.profile.GetActiveText()) == 0 {
|
if len(f.profile.GetActiveText()) == 0 {
|
||||||
mbox_string := "Profile wasn't selected.\n\nPlease, select valid profile for this server.\nIf you haven't add profiles yet - you can do it\nin options on \"Urban Terror\" tab."
|
// Temporary disable all these modals on Linux.
|
||||||
m := gtk.NewMessageDialog(f.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
// See https://github.com/mattn/go-gtk/issues/289.
|
||||||
m.Response(func() {
|
if runtime.GOOS != "linux" {
|
||||||
m.Destroy()
|
mbox_string := "Profile wasn't selected.\n\nPlease, select valid profile for this server.\nIf you haven't add profiles yet - you can do it\nin options on \"Urban Terror\" tab."
|
||||||
})
|
m := gtk.NewMessageDialog(f.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
||||||
m.Run()
|
m.Response(func() {
|
||||||
|
m.Destroy()
|
||||||
|
})
|
||||||
|
m.Run()
|
||||||
|
}
|
||||||
return errors.New("No game profile specified")
|
return errors.New("No game profile specified")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,12 +234,18 @@ func (m *MainWindow) deleteFromFavorites() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if not_favorited {
|
if not_favorited {
|
||||||
mbox_string := "Cannot delete server from favorites.\n\nServer isn't favorited."
|
// Temporary disable all these modals on Linux.
|
||||||
d := gtk.NewMessageDialog(m.window, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, mbox_string)
|
// See https://github.com/mattn/go-gtk/issues/289.
|
||||||
d.Response(func() {
|
if runtime.GOOS != "linux" {
|
||||||
d.Destroy()
|
mbox_string := "Cannot delete server from favorites.\n\nServer isn't favorited."
|
||||||
})
|
d := gtk.NewMessageDialog(m.window, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, mbox_string)
|
||||||
d.Run()
|
d.Response(func() {
|
||||||
|
d.Destroy()
|
||||||
|
})
|
||||||
|
d.Run()
|
||||||
|
} else {
|
||||||
|
ctx.Eventer.LaunchEvent("setToolbarLabelText", map[string]string{"text": "<markup><span foreground=\"red\" font_weight=\"bold\">Server isn't favorited</span></markup>"})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.Eventer.LaunchEvent("loadFavoriteServers", map[string]string{})
|
ctx.Eventer.LaunchEvent("loadFavoriteServers", map[string]string{})
|
||||||
@ -250,19 +256,23 @@ func (m *MainWindow) deleteFromFavorites() {
|
|||||||
func (m *MainWindow) dropDatabasesData() {
|
func (m *MainWindow) dropDatabasesData() {
|
||||||
fmt.Println("Dropping database data...")
|
fmt.Println("Dropping database data...")
|
||||||
var will_continue bool = false
|
var will_continue bool = false
|
||||||
mbox_string := "You are about to drop whole database data.\n\nAfter clicking \"YES\" ALL data in database (servers, profiles, settings, etc.)\nwill be lost FOREVER. Are you sure?"
|
// Temporary disable all these modals on Linux.
|
||||||
d := gtk.NewMessageDialog(m.window, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_YES_NO, mbox_string)
|
// See https://github.com/mattn/go-gtk/issues/289.
|
||||||
d.Connect("response", func(resp *glib.CallbackContext) {
|
if runtime.GOOS != "linux" {
|
||||||
if resp.Args(0) == 4294967287 {
|
mbox_string := "You are about to drop whole database data.\n\nAfter clicking \"YES\" ALL data in database (servers, profiles, settings, etc.)\nwill be lost FOREVER. Are you sure?"
|
||||||
will_continue = false
|
d := gtk.NewMessageDialog(m.window, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_YES_NO, mbox_string)
|
||||||
} else {
|
d.Connect("response", func(resp *glib.CallbackContext) {
|
||||||
will_continue = true
|
if resp.Args(0) == 4294967287 {
|
||||||
}
|
will_continue = false
|
||||||
})
|
} else {
|
||||||
d.Response(func() {
|
will_continue = true
|
||||||
d.Destroy()
|
}
|
||||||
})
|
d.Destroy()
|
||||||
d.Run()
|
})
|
||||||
|
d.Run()
|
||||||
|
} else {
|
||||||
|
ctx.Eventer.LaunchEvent("setToolbarLabelText", map[string]string{"text": "<markup><span foreground=\"red\" font_weight=\"bold\">Remove ~/.config/urtrator/database.sqlite3 manually!</span></markup>"})
|
||||||
|
}
|
||||||
|
|
||||||
if will_continue {
|
if will_continue {
|
||||||
ctx.Database.Db.MustExec("DELETE FROM servers")
|
ctx.Database.Db.MustExec("DELETE FROM servers")
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
// stdlib
|
// stdlib
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
// Local
|
// Local
|
||||||
@ -57,19 +58,25 @@ func (m *MainWindow) launchAsUsual() error {
|
|||||||
// we should show notification to user.
|
// we should show notification to user.
|
||||||
if len(server_profile.Name) == 0 {
|
if len(server_profile.Name) == 0 {
|
||||||
var will_continue bool = false
|
var will_continue bool = false
|
||||||
mbox_string := "Selected server is offline.\n\nWould you still want to launch Urban Terror?\nIt will just launch a game, without connecting to\nany server."
|
// Temporary disable all these modals on Linux.
|
||||||
messagebox := gtk.NewMessageDialog(m.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_YES_NO, mbox_string)
|
// See https://github.com/mattn/go-gtk/issues/289.
|
||||||
messagebox.Connect("response", func(resp *glib.CallbackContext) {
|
if runtime.GOOS != "linux" {
|
||||||
if resp.Args(0) == 4294967287 {
|
mbox_string := "Selected server is offline.\n\nWould you still want to launch Urban Terror?\nIt will just launch a game, without connecting to\nany server."
|
||||||
will_continue = false
|
messagebox := gtk.NewMessageDialog(m.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_YES_NO, mbox_string)
|
||||||
} else {
|
messagebox.Connect("response", func(resp *glib.CallbackContext) {
|
||||||
will_continue = true
|
if resp.Args(0) == 4294967287 {
|
||||||
}
|
will_continue = false
|
||||||
})
|
} else {
|
||||||
messagebox.Response(func() {
|
will_continue = true
|
||||||
messagebox.Destroy()
|
}
|
||||||
})
|
messagebox.Destroy()
|
||||||
messagebox.Run()
|
})
|
||||||
|
messagebox.Run()
|
||||||
|
} else {
|
||||||
|
// We're okay to connect to empty server, temporary.
|
||||||
|
will_continue = true
|
||||||
|
}
|
||||||
|
|
||||||
if !will_continue {
|
if !will_continue {
|
||||||
return errors.New("User declined to connect to offline server")
|
return errors.New("User declined to connect to offline server")
|
||||||
}
|
}
|
||||||
@ -83,12 +90,18 @@ func (m *MainWindow) launchAsUsual() error {
|
|||||||
// This check only relevant to "Servers" tab, favorite servers
|
// This check only relevant to "Servers" tab, favorite servers
|
||||||
// have profiles defined (see next).
|
// have profiles defined (see next).
|
||||||
if len(profile_name) == 0 {
|
if len(profile_name) == 0 {
|
||||||
mbox_string := "Invalid game profile selected.\n\nPlease, select profile and retry."
|
// Temporary disable all these modals on Linux.
|
||||||
messagebox := gtk.NewMessageDialog(m.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
// See https://github.com/mattn/go-gtk/issues/289.
|
||||||
messagebox.Response(func() {
|
if runtime.GOOS != "linux" {
|
||||||
messagebox.Destroy()
|
mbox_string := "Invalid game profile selected.\n\nPlease, select profile and retry."
|
||||||
})
|
messagebox := gtk.NewMessageDialog(m.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
||||||
messagebox.Run()
|
messagebox.Response(func() {
|
||||||
|
messagebox.Destroy()
|
||||||
|
})
|
||||||
|
messagebox.Run()
|
||||||
|
} else {
|
||||||
|
ctx.Eventer.LaunchEvent("setToolbarLabelText", map[string]string{"text": "<markup><span foreground=\"red\" font_weight=\"bold\">Invalid game profile selected.</span></markup>"})
|
||||||
|
}
|
||||||
return errors.New("User didn't select valid profile.")
|
return errors.New("User didn't select valid profile.")
|
||||||
}
|
}
|
||||||
user_profile = ctx.Cache.Profiles[profile_name].Profile
|
user_profile = ctx.Cache.Profiles[profile_name].Profile
|
||||||
@ -97,12 +110,18 @@ func (m *MainWindow) launchAsUsual() error {
|
|||||||
// information have higher priority, so we just override it :)
|
// information have higher priority, so we just override it :)
|
||||||
user_profile_cached, ok := ctx.Cache.Profiles[server_profile.ProfileToUse]
|
user_profile_cached, ok := ctx.Cache.Profiles[server_profile.ProfileToUse]
|
||||||
if !ok {
|
if !ok {
|
||||||
mbox_string := "Invalid game profile specified for favorite server.\n\nPlease, edit your favorite server, select valid profile and retry."
|
// Temporary disable all these modals on Linux.
|
||||||
messagebox := gtk.NewMessageDialog(m.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
// See https://github.com/mattn/go-gtk/issues/289.
|
||||||
messagebox.Response(func() {
|
if runtime.GOOS != "linux" {
|
||||||
messagebox.Destroy()
|
mbox_string := "Invalid game profile specified for favorite server.\n\nPlease, edit your favorite server, select valid profile and retry."
|
||||||
})
|
messagebox := gtk.NewMessageDialog(m.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
||||||
messagebox.Run()
|
messagebox.Response(func() {
|
||||||
|
messagebox.Destroy()
|
||||||
|
})
|
||||||
|
messagebox.Run()
|
||||||
|
} else {
|
||||||
|
ctx.Eventer.LaunchEvent("setToolbarLabelText", map[string]string{"text": "<markup><span foreground=\"red\" font_weight=\"bold\">Invalid game profile specified in favorite entry.</span></markup>"})
|
||||||
|
}
|
||||||
return errors.New("User didn't select valid profile.")
|
return errors.New("User didn't select valid profile.")
|
||||||
}
|
}
|
||||||
user_profile = user_profile_cached.Profile
|
user_profile = user_profile_cached.Profile
|
||||||
@ -154,19 +173,25 @@ func (m *MainWindow) launchWithQuickConnect() error {
|
|||||||
func (m *MainWindow) launchActually(server_profile *datamodels.Server, user_profile *datamodels.Profile, password string, nickname_to_use string) error {
|
func (m *MainWindow) launchActually(server_profile *datamodels.Server, user_profile *datamodels.Profile, password string, nickname_to_use string) error {
|
||||||
if server_profile.Name == "" {
|
if server_profile.Name == "" {
|
||||||
var will_continue bool = false
|
var will_continue bool = false
|
||||||
mbox_string := "Selected server is offline.\n\nWould you still want to launch Urban Terror?\nIt will just launch a game, without connecting to\nany server."
|
// Temporary disable all these modals on Linux.
|
||||||
messagebox := gtk.NewMessageDialog(m.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_YES_NO, mbox_string)
|
// See https://github.com/mattn/go-gtk/issues/289.
|
||||||
messagebox.Connect("response", func(resp *glib.CallbackContext) {
|
if runtime.GOOS != "linux" {
|
||||||
if resp.Args(0) == 4294967287 {
|
mbox_string := "Selected server is offline.\n\nWould you still want to launch Urban Terror?\nIt will just launch a game, without connecting to\nany server."
|
||||||
will_continue = false
|
messagebox := gtk.NewMessageDialog(m.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_YES_NO, mbox_string)
|
||||||
} else {
|
messagebox.Connect("response", func(resp *glib.CallbackContext) {
|
||||||
will_continue = true
|
if resp.Args(0) == 4294967287 {
|
||||||
}
|
will_continue = false
|
||||||
})
|
} else {
|
||||||
messagebox.Response(func() {
|
will_continue = true
|
||||||
messagebox.Destroy()
|
}
|
||||||
})
|
messagebox.Destroy()
|
||||||
messagebox.Run()
|
})
|
||||||
|
messagebox.Run()
|
||||||
|
} else {
|
||||||
|
// We're ok here, temporary.
|
||||||
|
will_continue = true
|
||||||
|
}
|
||||||
|
|
||||||
if !will_continue {
|
if !will_continue {
|
||||||
return errors.New("User declined to connect to offline server")
|
return errors.New("User declined to connect to offline server")
|
||||||
}
|
}
|
||||||
@ -174,12 +199,18 @@ func (m *MainWindow) launchActually(server_profile *datamodels.Server, user_prof
|
|||||||
|
|
||||||
// Check if server is applicable for selected profile.
|
// Check if server is applicable for selected profile.
|
||||||
if server_profile.Version != user_profile.Version {
|
if server_profile.Version != user_profile.Version {
|
||||||
mbox_string := "Invalid game profile selected.\n\nSelected profile have different game version than server.\nPlease, select valid profile and retry."
|
// Temporary disable all these modals on Linux.
|
||||||
messagebox := gtk.NewMessageDialog(m.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
// See https://github.com/mattn/go-gtk/issues/289.
|
||||||
messagebox.Response(func() {
|
if runtime.GOOS != "linux" {
|
||||||
messagebox.Destroy()
|
mbox_string := "Invalid game profile selected.\n\nSelected profile have different game version than server.\nPlease, select valid profile and retry."
|
||||||
})
|
messagebox := gtk.NewMessageDialog(m.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
||||||
messagebox.Run()
|
messagebox.Response(func() {
|
||||||
|
messagebox.Destroy()
|
||||||
|
})
|
||||||
|
messagebox.Run()
|
||||||
|
} else {
|
||||||
|
ctx.Eventer.LaunchEvent("setToolbarLabelText", map[string]string{"text": "<markup><span foreground=\"red\" font_weight=\"bold\">Invalid game profile selected.</span></markup>"})
|
||||||
|
}
|
||||||
return errors.New("User didn't select valid profile, mismatch with server's version.")
|
return errors.New("User didn't select valid profile, mismatch with server's version.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ package ui
|
|||||||
import (
|
import (
|
||||||
// stdlib
|
// stdlib
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"runtime"
|
||||||
|
|
||||||
// Local
|
// Local
|
||||||
"github.com/pztrn/urtrator/datamodels"
|
"github.com/pztrn/urtrator/datamodels"
|
||||||
@ -66,12 +67,16 @@ func (o *OptionsDialog) closeOptionsDialogWithSaving() {
|
|||||||
|
|
||||||
o.saveGeneral()
|
o.saveGeneral()
|
||||||
|
|
||||||
mbox_string := "Some options require application restart to be applied."
|
// Temporary disable all these modals on Linux.
|
||||||
m := gtk.NewMessageDialog(o.window, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, mbox_string)
|
// See https://github.com/mattn/go-gtk/issues/289.
|
||||||
m.Response(func() {
|
if runtime.GOOS != "linux" {
|
||||||
m.Destroy()
|
mbox_string := "Some options require application restart to be applied."
|
||||||
})
|
m := gtk.NewMessageDialog(o.window, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, mbox_string)
|
||||||
m.Run()
|
m.Response(func() {
|
||||||
|
m.Destroy()
|
||||||
|
})
|
||||||
|
m.Run()
|
||||||
|
}
|
||||||
|
|
||||||
o.window.Destroy()
|
o.window.Destroy()
|
||||||
}
|
}
|
||||||
|
@ -71,12 +71,18 @@ func (op *OptionsProfile) browseForBinaryHelper() {
|
|||||||
if runtime.GOARCH == "amd64" {
|
if runtime.GOARCH == "amd64" {
|
||||||
if len(filename) > 0 && strings.Split(filename, ".")[1] != "x86_64" && strings.Split(filename, ".")[0] != "Quake3-UrT" {
|
if len(filename) > 0 && strings.Split(filename, ".")[1] != "x86_64" && strings.Split(filename, ".")[0] != "Quake3-UrT" {
|
||||||
fmt.Println("Invalid binary selected!")
|
fmt.Println("Invalid binary selected!")
|
||||||
mbox_string := "Invalid binary selected!\nAccording to your OS, it should be Quake3-UrT.x86_64."
|
// Temporary disable all these modals on Linux.
|
||||||
m := gtk.NewMessageDialog(op.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
// See https://github.com/mattn/go-gtk/issues/289.
|
||||||
m.Response(func() {
|
if runtime.GOOS != "linux" {
|
||||||
m.Destroy()
|
mbox_string := "Invalid binary selected!\nAccording to your OS, it should be Quake3-UrT.x86_64."
|
||||||
})
|
m := gtk.NewMessageDialog(op.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
||||||
m.Run()
|
m.Response(func() {
|
||||||
|
m.Destroy()
|
||||||
|
})
|
||||||
|
m.Run()
|
||||||
|
} else {
|
||||||
|
//
|
||||||
|
}
|
||||||
op.binary_path.SetText("")
|
op.binary_path.SetText("")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -87,21 +93,33 @@ func (op *OptionsProfile) browseForBinaryHelper() {
|
|||||||
filename = strings.Split(filename, "Quake3-UrT.app")[1]
|
filename = strings.Split(filename, "Quake3-UrT.app")[1]
|
||||||
if len(filename) > 0 && !strings.Contains(strings.Split(filename, ".")[1], "x86_64") && !strings.Contains(strings.Split(filename, ".")[0], "Quake3-UrT") {
|
if len(filename) > 0 && !strings.Contains(strings.Split(filename, ".")[1], "x86_64") && !strings.Contains(strings.Split(filename, ".")[0], "Quake3-UrT") {
|
||||||
fmt.Println("Invalid binary selected!")
|
fmt.Println("Invalid binary selected!")
|
||||||
mbox_string := "Invalid binary selected!\nAccording to your OS, it should be Quake3-UrT.app/Contents/MacOS/Quake3-UrT.x86_64."
|
// Temporary disable all these modals on Linux.
|
||||||
|
// See https://github.com/mattn/go-gtk/issues/289.
|
||||||
|
if runtime.GOOS != "linux" {
|
||||||
|
mbox_string := "Invalid binary selected!\nAccording to your OS, it should be Quake3-UrT.app/Contents/MacOS/Quake3-UrT.x86_64."
|
||||||
|
m := gtk.NewMessageDialog(op.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
||||||
|
m.Response(func() {
|
||||||
|
m.Destroy()
|
||||||
|
})
|
||||||
|
m.Run()
|
||||||
|
} else {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
op.binary_path.SetText("")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Temporary disable all these modals on Linux.
|
||||||
|
// See https://github.com/mattn/go-gtk/issues/289.
|
||||||
|
if runtime.GOOS != "linux" {
|
||||||
|
mbox_string := "Invalid binary selected!\nAccording to your OS, it should be Quake3-UrT.app/Contents/MacOS/Quake3-UrT.x86_64.\n\nNote, that currently URTrator supports only official binary."
|
||||||
m := gtk.NewMessageDialog(op.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
m := gtk.NewMessageDialog(op.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
||||||
m.Response(func() {
|
m.Response(func() {
|
||||||
m.Destroy()
|
m.Destroy()
|
||||||
})
|
})
|
||||||
m.Run()
|
m.Run()
|
||||||
op.binary_path.SetText("")
|
} else {
|
||||||
|
//
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
mbox_string := "Invalid binary selected!\nAccording to your OS, it should be Quake3-UrT.app/Contents/MacOS/Quake3-UrT.x86_64.\n\nNote, that currently URTrator supports only official binary."
|
|
||||||
m := gtk.NewMessageDialog(op.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string)
|
|
||||||
m.Response(func() {
|
|
||||||
m.Destroy()
|
|
||||||
})
|
|
||||||
m.Run()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user