<commit_before>/******************************************************************************\
* File:          app.cpp
* Purpose:       Implementation of class 'Application'
* Author:        <NAME>
* RCS-ID:        $Id$
*
* Copyright (c) 1998-2009 <NAME>
* All rights are reserved. Reproduction in whole or part is prohibited
* without the written consent of the copyright owner.
\******************************************************************************/

#include <wx/cmdline.h> // for wxCmdLineParser
#include <wx/extension/log.h>
#include "app.h"
#include "frame.h"

DECLARE_APP(Application)
IMPLEMENT_APP(Application)

bool Application::OnCmdLineParsed(wxCmdLineParser& parser)
{
  for (size_t i = 0; i < parser.GetParamCount(); i++)
  {
    m_Files.Add(parser.GetParam(i));
  }

  return wxApp::OnCmdLineParsed(parser);
}

bool Application::OnInit()
{
  // This must be the first statement, other methods might use the name.
  SetAppName("syncped");

  if (!wxExApp::OnInit())
  {
    return false;
  }

  wxExProcessWithListView::InitCommandFromConfig();

  wxExLog::Get()->SetLogging();

  MDIFrame* frame = new MDIFrame(m_Files.Count() == 0);
  frame->Show();

  SetTopWindow(frame);

  wxExOpenFiles(frame, m_Files, 0, wxDIR_FILES); // only files in this dir
 
  return true;
}

void Application::OnInitCmdLine(wxCmdLineParser& parser)
{
  wxApp::OnInitCmdLine(parser);<commit_msg>added initialization of colour button<commit_after>/******************************************************************************\
* File:          app.cpp
* Purpose:       Implementation of class 'Application'
* Author:        <NAME>
* RCS-ID:        $Id$
*
* Copyright (c) 1998-2009 <NAME>
* All rights are reserved. Reproduction in whole or part is prohibited
* without the written consent of the copyright owner.
\******************************************************************************/

#include <wx/cmdline.h> // for wxCmdLineParser
#include <wx/extension/log.h>
#include "app.h"
#include "frame.h"

DECLARE_APP(Application)
IMPLEMENT_APP(Application)

bool Application::OnCmdLineParsed(wxCmdLineParser& parser)
{
  for (size_t i = 0; i < parser.GetParamCount(); i++)
  {
    m_Files.Add(parser.GetParam(i));
  }

  return wxApp::OnCmdLineParsed(parser);
}

bool Application::OnInit()
{
  // This must be the first statement, other methods might use the name.
  SetAppName("syncped");

  if (!wxExApp::OnInit())
  {
    return false;
  }

  if (!wxConfigBase::Get()->Exists(_("List Colour")))
  {
    wxConfigBase::Get()->Write(_("List Colour"), wxColour("RED"));
  }

  wxExProcessWithListView::InitCommandFromConfig();

  wxExLog::Get()->SetLogging();

  MDIFrame* frame = new MDIFrame(m_Files.Count() == 0);
  frame->Show();

  SetTopWindow(frame);

  wxExOpenFiles(frame, m_Files, 0, wxDIR_FILES); // only files in this dir
 
  return true;
}

void Application::OnInitCmdLine(wxCmdLineParser& parser)
{
  wxApp::OnInitCmdLine(parser);
{'fraction_non_alphanumeric': 0.23152542372881357, 'fraction_numerical': 0.007457627118644068, 'mean_word_length': 4.809055118110236, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6169430', 'n_tokens_mistral': 953, 'n_tokens_neox': 887, 'n_words': 215}