aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-12-19 02:24:36 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-12-19 02:24:36 +0000
commited479f04ab66e5290e1a1ddecc6334fbd5641be2 (patch)
tree653f1319efee9f762a54688c3ef98487d29f8e65
parent911e610febe502ae28c754c1fd9774a847f55ba2 (diff)
downloadenlightenment-ed479f04ab66e5290e1a1ddecc6334fbd5641be2.tar.gz
enlightenment-ed479f04ab66e5290e1a1ddecc6334fbd5641be2.tar.xz
enlightenment-ed479f04ab66e5290e1a1ddecc6334fbd5641be2.zip
polish up icon only and text only options in tasks - mentioned by
zmike. needed code changes. SVN revision: 81320
-rw-r--r--data/themes/edc/tasks.edc39
-rw-r--r--src/modules/tasks/e_mod_main.c25
2 files changed, 57 insertions, 7 deletions
diff --git a/data/themes/edc/tasks.edc b/data/themes/edc/tasks.edc
index fe4fa2f47..1a31cfb0a 100644
--- a/data/themes/edc/tasks.edc
+++ b/data/themes/edc/tasks.edc
@@ -115,7 +115,7 @@ group { name:"e/modules/tasks/item";
description { state: "default" 0.0;
rel1.relative: 1.0 0.0;
rel1.offset: 2 3;
- rel1.to_x: "icon";
+ rel1.to_x: "icon2";
rel1.to_y: "sel_base";
rel2.offset: -5 -5;
rel2.to: "sel_base";
@@ -144,6 +144,31 @@ group { name:"e/modules/tasks/item";
rel2.offset: 3 -4;
rel2.to: "sel_base";
}
+ description { state: "icon_only" 0.0;
+ inherit: "default" 0.0;
+ align: 0.5 0.5;
+ rel1.offset: 2 2;
+ rel2.relative: 1.0 1.0;
+ rel2.offset: -3 -3;
+ }
+ description { state: "text_only" 0.0;
+ inherit: "default" 0.0;
+ fixed: 1 1;
+ }
+ }
+ part { name: "icon2"; type: SPACER;
+ description { state: "default" 0.0;
+ rel1.to: "icon";
+ rel2.to: "icon";
+ }
+ description { state: "icon_only" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "text_only" 0.0;
+ inherit: "default" 0.0;
+ fixed: 1 1;
+ rel2.relative: 0.0 1.0;
+ }
}
part { name: "icon_clip"; type: RECT;
description { state: "default" 0.0;
@@ -317,6 +342,18 @@ group { name:"e/modules/tasks/item";
target: "e.text.label";
target: "icon_clip";
}
+ program {
+ signal: "e,state,icon_only"; source: "e";
+ action: STATE_SET "icon_only" 0.0;
+ target: "icon";
+ target: "icon2";
+ }
+ program {
+ signal: "e,state,text_only"; source: "e";
+ action: STATE_SET "text_only" 0.0;
+ target: "icon";
+ target: "icon2";
+ }
}
}
diff --git a/src/modules/tasks/e_mod_main.c b/src/modules/tasks/e_mod_main.c
index 9591c257f..aa8400f0c 100644
--- a/src/modules/tasks/e_mod_main.c
+++ b/src/modules/tasks/e_mod_main.c
@@ -390,13 +390,16 @@ _tasks_refill(Tasks *tasks)
{
item = tasks->items->data;
edje_object_size_min_calc(item->o_item, &w, &h);
- if (tasks->horizontal)
- {
- if (w < tasks->config->minw) w = tasks->config->minw;
- }
- else
+ if (!tasks->config->icon_only)
{
- if (h < tasks->config->minh) h = tasks->config->minh;
+ if (tasks->horizontal)
+ {
+ if (w < tasks->config->minw) w = tasks->config->minw;
+ }
+ else
+ {
+ if (h < tasks->config->minh) h = tasks->config->minh;
+ }
}
if (!tasks->gcc->resizable)
{
@@ -506,6 +509,16 @@ _tasks_item_new(Tasks *tasks, E_Border *border)
"base/theme/modules/tasks",
"e/modules/tasks/item");
}
+ if (tasks->config->text_only)
+ {
+ edje_object_signal_emit(item->o_item, "e,state,text_only", "e");
+ edje_object_message_signal_process(item->o_item);
+ }
+ else if (tasks->config->icon_only)
+ {
+ edje_object_signal_emit(item->o_item, "e,state,icon_only", "e");
+ edje_object_message_signal_process(item->o_item);
+ }
evas_object_event_callback_add(item->o_item, EVAS_CALLBACK_MOUSE_DOWN,
_tasks_cb_item_mouse_down, item);
evas_object_event_callback_add(item->o_item, EVAS_CALLBACK_MOUSE_UP,