diff --git a/README.md b/README.md index 311f6ee..fd043f4 100644 --- a/README.md +++ b/README.md @@ -91,3 +91,13 @@ and nothing can be done on URTrator side. ## About box cause app crash on macOS As previous, it is related to GTK+2, nothing I can do there. + +## Why GTK+2? + +Because GTK+3 going on "stable api nonsense" way. And also it have some +troubles with integrating with current popular WM/DE (like XFCE4, +Openbox, etc.). And also I already tired of that shitty Adwaita and +Cantarella. + +If you want to use GTK+3, well, you can write UI for yourself, Go +bindings exist. diff --git a/ui/options.go b/ui/options.go index 682ce6a..b29f442 100644 --- a/ui/options.go +++ b/ui/options.go @@ -12,6 +12,7 @@ package ui import ( // stdlib "fmt" + "strconv" // Local "github.com/pztrn/urtrator/datamodels" @@ -181,8 +182,10 @@ func (o *OptionsDialog) initializeUrtTab() { o.profiles_list.SetModel(o.profiles_list_store) o.profiles_list.AppendColumn(gtk.NewTreeViewColumnWithAttributes("Profile name", gtk.NewCellRendererText(), "text", 0)) o.profiles_list.AppendColumn(gtk.NewTreeViewColumnWithAttributes("Urban Terror version", gtk.NewCellRendererText(), "text", 1)) - crt := gtk.NewCellRendererToggle() - o.profiles_list.AppendColumn(gtk.NewTreeViewColumnWithAttributes("Second X session", crt, "bool", 2)) + + //crt := gtk.NewCellRendererToggle() + //second_x_column := gtk.NewTreeViewColumnWithAttributes("Second X session", crt, "bool", 2) + //o.profiles_list.AppendColumn(second_x_column) // Profiles list buttons. urt_profiles_buttons_vbox := gtk.NewVBox(false, 0) @@ -229,6 +232,8 @@ func (o *OptionsDialog) loadProfiles() { o.profiles_list_store.Append(&iter) o.profiles_list_store.Set(&iter, 0, profiles[p].Name) o.profiles_list_store.Set(&iter, 1, profiles[p].Version) + //state, _ := strconv.ParseBool(profiles[p].Second_x_session) + //o.profiles_list_store.Set(&iter, 2, state) } } diff --git a/ui/options_profile.go b/ui/options_profile.go index 4780127..91983c1 100644 --- a/ui/options_profile.go +++ b/ui/options_profile.go @@ -324,7 +324,7 @@ func (op *OptionsProfile) saveProfile() { } } - if found { + if found && profile.Version == op.old_profile.Version && profile.Binary == op.old_profile.Binary && profile.Name == op.old_profile.Name && profile.Second_x_session == op.old_profile.Second_x_session { mbox_string := "Game profile with same name already exist.\nRename profile for saving." m := gtk.NewMessageDialog(op.window, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, mbox_string) m.Response(func() {