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

/* PROTOTYPES - same all the time */
typedef struct _CFData CFData;

static void *_create_data(E_Config_Dialog *cfd);
static void _free_data(E_Config_Dialog *cfd, CFData *cfdata);
static int _basic_apply_data(E_Config_Dialog *cfd, CFData *cfdata);
static int _advanced_apply_data(E_Config_Dialog *cfd, CFData *cfdata);
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata);
static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata);

/* Actual config data we will be playing with whil the dialog is active */
struct _CFData
{
   /*- BASIC -*/
   int x;
   int y;
   int flip;
   /*- ADVANCED -*/
   int zone_desks_x_count;
   int zone_desks_y_count;
   int use_edge_flip;
   double edge_flip_timeout;
};

/* a nice easy setup function that does the dirty work */
E_Config_Dialog *
e_int_config_desks(E_Container *con)
{
   E_Config_Dialog *cfd;
   E_Config_Dialog_View v;
   
   /* methods */
   v.create_cfdata           = _create_data;
   v.free_cfdata             = _free_data;
   v.basic.apply_cfdata      = _basic_apply_data;
   v.basic.create_widgets    = _basic_create_widgets;
   v.advanced.apply_cfdata   = _advanced_apply_data;
   v.advanced.create_widgets = _advanced_create_widgets;
   /* create config diaolg for NULL object/data */
   cfd = e_config_dialog_new(con, _("Desktop Settings"), NULL, 0, &v, NULL);
   return cfd;
}

/**--CREATE--**/
static void
_fill_data(CFData *cfdata)
{
   cfdata->zone_desks_x_count = e_config->zone_desks_x_count;
   cfdata->zone_desks_x_count = e_config->zone_desks_x_count;
   cfdata->use_edge_flip = e_config->use_edge_flip;
   cfdata->edge_flip_timeout = e_config->edge_flip_timeout;
   
   cfdata->x = cfdata->zone_desks_x_count;
   cfdata->y = cfdata->zone_desks_y_count;
   cfdata->flip = cfdata->use_edge_flip;
}

static void *
_create_data(E_Config_Dialog *cdd)
{
   /* Create cfdata - cfdata is a temporary block of config data that this
    * dialog will be dealing with while configuring. it will be applied to
    * the running systems/config in the apply methods<commit_msg>gees man, not another ;)<commit_after>/*
 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
 */
#include "e.h"

/* PROTOTYPES - same all the time */
typedef struct _CFData CFData;

static void *_create_data(E_Config_Dialog *cfd);
static void _free_data(E_Config_Dialog *cfd, CFData *cfdata);
static int _basic_apply_data(E_Config_Dialog *cfd, CFData *cfdata);
static int _advanced_apply_data(E_Config_Dialog *cfd, CFData *cfdata);
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata);
static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata);

/* Actual config data we will be playing with whil the dialog is active */
struct _CFData
{
   /*- BASIC -*/
   int x;
   int y;
   int flip;
   /*- ADVANCED -*/
   int zone_desks_x_count;
   int zone_desks_y_count;
   int use_edge_flip;
   double edge_flip_timeout;
};

/* a nice easy setup function that does the dirty work */
E_Config_Dialog *
e_int_config_desks(E_Container *con)
{
   E_Config_Dialog *cfd;
   E_Config_Dialog_View v;
   
   /* methods */
   v.create_cfdata           = _create_data;
   v.free_cfdata             = _free_data;
   v.basic.apply_cfdata      = _basic_apply_data;
   v.basic.create_widgets    = _basic_create_widgets;
   v.advanced.apply_cfdata   = _advanced_apply_data;
   v.advanced.create_widgets = _advanced_create_widgets;
   /* create config diaolg for NULL object/data */
   cfd = e_config_dialog_new(con, _("Desktop Settings"), NULL, 0, &v, NULL);
   return cfd;
}

/**--CREATE--**/
static void
_fill_data(CFData *cfdata)
{
   cfdata->zone_desks_x_count = e_config->zone_desks_x_count;
   cfdata->zone_desks_y_count = e_config->zone_desks_y_count;
   cfdata->use_edge_flip = e_config->use_edge_flip;
   cfdata->edge_flip_timeout = e_config->edge_flip_timeout;
   
   cfdata->x = cfdata->zone_desks_x_count;
   cfdata->y = cfdata->zone_desks_y_count;
   cfdata->flip = cfdata->use_edge_flip;
}

static void *
_create_data(E_Config_Dialog *cdd)
{
   /* Create cfdata - cfdata is a temporary block of config data that this
    * dialog will be dealing with while configuring. it will be applied to
    * the running systems/config in the apply methods
{'fraction_non_alphanumeric': 0.10355767051892137, 'fraction_numerical': 0.004078857919782461, 'mean_word_length': 4.138533178114086, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, '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': '1656949', 'n_tokens_mistral': 1678, 'n_tokens_neox': 1620, 'n_words': 367}