forked from enlightenment/enlightenment
Remove unnecessary variable and cast.
SVN revision: 24996
This commit is contained in:
parent
7a7701d90c
commit
22191c3a64
|
@ -189,7 +189,7 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
if (e_config->desklock_personal_passwd)
|
if (e_config->desklock_personal_passwd)
|
||||||
evas_stringshare_del(e_config->desklock_personal_passwd);
|
evas_stringshare_del(e_config->desklock_personal_passwd);
|
||||||
}
|
}
|
||||||
e_config->desklock_personal_passwd = (char *)evas_stringshare_add(cfdata->desklock_passwd_cp);
|
e_config->desklock_personal_passwd = evas_stringshare_add(cfdata->desklock_passwd_cp);
|
||||||
e_config->desklock_autolock = cfdata->autolock;
|
e_config->desklock_autolock = cfdata->autolock;
|
||||||
e_config->desklock_use_timeout = cfdata->use_timeout;
|
e_config->desklock_use_timeout = cfdata->use_timeout;
|
||||||
e_config->desklock_timeout = cfdata->timeout;
|
e_config->desklock_timeout = cfdata->timeout;
|
||||||
|
@ -294,13 +294,13 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
if (e_config->desklock_personal_passwd)
|
if (e_config->desklock_personal_passwd)
|
||||||
evas_stringshare_del(e_config->desklock_personal_passwd);
|
evas_stringshare_del(e_config->desklock_personal_passwd);
|
||||||
}
|
}
|
||||||
e_config->desklock_personal_passwd = (char *)evas_stringshare_add(cfdata->desklock_passwd_cp);
|
e_config->desklock_personal_passwd = evas_stringshare_add(cfdata->desklock_passwd_cp);
|
||||||
|
|
||||||
if (cfdata->bg)
|
if (cfdata->bg)
|
||||||
{
|
{
|
||||||
if (e_config->desklock_background)
|
if (e_config->desklock_background)
|
||||||
evas_stringshare_del(e_config->desklock_background);
|
evas_stringshare_del(e_config->desklock_background);
|
||||||
e_config->desklock_background = (char *)evas_stringshare_add(cfdata->bg);
|
e_config->desklock_background = evas_stringshare_add(cfdata->bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_e_desklock_zone_num_get() > 1)
|
if (_e_desklock_zone_num_get() > 1)
|
||||||
|
@ -519,7 +519,6 @@ _load_bgs(E_Config_Dialog_Data *cfdata)
|
||||||
Evas *evasbuf;
|
Evas *evasbuf;
|
||||||
Evas_List *bg_dirs, *bg;
|
Evas_List *bg_dirs, *bg;
|
||||||
const char *f, *f1;
|
const char *f, *f1;
|
||||||
char *c;
|
|
||||||
|
|
||||||
if (!cfdata || !cfdata->gui.bg_list)
|
if (!cfdata || !cfdata->gui.bg_list)
|
||||||
return;
|
return;
|
||||||
|
@ -532,13 +531,12 @@ _load_bgs(E_Config_Dialog_Data *cfdata)
|
||||||
/* Desklock background */
|
/* Desklock background */
|
||||||
o = edje_object_add(evasbuf);
|
o = edje_object_add(evasbuf);
|
||||||
f1 = e_theme_edje_file_get("base/theme/desklock", "desklock/background");
|
f1 = e_theme_edje_file_get("base/theme/desklock", "desklock/background");
|
||||||
c = strdup(f1);
|
|
||||||
|
|
||||||
e_widget_ilist_header_append(cfdata->gui.bg_list, NULL, _("Theme Backgrounds"));
|
e_widget_ilist_header_append(cfdata->gui.bg_list, NULL, _("Theme Backgrounds"));
|
||||||
if (edje_object_file_set(o, f1, "desklock/background"))
|
if (edje_object_file_set(o, f1, "desklock/background"))
|
||||||
{
|
{
|
||||||
ic = e_thumb_icon_add(cfd->dia->win->evas);
|
ic = e_thumb_icon_add(cfd->dia->win->evas);
|
||||||
e_thumb_icon_file_set(ic, (char *)f1, "desktop/background");
|
e_thumb_icon_file_set(ic, f1, "desktop/background");
|
||||||
e_thumb_icon_size_set(ic, 64,
|
e_thumb_icon_size_set(ic, 64,
|
||||||
(64 * e_zone_current_get(cfd->dia->win->container)->h) /
|
(64 * e_zone_current_get(cfd->dia->win->container)->h) /
|
||||||
e_zone_current_get(cfd->dia->win->container)->w);
|
e_zone_current_get(cfd->dia->win->container)->w);
|
||||||
|
@ -552,11 +550,10 @@ _load_bgs(E_Config_Dialog_Data *cfdata)
|
||||||
e_widget_ilist_selected_set(cfdata->gui.bg_list, 1);
|
e_widget_ilist_selected_set(cfdata->gui.bg_list, 1);
|
||||||
|
|
||||||
im = e_widget_preview_add(cfdata->evas, BG_PREVIEW_W, BG_PREVIEW_H);
|
im = e_widget_preview_add(cfdata->evas, BG_PREVIEW_W, BG_PREVIEW_H);
|
||||||
e_widget_preview_edje_set(im, c, "desklock/background");
|
e_widget_preview_edje_set(im, f1, "desklock/background");
|
||||||
|
|
||||||
evas_object_del(o);
|
evas_object_del(o);
|
||||||
ecore_evas_free(eebuf);
|
ecore_evas_free(eebuf);
|
||||||
free(c);
|
|
||||||
/* end: Desklock background */
|
/* end: Desklock background */
|
||||||
|
|
||||||
/* Theme Background */
|
/* Theme Background */
|
||||||
|
@ -565,12 +562,11 @@ _load_bgs(E_Config_Dialog_Data *cfdata)
|
||||||
|
|
||||||
o = edje_object_add(evasbuf);
|
o = edje_object_add(evasbuf);
|
||||||
f = e_theme_edje_file_get("base/theme/backgrounds", "desktop/background");
|
f = e_theme_edje_file_get("base/theme/backgrounds", "desktop/background");
|
||||||
c = strdup(f);
|
|
||||||
ic = NULL;
|
ic = NULL;
|
||||||
if (edje_object_file_set(o, f, "desktop/background"))
|
if (edje_object_file_set(o, f, "desktop/background"))
|
||||||
{
|
{
|
||||||
ic = e_thumb_icon_add(cfd->dia->win->evas);
|
ic = e_thumb_icon_add(cfd->dia->win->evas);
|
||||||
e_thumb_icon_file_set(ic, (char *)f, "desktop/background");
|
e_thumb_icon_file_set(ic, f, "desktop/background");
|
||||||
e_thumb_icon_size_set(ic, 64,
|
e_thumb_icon_size_set(ic, 64,
|
||||||
(64 * e_zone_current_get(cfd->dia->win->container)->h) /
|
(64 * e_zone_current_get(cfd->dia->win->container)->h) /
|
||||||
e_zone_current_get(cfd->dia->win->container)->w);
|
e_zone_current_get(cfd->dia->win->container)->w);
|
||||||
|
@ -585,12 +581,11 @@ _load_bgs(E_Config_Dialog_Data *cfdata)
|
||||||
e_widget_ilist_selected_set(cfdata->gui.bg_list, 2);
|
e_widget_ilist_selected_set(cfdata->gui.bg_list, 2);
|
||||||
evas_object_del(im);
|
evas_object_del(im);
|
||||||
im = e_widget_preview_add(cfdata->evas, BG_PREVIEW_W, BG_PREVIEW_H);
|
im = e_widget_preview_add(cfdata->evas, BG_PREVIEW_W, BG_PREVIEW_H);
|
||||||
e_widget_preview_edje_set(im, c, "desktop/background");
|
e_widget_preview_edje_set(im, f, "desktop/background");
|
||||||
}
|
}
|
||||||
|
|
||||||
evas_object_del(o);
|
evas_object_del(o);
|
||||||
ecore_evas_free(eebuf);
|
ecore_evas_free(eebuf);
|
||||||
free(c);
|
|
||||||
|
|
||||||
e_widget_ilist_header_append(cfdata->gui.bg_list, NULL, _("Personal"));
|
e_widget_ilist_header_append(cfdata->gui.bg_list, NULL, _("Personal"));
|
||||||
bg_dirs = e_path_dir_list_get(path_backgrounds);
|
bg_dirs = e_path_dir_list_get(path_backgrounds);
|
||||||
|
|
Loading…
Reference in New Issue