forked from enlightenment/enlightenment
Few stale memory plugs and cleanups:
* Free the e_app callback for e_border on shutdown * Free the prefix strings on shutdown * Make better intl errors * Worthless function commenting * Comment for disabled shutdown unroll (Why is it disabled?) SVN revision: 20689
This commit is contained in:
parent
39c49d7699
commit
48d18c7535
|
@ -678,6 +678,18 @@ e_app_change_callback_add(void (*func) (void *data, E_App *a, E_App_Change ch),
|
||||||
_e_apps_change_callbacks = evas_list_append(_e_apps_change_callbacks, cb);
|
_e_apps_change_callbacks = evas_list_append(_e_apps_change_callbacks, cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Delete the registered callback which has been registered with the data
|
||||||
|
* given data pointer. This function will return after the first match is
|
||||||
|
* made.
|
||||||
|
*
|
||||||
|
* This will only delete the internal callback function reference. It will
|
||||||
|
* not delete the data. If the data or callback pointers can not be matched
|
||||||
|
* this function does nothing.
|
||||||
|
*
|
||||||
|
* @func pointer to function to be deleted
|
||||||
|
* @data pointer that was initialy registered with the add function
|
||||||
|
*/
|
||||||
EAPI void
|
EAPI void
|
||||||
e_app_change_callback_del(void (*func) (void *data, E_App *a, E_App_Change ch), void *data)
|
e_app_change_callback_del(void (*func) (void *data, E_App *a, E_App_Change ch), void *data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -192,6 +192,9 @@ e_border_shutdown(void)
|
||||||
handlers = evas_list_remove_list(handlers, handlers);
|
handlers = evas_list_remove_list(handlers, handlers);
|
||||||
ecore_event_handler_del(h);
|
ecore_event_handler_del(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e_app_change_callback_del(_e_border_app_change, NULL);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,9 +209,9 @@ e_intl_language_set(const char *lang)
|
||||||
alias_locale = _e_intl_locale_alias_get(_e_intl_language);
|
alias_locale = _e_intl_locale_alias_get(_e_intl_language);
|
||||||
if (!_e_intl_locale_validate(alias_locale))
|
if (!_e_intl_locale_validate(alias_locale))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Locale %s is NO GOOD. Please "
|
fprintf(stderr, "The locale %s cannot be found on your "
|
||||||
"install this locale or don't "
|
"system. Please install this locale or try "
|
||||||
"use it!\n", alias_locale);
|
"something else.\n", alias_locale);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -224,11 +224,14 @@ e_intl_language_set(const char *lang)
|
||||||
if (locale_path == NULL)
|
if (locale_path == NULL)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Can't find the "
|
fprintf(stderr, "Can't find the "
|
||||||
"translation for your locale(%s). "
|
"translation path for the locale %s. "
|
||||||
"Please make sure your messages "
|
"Please make sure your messages "
|
||||||
"path is in order. If this locale "
|
"path is in order. If this locale "
|
||||||
"is an alias make sure you have your "
|
"is an alias make sure you have your "
|
||||||
"locale.aliases file in the right place\n", alias_locale);
|
"locale.aliases file in the right place. Note: "
|
||||||
|
"If your locale is C, POSIX, en_US, en_GB, "
|
||||||
|
"en_US.utf8 etc. this is normal.\n",
|
||||||
|
alias_locale);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -685,7 +685,9 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
/* Store current selected desktops */
|
/* Store current selected desktops */
|
||||||
_e_main_desk_save();
|
_e_main_desk_save();
|
||||||
#if 0
|
|
||||||
|
/* FIXME: why? oh why is this disabled? */
|
||||||
|
#if 0
|
||||||
/* unroll our stack of shutdown functions with exit code of 0 */
|
/* unroll our stack of shutdown functions with exit code of 0 */
|
||||||
_e_main_shutdown(0);
|
_e_main_shutdown(0);
|
||||||
|
|
||||||
|
@ -701,6 +703,8 @@ main(int argc, char **argv)
|
||||||
ecore_file_shutdown();
|
ecore_file_shutdown();
|
||||||
ecore_app_restart();
|
ecore_app_restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e_prefix_shutdown();
|
||||||
|
|
||||||
/* just return 0 to keep the compiler quiet */
|
/* just return 0 to keep the compiler quiet */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -22,12 +22,7 @@ e_prefix_determine(char *argv0)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
E_FREE(_exe_path);
|
e_prefix_shutdown();
|
||||||
E_FREE(_prefix_path);
|
|
||||||
E_FREE(_prefix_path_locale);
|
|
||||||
E_FREE(_prefix_path_bin);
|
|
||||||
E_FREE(_prefix_path_data);
|
|
||||||
E_FREE(_prefix_path_lib);
|
|
||||||
|
|
||||||
if (!_e_prefix_try_proc())
|
if (!_e_prefix_try_proc())
|
||||||
{
|
{
|
||||||
|
@ -102,7 +97,7 @@ e_prefix_determine(char *argv0)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_prefix_fallback(void)
|
e_prefix_shutdown(void)
|
||||||
{
|
{
|
||||||
E_FREE(_exe_path);
|
E_FREE(_exe_path);
|
||||||
E_FREE(_prefix_path);
|
E_FREE(_prefix_path);
|
||||||
|
@ -110,6 +105,12 @@ e_prefix_fallback(void)
|
||||||
E_FREE(_prefix_path_bin);
|
E_FREE(_prefix_path_bin);
|
||||||
E_FREE(_prefix_path_data);
|
E_FREE(_prefix_path_data);
|
||||||
E_FREE(_prefix_path_lib);
|
E_FREE(_prefix_path_lib);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
e_prefix_fallback(void)
|
||||||
|
{
|
||||||
|
e_prefix_shutdown();
|
||||||
_e_prefix_fallbacks();
|
_e_prefix_fallbacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#define E_PREFIX_H
|
#define E_PREFIX_H
|
||||||
|
|
||||||
EAPI int e_prefix_determine(char *argv0);
|
EAPI int e_prefix_determine(char *argv0);
|
||||||
|
EAPI void e_prefix_shutdown(void);
|
||||||
EAPI void e_prefix_fallback(void);
|
EAPI void e_prefix_fallback(void);
|
||||||
EAPI const char *e_prefix_get(void);
|
EAPI const char *e_prefix_get(void);
|
||||||
EAPI const char *e_prefix_locale_get(void);
|
EAPI const char *e_prefix_locale_get(void);
|
||||||
|
|
Loading…
Reference in New Issue