enventor - more clean code.
This commit is contained in:
parent
b3ba86b30b
commit
097e7b9b0a
|
@ -139,6 +139,13 @@ group { name: "statusbar_layout";
|
||||||
action: STATE_SET "show" 0.0;
|
action: STATE_SET "show" 0.0;
|
||||||
target: "elm.text.info_msg";
|
target: "elm.text.info_msg";
|
||||||
transition: DECELERATE 0.3;
|
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";
|
program { name: "info_msg_hide";
|
||||||
signal: "elm,action,info_msg,hide";
|
signal: "elm,action,info_msg,hide";
|
||||||
|
|
|
@ -217,7 +217,7 @@ group { name: "fileselector_layout";
|
||||||
program { name: "msg_idle";
|
program { name: "msg_idle";
|
||||||
action: STATE_SET "show" 0.0;
|
action: STATE_SET "show" 0.0;
|
||||||
target: "elm.text.msg";
|
target: "elm.text.msg";
|
||||||
transition: DECELERATE 1;
|
transition: LINEAR 1;
|
||||||
after: "msg_hide";
|
after: "msg_hide";
|
||||||
}
|
}
|
||||||
program { name: "msg_hide";
|
program { name: "msg_hide";
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
struct statusbar_s
|
struct statusbar_s
|
||||||
{
|
{
|
||||||
Evas_Object *layout;
|
Evas_Object *layout;
|
||||||
Ecore_Timer *info_msg_timer;
|
|
||||||
|
|
||||||
option_data *od;
|
option_data *od;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -58,22 +56,9 @@ void
|
||||||
stats_term(stats_data *sd)
|
stats_term(stats_data *sd)
|
||||||
{
|
{
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
|
|
||||||
if (sd->info_msg_timer) ecore_timer_del(sd->info_msg_timer);
|
|
||||||
free(sd);
|
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
|
void
|
||||||
stats_info_msg_update(stats_data *sd, const char *msg)
|
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_part_text_set(sd->layout, "elm.text.info_msg", msg);
|
||||||
elm_object_signal_emit(sd->layout, "elm,action,info_msg,show", "");
|
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
|
void
|
||||||
|
|
Loading…
Reference in New Issue