diff --git a/launcher/gimx-launcher.cpp b/launcher/gimx-launcher.cpp index 9f1cddbd..591284a4 100644 --- a/launcher/gimx-launcher.cpp +++ b/launcher/gimx-launcher.cpp @@ -1568,39 +1568,35 @@ void launcherFrame::OnButtonCheckClick1(wxCommandEvent& event __attribute__((unu void launcherFrame::OnMenuEditConfig(wxCommandEvent& event __attribute__((unused))) { - if(InputChoice->GetStringSelection().IsEmpty()) + wxString command = wxT("gimx-config"); + + if(!InputChoice->GetStringSelection().IsEmpty()) { - wxMessageBox( _("No config selected!"), _("Error"), wxICON_ERROR); - return; + command.Append(wxT(" -f \"")); + command.Append(InputChoice->GetStringSelection()); + command.Append(wxT("\"")); } - wxString command = wxT("gimx-config -f \""); - command.Append(InputChoice->GetStringSelection()); - command.Append(wxT("\"")); - if (!wxExecute(command, wxEXEC_ASYNC)) { - wxMessageBox(_("Error editing the config file!"), _("Error"), - wxICON_ERROR); + wxMessageBox(_("Failed to start gimx-config!"), _("Error"), wxICON_ERROR); } } void launcherFrame::OnMenuEditFpsConfig(wxCommandEvent& event __attribute__((unused))) { - if(InputChoice->GetStringSelection().IsEmpty()) + wxString command = wxT("gimx-fpsconfig"); + + if(!InputChoice->GetStringSelection().IsEmpty()) { - wxMessageBox( _("No config selected!"), _("Error"), wxICON_ERROR); - return; + command.Append(wxT(" -f \"")); + command.Append(InputChoice->GetStringSelection()); + command.Append(wxT("\"")); } - wxString command = wxT("gimx-fpsconfig -f \""); - command.Append(InputChoice->GetStringSelection()); - command.Append(wxT("\"")); - if (!wxExecute(command, wxEXEC_ASYNC)) { - wxMessageBox(_("Error editing the config file!"), _("Error"), - wxICON_ERROR); + wxMessageBox(_("Failed to start gimx-fpsconfig!"), _("Error"), wxICON_ERROR); } }