Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_int_config_theme.c 


Log Message:
Fix theme selector preview size on dialog start. If we select a theme from the 
list, and it is the current theme that is already applied, then disable the 
ok/apply buttons.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_int_config_theme.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- e_int_config_theme.c        11 Jan 2006 04:35:51 -0000      1.8
+++ e_int_config_theme.c        11 Jan 2006 09:44:05 -0000      1.9
@@ -91,8 +91,7 @@
    e_config_save_queue();
 
    a = e_action_find("restart");
-   if ((a) && (a->func.go)) a->func.go(NULL, NULL);
-   
+   if ((a) && (a->func.go)) a->func.go(NULL, NULL);   
    return 1; /* Apply was OK */
 }
 
@@ -101,6 +100,7 @@
 {
    E_Cfg_Theme_Data *d;
    CFData *cfdata;
+   const char *tmp;
    
    d = data;
    e_widget_image_object_set(d->cfd->data, e_thumb_evas_object_get(d->file, 
d->cfd->dia->win->evas, 160, 120, 1));
@@ -108,7 +108,8 @@
    cfdata = d->cfd->cfdata;
    if (cfdata->current_theme) 
      {
-       if (!strcmp(cfdata->theme, cfdata->current_theme)) 
+       tmp = ecore_file_get_file(d->file);
+       if (!strcmp(tmp, cfdata->current_theme)) 
          {
             e_dialog_button_disable_num_set(d->cfd->dia, 0, 1);
             e_dialog_button_disable_num_set(d->cfd->dia, 1, 1);        
@@ -126,7 +127,8 @@
    Evas_Object *il;
    char buf[4096];
    char *homedir;
-   Evas_Object *theme;   
+   Evas_Object *theme;
+   char fulltheme[PATH_MAX];
    
    theme = edje_object_add(evas);
    
@@ -154,12 +156,11 @@
             ecore_list_prepend(themes, strdup("default.edj"));
             ecore_list_goto_first(themes);
             
-            char *themefile;
-            char fulltheme[PATH_MAX];
             Evas_Object *o;
             Ecore_Evas *eebuf;
             Evas *evasbuf;
             int i = 0;
+            char *themefile;
             
             eebuf = ecore_evas_buffer_new(1, 1);
             evasbuf = ecore_evas_get(eebuf);
@@ -211,9 +212,10 @@
    fr = e_widget_framelist_add(evas, "Preview", 0);
    if (im == NULL)
      {
-       theme = 
e_thumb_generate_begin(PACKAGE_DATA_DIR"/data/themes/default.edj",
-             320, 240, evas, &theme, NULL, NULL);
+       snprintf(fulltheme, sizeof(fulltheme), 
PACKAGE_DATA_DIR"/data/themes/default.edj");
+       theme = e_thumb_generate_begin(fulltheme, 320, 240, evas, &theme, NULL, 
NULL);
        im = e_widget_image_add_from_object(evas, theme, 320, 240);
+       e_widget_image_object_set(im, e_thumb_evas_object_get(fulltheme, evas, 
320, 240, 1));
      }
    cfd->data = im;
    e_widget_min_size_set(fr, 320, 240);




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to