summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlliver Schinagl <o.schinagl@ultimaker.com>2015-05-08 11:52:51 (GMT)
committerOlliver Schinagl <o.schinagl@ultimaker.com>2015-05-08 11:52:51 (GMT)
commitf51bcffbf5e9d3256e4c27b39f2f38d691d4a824 (patch)
treecb9be112fd18b92eb9f1dc2d45a86bf6caa99355
parent582cb96debe494e3d2a20dec1c57796ccb6c83a4 (diff)
downloadeulogium-f51bcffbf5e9d3256e4c27b39f2f38d691d4a824.zip
eulogium-f51bcffbf5e9d3256e4c27b39f2f38d691d4a824.tar.gz
eulogium-f51bcffbf5e9d3256e4c27b39f2f38d691d4a824.tar.bz2
Clean up bed-clearing function a little
Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
-rw-r--r--src/eulogium.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/eulogium.c b/src/eulogium.c
index 22e37a7..a8b9d99 100644
--- a/src/eulogium.c
+++ b/src/eulogium.c
@@ -698,25 +698,24 @@ static void _cleared_bed_cb(void *data, Evas_Object *obj EINA_UNUSED, void *even
Evas_Object *eulogium_clear_print_bed(struct eulogium_data *eulogium)
{
- Evas_Object *content, *obj;
+ Evas_Object *box, *obj;
- content = elm_box_add(eulogium->navi);
- evas_object_show(content);
+ box = elm_box_add(eulogium->navi);
+ evas_object_show(box);
- obj = elm_label_add(content);
- elm_object_text_set(obj, "Print bed not empty!<br>Empty print bed.");
+ obj = elm_label_add(box);
+ elm_object_text_set(obj, "Please empty print bed.");
evas_object_show(obj);
- elm_box_pack_end(content, obj);
+ elm_box_pack_end(box, obj);
/* TODO replace with left/right button call, this is just a quick Hack XXX */
- obj = elm_button_add(content);
- elm_object_text_set(obj, "Bed is now clear");
+ obj = elm_button_add(box);
+ elm_object_text_set(obj, "Print removed");
evas_object_smart_callback_add(obj, "clicked", _cleared_bed_cb, eulogium);
evas_object_show(obj);
- elm_box_pack_end(content, obj);
+ elm_box_pack_end(box, obj);
- /* XXX BUG If we fail, we keep on pushing new frames. instead, we need to replace the current frame */
- elm_naviframe_item_simple_push(eulogium->navi, content);
+ return box;
}
struct _filelist_data {