enventor - more clean code.

This commit is contained in:
ChunEon Park 2013-07-30 01:21:52 +09:00
parent b3ba86b30b
commit 097e7b9b0a
3 changed files with 8 additions and 18 deletions

View File

@ -139,6 +139,13 @@ group { name: "statusbar_layout";
action: STATE_SET "show" 0.0;
target: "elm.text.info_msg";
transition: DECELERATE 0.3;
after: "info_msg_idle";
}
program { name: "info_msg_idle";
action: STATE_SET "show" 0.0;
target: "elm.text.info_msg";
transition: LINEAR 2;
after: "info_msg_hide";
}
program { name: "info_msg_hide";
signal: "elm,action,info_msg,hide";

View File

@ -217,7 +217,7 @@ group { name: "fileselector_layout";
program { name: "msg_idle";
action: STATE_SET "show" 0.0;
target: "elm.text.msg";
transition: DECELERATE 1;
transition: LINEAR 1;
after: "msg_hide";
}
program { name: "msg_hide";

View File

@ -4,8 +4,6 @@
struct statusbar_s
{
Evas_Object *layout;
Ecore_Timer *info_msg_timer;
option_data *od;
};
@ -58,22 +56,9 @@ void
stats_term(stats_data *sd)
{
if (!sd) return;
if (sd->info_msg_timer) ecore_timer_del(sd->info_msg_timer);
free(sd);
}
static Eina_Bool
info_msg_timer_cb(void *data)
{
//Hide the save message
stats_data *sd = data;
if (!option_stats_bar_get(sd->od)) return ECORE_CALLBACK_CANCEL;
elm_object_signal_emit(sd->layout, "elm,action,info_msg,hide", "");
sd->info_msg_timer = NULL;
return ECORE_CALLBACK_CANCEL;
}
void
stats_info_msg_update(stats_data *sd, const char *msg)
{
@ -81,8 +66,6 @@ stats_info_msg_update(stats_data *sd, const char *msg)
elm_object_part_text_set(sd->layout, "elm.text.info_msg", msg);
elm_object_signal_emit(sd->layout, "elm,action,info_msg,show", "");
if (sd->info_msg_timer) ecore_timer_del(sd->info_msg_timer);
sd->info_msg_timer = ecore_timer_add(2, info_msg_timer_cb, sd);
}
void