Improve popup theme a bit, add ecdb_combo_clear function.

This commit is contained in:
Jaime Thomas 2008-12-21 19:42:30 +00:00
parent a2f739d228
commit 18dffd7af5
4 changed files with 19 additions and 41 deletions

View File

@ -3,7 +3,7 @@
-> ffmpeg as an alternative backend to gstreamer -> ffmpeg as an alternative backend to gstreamer
-> finish interface -> finish interface
-> more flexible typebuf -> more flexible typebuf
-> more configuration options (speed and drive choice) -> more configuration options (speed and drive choice done)
-> fix combo theme -> fix combo theme
-> vlagrind errors in evas_box-- -> move callbacks to buttons instead of swallow (done except for welcome page)
-> move callbacks to buttons instead of swallow -> send combo popup children the focus out signal

View File

@ -381,15 +381,12 @@ group {
parts { parts {
part { part {
name: "base"; name: "ecdb.box";
type: IMAGE; type: BOX;
description { description {
state: "default" 0.0; state: "default" 0.0;
min: 1 1;
max: 1 1;
color: 255 255 255 0; color: 255 255 255 0;
visible: 1;
rel1 { rel1 {
relative: 0.0 0.0; relative: 0.0 0.0;
@ -401,38 +398,9 @@ group {
offset: -1 -1; offset: -1 -1;
} }
image {
normal: "background.png";
}
}
description {
state: "active" 0.0;
inherit: "default" 0.0;
color: 255 255 255 200;
max: 9999 9999;
}
}
part {
name: "ecdb.box";
type: BOX;
description {
state: "default" 0.0;
color: 255 255 255 0;
rel1 {
to: "base";
}
rel2 {
to: "base";
}
box { box {
layout: "vertical"; layout: "vertical";
padding: 1 1; padding: 0 2;
align: 0.0 0.5; align: 0.0 0.5;
} }
} }
@ -451,7 +419,6 @@ group {
signal: "ecdb,combo,popup,show,*"; signal: "ecdb,combo,popup,show,*";
source: "ecdb"; source: "ecdb";
action: STATE_SET "active" 0.0; action: STATE_SET "active" 0.0;
target: "base";
target: "ecdb.box"; target: "ecdb.box";
transition: DECELERATE 0.2; transition: DECELERATE 0.2;
} }
@ -461,7 +428,6 @@ group {
signal: "ecdb,combo,popup,hide,*"; signal: "ecdb,combo,popup,hide,*";
source: "ecdb"; source: "ecdb";
action: STATE_SET "default" 0.0; action: STATE_SET "default" 0.0;
target: "base";
target: "ecdb.box"; target: "ecdb.box";
transition: DECELERATE 0.2; transition: DECELERATE 0.2;
} }

View File

@ -14,7 +14,7 @@ _widget_focus_handle(void *data, Evas_Object *o, const char *emission,
if (!name) if (!name)
return; return;
if ((old_source) && (strcmp(old_source, source))) if ((old_source) && (strcmp(old_source, name)))
{ {
eo = evas_object_name_find(ecore_evas_get(em->main_win_ee), old_source); eo = evas_object_name_find(ecore_evas_get(em->main_win_ee), old_source);
edje_object_signal_emit(eo, "ecdb,focus,out", "ecdb"); edje_object_signal_emit(eo, "ecdb,focus,out", "ecdb");
@ -710,6 +710,17 @@ ecdb_combo_data_set(Evas_Object *c, void *data)
cd->data = data; cd->data = data;
} }
void
ecdb_combo_clear(Evas_Object *c)
{
Combo_Data *cd;
cd = evas_object_data_get(c, "cd");
edje_object_part_box_remove_all(cd->popup, "ecdb.box", 1);
cd->selected = 1;
cd->count = 0;
}
/******************************* Label ***************************************/ /******************************* Label ***************************************/
Evas_Object * Evas_Object *

View File

@ -36,6 +36,7 @@ void ecdb_combo_header_create_set(Evas_Object *c, Evas_Object *
int idx)); int idx));
int ecdb_combo_selected_get(Evas_Object *c); int ecdb_combo_selected_get(Evas_Object *c);
void ecdb_combo_data_set(Evas_Object *c, void *data); void ecdb_combo_data_set(Evas_Object *c, void *data);
void ecdb_combo_clear(Evas_Object *c);
Evas_Object *ecdb_label_add(Evas_Object *parent, const char *name); Evas_Object *ecdb_label_add(Evas_Object *parent, const char *name);
void ecdb_label_text_set(Evas_Object *l, const char *text); void ecdb_label_text_set(Evas_Object *l, const char *text);