diff --git a/src/bin/e_apps.c b/src/bin/e_apps.c
index 17d655225..7a18a1b1f 100644
--- a/src/bin/e_apps.c
+++ b/src/bin/e_apps.c
@@ -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);
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index fcf0c97ef..e84b255f4 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -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)
diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c
index c274f6991..c93a2ea94 100644
--- a/src/modules/ibar/e_mod_main.c
+++ b/src/modules/ibar/e_mod_main.c
@@ -1683,10 +1683,33 @@ _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
"
+ "does not have a matching application file.
"
+ "
"
+ "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);
e_box_unpack(ibb->drag_object);