This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository edi.
View the commit online.
commit c6c3560c4d44ed926c14ce9b06c7aaf871b96d7c
Author: Alastair Poole <[email protected]>
AuthorDate: Tue Apr 14 06:06:13 2026 +0100
edi_filepanel: fallback icons for file selector.
Some themes don't include specific mime-types and the widget
wasn't displaying an icon. This adds fallback mechanism but still
takes advantage of more ellaborate icon themes.
---
src/bin/edi_filepanel.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/src/bin/edi_filepanel.c b/src/bin/edi_filepanel.c
index 0f1fe90..7bc665e 100644
--- a/src/bin/edi_filepanel.c
+++ b/src/bin/edi_filepanel.c
@@ -111,6 +111,18 @@ _icon_status(Edi_Scm_Status_Code code, Eina_Bool *staged)
return NULL;
}
+static Eina_Bool
+_icon_file_set(Evas_Object *icon, const char *icon_name)
+{
+ if (icon_name && elm_icon_standard_set(icon, edi_theme_icon_path_get(icon_name)))
+ return EINA_TRUE;
+
+ if (elm_icon_standard_set(icon, edi_theme_icon_path_get("text-x-generic")))
+ return EINA_TRUE;
+
+ return elm_icon_standard_set(icon, edi_theme_icon_path_get("file"));
+}
+
static Edi_Scm_Status_Code *
_file_status_item_find(const char *path)
{
@@ -726,9 +738,9 @@ _content_get(void *data, Evas_Object *obj, const char *source)
provider = _get_provider_from_hashset(sd->path);
if (provider)
- icon_name = edi_theme_icon_path_get(provider->icon);
+ icon_name = provider->icon;
else
- icon_name = edi_theme_icon_path_get("empty");
+ icon_name = "file";
box = elm_box_add(obj);
elm_box_horizontal_set(box, EINA_TRUE);
@@ -740,7 +752,7 @@ _content_get(void *data, Evas_Object *obj, const char *source)
evas_object_show(lbox);
ic = elm_icon_add(lbox);
- elm_icon_standard_set(ic, edi_theme_icon_path_get(icon_name));
+ _icon_file_set(ic, icon_name);
evas_object_size_hint_min_set(ic, ELM_SCALE_SIZE(24), ELM_SCALE_SIZE(24));
evas_object_show(ic);
elm_box_pack_end(lbox, ic);
@@ -1320,4 +1332,3 @@ edi_filepanel_selected_path_get(Evas_Object *obj EINA_UNUSED)
return sd->path;
}
-
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.