<commit_before>/*
 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
 */
#include "e.h"

/* TODO List:
 *
 * * edjify error dialogs if edje data can be found for them
 * * current gui dialg needs to resize to fit contents if they are bigger
 */

/* local subsystem functions */
static void _e_error_message_show_x(char *txt);

static void _e_error_cb_ok_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _e_error_cb_ok_up(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _e_error_edje_cb_ok_up(void *data, Evas_Object *obj, const char *emission, const char *source);
static void _e_error_cb_job_ecore_evas_free(void *data);

/* local subsystem globals */
static int error_gui = 0;

/* externally accessible functions */
void
e_error_message_show_internal(char *txt)
{
   printf("_______                     _______\n"
	  "|:::::| Enlightenment Error |:::::|\n"
	  "~~~~~~~                     ~~~~~~~\n"
	  "%s\n",
	  txt);
   if (error_gui) _e_error_message_show_x(txt);
}

void
e_error_dialog_show_internal(char *title, char *txt)
{
   Evas_List *l;
   E_Manager *man;

   l = e_manager_list();
   if (!l) return;
   man = l->data;
   e_error_message_manager_show(man, title, txt);
}

void
e_error_gui_set(int on)
{
   error_gui = on;
}

void
e_error_message_manager_show(E_Manager *man, char *title, char *txt)
{
   Ecore_Evas  *ee;
   Evas        *e;
   Evas_Object *o;
   int          error_w, error_h;
   Evas_List   *l, *shapelist = NULL;
   Evas_Coord   maxw, maxh;
   E_Container *con;
   Ecore_X_Window win;
   int          x, y;

   error_w = 400;<commit_msg>Need a container.<commit_after>/*
 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
 */
#include "e.h"

/* TODO List:
 *
 * * edjify error dialogs if edje data can be found for them
 * * current gui dialg needs to resize to fit contents if they are bigger
 */

/* local subsystem functions */
static void _e_error_message_show_x(char *txt);

static void _e_error_cb_ok_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _e_error_cb_ok_up(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _e_error_edje_cb_ok_up(void *data, Evas_Object *obj, const char *emission, const char *source);
static void _e_error_cb_job_ecore_evas_free(void *data);

/* local subsystem globals */
static int error_gui = 0;

/* externally accessible functions */
void
e_error_message_show_internal(char *txt)
{
   printf("_______                     _______\n"
	  "|:::::| Enlightenment Error |:::::|\n"
	  "~~~~~~~                     ~~~~~~~\n"
	  "%s\n",
	  txt);
   if (error_gui) _e_error_message_show_x(txt);
}

void
e_error_dialog_show_internal(char *title, char *txt)
{
   Evas_List *l;
   E_Manager *man;

   l = e_manager_list();
   if (!l) return;
   man = l->data;
   e_error_message_manager_show(man, title, txt);
}

void
e_error_gui_set(int on)
{
   error_gui = on;
}

void
e_error_message_manager_show(E_Manager *man, char *title, char *txt)
{
   Ecore_Evas  *ee;
   Evas        *e;
   Evas_Object *o;
   int          error_w, error_h;
   Evas_List   *l, *shapelist = NULL;
   Evas_Coord   maxw, maxh;
   E_Container *con;
   Ecore_X_Window win;
   int          x, y;

   con = e_container_current_get(man);

   error_w = 400;
{'fraction_non_alphanumeric': 0.1277439024390244, 'fraction_numerical': 0.007317073170731708, 'mean_word_length': 3.550624133148405, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '4073331', 'n_tokens_mistral': 1312, 'n_tokens_neox': 1261, 'n_words': 309}