Permalink
Browse files

Allow to start editors from gimx-launcher with no config #512

  • Loading branch information...
matlo committed Jan 10, 2018
1 parent a7b5a4e commit 492e724412f5f31bf46ca9e9dc7d25be907d402a
Showing with 14 additions and 18 deletions.
  1. +14 −18 launcher/gimx-launcher.cpp
View
@@ -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);
}
}

0 comments on commit 492e724

Please sign in to comment.