forked from enlightenment/enlightenment
1. fix segv dnd border icon to ibar
2. border icon if from netwm has alpha set :) SVN revision: 16979
This commit is contained in:
parent
a5991bd857
commit
9ad9f64731
|
@ -345,6 +345,7 @@ e_app_new(const char *path, int scan_subdirs)
|
|||
{
|
||||
_e_apps = evas_hash_add(_e_apps, a->path, a);
|
||||
_e_apps_list = evas_list_prepend(_e_apps_list, a);
|
||||
a->scanned = 1;
|
||||
}
|
||||
// e_app_cache_free(ac);
|
||||
}
|
||||
|
@ -560,6 +561,7 @@ e_app_prepend_relative(E_App *add, E_App *before)
|
|||
{
|
||||
char buf[PATH_MAX];
|
||||
|
||||
if ((!add) || (!before)) return;
|
||||
if (!before->parent) return;
|
||||
|
||||
before->parent->subapps = evas_list_prepend_relative(before->parent->subapps,
|
||||
|
@ -588,6 +590,7 @@ e_app_append(E_App *add, E_App *parent)
|
|||
{
|
||||
char buf[PATH_MAX];
|
||||
|
||||
if ((!add) || (!parent)) return;
|
||||
parent->subapps = evas_list_append(parent->subapps, add);
|
||||
add->parent = parent;
|
||||
|
||||
|
@ -612,6 +615,7 @@ e_app_files_prepend_relative(Evas_List *files, E_App *before)
|
|||
{
|
||||
Evas_List *l;
|
||||
|
||||
if (!before) return;
|
||||
if (!before->parent) return;
|
||||
|
||||
for (l = files; l; l = l->next)
|
||||
|
@ -667,6 +671,7 @@ e_app_files_append(Evas_List *files, E_App *parent)
|
|||
{
|
||||
Evas_List *l, *subapps;
|
||||
|
||||
if (!parent) return;
|
||||
subapps = parent->subapps;
|
||||
|
||||
for (l = files; l; l = l->next)
|
||||
|
@ -718,6 +723,7 @@ e_app_remove(E_App *remove)
|
|||
{
|
||||
char buf[PATH_MAX];
|
||||
|
||||
if (!remove) return;
|
||||
if (!remove->parent) return;
|
||||
|
||||
remove->parent->subapps = evas_list_remove(remove->parent->subapps, remove);
|
||||
|
|
|
@ -4114,6 +4114,7 @@ _e_border_cb_mouse_move(void *data, int type, void *event)
|
|||
{
|
||||
o = e_icon_add(drag->evas);
|
||||
e_icon_data_set(o, data, iw, ih);
|
||||
e_icon_alpha_set(o, 1);
|
||||
}
|
||||
}
|
||||
if (!o)
|
||||
|
|
|
@ -1683,9 +1683,32 @@ _ibar_bar_cb_drop_border(void *data, const char *type, void *event)
|
|||
app = e_app_window_name_class_title_role_find(bd->client.icccm.name,
|
||||
bd->client.icccm.class,
|
||||
title, bd->client.icccm.window_role);
|
||||
if (!app)
|
||||
{
|
||||
app = e_app_launch_id_pid_find(bd->client.netwm.e_start_launch_id,
|
||||
bd->client.netwm.pid);
|
||||
}
|
||||
if (!app)
|
||||
{
|
||||
E_Dialog *dia;
|
||||
|
||||
dia = e_dialog_new(e_container_current_get(e_manager_current_get()));
|
||||
e_dialog_title_set(dia, _("Cannot add icon"));
|
||||
e_dialog_text_set(dia,
|
||||
_("You tried to drop an icon of an application that<br>"
|
||||
"does not have a matching application file.<br>"
|
||||
"<br>"
|
||||
"The icon cannot be added to IBar."
|
||||
));
|
||||
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
||||
e_dialog_button_focus_num(dia, 1);
|
||||
e_win_centered_set(dia->win, 1);
|
||||
e_dialog_show(dia);
|
||||
return;
|
||||
}
|
||||
/* add dropped element */
|
||||
ic = _ibar_icon_pos_find(ibb, ev->x, ev->y);
|
||||
if (!ic) return;
|
||||
|
||||
/* remove drag marker */
|
||||
e_box_freeze(ibb->box_object);
|
||||
|
|
Loading…
Reference in New Issue