Button and check can now be disabled.
This commit is contained in:
parent
e863acb6b5
commit
7aa56383a4
@ -126,6 +126,16 @@ group {
|
||||
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 {
|
||||
@ -305,6 +315,22 @@ group {
|
||||
target: "focus_clip";
|
||||
transition: DECELERATE 0.5;
|
||||
}
|
||||
|
||||
program {
|
||||
name: "disable";
|
||||
signal: "ecdb,disable";
|
||||
action: STATE_SET "disabled" 0.0;
|
||||
source: "ecdb";
|
||||
target: "button";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "enable";
|
||||
signal: "ecdb,enable";
|
||||
action: STATE_SET "default" 0.0;
|
||||
source: "ecdb";
|
||||
target: "button";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,10 +137,16 @@ group {
|
||||
}
|
||||
|
||||
description {
|
||||
state: "disabled" 0.0;
|
||||
state: "disabled_unsel" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 255 255 255 128;
|
||||
}
|
||||
|
||||
description {
|
||||
state: "disabled_sel" 0.0;
|
||||
inherit: "active" 0.0;
|
||||
color: 255 255 255 128;
|
||||
}
|
||||
}
|
||||
|
||||
part {
|
||||
@ -201,5 +207,51 @@ group {
|
||||
toggle_state();
|
||||
}
|
||||
}
|
||||
|
||||
program {
|
||||
name: "disabled";
|
||||
signal: "ecdb,disable";
|
||||
source: "ecdb";
|
||||
action: STATE_SET "disabled" 0.0;
|
||||
target: "check_base";
|
||||
target: "check_shadow";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "disabled_check";
|
||||
signal: "ecdb,disable";
|
||||
source: "ecdb";
|
||||
|
||||
script {
|
||||
if (get_int(s) == 1)
|
||||
set_state(PART:"check", "disabled_sel",
|
||||
0.0);
|
||||
else
|
||||
set_state(PART:"check",
|
||||
"disabled_unsel", 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
program {
|
||||
name: "enabled";
|
||||
signal: "ecdb,enable";
|
||||
source: "ecdb";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "check_base";
|
||||
target: "check_shadow";
|
||||
}
|
||||
|
||||
program {
|
||||
name: "enabled_check";
|
||||
signal: "ecdb,enable";
|
||||
source: "ecdb";
|
||||
|
||||
script {
|
||||
if (get_int(s) == 1)
|
||||
set_state(PART:"check", "active", 0.0);
|
||||
else
|
||||
set_state(PART:"check", "default", 0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ group {
|
||||
description {
|
||||
state: "visible" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 255 255 255 160;
|
||||
color: 255 255 255 0;
|
||||
visible: 1;
|
||||
}
|
||||
}
|
||||
|
BIN
ecdb/trunk/data/themes/default/images/button_disabled.png
Normal file
BIN
ecdb/trunk/data/themes/default/images/button_disabled.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 817 B |
@ -17,4 +17,5 @@ images {
|
||||
image: "check_base.png" COMP;
|
||||
image: "check_focus.png" COMP;
|
||||
image: "check_shadow.png" COMP;
|
||||
image: "button_disabled.png" COMP;
|
||||
}
|
||||
|
@ -9,6 +9,8 @@ static void ecdb_cb_erase_page_buttons_clicked(void *data, Evas_Object *o,
|
||||
const char *emission, const char *source);
|
||||
static void ecdb_cb_page_hide_finished(void *data, Evas_Object *o,
|
||||
const char *emission, const char *source);
|
||||
static void ecdb_gui_controls_disable(const char **ids, int n);
|
||||
static void ecdb_gui_controls_enable(const char **ids, int n);
|
||||
static void ecdb_filelist_show(void);
|
||||
static void ecdb_welcome_page_show(void);
|
||||
static void ecdb_erase_page_show(void);
|
||||
@ -387,13 +389,13 @@ ecdb_cb_erase_page_buttons_clicked(void *data, Evas_Object *o,
|
||||
|
||||
proj->quick = speed;
|
||||
|
||||
/* I need to find a better way to do this...
|
||||
* Its pretty easy, but a lot more theming work
|
||||
*/
|
||||
edje_object_signal_emit(swallow, "ecdb,erase,start", "ecdb");
|
||||
const char *ids[] = {"ecdb/erase/return", "ecdb/erase/begin",
|
||||
"ecdb/erase/speed"};
|
||||
ecdb_gui_controls_disable(ids, 3);
|
||||
|
||||
/* 1) Disable buttons...
|
||||
* 2) Start erase
|
||||
|
||||
/* 2) Start erase
|
||||
* 3) Grab a drive
|
||||
* 4) Start burn
|
||||
* 5) Set up progress callback
|
||||
@ -640,3 +642,31 @@ ecdb_cb_page_hide_finished(void *data, Evas_Object *o, const char *emission,
|
||||
ecdb_page_hide(source);
|
||||
}
|
||||
|
||||
static void
|
||||
ecdb_gui_controls_disable(const char **ids, int n)
|
||||
{
|
||||
Evas_Object *obj;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
obj = evas_object_name_find(ecore_evas_get(em->main_win_ee),
|
||||
ids[i]);
|
||||
edje_object_signal_emit(obj, "ecdb,disable", "ecdb");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
ecdb_gui_controls_enable(const char **ids, int n)
|
||||
{
|
||||
Evas_Object *obj;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
obj = evas_object_name_find(ecore_evas_get(em->main_win_ee),
|
||||
ids[i]);
|
||||
edje_object_signal_emit(obj, "ecdb,enable", "ecdb");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user