Enlightenment CVS committal
Author : devilhorns
Project : e17
Module : apps/e
Dir : e17/apps/e/src/modules/conf_wallpaper
Modified Files:
e_int_config_wallpaper_import.c
Log Message:
Encode any 'imported' images with a data item so we know if it's
fill/stretch/etc. First stage of allowing changes to imported images.
===================================================================
RCS file:
/cvs/e/e17/apps/e/src/modules/conf_wallpaper/e_int_config_wallpaper_import.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_int_config_wallpaper_import.c 24 Oct 2007 08:37:48 -0000 1.3
+++ e_int_config_wallpaper_import.c 28 Oct 2007 00:58:17 -0000 1.4
@@ -156,19 +156,29 @@
of = e_widget_frametable_add(evas, _("Fill and Stretch Options"), 1);
import->frame_fill_obj = of;
rg = e_widget_radio_group_new(&cfdata->method);
- ord = e_widget_radio_icon_add(evas, _("Stretch"),
"enlightenment/wallpaper_stretch", 24, 24, IMPORT_STRETCH, rg);
+ ord = e_widget_radio_icon_add(evas, _("Stretch"),
+ "enlightenment/wallpaper_stretch",
+ 24, 24, IMPORT_STRETCH, rg);
import->fill_stretch_obj = ord;
e_widget_frametable_object_append(of, ord, 0, 0, 1, 1, 1, 0, 1, 0);
- ord = e_widget_radio_icon_add(evas, _("Center"),
"enlightenment/wallpaper_center", 24, 24, IMPORT_CENTER, rg);
+ ord = e_widget_radio_icon_add(evas, _("Center"),
+ "enlightenment/wallpaper_center",
+ 24, 24, IMPORT_CENTER, rg);
import->fill_center_obj = ord;
e_widget_frametable_object_append(of, ord, 1, 0, 1, 1, 1, 0, 1, 0);
- ord = e_widget_radio_icon_add(evas, _("Tile"),
"enlightenment/wallpaper_tile", 24, 24, IMPORT_TILE, rg);
+ ord = e_widget_radio_icon_add(evas, _("Tile"),
+ "enlightenment/wallpaper_tile",
+ 24, 24, IMPORT_TILE, rg);
import->fill_tile_obj = ord;
e_widget_frametable_object_append(of, ord, 2, 0, 1, 1, 1, 0, 1, 0);
- ord = e_widget_radio_icon_add(evas, _("Within"),
"enlightenment/wallpaper_scale_aspect_in", 24, 24, IMPORT_SCALE_ASPECT_IN, rg);
+ ord = e_widget_radio_icon_add(evas, _("Within"),
+ "enlightenment/wallpaper_scale_aspect_in",
+ 24, 24, IMPORT_SCALE_ASPECT_IN, rg);
import->fill_within_obj = ord;
e_widget_frametable_object_append(of, ord, 3, 0, 1, 1, 1, 0, 1, 0);
- ord = e_widget_radio_icon_add(evas, _("Fill"),
"enlightenment/wallpaper_scale_aspect_out", 24, 24, IMPORT_SCALE_ASPECT_OUT,
rg);
+ ord = e_widget_radio_icon_add(evas, _("Fill"),
+ "enlightenment/wallpaper_scale_aspect_out",
+ 24, 24, IMPORT_SCALE_ASPECT_OUT, rg);
import->fill_fill_obj = ord;
e_widget_frametable_object_append(of, ord, 4, 0, 1, 1, 1, 0, 1, 0);
e_widget_table_object_append(ot, of, 0, 0, 1, 1, 1, 1, 1, 0);
@@ -178,7 +188,8 @@
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;
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);
@@ -190,10 +201,12 @@
edje_object_part_swallow(import->bg_obj, "e.swallow.content", o);
evas_object_show(o);
- import->ok_obj = e_widget_button_add(evas, _("OK"), NULL, _import_cb_ok,
win, cfdata);
+ import->ok_obj = e_widget_button_add(evas, _("OK"), NULL,
+ _import_cb_ok, win, cfdata);
e_widget_list_object_append(import->box_obj, import->ok_obj, 1, 0, 0.5);
- import->close_obj = e_widget_button_add(evas, _("Cancel"), NULL,
_import_cb_close, win, NULL);
+ import->close_obj = e_widget_button_add(evas, _("Cancel"), NULL,
+ _import_cb_close, win, NULL);
e_widget_list_object_append(import->box_obj, import->close_obj, 1, 0, 0.5);
e_win_centered_set(win, 1);
@@ -289,11 +302,15 @@
e_widget_fsel_path_get(import->fsel_obj, &fdev, &fpath);
if ((fdev) || (fpath))
{
- if (e_config->wallpaper_import_last_dev)
evas_stringshare_del(e_config->wallpaper_import_last_dev);
- if (fdev) e_config->wallpaper_import_last_dev =
evas_stringshare_add(fdev);
+ if (e_config->wallpaper_import_last_dev)
+ evas_stringshare_del(e_config->wallpaper_import_last_dev);
+ if (fdev)
+ e_config->wallpaper_import_last_dev = evas_stringshare_add(fdev);
else e_config->wallpaper_import_last_dev = NULL;
- if (e_config->wallpaper_import_last_path)
evas_stringshare_del(e_config->wallpaper_import_last_path);
- if (fpath) e_config->wallpaper_import_last_path =
evas_stringshare_add(fpath);
+ if (e_config->wallpaper_import_last_path)
+ evas_stringshare_del(e_config->wallpaper_import_last_path);
+ if (fpath)
+ e_config->wallpaper_import_last_path = evas_stringshare_add(fpath);
else e_config->wallpaper_import_last_path = NULL;
e_config_save_queue();
}
@@ -320,7 +337,8 @@
snprintf(buf, sizeof(buf), "%s/.e/e/backgrounds/%s.edj", homedir, fstrip);
while (ecore_file_exists(buf))
{
- snprintf(buf, sizeof(buf), "%s/.e/e/backgrounds/%s-%i.edj", homedir,
fstrip, num);
+ snprintf(buf, sizeof(buf), "%s/.e/e/backgrounds/%s-%i.edj",
+ homedir, fstrip, num);
num++;
}
free(fstrip);
@@ -373,6 +391,7 @@
"images { image: \"%s\" %s; }\n"
"collections {\n"
"group { name: \"e/desktop/background\";\n"
+ "data { item: \"style\" \"0\"; }\n"
"max: %i %i;\n"
"parts {\n"
"part { name: \"bg\"; mouse_events: 0;\n"
@@ -386,6 +405,7 @@
"images { image: \"%s\" %s; }\n"
"collections {\n"
"group { name: \"e/desktop/background\";\n"
+ "data { item: \"style\" \"1\"; }\n"
"max: %i %i;\n"
"parts {\n"
"part { name: \"bg\"; mouse_events: 0;\n"
@@ -402,6 +422,7 @@
"images { image: \"%s\" %s; }\n"
"collections {\n"
"group { name: \"e/desktop/background\";\n"
+ "data { item: \"style\" \"2\"; }\n"
"max: %i %i;\n"
"parts {\n"
"part { name: \"col\"; type: RECT; mouse_events: 0;\n"
@@ -420,6 +441,7 @@
"images { image: \"%s\" %s; }\n"
"collections {\n"
"group { name: \"e/desktop/background\";\n"
+ "data { item: \"style\" \"3\"; }\n"
"max: %i %i;\n"
"parts {\n"
"part { name: \"col\"; type: RECT; mouse_events: 0;\n"
@@ -438,6 +460,7 @@
"images { image: \"%s\" %s; }\n"
"collections {\n"
"group { name: \"e/desktop/background\";\n"
+ "data { item: \"style\" \"4\"; }\n"
"max: %i %i;\n"
"parts {\n"
"part { name: \"bg\"; mouse_events: 0;\n"
@@ -460,7 +483,9 @@
import->tmpf = strdup(tmpn);
import->fdest = strdup(buf);
- import->exe_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
_import_cb_edje_cc_exit, import);
+ import->exe_handler =
+ ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
+ _import_cb_edje_cc_exit, import);
import->exe = ecore_exe_run(cmd, NULL);
}
@@ -576,7 +601,6 @@
"wallpaper?"));
return;
}
-
}
e_win_hide(win);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs