From 15f8b5101ddfd6bb182faac1e665ee9b233ded99 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Mon, 11 Oct 2010 15:10:34 +0000 Subject: [PATCH] show group name when it is auto-discovered as well. SVN revision: 53264 --- legacy/edje/src/bin/edje_player.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/legacy/edje/src/bin/edje_player.c b/legacy/edje/src/bin/edje_player.c index 70cec65859..8008122a86 100644 --- a/legacy/edje/src/bin/edje_player.c +++ b/legacy/edje/src/bin/edje_player.c @@ -36,6 +36,16 @@ struct opts { char *title; }; +static Ecore_Evas *win; + +static void +_win_title_set(const char *group, const char *file) +{ + char buf[1024]; + snprintf(buf, sizeof(buf), "Edje_Player - %s of %s", group, file); + ecore_evas_title_set(win, buf); +} + static char * _slave_mode_tok(char **p_arg) { @@ -463,6 +473,7 @@ _create_edje(Evas *evas, const struct opts *opts) evas_object_del(edje); return NULL; } + if (!opts->title) _win_title_set(opts->group, opts->file); } else { @@ -473,6 +484,7 @@ _create_edje(Evas *evas, const struct opts *opts) evas_object_del(edje); return NULL; } + if (!opts->title) _win_title_set("main", opts->file); } else { @@ -492,6 +504,7 @@ _create_edje(Evas *evas, const struct opts *opts) evas_object_del(edje); return NULL; } + if (!opts->title) _win_title_set(group, opts->file); edje_file_collection_list_free(groups); } } @@ -578,7 +591,6 @@ const Ecore_Getopt optdesc = { int main(int argc, char **argv) { - Ecore_Evas *win; Evas *evas; Evas_Object *stack, *edje; struct opts opts; @@ -716,13 +728,6 @@ int main(int argc, char **argv) ecore_evas_sticky_set(win, opts.sticky); if (opts.title) ecore_evas_title_set(win, opts.title); - else - { - char buf[1024]; - snprintf(buf, sizeof(buf), "Edje_Player - %s of %s", - opts.group, opts.file); - ecore_evas_title_set(win, buf); - } if (opts.size.w <= 0) opts.size.w = 320; if (opts.size.h <= 0) opts.size.h = 240;