Show application icons whilst we startup

SVN revision: 13226
devs/princeamd/enlightenment-0.17-elive
handyande 18 years ago committed by handyande
parent 08bc10fae2
commit e22ea92c98
  1. 53
      src/bin/e_init.c
  2. 2
      src/bin/e_init.h
  3. 1
      src/bin/e_startup.c

@ -3,12 +3,19 @@
*/
#include "e.h"
EAPI void _e_init_icons_del(void);
/* local subsystem globals */
static Ecore_X_Window _e_init_win = 0;
static Ecore_Evas *_e_init_ecore_evas = NULL;
static Evas *_e_init_evas = NULL;
static Evas_Object *_e_init_object = NULL;
/* startup icons */
static Evas_Coord _e_init_icon_x, _e_init_icon_y;
static int _e_init_icon_size, _e_init_icon_wrap;
static Evas_List *_e_init_icon_list;
/* externally accessible functions */
int
e_init_init(void)
@ -43,6 +50,11 @@ e_init_init(void)
ecore_evas_raise(_e_init_ecore_evas);
ecore_evas_show(_e_init_ecore_evas);
_e_init_icon_size = 64;
_e_init_icon_wrap = w;
_e_init_icon_x = 0;
_e_init_icon_y = h - _e_init_icon_size;
n = ecore_x_xinerama_screen_count_get();
if (n == 0)
{
@ -123,6 +135,8 @@ e_init_hide(void)
_e_init_evas = NULL;
_e_init_win = 0;
_e_init_object = NULL;
_e_init_icons_del();
}
void
@ -151,3 +165,42 @@ e_init_window_get(void)
{
return _e_init_win;
}
/* code for displaying startup icons */
void
e_init_icons_app_add(E_App *app)
{
Evas_Object *o;
E_OBJECT_CHECK(app);
E_OBJECT_TYPE_CHECK(app, E_APP_TYPE);
o = edje_object_add(_e_init_evas);
edje_object_file_set(o,app->path, "icon");
evas_object_resize(o, _e_init_icon_size, _e_init_icon_size);
evas_object_move(o, _e_init_icon_x, _e_init_icon_y);
evas_object_show(o);
_e_init_icon_list = evas_list_append(_e_init_icon_list, o);
_e_init_icon_x += _e_init_icon_size;
if (_e_init_icon_x + _e_init_icon_size > _e_init_icon_wrap)
{
_e_init_icon_x = 0;
_e_init_icon_y -= _e_init_icon_size;
}
}
void
_e_init_icons_del(void)
{
Evas_Object *next;
while(_e_init_icon_list)
{
next = _e_init_icon_list->data;
evas_object_del(next);
_e_init_icon_list = evas_list_remove(_e_init_icon_list, next);
}
}

@ -15,5 +15,7 @@ EAPI void e_init_version_set(const char *str);
EAPI void e_init_status_set(const char *str);
EAPI Ecore_X_Window e_init_window_get(void);
EAPI void e_init_icons_app_add(E_App *app);
#endif
#endif

@ -63,6 +63,7 @@ _e_startup(void)
e_app_exec(a);
snprintf(buf, sizeof(buf), "Starting %s", a->name);
e_init_status_set((const char *)buf);
e_init_icons_app_add(a);
if (a->wait_exit)
{
timeout_timer = ecore_timer_add(10.0, _e_startup_timeout_cb, NULL);

Loading…
Cancel
Save