forked from enlightenment/enlightenment
fix bugs waiting to hapen (eap editor)
fix icons in fm to match icons that should be displayed. nuke needless buttons in applications dialog (dnd can do that work) and right-click menu for "sort apps" thing too. SVN revision: 26952
This commit is contained in:
parent
1425bc9193
commit
529a6884e0
|
@ -321,7 +321,8 @@ _e_eap_edit_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dial
|
|||
|
||||
_e_eap_editor_icon_show(cfdata);
|
||||
|
||||
if (editor->img_widget) evas_object_del(editor->img_widget);
|
||||
// when flipping from advanced to basic - this will already be destroyed.
|
||||
// if (editor->img_widget) evas_object_del(editor->img_widget);
|
||||
editor->img_widget = e_widget_button_add(evas, "", NULL,
|
||||
_e_eap_editor_cb_icon_select, cfdata, editor);
|
||||
if (editor->img)
|
||||
|
|
|
@ -2057,7 +2057,8 @@ _e_fm2_icon_icon_direct_set(E_Fm2_Icon *ic, Evas_Object *o, void (*gen_func) (vo
|
|||
gen_func, data);
|
||||
_e_fm2_icon_thumb(ic, oic, force_gen);
|
||||
}
|
||||
else if ((e_util_glob_case_match(ic->info.file, "*.desktop")) || (e_util_glob_case_match(ic->info.file, "*.directory")))
|
||||
else if ((e_util_glob_case_match(ic->info.file, "*.desktop")) ||
|
||||
(e_util_glob_case_match(ic->info.file, "*.directory")))
|
||||
{
|
||||
E_App *app;
|
||||
|
||||
|
@ -2216,11 +2217,13 @@ _e_fm2_icon_desktop_load(E_Fm2_Icon *ic)
|
|||
char *v;
|
||||
|
||||
/* FIXME: Use a real icon size. */
|
||||
v = (char *)ecore_desktop_icon_find(desktop->icon, NULL, e_config->icon_theme);
|
||||
v = desktop->icon_path;
|
||||
// make it consistent and use the same icon everywhere
|
||||
// v = ecore_desktop_icon_find(desktop->icon, NULL, e_config->icon_theme);
|
||||
if (v)
|
||||
{
|
||||
ic->info.icon = evas_stringshare_add(v);
|
||||
free(v);
|
||||
// free(v);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5080,6 +5083,7 @@ _e_fm2_live_process_begin(Evas_Object *obj)
|
|||
if (!sd->live.actions) return;
|
||||
if ((sd->live.idler) || (sd->live.timer) ||
|
||||
(sd->scan_idler) || (sd->scan_timer)) return;
|
||||
printf("live idler and timer add!\n");
|
||||
sd->live.idler = ecore_idler_add(_e_fm2_cb_live_idler, obj);
|
||||
sd->live.timer = ecore_timer_add(0.2, _e_fm2_cb_live_timer, obj);
|
||||
}
|
||||
|
@ -5123,6 +5127,7 @@ _e_fm2_live_process(Evas_Object *obj)
|
|||
if (!sd->live.actions) return;
|
||||
a = sd->live.actions->data;
|
||||
sd->live.actions = evas_list_remove_list(sd->live.actions, sd->live.actions);
|
||||
printf("live: %i\n", a->type);
|
||||
switch (a->type)
|
||||
{
|
||||
case FILE_ADD:
|
||||
|
@ -5170,6 +5175,7 @@ _e_fm2_cb_live_idler(void *data)
|
|||
double t;
|
||||
|
||||
sd = evas_object_smart_data_get(data);
|
||||
if (!sd) return NULL;
|
||||
t = ecore_time_get();
|
||||
do
|
||||
{
|
||||
|
@ -5180,7 +5186,9 @@ _e_fm2_cb_live_idler(void *data)
|
|||
if (sd->live.actions) return 1;
|
||||
_e_fm2_live_process_end(data);
|
||||
_e_fm2_cb_live_timer(data);
|
||||
printf("write changes %i\n", sd->order_file);
|
||||
if (sd->order_file) _e_fm2_order_file_rewrite(data);
|
||||
sd->live.idler = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -5194,13 +5202,16 @@ _e_fm2_cb_live_timer(void *data)
|
|||
if (sd->queue) _e_fm2_queue_process(data);
|
||||
else if (sd->iconlist_changed)
|
||||
{
|
||||
printf("queue update\n");
|
||||
if (sd->resize_job) ecore_job_del(sd->resize_job);
|
||||
sd->resize_job = ecore_job_add(_e_fm2_cb_resize_job, sd->obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("else...\n");
|
||||
if (sd->live.deletions)
|
||||
{
|
||||
printf("queu update\n");
|
||||
sd->iconlist_changed = 1;
|
||||
if (sd->resize_job) ecore_job_del(sd->resize_job);
|
||||
sd->resize_job = ecore_job_add(_e_fm2_cb_resize_job, sd->obj);
|
||||
|
|
|
@ -262,8 +262,8 @@ _cb_editor_del(void *obj)
|
|||
cfdata->editor = NULL;
|
||||
e_object_del_attach_func_set(obj, NULL);
|
||||
e_object_data_set(obj, NULL);
|
||||
e_fm2_refresh(cfdata->gui.o_fm);
|
||||
e_fm2_refresh(cfdata->gui.o_fm_all);
|
||||
// e_fm2_refresh(cfdata->gui.o_fm);
|
||||
// e_fm2_refresh(cfdata->gui.o_fm_all);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -312,6 +312,38 @@ _cb_files_selected_all(void *data, Evas_Object *obj, void *event_info)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_files_selected_all2(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
Evas_List *selected;
|
||||
E_Fm2_Icon_Info *ici;
|
||||
const char *realpath;
|
||||
char buf[4096];
|
||||
E_App *a;
|
||||
|
||||
cfdata = data;
|
||||
if (!cfdata->gui.o_fm) return;
|
||||
selected = e_fm2_selected_list_get(cfdata->gui.o_fm);
|
||||
if (!selected) return;
|
||||
ici = selected->data;
|
||||
realpath = e_fm2_real_path_get(cfdata->gui.o_fm);
|
||||
if (!strcmp(realpath, "/"))
|
||||
snprintf(buf, sizeof(buf), "/%s", ici->file);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file);
|
||||
evas_list_free(selected);
|
||||
if (ecore_file_is_dir(buf)) return;
|
||||
a = e_app_new(buf, 0);
|
||||
if (a)
|
||||
{
|
||||
if (cfdata->editor) e_object_del(E_OBJECT(cfdata->editor));
|
||||
cfdata->editor = e_eap_edit_show(cfdata->cfd->con, a);
|
||||
e_object_data_set(E_OBJECT(cfdata->editor), cfdata);
|
||||
e_object_del_attach_func_set(E_OBJECT(cfdata->editor), _cb_editor_del);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_files_selection_change_all(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
|
@ -437,7 +469,7 @@ _cb_button_add(void *data1, void *data2)
|
|||
_append_to_order(realpath, ecore_file_get_file(buf));
|
||||
}
|
||||
|
||||
e_fm2_refresh(cfdata->gui.o_fm);
|
||||
// e_fm2_refresh(cfdata->gui.o_fm);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -560,12 +592,12 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
150, 220, /* min */
|
||||
99999, 99999 /* max */
|
||||
);
|
||||
|
||||
/*
|
||||
mt = e_widget_check_add(evas, _("Sort applications"), &(cfdata->sorted));
|
||||
evas_object_smart_callback_add(mt, "changed",
|
||||
_cb_files_sorted_changed, cfdata);
|
||||
e_widget_framelist_object_append(of, mt);
|
||||
|
||||
*/
|
||||
if (once)
|
||||
mt = e_widget_button_add(evas, _(once->label), "enlightenment/e",
|
||||
_cb_button_add, cfdata, NULL);
|
||||
|
@ -573,6 +605,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
mt = e_widget_button_add(evas, _("Add application..."), "enlightenment/e",
|
||||
_cb_button_add, cfdata, NULL);
|
||||
cfdata->gui.o_add_button = mt;
|
||||
|
||||
e_widget_framelist_object_append(of, mt);
|
||||
e_widget_disabled_set(mt, 1);
|
||||
|
||||
|
@ -624,6 +657,8 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
e_fm2_icon_menu_flags_set(mt, E_FM2_MENU_NO_SHOW_HIDDEN);
|
||||
evas_object_smart_callback_add(mt, "dir_changed",
|
||||
_cb_files_dir_changed, cfdata);
|
||||
evas_object_smart_callback_add(mt, "selected",
|
||||
_cb_files_selected_all2, cfdata);
|
||||
evas_object_smart_callback_add(mt, "selection_change",
|
||||
_cb_files_selection_change, cfdata);
|
||||
evas_object_smart_callback_add(mt, "changed",
|
||||
|
@ -647,7 +682,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
150, 220, /* min */
|
||||
99999, 99999 /* max */
|
||||
);
|
||||
|
||||
/*
|
||||
mt = e_widget_button_add(evas, _("Move application up"), "widget/up_arrow",
|
||||
_cb_button_move_up, cfdata, NULL);
|
||||
cfdata->gui.o_move_up_button = mt;
|
||||
|
@ -659,7 +694,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
cfdata->gui.o_move_down_button = mt;
|
||||
e_widget_framelist_object_append(of, mt);
|
||||
e_widget_disabled_set(cfdata->gui.o_move_down_button, 1);
|
||||
|
||||
*/
|
||||
e_widget_table_object_append(ot, of, 2, 0, 2, 4, 1, 1, 1, 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue