[E-devel] E_CONFIG_SUB

2006-05-13 Thread Aleksej Struk

Hi Raster,

Please find two files attached : e_mod_main.c and e_mod_main.h
To see the peace of code where E_CONFIG_SUB is used, please refer to
function _lang_load_config.

As I said in IRC, E_CONFIG_SUB works if the config file is already
exist. Otherwise eet crashes.

BTW. If u would require all the module code, in order to do testings,
then please let me know :)

Waiting for comments.

aleksej

--
Aleksej Struk
Master Degree Student
Free University of Bozen-Bolzano
Faculty of Computer Science
phone: +39-0471-061749
cell phone: +39-3204627049
[EMAIL PROTECTED] [EMAIL PROTECTED] - http://www.
#include e.h
#include e_mod_main.h
#include e_mod_config.h
#include e_mod_keybind.h
#include e_mod_lang.h
#include config.h

#define LANG_MODULE_CONFIG_FILE module.language

Lang   *_lang_init(E_Module *m);
static void   _lang_shutdown(Lang *l);

static void   _lang_config_menu_new(Lang *l);

static int_lang_face_init(Lang_Face *lf);
static void   _lang_face_menu_new(Lang_Face *lf);
static void   _lang_face_enable(Lang_Face *lf);
static void   _lang_face_disable(Lang_Face *lf);
static void   _lang_face_free(Lang_Face *lf);

static void   _lang_face_cb_gmc_change(void *data, E_Gadman_Client *gmc, E_Gadman_Change change);
static void   _lang_face_cb_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_info);
static void   _lang_face_cb_menu_edit(void *data, E_Menu *mn, E_Menu_Item *mi);
static void   _lang_face_cb_menu_configure(void *data, E_Menu *mn, E_Menu_Item *mi);

void   _lang_load_config(Lang *l);

static int lang_count;

Lang  *lang = NULL;

EAPI E_Module_Api e_modapi = {
   E_MODULE_API_VERSION,
   Language
};

EAPI void *
e_modapi_init(E_Module *m)
{
   Lang	*l;

   l = _lang_init(m);

   if (!l)
 return NULL;

   lang = l;

   m-config_menu = l-config_menu;
   return l;
}

EAPI int
e_modapi_shutdown(E_Module *m)
{
   Lang	*l;

   l = m-data;
   if (!l)
 return 0;

   if (m-config_menu)
 {
	e_menu_deactivate(m-config_menu);
	e_object_del(E_OBJECT(m-config_menu));
	m-config_menu = NULL;
 }
   if (l-cfd)
 {
	e_object_del(E_OBJECT(l-cfd));
	l-cfd = NULL;
 }
   _lang_shutdown(l);
   return 1;
}

EAPI int
e_modapi_save(E_Module *m)
{
   Lang *l;

   l = m-data;
   if (!l)
 return 0;
   e_config_domain_save(LANG_MODULE_CONFIG_FILE, l-conf_edd, l-conf);
   return 1;
}

EAPI int
e_modapi_info(E_Module *m)
{
   char buf[4096];

   snprintf(buf, sizeof(buf), %s/module_icon.png, e_module_dir_get(m));
   m-icon_file = strdup(buf);
   return 1;
}

EAPI int
e_modapi_about(E_Module *m)
{
   e_module_dialog_show( _(Enlightenment Language Enhancment Module),
			 _(This module is used to switch between input languages.));
   return 1;
}

EAPI int
e_modapi_config(E_Module *m)
{
   Lang *l;
   E_Container *con;

   l = m-data;
   if (!l)
 return 0;
   if (!l-face)
 return 0;

   con = e_container_current_get(e_manager_current_get());
   if (l-face-con == con)
 _lang_configure_lang_module(con, l);

   return 1;
}

Lang *
_lang_init(E_Module *m)
{
   Lang		*l;
   E_Menu_Item	*mi;
   Evas_List	*managers, *l1, *l2;

   lang_load_kbd_models();
   lang_load_xfree_languages();

   l = E_NEW(Lang, 1);

   if (!l)
 return NULL;

   l-module   = m;
   l-current_lang_selector = 0;

   _lang_load_config(l);
   _lang_config_menu_new(l);

   managers = e_manager_list();
   for (l1 = managers; l1; l1 = l1-next)
 {
	E_Manager *man;

	man = l1-data;
	for (l2 = man-containers; l2; l2 = l2-next)
	  {
	 E_Container *con;
	 Lang_Face	 *lf;

	 con = l2-data;
	 lf = E_NEW(Lang_Face, 1);

	 if (lf)
	   {
		  lf-conf_face_edd = E_CONFIG_DD_NEW(Lang_Face_Config, Config_Face);
#undef T
#undef D
#define T Config_Face
#define D lf-conf_face_edd
		  E_CONFIG_VAL(D, T, enabled, UCHAR);

		  l-face   = lf;
		  lf-lang  = l;
		  lf-con   = con;
		  lf-evas  = con-bg_evas;

		  lf-conf = E_NEW(Config_Face, 1);
		  lf-conf-enabled = 1;

		  if (!_lang_face_init(lf))
		return NULL;

		  lang_face_language_indicator_set(l);

		  _lang_face_menu_new(lf);

		  mi = e_menu_item_new(l-config_menu);
		  e_menu_item_label_set(mi, con-name);
		  e_menu_item_submenu_set(mi, lf-menu);

		  if (!lf-conf-enabled)
		_lang_face_disable(lf);
		  else
		_lang_face_enable(lf);
	   }
	  }
 }

   _lang_register_module_actions();
   _lang_register_module_keybindings(l);


   return l;
}

static void
_lang_shutdown(Lang *l)
{
   _lang_unregister_module_actions();
   _lang_unregister_module_keybindings(l);

   lang_free_kbd_models();
   lang_free_xfree_languages();

   while (l-conf-languages)
 {
	Language  *lang = l-conf-languages-data;
	if (lang-lang_name) evas_stringshare_del(lang-lang_name);
	if (lang-lang_shortcut) evas_stringshare_del(lang-lang_shortcut);
	if (lang-lang_flag) evas_stringshare_del(lang-lang_flag);
	if (lang-kbd_model) evas_stringshare_del(lang-kbd_model);
	if (lang-kbd_layout) evas_stringshare_del(lang-kbd_layout);
	if (lang-kbd_variant) 

Re: [E-devel] E_CONFIG_SUB

2006-05-13 Thread The Rasterman
On Sat, 13 May 2006 11:22:12 + Aleksej Struk [EMAIL PROTECTED] babbled:

 Hi Raster,
 
 Please find two files attached : e_mod_main.c and e_mod_main.h
 To see the peace of code where E_CONFIG_SUB is used, please refer to
 function _lang_load_config.
 
 As I said in IRC, E_CONFIG_SUB works if the config file is already
 exist. Otherwise eet crashes.
 
 BTW. If u would require all the module code, in order to do testings,
 then please let me know :)

umm.. bk_next and bk_prev are not pointers.. they are literal structs. that's
why its not working. SUB expects a SUB struct POINTED to. otherwise you can
just declare the struct values directly as bk_next.key, bk_next.params etc.
etc. (instead of just the plain struct member - have it parent.child).

 Waiting for comments.
 
 aleksej
 
 -- 
 Aleksej Struk
 Master Degree Student
 Free University of Bozen-Bolzano
 Faculty of Computer Science
 phone: +39-0471-061749
 cell phone: +39-3204627049
 [EMAIL PROTECTED] [EMAIL PROTECTED] - http://www.
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Re: E CVS: apps/entrance xcomputerman

2006-05-13 Thread The Rasterman
On Fri, 12 May 2006 19:08:08 -0400 (EDT) Enlightenment CVS
[EMAIL PROTECTED] babbled:

 Enlightenment CVS committal
 
 Author  : xcomputerman
 Project : e17
 Module  : apps/entrance

wo! xcomp! entrance commits! does this mean you're back? :)

-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [e-devel] patches, patches...

2006-05-13 Thread The Rasterman
On Fri, 12 May 2006 15:00:35 +0200 ilLogict [EMAIL PROTECTED] babbled:

  Hello!
 
  Here are some patches that have been waiting to be sent for some
 time ;)
 e-desktop_names-more_efficient_scanning.patch: more efficient way of
 scanning when assigning a name to a desktop
 e-i18n-default_desktop_name.patch: allow translation of the default
 desktop name

actually- it's no more efficient at all :) evas_list_nth has to walk up to the
nth element anyway to get it :). i18n patch is fine :)

 e_remote_main-add_end_newline.patch: only to make the compiler shut :)
 e-screen_ratio-more_work.patch: the screen ratio wasn't used when the
 selected background was not de theme default one

ok :)

 exhibit-jpeg_files: add recognition of .jpeg extension

i'll let codewarrior do this :)

  Cheers!
 
   ilLogict
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Edje transitions

2006-05-13 Thread Simon TRENY
Hi everybody,

I've noticed that in edje, when you start a new transition on a
part while another transition was already running, the running
transition jumps directly to its final state in order to start the new
transition.
For example, if a part has 3 states (state1, state2, state3). At the
beginning the part is in the state 1. Now, with STATE_SET, you start a
smooth transition from state1 to state2, but before this transition is
complete, you start another smooth transition to state3. In this case,
the part will directly go to state2 (it wasn't in state2 since the
first transition wasn't complete), and will start the smooth transition
to state3.

Is there actually a good reason for that behaviour, except the fact
that it is easier to implement? The problem with this behaviour may be
seen in the new ibar's labels for example: when the mouse enters an
icon, the label smoothly appears and when it leaves the icon, the
label smoothly disappears. But if the mouse leaves the icon before
the label has totally appeared, then the label just seems to pop up. It
happens if you move the mouse quicly over the ibar. Ok, I know, this is
not a big problem, but I think it will look a lot better if this
behaviour was different (if the interpolation was done from the
intermediate state).
Another example, in entrance, you can click on a button to open
smoothly the Sessions panel. A new click closes it smoothly. But
several fast clicks makes it pops up with no longer smooth transition.

So what do you think about it? Should we implement a better transition
system, or is there a good reason to do that (I can see some)


Regards :)
Simon TRENY MoOm


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel