Ejemplo n.º 1
0
EAPI int
e_modapi_shutdown (E_Module * m)
{
   ut_config->module = NULL;
   e_gadcon_provider_unregister (&_gc_class);

   if (ut_config->config_dialog)
     e_object_del (E_OBJECT (ut_config->config_dialog));

   if (ut_config->menu)
     {
	e_menu_post_deactivate_callback_set (ut_config->menu, NULL, NULL);
	e_object_del (E_OBJECT (ut_config->menu));
	ut_config->menu = NULL;
    }
   while (ut_config->items)
     {
	Config_Item *ci;

	ci = ut_config->items->data;
	ut_config->items =
	  eina_list_remove_list (ut_config->items, ut_config->items);

	if (ci->id) eina_stringshare_del (ci->id);

	E_FREE(ci);
    }

   E_FREE(ut_config);
   E_CONFIG_DD_FREE (conf_item_edd);
   E_CONFIG_DD_FREE (conf_edd);

   return 1;
}
Ejemplo n.º 2
0
SH_API int _read_stdin_entry(void *data, Ecore_Fd_Handler *fd_handler)
{
   char *buffer;
   char *s;
   char c;
   int i = 0;
   Evas_Object *obj = data;

   if (!_stdin_prepare(fd_handler)) return 0;

   // allocate initial buffer
   buffer = malloc(sizeof(char));

   // get the buffer
   do {
     c = getc(stdin);
     buffer[i] = c;
     buffer = realloc(buffer, i + sizeof(buffer));
     i++;
   } while (c != EOF);

   // terminate the string.
   buffer[i - 1] = '\0';

   // add into entry, but before convert to html markup
   s = elm_entry_utf8_to_markup(buffer);
   elm_entry_entry_set(obj, s);

   // free the the pointers, delete handler when we don't need it
   E_FREE(buffer);
   E_FREE(s);
   ecore_main_fd_handler_del(fd_handler);
   return 0;
}
Ejemplo n.º 3
0
void
e_prefix_shutdown(void)
{
   E_FREE(_exe_path);
   E_FREE(_prefix_path);
   E_FREE(_prefix_path_bin);
   E_FREE(_prefix_path_data);
   E_FREE(_prefix_path_lib);
}
Ejemplo n.º 4
0
void
e_int_config_theme_del(E_Win *win)
{
   Import *import;

   import = win->data;

   e_object_del(E_OBJECT(import->win));
   e_int_config_theme_import_done(import->parent);

   E_FREE(import->cfdata->file);
   E_FREE(import->cfdata);
   E_FREE(import);
   return;
}
Ejemplo n.º 5
0
static void
_e_entry_dialog_free(E_Entry_Dialog *ed)
{
   e_object_del(E_OBJECT(ed->dia));
   E_FREE(ed->text);
   free(ed);
}
Ejemplo n.º 6
0
static void
_cpuclock_status_free(Cpu_Status *s)
{
   Eina_List *l;

   if (eina_list_count(s->frequencies)) eina_list_free(s->frequencies);
   if (s->governors)
     {
        for (l = s->governors; l; l = l->next)
          E_FREE(l->data);
        eina_list_free(s->governors);
     }
   E_FREE(s->cur_governor);
   if (s->orig_governor) eina_stringshare_del(s->orig_governor);
   E_FREE(s);
}
Ejemplo n.º 7
0
static void
_e_shell_surface_destroy(struct wl_resource *resource)
{
   E_Client *ec;

   /* DBG("Shell Surface Destroy: %d", wl_resource_get_id(resource)); */

   /* get the client for this resource */
   if ((ec = wl_resource_get_user_data(resource)))
     {
        if (!e_object_unref(E_OBJECT(ec))) return;
        if (e_object_is_del(E_OBJECT(ec))) return;

        if (ec->comp_data)
          {
             E_FREE(ec->comp_data->shell.data);
             if (ec->comp_data->mapped)
               {
                  if ((ec->comp_data->shell.surface) &&
                      (ec->comp_data->shell.unmap))
                    ec->comp_data->shell.unmap(ec->comp_data->shell.surface);
               }
             if (ec->parent)
               {
                  ec->parent->transients =
                    eina_list_remove(ec->parent->transients, ec);
               }
             /* wl_resource_destroy(ec->comp_data->shell.surface); */
             ec->comp_data->shell.surface = NULL;
          }
     }
}
Ejemplo n.º 8
0
static void
_gc_shutdown(E_Gadcon_Client *gcc)
{
   Instance *inst;
   Forecasts *w;

   inst = gcc->data;
   w = inst->forecasts;

   if (inst->popup) _forecasts_popup_destroy(inst);
   if (inst->check_timer)
     ecore_timer_del(inst->check_timer);
   if (inst->add_handler)
     ecore_event_handler_del(inst->add_handler);
   if (inst->data_handler)
     ecore_event_handler_del(inst->data_handler);
   if (inst->del_handler)
     ecore_event_handler_del(inst->del_handler);
   if (inst->server)
     ecore_con_server_del(inst->server);
   if (inst->area)
     eina_stringshare_del(inst->area);
   eina_strbuf_free(inst->buffer);

   inst->server = NULL;
   forecasts_config->instances =
     eina_list_remove(forecasts_config->instances, inst);

   evas_object_event_callback_del(w->forecasts_obj, EVAS_CALLBACK_MOUSE_DOWN,
                                  _forecasts_cb_mouse_down);

   _forecasts_free(w);
   E_FREE(inst);
}
int
news_config_shutdown(void)
{
   News_Config *c;
   News_Config_Item *nic;

   c = news->config;

   news_feed_all_delete();

   news_feed_lang_list_free(news->config->feed.langs);

   if (c->proxy.host) eina_stringshare_del(c->proxy.host);

   while ( (nic = eina_list_data_get(c->items)) )
     news_config_item_del(nic);

   eina_stringshare_del(c->viewer.vcontent.font_color);
   eina_stringshare_del(c->viewer.vcontent.font_shadow_color);

   E_FREE(news->config);

   E_CONFIG_DD_FREE(_news_edd);
   E_CONFIG_DD_FREE(_news_feed_edd);
   E_CONFIG_DD_FREE(_news_feed_ref_edd);
   E_CONFIG_DD_FREE(_news_feed_category_edd);
   E_CONFIG_DD_FREE(_news_item_edd);

   return 1;
}
Ejemplo n.º 10
0
static void
_gc_shutdown(E_Gadcon_Client *gcc)
{
   Instance *inst;

   if (!(inst = gcc->data)) return;

   evas_object_event_callback_del(inst->tclock, EVAS_CALLBACK_MOUSE_DOWN,
                                  _tclock_cb_mouse_down);
   evas_object_event_callback_del(inst->tclock, EVAS_CALLBACK_MOUSE_IN,
                                  _tclock_cb_mouse_in);
   evas_object_event_callback_del(inst->tclock, EVAS_CALLBACK_MOUSE_OUT,
                                  _tclock_cb_mouse_out);

   if (inst->tclock) evas_object_del(inst->tclock);

   tclock_config->instances =
     eina_list_remove(tclock_config->instances, inst);

   if (eina_list_count(tclock_config->instances) <= 0) 
     {
	if (check_timer) ecore_timer_del(check_timer);
	check_timer = NULL;
     }

   E_FREE(inst);
}
Ejemplo n.º 11
0
/**
 * Module specific face freeing.
 *
 * It is called when a face is freed.
 *
 * @param   data the pointer you passed to e_gadget_new().
 * @param   face a pointer to your E_Gadget_Face.
 * @ingroup Emu_Module_Gadget_Group
 */
static void
_gc_shutdown(E_Gadcon_Client *gcc)
{
   Emu_Face *emu_face;

   emu_face = gcc->data;
   if (emu_face)
     {
        eina_hash_foreach(emu_face->menus, _emu_menus_hash_cb_free, NULL);
        eina_hash_free(emu_face->menus);
        emu_face->menus = NULL;

        if (emu_face->read)
           ecore_event_handler_del(emu_face->read);
        if (emu_face->add)
           ecore_event_handler_del(emu_face->add);
        if (emu_face->del)
           ecore_event_handler_del(emu_face->del);

        if (emu_face->exe)
           ecore_exe_terminate(emu_face->exe);
        if (emu_face->command)
           eina_stringshare_del(emu_face->command);

        evas_object_del(emu_face->o_button);
        E_FREE(emu_face);
     }
}
Ejemplo n.º 12
0
void
e_int_config_wallpaper_web_del(E_Dialog *dia)
{
   Web *web;
   Ecore_File_Download_Job *job;
   Exchange_Object *wp;
   Eina_List *l;

   web = dia->data;
   e_int_config_wallpaper_web_done(web->parent);

   EINA_LIST_FOREACH(web->jobs, l, job)
     ecore_file_download_abort(job);

   EINA_LIST_FREE(web->objs, wp)
     exchange_object_free(wp);

   evas_object_del(web->list);
   evas_object_del(web->textblock);
   evas_object_del(web->image);

   E_FREE(web);
   e_object_unref(E_OBJECT(dia));
   exchange_shutdown();
}
Ejemplo n.º 13
0
    static void
_gc_shutdown(E_Gadcon_Client *gcc)
{
    Instance *inst;

    inst = gcc->data;

    exalt_config->instances = evas_list_remove(exalt_config->instances, inst);

    if (exalt_config->menu)
    {
        e_menu_post_deactivate_callback_set(exalt_config->menu, NULL, NULL);
        e_menu_pre_activate_callback_set(exalt_config->menu, NULL, NULL);
        e_object_del(E_OBJECT(exalt_config->menu));
        exalt_config->menu = NULL;
    }

    if (inst->o_button)
    {
        evas_object_event_callback_del(inst->o_button, EVAS_CALLBACK_MOUSE_DOWN,
                _cb_mouse_down);

        evas_object_del(inst->o_button);
    }

    exalt_dbus_notify_set( exalt_config->conn, NULL, NULL);
    E_FREE(inst);
}
Ejemplo n.º 14
0
static void
_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
   free(cfdata->fm);
   places_conf->cfd = NULL;
   E_FREE(cfdata);
}
Ejemplo n.º 15
0
int 
e_modapi_shutdown(E_Module *m) 
{
   /* unregister from gadcon */
   _gc_unregister();

   while (weather_cfg->items) 
     {
        Config_Item *ci;

        ci = weather_cfg->items->data;
        weather_cfg->items = 
          eina_list_remove_list(weather_cfg->items, weather_cfg->items);
        E_FREE(ci);
     }

   /* module is exiting, we don't need the module directory anymore */
   eina_stringshare_del(weather_cfg->mod_dir);

   /* free the config structure */
   _weather_config_free();

   /* free the edd's */
   E_CONFIG_DD_FREE(item_edd);
   E_CONFIG_DD_FREE(conf_edd);
   return 1;
}
Ejemplo n.º 16
0
SH_API Evas_Object *
create_entry(Evas_Object *parent, Eina_Bool entry_has_one_line, const char *entry_text, Eina_Bool entry_hide_text, Eina_Bool entry_line_nowrap, Eina_Bool entry_editable)
{
  Evas_Object *entry;
  char *s = NULL;

  if (entry_text) s = elm_entry_utf8_to_markup(entry_text);

  entry = elm_entry_add(parent);

  if (entry_line_nowrap)
    elm_entry_line_wrap_set(entry, 0);
  else
    elm_entry_line_wrap_set(entry, 1);
  if (s)
    {
      elm_entry_entry_set(entry, s);
      E_FREE(s);
    }
  elm_entry_password_set(entry, entry_hide_text);

  evas_object_size_hint_weight_set(entry, 1.0, 1.0);
  evas_object_size_hint_align_set(entry, -1.0, -1.0);

  elm_entry_single_line_set(entry, entry_has_one_line);
  elm_entry_editable_set(entry, entry_editable);

  return entry;
}
Ejemplo n.º 17
0
static Eina_Bool _lng_start(Language_XML *xml)
{
    Language_XML_Node *node;

    if (!xml)
    {
        DBG("One of values is NULL, returning with error.");
        return EINA_FALSE;
    }

    if (!xml->current && xml->top) return EINA_FALSE;

    node = calloc(sizeof(Language_XML_Node), 1);
    if (!node)
    {
        E_FREE(node);
        return EINA_FALSE;
    }

    node->attributes = eina_hash_string_superfast_new(free);
    node->parent = xml->current;

    if (!xml->top)
        xml->current = xml->top = node;
    else
    {
        xml->current->children = eina_list_append( xml->current->children, node );
        xml->current = node;
    }

    return EINA_TRUE;
}
Ejemplo n.º 18
0
void language_xml_clear(Language_XML *xml)
{
    Language_XML_Node *n_cur;

    if ((!xml) || (!xml->current))
    {
        DBG("One of values is NULL, returning with error.");
        return;
    }

    xml->current = xml->top;

    n_cur = xml->current;
    if (!n_cur)
    {
        DBG("One of values is NULL, returning with error.");
        return;
    }

    n_cur = n_cur->parent;

    if (n_cur)
    {
        Language_XML_Node *c_parent = n_cur;
        Eina_List *c_list = c_parent->children;
        void *data;

        c_list = eina_list_data_find_list(c_list, xml->current);
        EINA_LIST_FREE(c_list, data) E_FREE(data);
        if (!(n_cur = eina_list_data_get(c_list)))
            if (!(n_cur = eina_list_last(c_list))) n_cur = c_parent;
    }
    else
    {
        xml->top = NULL;
        void *data;
        if (xml->current)
        {
            eina_hash_free(xml->current->attributes);
            EINA_LIST_FREE(xml->current->children, data) E_FREE(data);
            E_FREE(xml->current);
        }
    }

    xml->current = n_cur;
}
Ejemplo n.º 19
0
/* Private Function Bodies */
static void
_e_entry_dialog_free(E_Entry_Dialog *ed)
{
   e_object_del(E_OBJECT(ed->dia));
   evas_object_smart_callback_del(ed->entry, "key_down", _e_entry_cb_key_down);
   E_FREE(ed->text);
   free(ed);
}
Ejemplo n.º 20
0
/* private functions */
static void
_e_wid_del_hook(Evas_Object *obj)
{
   E_Widget_Data *wd = NULL;

   wd = e_widget_data_get(obj);
   E_FREE(wd);
}
Ejemplo n.º 21
0
void 
_ex_file_download_complete_cb(void *data, const char *file, int status)
{
   _ex_main_itree_add(file, file);
   etk_object_destroy(ETK_OBJECT(dialog));
   E_FREE(data);
   D(("Download of file %s is done\n", file));
}
EINTERN void
e_mod_move_border_shape_input_free(E_Move_Border *mb)
{
   E_CHECK(mb);
   E_CHECK(mb->shape_input);
   E_FREE(mb->shape_input);
   mb->shape_input = NULL;
}
Ejemplo n.º 23
0
static void
_border_item_free(Evry_Item *it)
{
   GET_BORDER(bi, it);

   e_object_unref(E_OBJECT(bi->border));

   E_FREE(bi);
}
Ejemplo n.º 24
0
static void
_free_data (E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata)
{
  if (!empris_config)
    return;
  empris_config->config_dialog = NULL;
  free (cfdata->player);
  E_FREE (cfdata);
}
Ejemplo n.º 25
0
static void
_free_data(E_Config_Dialog      *dialog,
           E_Config_Dialog_Data *cfdata)
{
   E_Bluez_Instance *inst = dialog->data;

   inst->conf_dialog = NULL;
   E_FREE(cfdata);
}
Ejemplo n.º 26
0
static void
_client_item_free(Evry_Item *it)
{
   GET_BORDER(bi, it);

   e_object_unref(E_OBJECT(bi->client));

   E_FREE(bi);
}
Ejemplo n.º 27
0
static E_Widget *
_e_widget_spinner_handle(Enhance *en, EXML_Node *node)
{
    E_Widget   *spinner;
    char       *id;
    Ecore_List *props;
    EXML_Node  *prop;
    double      value;
    double      min       = 0;
    double      max       = 0;
    double      step_inc  = 1;
    double      page_inc  = 1;
    double      page_size = 1;

    id = ecore_hash_get(node->attributes, "id");
    if(!id) return NULL;

    props = node->children;
    ecore_list_first_goto(props);
    prop = ecore_list_current(props);
    while(prop != NULL)
    {
        if(!strcmp(prop->tag, "property"))
        {
            char *name;

            name = ecore_hash_get(prop->attributes, "name");
            if(!name) {
                prop = ecore_list_next(props);
                continue;
            }

            if(!strcmp(name, "adjustment"))
            {
                if(prop->value)
                {
                    char *adj;

                    adj = strdup(prop->value);
                    sscanf(adj, "%lf %lf %lf %lf %lf %lf", &value, &min, &max,
                           &step_inc, &page_inc, &page_size);
                    E_FREE(adj);
                }
            }
        }
        prop = ecore_list_next(props);
    }

    ecore_list_first_goto(props);

    spinner = _e_widget_new(en, node, etk_spinner_new(min, max,
                            value,
                            step_inc,
                            page_inc), id);

    return spinner;
}
Ejemplo n.º 28
0
static void
_free_data(E_Config_Dialog *dialog, E_Config_Dialog_Data *cfdata)
{
   E_Mixer_Module_Context *ctxt = dialog->data;
   if (ctxt)
     ctxt->conf_dialog = NULL;

   E_FREE(cfdata);
}
static void
_free_data (E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata)
{
  if (!mpdule_config)
    return;
  mpdule_config->config_dialog = NULL;
  free (cfdata->hostname);
  E_FREE (cfdata);
}
Ejemplo n.º 30
0
static void
_gc_shutdown(E_Gadcon_Client *gcc)
{
   Instance *inst;

   if (!(inst = gcc->data)) return;
   instances = eina_list_remove(instances, inst);
   if (inst->o_toggle) evas_object_del(inst->o_toggle);
   E_FREE(inst);
}