aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-01-21 12:28:42 +1000
committerDavid Walter Seikel2016-01-21 12:28:42 +1000
commitb4ed410b9133c692fc20171ef3061f8b0b912d95 (patch)
treea7c1eda6b3f349e6c411f64ce9d763c7f7a593e9
parentCommenting out no longer needed code, which I should probably just delete soon. (diff)
downloadSledjHamr-b4ed410b9133c692fc20171ef3061f8b0b912d95.zip
SledjHamr-b4ed410b9133c692fc20171ef3061f8b0b912d95.tar.gz
SledjHamr-b4ed410b9133c692fc20171ef3061f8b0b912d95.tar.bz2
SledjHamr-b4ed410b9133c692fc20171ef3061f8b0b912d95.tar.xz
Evil hack around ELM's problem with lack of toolbar item icons.
-rw-r--r--media/spacer.pngbin0 -> 83 bytes
-rw-r--r--src/extantz/extantz.c10
-rw-r--r--src/extantz/woMan.c6
-rw-r--r--src/libraries/winFang.c11
-rw-r--r--src/libraries/winFang.h2
5 files changed, 20 insertions, 9 deletions
diff --git a/media/spacer.png b/media/spacer.png
new file mode 100644
index 0000000..bf91fa5
--- /dev/null
+++ b/media/spacer.png
Binary files differ
diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c
index 1091c87..07e6502 100644
--- a/src/extantz/extantz.c
+++ b/src/extantz/extantz.c
@@ -461,11 +461,11 @@ static winFang *_makeMainMenu(globals *ourGlobals)
461 makeMainMenuFinish(me, tb); 461 makeMainMenuFinish(me, tb);
462 462
463 // Other stuff in the toolbar. 463 // Other stuff in the toolbar.
464 it = elm_toolbar_item_append(tb, NULL, "restriction icons", NULL, NULL); 464 it = elm_toolbar_item_append(tb, NoIcon, "restriction icons", NULL, NULL);
465 it = elm_toolbar_item_append(tb, NULL, NULL, NULL, NULL); elm_toolbar_item_separator_set(it, EINA_TRUE); 465 it = elm_toolbar_item_append(tb, NoIcon, NULL, NULL, NULL); elm_toolbar_item_separator_set(it, EINA_TRUE);
466 it = elm_toolbar_item_append(tb, NULL, "hop://localhost/Anarchadia 152, 155, 51 - Lost plot (Adult)", NULL, NULL); 466 it = elm_toolbar_item_append(tb, NoIcon, "hop://localhost/Anarchadia 152, 155, 51 - Lost plot (Adult)", NULL, NULL);
467 it = elm_toolbar_item_append(tb, NULL, NULL, NULL, NULL); elm_toolbar_item_separator_set(it, EINA_TRUE); 467 it = elm_toolbar_item_append(tb, NoIcon, NULL, NULL, NULL); elm_toolbar_item_separator_set(it, EINA_TRUE);
468 it = elm_toolbar_item_append(tb, NULL, "date time:o'clock", NULL, NULL); 468 it = elm_toolbar_item_append(tb, NoIcon, "date time:o'clock", NULL, NULL);
469 469
470 elm_layout_box_prepend(me->layout, WF_BOX, tb); 470 elm_layout_box_prepend(me->layout, WF_BOX, tb);
471 471
diff --git a/src/extantz/woMan.c b/src/extantz/woMan.c
index 42390cc..c867241 100644
--- a/src/extantz/woMan.c
+++ b/src/extantz/woMan.c
@@ -250,10 +250,10 @@ winFang *woMan_add(globals *ourGlobals)
250 evas_object_show(nf); 250 evas_object_show(nf);
251 251
252 sprintf(buf, "%s/%s", prefix_data_get(), img3); 252 sprintf(buf, "%s/%s", prefix_data_get(), img3);
253 tab = viewerList; tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Viewers", _promote, tab_it); 253 tab = viewerList; tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NoIcon, "Viewers", _promote, tab_it);
254 // TODO - This strdup leaks, but this is just temporary test code anyway, it will go away. 254 // TODO - This strdup leaks, but this is just temporary test code anyway, it will go away.
255 tab = _content_image_new(me->win, strdup(buf)); tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Landmarks", _promote, tab_it); 255 tab = _content_image_new(me->win, strdup(buf)); tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NoIcon, "Landmarks", _promote, tab_it);
256 tab = gridList; tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Grids", _promote, tab_it); 256 tab = gridList; tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NoIcon, "Grids", _promote, tab_it);
257 elm_layout_box_append(me->win, WF_BOX, nf); 257 elm_layout_box_append(me->win, WF_BOX, nf);
258 258
259 bt = eo_add(ELM_BUTTON_CLASS, me->win, 259 bt = eo_add(ELM_BUTTON_CLASS, me->win,
diff --git a/src/libraries/winFang.c b/src/libraries/winFang.c
index 0f2c5a5..df9f5fa 100644
--- a/src/libraries/winFang.c
+++ b/src/libraries/winFang.c
@@ -225,6 +225,15 @@ winFang *winFangAdd(winFang *parent, int x, int y, int w, int h, char *title, ch
225 225
226// result->bg = edje_object_part_object_get(elm_layout_edje_get(result->layout), WF_BACKGROUND); 226// result->bg = edje_object_part_object_get(elm_layout_edje_get(result->layout), WF_BACKGROUND);
227 227
228 if (0 == NoIcon[0])
229 snprintf(NoIcon, sizeof(NoIcon), "%s/spacer.png", prefix_data_get());
230/* This aint doing shit. B-(
231 obj = elm_icon_add(obj);
232 elm_icon_order_lookup_set(obj, ELM_ICON_LOOKUP_THEME_FDO);
233 elm_icon_standard_set(obj, NoIcon);
234 elm_image_file_set(obj, NoIcon, NULL);
235*/
236
228 if (result->parent) 237 if (result->parent)
229 { 238 {
230 result->win = result->layout; 239 result->win = result->layout;
@@ -545,7 +554,7 @@ Evas_Object *menuAdd(winFang *win, Evas_Object *tb, char *label)
545 554
546 // Evas_Object * obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data 555 // Evas_Object * obj, const char *icon, const char *label, Evas_Smart_Cb func, const void *data
547 // The function is called when the item is clicked. 556 // The function is called when the item is clicked.
548 tb_it = elm_toolbar_item_append(tb, NULL, label, NULL, NULL); 557 tb_it = elm_toolbar_item_append(tb, NoIcon, label, NULL, NULL);
549 // Mark it as a menu. 558 // Mark it as a menu.
550 elm_toolbar_item_menu_set(tb_it, EINA_TRUE); 559 elm_toolbar_item_menu_set(tb_it, EINA_TRUE);
551 // This alledgedly marks it as a menu (not true), and gets an Evas_Object for us to play with. 560 // This alledgedly marks it as a menu (not true), and gets an Evas_Object for us to play with.
diff --git a/src/libraries/winFang.h b/src/libraries/winFang.h
index 91ceb0c..1885ca1 100644
--- a/src/libraries/winFang.h
+++ b/src/libraries/winFang.h
@@ -13,6 +13,8 @@
13#define WF_BOX "winFang/box" 13#define WF_BOX "winFang/box"
14#define WF_SWALLOW "winFang/content" 14#define WF_SWALLOW "winFang/content"
15 15
16// Evil hack around ELM's problem with lack of toolbar item icons.
17char NoIcon[PATH_MAX];
16 18
17typedef struct _widgetSpec 19typedef struct _widgetSpec
18{ 20{