<commit_before>#include <include/base/cef_logging.h>
#include <brick/cef_handler.h>
#include "edit_account_window.h"

extern char _binary_window_edit_account_glade_start;
extern char _binary_window_edit_account_glade_size;

namespace {

    static void
    on_check_button(GtkWidget *widget, EditAccountWindow *self) {
      Account::AuthResult auth_result = self->window_objects_.account->Auth();
      GtkMessageType dialog_type;
      std::string body;
      if (auth_result.success) {
        dialog_type = GTK_MESSAGE_INFO;
        body = "Successful!";
      } else {
        dialog_type = GTK_MESSAGE_ERROR;

        switch (auth_result.error_code) {
          case Account::ERROR_CODE::HTTP:
            body = "HTTP error: " + auth_result.http_error;
            break;
          case Account::ERROR_CODE::CAPTCHA:
            body = "You have exceeded the maximum number of login attempts.\n"
               "Please log in first <b>browser</b>";
            break;
          case Account::ERROR_CODE::OTP:
            body = "Account used two-step authentication.\n"
               "Please use the <b>Application Password</b> for authorization";
            break;
          default:
            body = "An unknown error occurred :(";
            break;
        }
      }

      GtkWidget *dialog = gtk_message_dialog_new_with_markup(
         GTK_WINDOW(self->window_objects_.window),
         GTK_DIALOG_DESTROY_WITH_PARENT,
         dialog_type,
         GTK_BUTTONS_CLOSE,
         NULL
      );

      gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dialog),
         body.c_str());
      gtk_dialog_run(GTK_DIALOG(dialog));
      gtk_widget_destroy(dialog);
    }

    static void
    on_save_button(GtkWidget *widget, EditAccountWindow *self) {
      const gchar* domain =
        gtk_entry_get_text(self->window_objects_.domain_entry);
      const gchar* login =
         gtk_entry_get_text(self->window_objects_.login_entry);
      const gchar* password =
         gtk_entry_get_text(GTK_ENTRY(self->window_objects_.password_entry));
<commit_msg>Fixed misprinted<commit_after>#include <include/base/cef_logging.h>
#include <brick/cef_handler.h>
#include "edit_account_window.h"

extern char _binary_window_edit_account_glade_start;
extern char _binary_window_edit_account_glade_size;

namespace {

    static void
    on_check_button(GtkWidget *widget, EditAccountWindow *self) {
      Account::AuthResult auth_result = self->window_objects_.account->Auth();
      GtkMessageType dialog_type;
      std::string body;
      if (auth_result.success) {
        dialog_type = GTK_MESSAGE_INFO;
        body = "Successful!";
      } else {
        dialog_type = GTK_MESSAGE_ERROR;

        switch (auth_result.error_code) {
          case Account::ERROR_CODE::HTTP:
            body = "HTTP error: " + auth_result.http_error;
            break;
          case Account::ERROR_CODE::CAPTCHA:
            body = "You have exceeded the maximum number of login attempts.\n"
               "Please log in <b>browser</b> first";
            break;
          case Account::ERROR_CODE::OTP:
            body = "Account used two-step authentication.\n"
               "Please use <b>Application Password</b> for authorization";
            break;
          default:
            body = "An unknown error occurred :(";
            break;
        }
      }

      GtkWidget *dialog = gtk_message_dialog_new_with_markup(
         GTK_WINDOW(self->window_objects_.window),
         GTK_DIALOG_DESTROY_WITH_PARENT,
         dialog_type,
         GTK_BUTTONS_CLOSE,
         NULL
      );

      gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dialog),
         body.c_str());
      gtk_dialog_run(GTK_DIALOG(dialog));
      gtk_widget_destroy(dialog);
    }

    static void
    on_save_button(GtkWidget *widget, EditAccountWindow *self) {
      const gchar* domain =
        gtk_entry_get_text(self->window_objects_.domain_entry);
      const gchar* login =
         gtk_entry_get_text(self->window_objects_.login_entry);
      const gchar* password =
         gtk_entry_get_text(GTK_ENTRY(self->window_objects_.password_entry));

{'fraction_non_alphanumeric': 0.09053497942386832, 'fraction_numerical': 0.0, 'mean_word_length': 2.6534040671971706, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 27, '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': '4615008', 'n_tokens_mistral': 1288, 'n_tokens_neox': 1250, 'n_words': 228}