More themeing work.
This commit is contained in:
parent
8eee12525d
commit
b12aae86bf
@ -4,6 +4,8 @@
|
||||
|
||||
#include "images/images.edc"
|
||||
#include "fonts/fonts.edc"
|
||||
#include "macros/button.edc"
|
||||
#include "macros/check.edc"
|
||||
|
||||
collections {
|
||||
#include "groups/window.edc"
|
||||
|
@ -17,7 +17,8 @@ group {
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
min: 0 26;
|
||||
min: 100 26;
|
||||
max: 150 50;
|
||||
color: 255 255 255 178;
|
||||
|
||||
image {
|
||||
|
@ -12,9 +12,8 @@ group {
|
||||
snprintf(sectors, 100, "%d/%d", getarg(3), getarg(4));
|
||||
set_text(PART:"progress_text", sectors);
|
||||
|
||||
/* Also sent is the buffer available [getarg(5)] and
|
||||
* the buffer capacity [getarg(6)]
|
||||
*/
|
||||
// Also sent is the buffer available [getarg(5)] and
|
||||
// the buffer capacity [getarg(6)]
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -70,74 +69,11 @@ group {
|
||||
}
|
||||
}
|
||||
|
||||
part {
|
||||
name: "ecdb/erase/return";
|
||||
type: SWALLOW;
|
||||
repeat_events: 1;
|
||||
scale: 1;
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
BUTTON("ecdb/erase/return", "ecdb/erase/return/text", 100, 26, 150, 26, "bg", "bg", 0, 0, "bg", "bg", 1, 1, 0, 5, -5, 1, 1, 0)
|
||||
|
||||
rel1 {
|
||||
to: "bg";
|
||||
relative: 1.0 0.0;
|
||||
offset: -200 5;
|
||||
}
|
||||
BUTTON("ecdb/erase/begin", "ecdb/erase/begin/text", 100, 26, 150, 26, "bg", "ecdb/erase/return", 0, 1, "bg", "ecdb/erase/return", 1, 1, 0, 5, -5, -1, 1, 0)
|
||||
|
||||
rel2 {
|
||||
to: "bg";
|
||||
relative: 1.0 0.0;
|
||||
offset: -11 30;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
part {
|
||||
name: "ecdb/erase/begin";
|
||||
type: SWALLOW;
|
||||
repeat_events: 1;
|
||||
scale: 1;
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
|
||||
rel1 {
|
||||
to: "ecdb/erase/return";
|
||||
relative: 0.0 1.0;
|
||||
offset: 0 5;
|
||||
}
|
||||
|
||||
rel2 {
|
||||
to: "ecdb/erase/return";
|
||||
relative: 1.0 1.0;
|
||||
offset: 0 30;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
part {
|
||||
name: "ecdb/erase/speed";
|
||||
type: SWALLOW;
|
||||
repeat_events: 1;
|
||||
scale: 1;
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
|
||||
rel1 {
|
||||
to: "ecdb/erase/begin";
|
||||
relative: 0.0 1.0;
|
||||
offset: 0 5;
|
||||
}
|
||||
|
||||
rel2 {
|
||||
to: "ecdb/erase/begin";
|
||||
relative: 1.0 1.0;
|
||||
offset: 0 30;
|
||||
}
|
||||
}
|
||||
}
|
||||
CHECK("ecdb/erase/speed", "ecdb/erase/speed/text", 100, 26, 150, 26, "bg", "ecdb/erase/begin", 0, 1, "bg", "ecdb/erase/begin", 1, 1, 0, 5, -5, -1, 1, 0)
|
||||
|
||||
part {
|
||||
name: "ecdb/erase/drive";
|
||||
@ -147,17 +83,21 @@ group {
|
||||
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
align: 1.0 0.0;
|
||||
max: 150 26;
|
||||
min: 100 26;
|
||||
|
||||
rel1 {
|
||||
to: "ecdb/erase/speed";
|
||||
to_y: "ecdb/erase/speed";
|
||||
to_x: "bg";
|
||||
relative: 0.0 1.0;
|
||||
offset: 0 5;
|
||||
offset: 5 5;
|
||||
}
|
||||
|
||||
rel2 {
|
||||
to: "ecdb/erase/speed";
|
||||
to: "bg";
|
||||
relative: 1.0 1.0;
|
||||
offset: 0 30;
|
||||
offset: -5 -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -178,9 +118,9 @@ group {
|
||||
}
|
||||
|
||||
rel2 {
|
||||
to: "bg";
|
||||
relative: 1.0 1.0;
|
||||
offset: -205 -10;
|
||||
to_x: "ecdb/erase/return";
|
||||
relative: 0.0 1.0;
|
||||
offset: -5 -10;
|
||||
}
|
||||
|
||||
image {
|
||||
@ -297,6 +237,9 @@ group {
|
||||
}
|
||||
|
||||
programs {
|
||||
BUTTON_PROGS("ecdb/erase/return")
|
||||
BUTTON_PROGS("ecdb/erase/begin")
|
||||
CHECK_PROGS("ecdb/erase/speed")
|
||||
program {
|
||||
name: "erase_page,visible1";
|
||||
signal: "ecdb,erase_page,visible";
|
||||
|
492
experimental/ecdb/trunk/data/themes/default/macros/button.edc
Normal file
492
experimental/ecdb/trunk/data/themes/default/macros/button.edc
Normal file
@ -0,0 +1,492 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#define BUTTON_ICON(partname, partnametext, iconimage, minx, miny, maxx, maxy, rel1xto, rel1yto, rel1x, rel1y, rel2xto, rel2yto, rel2x, rel2y, offset1x, offset1y, offset2x, offset2y, alignx, aligny) \
|
||||
part { \
|
||||
name: partname; \
|
||||
type: IMAGE; \
|
||||
mouse_events: 1; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
min: minx miny; \
|
||||
max: maxx maxy; \
|
||||
color: 255 255 255 178; \
|
||||
align: alignx aligny; \
|
||||
rel1 { \
|
||||
to_x: rel1xto; \
|
||||
to_y: rel1yto; \
|
||||
relative: rel1x rel1y; \
|
||||
offset: offset1x offset1y; \
|
||||
} \
|
||||
rel2 { \
|
||||
to_x: rel2xto; \
|
||||
to_y: rel2yto; \
|
||||
relative: rel2x rel2y; \
|
||||
offset: offset2x offset2y; \
|
||||
} \
|
||||
image { \
|
||||
normal: "button_base.png"; \
|
||||
border: 7 7 7 7; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"button_clip"; \
|
||||
type: RECT; \
|
||||
mouse_events: 1; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
color: 255 255 255 255; \
|
||||
rel1 { \
|
||||
to: partname; \
|
||||
relative: 0.0 0.0; \
|
||||
offset: 3 1; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname; \
|
||||
relative: 1.0 1.0; \
|
||||
offset: -4 -2; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"focus_clip"; \
|
||||
type: RECT; \
|
||||
mouse_events: 1; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
color: 255 255 255 0; \
|
||||
rel1 { \
|
||||
to: partname"button"; \
|
||||
offset: -1 0; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname"button"; \
|
||||
offset: 0 -1; \
|
||||
} \
|
||||
} \
|
||||
description { \
|
||||
state: "visible" 0.0; \
|
||||
inherit: "default" 0.0; \
|
||||
color: 255 255 255 255; \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"focus"; \
|
||||
type: IMAGE; \
|
||||
mouse_events: 1; \
|
||||
clip_to: partname"focus_clip"; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
rel1 { \
|
||||
to: partname"focus_clip"; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname"focus_clip"; \
|
||||
} \
|
||||
image { \
|
||||
normal: "focus.png"; \
|
||||
border: 7 7 7 7; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"button"; \
|
||||
type: IMAGE; \
|
||||
mouse_events: 1; \
|
||||
clip_to: partname"button_clip"; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
min: 0 24; \
|
||||
rel1 { \
|
||||
to: partname"button_clip"; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname"button_clip"; \
|
||||
} \
|
||||
image { \
|
||||
normal: "button.png"; \
|
||||
border: 7 7 7 7; \
|
||||
} \
|
||||
} \
|
||||
description { \
|
||||
state: "disabled" 0.0; \
|
||||
inherit: "default" 0.0; \
|
||||
image { \
|
||||
normal: "button_disabled.png"; \
|
||||
border: 11 11 10 10; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"shadow"; \
|
||||
type: IMAGE; \
|
||||
mouse_events: 1; \
|
||||
clip_to: partname"button_clip"; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
min: 0 24; \
|
||||
color: 255 255 255 0; \
|
||||
rel1 { \
|
||||
to: partname"button_clip"; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname"button_clip"; \
|
||||
} \
|
||||
image { \
|
||||
normal: "button_shadow.png"; \
|
||||
border: 6 6 0 6; \
|
||||
} \
|
||||
} \
|
||||
description { \
|
||||
state: "clicked" 0.0; \
|
||||
inherit: "default" 0.0; \
|
||||
color: 255 255 255 255; \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"shadow_overlay"; \
|
||||
type: IMAGE; \
|
||||
mouse_events: 1; \
|
||||
clip_to: partname"button_clip"; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
min: 0 24; \
|
||||
color: 255 255 255 0; \
|
||||
rel1 { \
|
||||
to: partname"button_clip"; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname"button_clip"; \
|
||||
} \
|
||||
image { \
|
||||
normal: "button_shadow_overlay.png"; \
|
||||
border: 6 6 6 13; \
|
||||
} \
|
||||
} \
|
||||
description { \
|
||||
state: "clicked" 0.0; \
|
||||
inherit: "default" 0.0; \
|
||||
color: 255 255 255 255; \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partnametext; \
|
||||
type: TEXT; \
|
||||
mouse_events: 1; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
align: 0.0 0.5; \
|
||||
color: 60 60 60 255; \
|
||||
fixed: 1 1; \
|
||||
rel1 { \
|
||||
to: partname"ecdb.swallow.icon"; \
|
||||
offset: 40 0; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname"ecdb.swallow.icon"; \
|
||||
} \
|
||||
text { \
|
||||
text: ""; \
|
||||
font: "ecdb/default"; \
|
||||
min: 1 1; \
|
||||
size: 11; \
|
||||
align: 0.5 0.5; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"icon"; \
|
||||
type: IMAGE; \
|
||||
mouse_events: 1; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
max: 32 32; \
|
||||
align: 0.0 0.5; \
|
||||
rel1 { \
|
||||
to: partname"button_clip"; \
|
||||
offset: 15 0; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname"button_clip"; \
|
||||
} \
|
||||
image { \
|
||||
normal: iconimage; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define BUTTON_PROGS(partname) \
|
||||
program { \
|
||||
name: partname"clicked"; \
|
||||
action: STATE_SET "clicked" 0.0; \
|
||||
signal: "mouse,down,1"; \
|
||||
source: partname"*"; \
|
||||
target: partname"shadow_overlay"; \
|
||||
target: partname"shadow"; \
|
||||
transition: DECELERATE 0.2; \
|
||||
} \
|
||||
program { \
|
||||
name: partname"focus_in,mouse"; \
|
||||
signal: "mouse,down,1"; \
|
||||
action: STATE_SET "visible" 0.0; \
|
||||
source: partname"*"; \
|
||||
target: partname"focus_clip"; \
|
||||
transition: DECELERATE 0.5; \
|
||||
} \
|
||||
program { \
|
||||
name: partname"focus_in,ecdb"; \
|
||||
signal: "ecdb,focus,in,"partname; \
|
||||
action: STATE_SET "visible" 0.0; \
|
||||
source: "ecdb"; \
|
||||
target: partname"focus_clip"; \
|
||||
transition: DECELERATE 0.5; \
|
||||
} \
|
||||
program { \
|
||||
name: partname"unclick"; \
|
||||
signal: "mouse,clicked,1"; \
|
||||
signal: "mouse,up,1"; \
|
||||
action: STATE_SET "default" 0.0; \
|
||||
source: partname"*"; \
|
||||
target: partname"shadow_overlay"; \
|
||||
target: partname"shadow"; \
|
||||
transition: DECELERATE 0.2; \
|
||||
} \
|
||||
program { \
|
||||
name: partname"click_emit"; \
|
||||
signal: "mouse,clicked,1"; \
|
||||
source: partname"*"; \
|
||||
action: SIGNAL_EMIT partname",clicked" partname; \
|
||||
} \
|
||||
program { \
|
||||
name: partname"focus_out"; \
|
||||
signal: "ecdb,focus,out,"partname; \
|
||||
action: STATE_SET "default" 0.0; \
|
||||
source: "ecdb"; \
|
||||
target: partname"focus_clip"; \
|
||||
transition: DECELERATE 0.5; \
|
||||
} \
|
||||
program { \
|
||||
name: partname"disable"; \
|
||||
signal: "ecdb,disable,"partname; \
|
||||
action: STATE_SET "disabled" 0.0; \
|
||||
source: "ecdb"; \
|
||||
target: partname"button"; \
|
||||
} \
|
||||
program { \
|
||||
name: partname"enable"; \
|
||||
signal: "ecdb,enable,"partname; \
|
||||
action: STATE_SET "default" 0.0; \
|
||||
source: "ecdb"; \
|
||||
target: partname"button"; \
|
||||
}
|
||||
|
||||
#define BUTTON(partname, partnametext, minx, miny, maxx, maxy, rel1xto, rel1yto, rel1x, rel1y, rel2xto, rel2yto, rel2x, rel2y, offset1x, offset1y, offset2x, offset2y, alignx, aligny) \
|
||||
part { \
|
||||
name: partname; \
|
||||
type: IMAGE; \
|
||||
mouse_events: 1; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
min: minx miny; \
|
||||
max: maxx maxy; \
|
||||
color: 255 255 255 178; \
|
||||
align: alignx aligny; \
|
||||
rel1 { \
|
||||
to_x: rel1xto; \
|
||||
to_y: rel1yto; \
|
||||
relative: rel1x rel1y; \
|
||||
offset: offset1x offset1y; \
|
||||
} \
|
||||
rel2 { \
|
||||
to_x: rel2xto; \
|
||||
to_y: rel2yto; \
|
||||
relative: rel2x rel2y; \
|
||||
offset: offset2x offset2y; \
|
||||
} \
|
||||
image { \
|
||||
normal: "button_base.png"; \
|
||||
border: 7 7 7 7; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"button_clip"; \
|
||||
type: RECT; \
|
||||
mouse_events: 1; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
color: 255 255 255 255; \
|
||||
rel1 { \
|
||||
to: partname; \
|
||||
relative: 0.0 0.0; \
|
||||
offset: 3 1; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname; \
|
||||
relative: 1.0 1.0; \
|
||||
offset: -4 -2; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"focus_clip"; \
|
||||
type: RECT; \
|
||||
mouse_events: 1; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
color: 255 255 255 0; \
|
||||
rel1 { \
|
||||
to: partname"button"; \
|
||||
offset: -1 0; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname"button"; \
|
||||
offset: 0 -1; \
|
||||
} \
|
||||
} \
|
||||
description { \
|
||||
state: "visible" 0.0; \
|
||||
inherit: "default" 0.0; \
|
||||
color: 255 255 255 255; \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"focus"; \
|
||||
type: IMAGE; \
|
||||
mouse_events: 1; \
|
||||
clip_to: partname"focus_clip"; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
rel1 { \
|
||||
to: partname"focus_clip"; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname"focus_clip"; \
|
||||
} \
|
||||
image { \
|
||||
normal: "focus.png"; \
|
||||
border: 7 7 7 7; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"button"; \
|
||||
type: IMAGE; \
|
||||
mouse_events: 1; \
|
||||
clip_to: partname"button_clip"; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
min: 0 24; \
|
||||
rel1 { \
|
||||
to: partname"button_clip"; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname"button_clip"; \
|
||||
} \
|
||||
image { \
|
||||
normal: "button.png"; \
|
||||
border: 7 7 7 7; \
|
||||
} \
|
||||
} \
|
||||
description { \
|
||||
state: "disabled" 0.0; \
|
||||
inherit: "default" 0.0; \
|
||||
image { \
|
||||
normal: "button_disabled.png"; \
|
||||
border: 11 11 10 10; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"shadow"; \
|
||||
type: IMAGE; \
|
||||
mouse_events: 1; \
|
||||
clip_to: partname"button_clip"; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
min: 0 24; \
|
||||
color: 255 255 255 0; \
|
||||
rel1 { \
|
||||
to: partname"button_clip"; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname"button_clip"; \
|
||||
} \
|
||||
image { \
|
||||
normal: "button_shadow.png"; \
|
||||
border: 6 6 0 6; \
|
||||
} \
|
||||
} \
|
||||
description { \
|
||||
state: "clicked" 0.0; \
|
||||
inherit: "default" 0.0; \
|
||||
color: 255 255 255 255; \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"shadow_overlay"; \
|
||||
type: IMAGE; \
|
||||
mouse_events: 1; \
|
||||
clip_to: partname"button_clip"; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
min: 0 24; \
|
||||
color: 255 255 255 0; \
|
||||
rel1 { \
|
||||
to: partname"button_clip"; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname"button_clip"; \
|
||||
} \
|
||||
image { \
|
||||
normal: "button_shadow_overlay.png"; \
|
||||
border: 6 6 6 13; \
|
||||
} \
|
||||
} \
|
||||
description { \
|
||||
state: "clicked" 0.0; \
|
||||
inherit: "default" 0.0; \
|
||||
color: 255 255 255 255; \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partnametext; \
|
||||
type: TEXT; \
|
||||
mouse_events: 1; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
align: 0.0 0.5; \
|
||||
color: 60 60 60 255; \
|
||||
fixed: 1 1; \
|
||||
rel1 { \
|
||||
to: partname; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname; \
|
||||
} \
|
||||
text { \
|
||||
text: ""; \
|
||||
font: "ecdb/default"; \
|
||||
min: 1 1; \
|
||||
size: 11; \
|
||||
align: 0.5 0.5; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
262
experimental/ecdb/trunk/data/themes/default/macros/check.edc
Normal file
262
experimental/ecdb/trunk/data/themes/default/macros/check.edc
Normal file
@ -0,0 +1,262 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#define CHECK(partname, labeltext, minx, miny, maxx, maxy, rel1xto, rel1yto, rel1x, rel1y, rel2xto, rel2yto, rel2x, rel2y, offset1x, offset1y, offset2x, offset2y, alignx, aligny) \
|
||||
part { \
|
||||
name: partname"base"; \
|
||||
type: RECT; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
min: minx miny; \
|
||||
max: maxx maxy; \
|
||||
align: alignx aligny; \
|
||||
color: 0 0 0 0; \
|
||||
rel1 { \
|
||||
to_x: rel1xto; \
|
||||
to_y: rel1yto; \
|
||||
relative: rel1x rel1y; \
|
||||
offset: offset1x offset1y; \
|
||||
} \
|
||||
rel2 { \
|
||||
to_x: rel2xto; \
|
||||
to_y: rel2yto; \
|
||||
relative: rel2x rel2y; \
|
||||
offset: offset2x offset2y; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"check_base"; \
|
||||
type: IMAGE; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
min: 20 18; \
|
||||
max: 20 18; \
|
||||
fixed: 1 1; \
|
||||
align: 0.0 0.5; \
|
||||
rel1 { \
|
||||
to: partname"base"; \
|
||||
relative: 0.0 0.0; \
|
||||
offset: 2 2; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname"base"; \
|
||||
relative: 0.0 1.0; \
|
||||
offset: -1 -3; \
|
||||
} \
|
||||
image { \
|
||||
normal: "check_base.png"; \
|
||||
} \
|
||||
} \
|
||||
description { \
|
||||
state: "disabled" 0.0; \
|
||||
inherit: "default" 0.0; \
|
||||
color: 255 255 255 128; \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname"check_shadow"; \
|
||||
type: IMAGE; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
color: 255 255 255 128; \
|
||||
image.normal: "check_shadow.png"; \
|
||||
rel1 { \
|
||||
to: partname; \
|
||||
relative: 0.0 0.0; \
|
||||
offset: 0 1; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname; \
|
||||
relative: 1.0 1.0; \
|
||||
offset: -1 -1; \
|
||||
} \
|
||||
} \
|
||||
description { \
|
||||
state: "focused" 0.0; \
|
||||
inherit: "default" 0.0; \
|
||||
color: 255 255 255 255; \
|
||||
image.normal: "check_focus.png"; \
|
||||
rel1 { \
|
||||
to: partname; \
|
||||
relative: 0.0 0.0; \
|
||||
offset: 0 0; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname; \
|
||||
relative: 1.0 1.0; \
|
||||
offset: -1 -1; \
|
||||
} \
|
||||
} \
|
||||
description { \
|
||||
state: "disabled" 0.0; \
|
||||
inherit: "default" 0.0; \
|
||||
color: 255 255 255 0; \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: partname; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
min: 20 18; \
|
||||
max: 20 18; \
|
||||
fixed: 1 1; \
|
||||
align: 0.0 0.5; \
|
||||
rel1 { \
|
||||
to: partname"base"; \
|
||||
relative: 0.0 0.0; \
|
||||
offset: 2 2; \
|
||||
} \
|
||||
rel2 { \
|
||||
to: partname"base"; \
|
||||
relative: 0.0 1.0; \
|
||||
offset: 2 -3; \
|
||||
} \
|
||||
image { \
|
||||
normal: "check0.png"; \
|
||||
} \
|
||||
} \
|
||||
description { \
|
||||
state: "on" 0.0; \
|
||||
inherit: "default" 0.0; \
|
||||
image { \
|
||||
normal: "check2.png"; \
|
||||
} \
|
||||
} \
|
||||
description { \
|
||||
state: "disabled_unsel" 0.0; \
|
||||
inherit: "default" 0.0; \
|
||||
color: 255 255 255 128; \
|
||||
} \
|
||||
description { \
|
||||
state: "disabled_sel" 0.0; \
|
||||
inherit: "default" 0.0; \
|
||||
image { \
|
||||
normal: "check2.png"; \
|
||||
} \
|
||||
color: 255 255 255 128; \
|
||||
} \
|
||||
} \
|
||||
part { \
|
||||
name: labeltext; \
|
||||
type: TEXT; \
|
||||
scale: 1; \
|
||||
description { \
|
||||
state: "default" 0.0; \
|
||||
color: 60 60 60 255; \
|
||||
fixed: 1 1; \
|
||||
rel1 { \
|
||||
to: partname; \
|
||||
offset: 25 0; \
|
||||
} \
|
||||
rel2 { \
|
||||
relative: 1.0 1.0; \
|
||||
to_y: partname; \
|
||||
offset: -1 0; \
|
||||
} \
|
||||
text { \
|
||||
text: ""; \
|
||||
font: "ecdb/default"; \
|
||||
min: 1 1; \
|
||||
size: 11; \
|
||||
align: 0.0 0.5; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define CHECK_PROGS(partname) \
|
||||
program { \
|
||||
name: partname"focus_in"; \
|
||||
signal: "ecdb,focus,in,"partname; \
|
||||
signal: "mouse,down,1"; \
|
||||
action: STATE_SET "focused" 0.0; \
|
||||
source: "*"; \
|
||||
target: partname"check_shadow"; \
|
||||
} \
|
||||
program { \
|
||||
name: partname"focus_out"; \
|
||||
signal: "ecdb,focus,out,"partname; \
|
||||
action: STATE_SET "default" 0.0; \
|
||||
source: "ecdb"; \
|
||||
target: partname"check_shadow"; \
|
||||
} \
|
||||
program { \
|
||||
name: partname"clicked"; \
|
||||
signal: "mouse,clicked,1"; \
|
||||
source: partname"*"; \
|
||||
script { \
|
||||
new str[50]; \
|
||||
new Float:val; \
|
||||
get_state(PART:partname, str, 50, val); \
|
||||
if (!strcmp(str, "on")) \
|
||||
{ \
|
||||
emit(partname",toggle,off", partname); \
|
||||
set_state(PART:partname, "default", 0.0); \
|
||||
} \
|
||||
else if (!strcmp(str, "default")) \
|
||||
{ \
|
||||
emit(partname",toggle,on", partname); \
|
||||
set_state(PART:partname, "on", 0.0); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
program { \
|
||||
name: partname"disabled"; \
|
||||
signal: "ecdb,disable,"partname; \
|
||||
source: "ecdb"; \
|
||||
action: STATE_SET "disabled" 0.0; \
|
||||
target: partname"check_base"; \
|
||||
target: partname"check_shadow"; \
|
||||
} \
|
||||
program { \
|
||||
name: partname"disabled_check"; \
|
||||
signal: "ecdb,disable,"partname; \
|
||||
source: "ecdb"; \
|
||||
script { \
|
||||
new str[50]; \
|
||||
new Float:val; \
|
||||
get_state(PART:partname, str, 50, val); \
|
||||
if (!strcmp(str, "on")) \
|
||||
set_state(PART:partname, "disabled_sel", 0.0); \
|
||||
else if (!strcmp(str, "default")) \
|
||||
set_state(PART:partname, "disabled_unsel", 0.0); \
|
||||
} \
|
||||
} \
|
||||
program { \
|
||||
name: partname"enabled"; \
|
||||
signal: "ecdb,enable,"partname; \
|
||||
source: "ecdb"; \
|
||||
action: STATE_SET "default" 0.0; \
|
||||
target: partname"check_base"; \
|
||||
target: partname"check_shadow"; \
|
||||
} \
|
||||
program { \
|
||||
name: partname"enabled_check"; \
|
||||
signal: "ecdb,enable,"partname; \
|
||||
source: "ecdb"; \
|
||||
script { \
|
||||
new str[50]; \
|
||||
new Float:val; \
|
||||
get_state(PART:partname, str, 50, val); \
|
||||
if (!strcmp(str, "disabled_sel")) \
|
||||
set_state(PART:partname, "on", 0.0); \
|
||||
else if (!strcmp(str, "disabled_unsel")) \
|
||||
set_state(PART:partname, "default", 0.0); \
|
||||
} \
|
||||
} \
|
||||
program { \
|
||||
name: partname"check_off"; \
|
||||
signal: "ecdb,check,off,"partname; \
|
||||
source: "ecdb"; \
|
||||
action: STATE_SET "default" 0.0; \
|
||||
target: partname; \
|
||||
} \
|
||||
program { \
|
||||
name: partname"check_on"; \
|
||||
signal: "ecdb,check,on,"partname; \
|
||||
source: "ecdb"; \
|
||||
action: STATE_SET "on" 0.0; \
|
||||
target: partname; \
|
||||
}
|
@ -1,39 +1,39 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#include "ecdb.h"
|
||||
|
||||
static void _button_cb_return(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _button_cb_begin(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _button_cb_return(void *data, Evas_Object *o, const char *emission,
|
||||
const char *source);
|
||||
static void _button_cb_begin(void *data, Evas_Object *o, const char *emission,
|
||||
const char *source);
|
||||
|
||||
static void
|
||||
_button_cb_return(void *data, Evas_Object *obj, void *event_info)
|
||||
_button_cb_return(void *data __UNUSED__, Evas_Object *o,
|
||||
const char *emission __UNUSED__,
|
||||
const char *source __UNUSED__)
|
||||
{
|
||||
Evas_Object *swallow;
|
||||
char *signal;
|
||||
|
||||
swallow = evas_object_name_find(ecore_evas_get(em->main_win_ee),
|
||||
"erase_page");
|
||||
|
||||
edje_object_part_text_set(swallow, "progress_text", "Begin Erase");
|
||||
edje_object_part_text_set(swallow, "progress_percent", "0%");
|
||||
signal = evas_object_data_get(swallow, "hide_signal");
|
||||
edje_object_signal_emit(swallow, signal, "ecdb");
|
||||
edje_object_part_text_set(o, "progress_text", "Begin Erase");
|
||||
edje_object_part_text_set(o, "progress_percent", "0%");
|
||||
signal = evas_object_data_get(o, "hide_signal");
|
||||
edje_object_signal_emit(o, signal, "ecdb");
|
||||
ecdb_welcome_page_show();
|
||||
}
|
||||
|
||||
static void
|
||||
_button_cb_begin(void *data, Evas_Object *obj, void *event_info)
|
||||
_button_cb_begin(void *data __UNUSED__, Evas_Object *obj,
|
||||
const char *emission __UNUSED__,
|
||||
const char *source __UNUSED__)
|
||||
{
|
||||
Evas_Object *swallow, *o;
|
||||
Evas_Object *o;
|
||||
Ecdb_Erase_Project *proj;
|
||||
char buf[1024];
|
||||
const char *state;
|
||||
int drive;
|
||||
|
||||
swallow = evas_object_name_find(ecore_evas_get(em->main_win_ee),
|
||||
"erase_page");
|
||||
|
||||
proj = ecdb_erase_project_new();
|
||||
snprintf(buf, sizeof(buf), "Commencing...");
|
||||
edje_object_part_text_set(swallow, "progress_text", buf);
|
||||
edje_object_part_text_set(obj, "progress_text", buf);
|
||||
|
||||
o = evas_object_name_find(evas_object_evas_get(obj), "ecdb/erase/drive");
|
||||
drive = ecdb_combo_selected_get(o);
|
||||
@ -41,7 +41,7 @@ _button_cb_begin(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
printf("Choose a drive!\n");
|
||||
ecdb_erase_project_destroy(proj);
|
||||
edje_object_part_text_set(swallow, "progress_text", "Choose a Drive!");
|
||||
edje_object_part_text_set(obj, "progress_text", "Choose a Drive!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -49,30 +49,28 @@ _button_cb_begin(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
printf("Couldn't grab drive!\n");
|
||||
ecdb_erase_project_destroy(proj);
|
||||
edje_object_part_text_set(swallow, "progress_text",
|
||||
edje_object_part_text_set(obj, "progress_text",
|
||||
"Couldn't grab the drive!");
|
||||
return;
|
||||
}
|
||||
|
||||
o = evas_object_name_find(evas_object_evas_get(obj), "ecdb/erase/speed");
|
||||
proj->quick = ecdb_check_checked_get(o);
|
||||
state = edje_object_part_state_get(obj, "ecdb/erase/speed/check", NULL);
|
||||
proj->quick = !strcmp(state, "active");
|
||||
printf("Quick erase: %d (%s)\n", proj->quick, state);
|
||||
if (!ecdb_erase_disc(proj))
|
||||
{
|
||||
Ecdb_Project *p = ECDB_PROJECT(proj);
|
||||
|
||||
printf("Disc not erasable!\n");
|
||||
snprintf(buf, sizeof(buf), "Disc not erasable!");
|
||||
edje_object_part_text_set(swallow, "progress_text", buf);
|
||||
edje_object_part_text_set(obj, "progress_text", buf);
|
||||
burn_drive_release(p->drive->tangible[0].drive, 0);
|
||||
burn_drive_info_free(p->drive->tangible);
|
||||
ecdb_erase_project_destroy(proj);
|
||||
return;
|
||||
}
|
||||
|
||||
edje_object_signal_emit(swallow, "ecdb,erase,start", "ecdb");
|
||||
const char *ids[] = {"ecdb/erase/return", "ecdb/erase/begin",
|
||||
"ecdb/erase/speed", "ecdb/erase/drive"};
|
||||
ecdb_gui_controls_disable(ids, 4);
|
||||
edje_object_signal_emit(obj, "ecdb,erase,start", "ecdb");
|
||||
}
|
||||
|
||||
void
|
||||
@ -107,22 +105,20 @@ ecdb_erase_page_show(void)
|
||||
edje_object_signal_callback_add(swallow, "hide,finished", "erase_page",
|
||||
ecdb_page_hide_finished, NULL);
|
||||
|
||||
b = ecdb_button_add(swallow, "ecdb/erase/return");
|
||||
ecdb_button_label_set(b, "Return to Main Page");
|
||||
evas_object_smart_callback_add(b, "clicked", _button_cb_return, NULL);
|
||||
evas_object_show(b);
|
||||
ecdb_button_icon_set(b, "ecdb/erase/return");
|
||||
/* Set text and ready callback for clicked */
|
||||
edje_object_part_text_set(swallow, "ecdb/erase/return/text",
|
||||
"Return to Main Page");
|
||||
edje_object_signal_callback_add(swallow, "ecdb/erase/return,clicked",
|
||||
"*", _button_cb_return, NULL);
|
||||
|
||||
b = ecdb_button_add(swallow, "ecdb/erase/begin");
|
||||
ecdb_button_label_set(b, "Start Erase");
|
||||
evas_object_smart_callback_add(b, "clicked", _button_cb_begin, NULL);
|
||||
evas_object_show(b);
|
||||
ecdb_button_icon_set(b, "ecdb/erase/begin");
|
||||
|
||||
b = ecdb_check_add(swallow, "ecdb/erase/speed");
|
||||
ecdb_check_label_set(b, "Quick Erase");
|
||||
evas_object_show(b);
|
||||
edje_object_part_text_set(swallow, "ecdb/erase/begin/text",
|
||||
"Start Erase");
|
||||
edje_object_signal_callback_add(swallow, "ecdb/erase/begin,clicked",
|
||||
"*", _button_cb_begin, NULL);
|
||||
|
||||
edje_object_part_text_set(swallow, "ecdb/erase/speed/text",
|
||||
"Quick Erase");
|
||||
b = ecdb_combo_add(swallow, "ecdb/erase/drive");
|
||||
ecdb_combo_header_set(b, "Drive");
|
||||
ecdb_combo_header_create_set(b, ecdb_gui_combo_header_from_drive);
|
||||
|
Loading…
Reference in New Issue
Block a user