Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_int_config_background.c 


Log Message:
When selecting bgs, if the current bg is what we selected in the list, disable 
the ok/apply buttons
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_int_config_background.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- e_int_config_background.c   10 Jan 2006 14:17:59 -0000      1.11
+++ e_int_config_background.c   10 Jan 2006 15:04:04 -0000      1.12
@@ -24,6 +24,7 @@
 {
    /*- BASIC -*/
    char *file ;
+   char *current_file;
    /*- ADVANCED -*/
    int bg_method;
 };
@@ -58,6 +59,7 @@
 _fill_data(CFData *cfdata)
 {
    cfdata->bg_method = BG_SET_DEFAULT_DESK;
+   cfdata->current_file = strdup(e_config->desktop_default_background);
    /* TODO: get default bg */
 }
 
@@ -78,7 +80,8 @@
 static void
 _free_data(E_Config_Dialog *cfd, CFData *cfdata)
 {
-   /* Free the cfdata */  
+   /* Free the cfdata */
+   free(cfdata->current_file);
    free(cfdata);
 }
 
@@ -90,6 +93,7 @@
    e_config->desktop_default_background = evas_stringshare_add(cfdata->file);
    e_bg_update();
    e_config_save_queue();
+   cfdata->current_file = strdup(cfdata->file);
    return 1; /* Apply was OK */
 }
 
@@ -97,9 +101,16 @@
 _e_config_bg_cb_standard(void *data)
 {
    E_Cfg_Bg_Data *d;
+   CFData *cfdata;
    
    d = data;
    e_widget_image_object_set(d->cfd->data, e_thumb_evas_object_get(d->file, 
d->cfd->dia->win->evas, 200, 160, 1));
+   cfdata = d->cfd->cfdata;
+   if (!strcmp(d->file, cfdata->current_file)) 
+     {
+       e_dialog_button_disable_num_set(d->cfd->dia, 0, 1);
+       e_dialog_button_disable_num_set(d->cfd->dia, 1, 1);     
+     }
 }
 
 /**--GUI--**/
@@ -149,6 +160,7 @@
        e_config->desktop_default_background = 
evas_stringshare_add(cfdata->file);
        e_bg_update();
        e_config_save_queue();
+       cfdata->current_file = strdup(cfdata->file);    
        break;
       case BG_SET_THIS_DESK:
        d = e_desk_current_get(z);




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