Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_int_config_wallpaper_import.c 


Log Message:


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).

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_wallpaper_import.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- e_int_config_wallpaper_import.c     29 Sep 2006 06:49:35 -0000      1.27
+++ e_int_config_wallpaper_import.c     17 Nov 2006 15:04:52 -0000      1.28
@@ -27,6 +27,7 @@
    Evas_Object *fill_tile_obj;
    Evas_Object *fill_within_obj;
    Evas_Object *fill_fill_obj;
+   Evas_Object *external_obj;
    Evas_Object *quality_obj;
    Evas_Object *frame_fill_obj;
    Evas_Object *frame_quality_obj;
@@ -43,6 +44,7 @@
 {
    char *file;   
    int method;
+   int external;
    int quality;
 };
 
@@ -84,6 +86,7 @@
    
    cfdata = E_NEW(E_Config_Dialog_Data, 1);
    cfdata->method = IMPORT_STRETCH;
+   cfdata->external = 0;
    cfdata->quality = 90;
    import->cfdata = cfdata;
    import->win = win;
@@ -166,9 +169,12 @@
    
    of = e_widget_frametable_add(evas, _("File Quality"), 0);
    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);
    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_list_object_append(o, ot, 0, 0, 0.5);
@@ -236,6 +242,7 @@
    e_widget_disabled_set(import->fill_tile_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->external_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_quality_obj, disabled);
@@ -339,11 +346,19 @@
    evas_object_image_size_get(img, &w, &h);
    evas_object_del(img);   
    
-   fstrip = strdup(e_util_filename_escape(file));
-   if (import->cfdata->quality == 100)
-     snprintf(enc, sizeof(enc), "COMP");
+   if (import->cfdata->external)
+     {
+       fstrip = strdup(e_util_filename_escape(import->cfdata->file));
+       snprintf(enc, sizeof(enc), "USER");
+     }
    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) 
      {
       case IMPORT_STRETCH:



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to