filepanel: Use edi_theme_icon_path_get.

Let's try to ensure our file panel will always display icons
even if the installed system has no icon themes installed.
I think this is the whole point of edi_theme_icon_path.. that
we are able to provide a UI that looks "okay" without messing
about with themes. People can do that themselves if they like
but an empty app GUI might put people off...let's not do it.
Again lovely icons from Faenza's author Mattieu James.
edi-0.8
Alastair Poole 2 years ago
parent 6311340663
commit 2e4a141c98
  1. BIN
      data/icons/dialog-information.png
  2. BIN
      data/icons/dialog-question.png
  3. BIN
      data/icons/document-save-as.png
  4. BIN
      data/icons/empty.png
  5. BIN
      data/icons/folder.png
  6. BIN
      data/icons/go-down.png
  7. BIN
      data/icons/go-up.png
  8. BIN
      data/icons/image-x-generic.png
  9. 5
      data/icons/meson.build
  10. BIN
      data/icons/text-x-csrc.png
  11. BIN
      data/icons/text-x-generic.png
  12. 20
      src/bin/edi_filepanel.c

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

@ -10,7 +10,10 @@ install_data(['document-new.png', 'window-close.png', 'window-close.png',
'object-flip-horizontal.png', 'object-flip-vertical.png',
'edit-clear.png','applications-electronics.png', 'mail-send.png',
'dialog-error.png', 'go-home.png', 'network-server.png',
'edit-delete.png',
'edit-delete.png', 'text-x-generic.png', 'text-x-csrc.png',
'image-x-generic.png', 'empty.png',
'document-save-as.png', 'dialog-question.png', 'dialog-error.png',
'dialog-information.png',
],
install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'edi', 'icons')
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

@ -95,17 +95,17 @@ _icon_status(Edi_Scm_Status_Code code, Eina_Bool *staged)
*staged = EINA_TRUE;
return NULL;
case EDI_SCM_STATUS_ADDED:
return "document-new";
return edi_theme_icon_path_get("document-new");
case EDI_SCM_STATUS_ADDED_STAGED:
*staged = EINA_TRUE;
return "document-new";
return edi_theme_icon_path_get("document-new");
case EDI_SCM_STATUS_MODIFIED:
return "document-save-as";
return edi_theme_icon_path_get("document-save-as");
case EDI_SCM_STATUS_MODIFIED_STAGED:
*staged = EINA_TRUE;
return "document-save-as";
return edi_theme_icon_path_get("document-save-as");
case EDI_SCM_STATUS_UNTRACKED:
return "dialog-question";
return edi_theme_icon_path_get("dialog-question");
}
return NULL;
@ -461,7 +461,7 @@ _item_menu_filetype_create(Evas_Object *menu, Elm_Object_Item *parent, const cha
if (!provider)
return;
elm_menu_item_add(menu, parent, provider->icon, provider->id, func, sd);
elm_menu_item_add(menu, parent, edi_theme_icon_path_get(provider->icon), provider->id, func, sd);
}
static void
@ -722,9 +722,9 @@ _content_get(void *data, Evas_Object *obj, const char *source)
provider = _get_provider_from_hashset(sd->path);
if (provider)
icon_name = provider->icon;
icon_name = edi_theme_icon_path_get(provider->icon);
else
icon_name = "empty";
icon_name = edi_theme_icon_path_get("empty");
box = elm_box_add(obj);
elm_box_horizontal_set(box, EINA_TRUE);
@ -767,7 +767,7 @@ _content_get(void *data, Evas_Object *obj, const char *source)
if (staged)
{
ic = elm_icon_add(mbox);
elm_icon_standard_set(ic, "dialog-information");
elm_icon_standard_set(ic, edi_theme_icon_path_get("dialog-information"));
evas_object_size_hint_min_set(ic, ELM_SCALE_SIZE(16), ELM_SCALE_SIZE(16));
evas_object_show(ic);
elm_box_pack_end(rbox, ic);
@ -777,7 +777,7 @@ _content_get(void *data, Evas_Object *obj, const char *source)
else
{
ic = elm_icon_add(mbox);
elm_icon_standard_set(ic, "dialog-error");
elm_icon_standard_set(ic, edi_theme_icon_path_get("dialog-error"));
evas_object_size_hint_min_set(ic, ELM_SCALE_SIZE(16), ELM_SCALE_SIZE(16));
evas_object_show(ic);
elm_box_pack_end(rbox, ic);

Loading…
Cancel
Save