forked from enlightenment/enlightenment
support the new edje USER image support - this will mean edje can use an
externhal image file directly and for wallpapers then the .edj file is simply layout data - the original lives elsewhere (where it was when u built the .edj - or imported the wallpaper). SVN revision: 27157
This commit is contained in:
parent
6f93ee0289
commit
42edd5eaf8
|
@ -27,6 +27,7 @@ struct _Import
|
||||||
Evas_Object *fill_tile_obj;
|
Evas_Object *fill_tile_obj;
|
||||||
Evas_Object *fill_within_obj;
|
Evas_Object *fill_within_obj;
|
||||||
Evas_Object *fill_fill_obj;
|
Evas_Object *fill_fill_obj;
|
||||||
|
Evas_Object *external_obj;
|
||||||
Evas_Object *quality_obj;
|
Evas_Object *quality_obj;
|
||||||
Evas_Object *frame_fill_obj;
|
Evas_Object *frame_fill_obj;
|
||||||
Evas_Object *frame_quality_obj;
|
Evas_Object *frame_quality_obj;
|
||||||
|
@ -43,6 +44,7 @@ struct _E_Config_Dialog_Data
|
||||||
{
|
{
|
||||||
char *file;
|
char *file;
|
||||||
int method;
|
int method;
|
||||||
|
int external;
|
||||||
int quality;
|
int quality;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -84,6 +86,7 @@ e_int_config_wallpaper_import(E_Config_Dialog *parent)
|
||||||
|
|
||||||
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
||||||
cfdata->method = IMPORT_STRETCH;
|
cfdata->method = IMPORT_STRETCH;
|
||||||
|
cfdata->external = 0;
|
||||||
cfdata->quality = 90;
|
cfdata->quality = 90;
|
||||||
import->cfdata = cfdata;
|
import->cfdata = cfdata;
|
||||||
import->win = win;
|
import->win = win;
|
||||||
|
@ -166,9 +169,12 @@ e_int_config_wallpaper_import(E_Config_Dialog *parent)
|
||||||
|
|
||||||
of = e_widget_frametable_add(evas, _("File Quality"), 0);
|
of = e_widget_frametable_add(evas, _("File Quality"), 0);
|
||||||
import->frame_quality_obj = of;
|
import->frame_quality_obj = of;
|
||||||
|
ord = e_widget_check_add(evas, _("Use original file"), &(cfdata->external));
|
||||||
|
import->external_obj = ord;
|
||||||
|
e_widget_frametable_object_append(of, ord, 0, 0, 1, 1, 1, 0, 1, 0);
|
||||||
ord = e_widget_slider_add(evas, 1, 0, _("%3.0f%%"), 0.0, 100.0, 1.0, 0, NULL, &(cfdata->quality), 150);
|
ord = e_widget_slider_add(evas, 1, 0, _("%3.0f%%"), 0.0, 100.0, 1.0, 0, NULL, &(cfdata->quality), 150);
|
||||||
import->quality_obj = ord;
|
import->quality_obj = ord;
|
||||||
e_widget_frametable_object_append(of, ord, 0, 0, 1, 1, 1, 0, 1, 0);
|
e_widget_frametable_object_append(of, ord, 0, 1, 1, 1, 1, 0, 1, 0);
|
||||||
e_widget_table_object_append(ot, of, 0, 1, 1, 1, 1, 1, 1, 0);
|
e_widget_table_object_append(ot, of, 0, 1, 1, 1, 1, 1, 1, 0);
|
||||||
|
|
||||||
e_widget_list_object_append(o, ot, 0, 0, 0.5);
|
e_widget_list_object_append(o, ot, 0, 0, 0.5);
|
||||||
|
@ -236,6 +242,7 @@ _import_opt_disabled_set(Import *import, int disabled)
|
||||||
e_widget_disabled_set(import->fill_tile_obj, disabled);
|
e_widget_disabled_set(import->fill_tile_obj, disabled);
|
||||||
e_widget_disabled_set(import->fill_within_obj, disabled);
|
e_widget_disabled_set(import->fill_within_obj, disabled);
|
||||||
e_widget_disabled_set(import->fill_fill_obj, disabled);
|
e_widget_disabled_set(import->fill_fill_obj, disabled);
|
||||||
|
e_widget_disabled_set(import->external_obj, disabled);
|
||||||
e_widget_disabled_set(import->quality_obj, disabled);
|
e_widget_disabled_set(import->quality_obj, disabled);
|
||||||
e_widget_disabled_set(import->frame_fill_obj, disabled);
|
e_widget_disabled_set(import->frame_fill_obj, disabled);
|
||||||
e_widget_disabled_set(import->frame_quality_obj, disabled);
|
e_widget_disabled_set(import->frame_quality_obj, disabled);
|
||||||
|
@ -339,11 +346,19 @@ _import_edj_gen(Import *import)
|
||||||
evas_object_image_size_get(img, &w, &h);
|
evas_object_image_size_get(img, &w, &h);
|
||||||
evas_object_del(img);
|
evas_object_del(img);
|
||||||
|
|
||||||
fstrip = strdup(e_util_filename_escape(file));
|
if (import->cfdata->external)
|
||||||
if (import->cfdata->quality == 100)
|
{
|
||||||
snprintf(enc, sizeof(enc), "COMP");
|
fstrip = strdup(e_util_filename_escape(import->cfdata->file));
|
||||||
|
snprintf(enc, sizeof(enc), "USER");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
snprintf(enc, sizeof(enc), "LOSSY %i", import->cfdata->quality);
|
{
|
||||||
|
fstrip = strdup(e_util_filename_escape(file));
|
||||||
|
if (import->cfdata->quality == 100)
|
||||||
|
snprintf(enc, sizeof(enc), "COMP");
|
||||||
|
else
|
||||||
|
snprintf(enc, sizeof(enc), "LOSSY %i", import->cfdata->quality);
|
||||||
|
}
|
||||||
switch (import->cfdata->method)
|
switch (import->cfdata->method)
|
||||||
{
|
{
|
||||||
case IMPORT_STRETCH:
|
case IMPORT_STRETCH:
|
||||||
|
|
Loading…
Reference in New Issue