static void
_eco_match_edit(void *data, void *data2)
{
  int sel = e_widget_ilist_selected_get(o_matches);
  const char *val = e_widget_ilist_nth_label_get(o_matches, sel);			
  eco_match_dialog(val, _eco_match_dialog_ok_cb);
}
static void
_cb_feed_change(void *data, Evas_Object *obj)
{
   E_Config_Dialog_Data *cfdata;
   E_Ilist_Item *item;
   News_Feed *feed;
   Eina_List *sel, *items, *l;
   int i;

   cfdata = data;

   if (cfdata->ilist_feeds_sel) eina_list_free(cfdata->ilist_feeds_sel);
   sel = NULL;
   items = e_widget_ilist_items_get(cfdata->ilist_feeds);
   for (l=items, i=0; l; l=eina_list_next(l), i++)
     {
        item = l->data;
        if (item->header) continue;
        if (!item->selected) continue;
        feed = e_widget_ilist_nth_data_get(cfdata->ilist_feeds, i);
        sel = eina_list_append(sel, feed);
     }
   cfdata->ilist_feeds_sel = sel;

   if (e_widget_ilist_selected_get(cfdata->ilist_feeds) >= 0)
     {
        if (cfdata->button_add)
          e_widget_disabled_set(cfdata->button_add, 0);
     }
   else
     {
        if (cfdata->button_add)
          e_widget_disabled_set(cfdata->button_add, 1);
     }
}
Exemple #3
0
static void
_eco_match_del(void *data, void *data2)
{		
  int num = e_widget_ilist_selected_get(o_matches);			
  e_widget_ilist_remove_num(o_matches, num);

  eco_config_option_list_del(cfg_screen, "opacity_matches", num);
  eco_config_option_list_del(cfg_screen, "opacity_values", num);
}				
Exemple #4
0
static void
_eco_match_click_cb(void *data)
{
  int sel = e_widget_ilist_selected_get(o_matches);
  Eco_Option *value = eco_config_option_list_nth(cfg_screen, "opacity_values", sel);
  if (value)
    {
      e_widget_slider_value_int_set(o_opacity, value->intValue);
      e_widget_disabled_set(o_opacity, 0);	
    }
} 
static void
_eco_match_del(void *data, void *data2)
{
  int sel = e_widget_ilist_selected_get(o_matches);			

  e_widget_ilist_remove_num(o_matches, sel);
  eco_config_option_list_del(cfg_screen, str_effects, sel);
  eco_config_option_list_del(cfg_screen, str_matches, sel);
  eco_config_option_list_del(cfg_screen, str_durations, sel);
  eco_config_option_list_del(cfg_screen, str_randoms, sel);
  /* eco_config_option_list_del(cfg_screen, str_options, sel); */
}				
static void
_eco_match_dialog_ok_cb(void *data, E_Dialog *dia)
{
  Evas_Object *entry = data;
  Eco_Option *match;
  
  int sel = e_widget_ilist_selected_get(o_matches);	
  const char *val = e_widget_entry_text_get(entry);	
  e_widget_ilist_nth_label_set(o_matches, sel, val);
 
  e_util_defer_object_del(E_OBJECT(dia));
}
Exemple #7
0
/* Apply Function */
static void
_apply(E_Config_Dialog_Data *cfdata)
{
  Eco_Option *value;
  int val;
  e_widget_slider_value_int_get(o_opacity, &val);
  int sel = e_widget_ilist_selected_get(o_matches);
  value = eco_config_option_list_nth(cfg_screen, "opacity_values", sel);
  if (value) value->intValue = val;
  
  eco_config_group_apply("core"); 
}
static void
_cb_zone_change(void        *data,
                Evas_Object *obj)
{
   int n;
   CB_ENTRY;

   n = e_widget_ilist_selected_get(cfdata->o_zonelist);
   E_Zone *zone = e_widget_ilist_nth_data_get(cfdata->o_zonelist, n);
   if (!zone) return;
   _fill_zone_config(zone, cfdata);
}
Exemple #9
0
static void
_eco_match_dialog_ok_cb(void *data, E_Dialog *dia)
{
  Evas_Object *entry = data;
  Eco_Option *match;
  
  int sel = e_widget_ilist_selected_get(o_matches);	
  const char *val = e_widget_entry_text_get(entry);	
  e_widget_ilist_nth_label_set(o_matches, sel, val);
  
  match = eco_config_option_list_nth(cfg_screen, "opacity_matches", sel);
  if (match)
    {
      eco_string_free(match->stringValue);
      match->stringValue = eina_stringshare_add(val);
    }
  e_util_defer_object_del(E_OBJECT(dia));
}
Exemple #10
0
/* Apply Function */
static void
_apply(E_Config_Dialog_Data *cfdata)
{
  Eco_Option *opt, *item;
  int val, sel, i;
  Eina_List *l = NULL;
  const char *match;
  
  sel = e_widget_ilist_selected_get(o_matches);

  /* set effect */
  opt = eco_config_option_list_nth(cfg_screen, str_effects, sel);
  if (opt) opt->intValue = effect;

  /* update match */
  match = e_widget_ilist_nth_label_get(o_matches, sel);
  opt = eco_config_option_list_nth(cfg_screen, str_matches, sel);
  if (opt && match)
    {
      eco_string_free(opt->stringValue);
      opt->stringValue = eina_stringshare_add(match);
    }
  /* update duration */
  opt = eco_config_option_list_nth(cfg_screen, str_durations, sel);
  if (opt) opt->intValue = duration;
  
  /* update random effect list */
  opt = eco_config_option_get(cfg_screen, str_randoms);
  EINA_LIST_FREE(opt->listValue, item) free(item);
  for (i = 0; i < effect_cnt; i++)
    {
     if (random_effect[i])
	{
	  item = calloc (1, sizeof(Eco_Option));
	  item->intValue = i;
	  l = eina_list_append(l, item);
	}
    }
  opt->listValue = l;
  
  eco_config_group_apply("animation"); 
}
Exemple #11
0
static void
_eco_match_click_cb(void *data)
{
  Eco_Option *opt;
  int sel;
  const char *match;
  
  /* remember changes to the last selected item */
  opt = eco_config_option_list_nth(cfg_screen, str_effects, selected);
  if (opt) opt->intValue = effect;
  
  opt = eco_config_option_list_nth(cfg_screen, str_durations, selected);
  if (opt) opt->intValue = duration;

  opt = eco_config_option_list_nth(cfg_screen, str_matches, selected);
  match = e_widget_ilist_nth_label_get(o_matches, selected);
  if (opt && match)
    {
      eco_string_free(opt->stringValue);
      opt->stringValue = eina_stringshare_add(match);
    }
  
  /* set stored values for selected match */
  sel = e_widget_ilist_selected_get(o_matches);
  opt = eco_config_option_list_nth(cfg_screen, str_durations, sel);
  if (opt)
    {
      e_widget_slider_value_int_set(o_duration, opt->intValue);
      e_widget_disabled_set(o_duration, 0);
    }
  opt = eco_config_option_list_nth(cfg_screen, str_effects, sel);
  if (opt)
    {
      e_widget_radio_toggle_set(o_effect[opt->intValue], 1);
    }
  selected = sel;
}