Enlightenment CVS committal

Author  : rephorm
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_color_dialog.c e_color_dialog.h 
        e_int_config_wallpaper_gradient.c e_widget_color_well.c 
        e_widget_csel.c e_widget_spectrum.c 


Log Message:

* crosshairs show in proper place in spectrum initially
* a color well's dialog closes when the well is deleted
* the X border button calls the cancel cb for the color dialog
* the X on the grad dialog now works

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_color_dialog.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_color_dialog.c    20 Aug 2006 22:15:27 -0000      1.2
+++ e_color_dialog.c    20 Aug 2006 23:29:41 -0000      1.3
@@ -7,6 +7,7 @@
 static void _e_color_dialog_button1_click(void *data, E_Dialog *edia);
 static void _e_color_dialog_button2_click(void *data, E_Dialog *edia);
 static void _e_color_dialog_free(E_Color_Dialog *dia);
+static void _e_color_dialog_dia_del(E_Object *obj);
 
 /**
  * Create a color selector dialog.
@@ -44,6 +45,9 @@
    e_dialog_resizable_set(dia->dia, 1);
    e_win_centered_set(dia->dia->win, 1);
 
+   dia->dia->data = dia;
+   e_object_del_attach_func_set(E_OBJECT(dia->dia), _e_color_dialog_dia_del);
+
    return dia;
 }
 
@@ -88,7 +92,7 @@
 _e_color_dialog_button2_click(void *data, E_Dialog *edia)
 {
    E_Color_Dialog *dia;
-   
+
    dia = data;
    if(dia->cancel_func && dia->color)
      dia->cancel_func(dia, dia->color, dia->cancel_data);
@@ -98,8 +102,15 @@
 static void
 _e_color_dialog_free(E_Color_Dialog *dia)
 {
-   printf("DIALOG FREE!\n");
    e_object_unref(E_OBJECT(dia->dia));
    E_FREE(dia->color);
    E_FREE(dia);
+}
+
+static void
+_e_color_dialog_dia_del(E_Object *obj)
+{
+   E_Dialog *dia = obj;
+   E_Color_Dialog *cdia = dia->data;
+   _e_color_dialog_button2_click(cdia, dia);
 }
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_color_dialog.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_color_dialog.h    20 Aug 2006 22:15:27 -0000      1.2
+++ e_color_dialog.h    20 Aug 2006 23:29:41 -0000      1.3
@@ -19,7 +19,7 @@
    E_Dialog            *dia;
    
    E_Color             *color;
-   
+  
    void (*select_func)(E_Color_Dialog *dia, E_Color *color, void *data);
    void  *select_data;
    void (*cancel_func)(E_Color_Dialog *dia, E_Color *color, void *data);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_wallpaper_gradient.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- e_int_config_wallpaper_gradient.c   20 Aug 2006 22:33:31 -0000      1.4
+++ e_int_config_wallpaper_gradient.c   20 Aug 2006 23:29:41 -0000      1.5
@@ -58,6 +58,7 @@
 static void _import_cb_close(void *data, E_Dialog *dia);
 static void _import_cb_ok(void *data, E_Dialog *dia);
 static void _import_config_save(Import *import);
+static void _import_cb_dia_del(E_Object *obj);
 
 EAPI E_Dialog *
 e_int_config_wallpaper_gradient(E_Config_Dialog *parent)
@@ -81,7 +82,9 @@
        return NULL;    
      }
 
-   dia->win->data = import;
+   dia->data = import;
+   e_object_del_attach_func_set(E_OBJECT(dia), _import_cb_dia_del);
+   e_win_centered_set(dia->win, 1);
 
    cfdata = E_NEW(E_Config_Dialog_Data, 1);
    cfdata->mode = GRAD_H;
@@ -96,7 +99,6 @@
    import->parent = parent;
 
    e_dialog_title_set(dia, _("Create a gradient..."));
-   // e_win_delete_callback_set(dia->win, _import_cb_delete);
 
    cfdata->color1 = calloc(1, sizeof(E_Color));
    cfdata->color1->a = 255;
@@ -190,7 +192,7 @@
 {
    Import *import;
 
-   import = dia->win->data;
+   import = dia->data;
    _import_config_save(import);
 
    if (import->exe_handler) ecore_event_handler_del(import->exe_handler);
@@ -376,11 +378,6 @@
 }
 
 static void 
-_import_cb_delete(E_Win *win) 
-{
-}
-
-static void 
 _import_cb_close(void *data, E_Dialog *dia) 
 {
    e_int_config_wallpaper_gradient_del(dia);
@@ -391,7 +388,7 @@
 {
    Import *import;
 
-   import = dia->win->data;
+   import = dia->data;
 
    if (dia && import->cfdata->name)
      {
@@ -401,3 +398,9 @@
    e_int_config_wallpaper_gradient_del(dia);
 }
 
+static void
+_import_cb_dia_del(E_Object *obj)
+{
+   E_Dialog *dia = obj;
+   e_int_config_wallpaper_gradient_del(dia);
+}
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_color_well.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_widget_color_well.c       20 Aug 2006 22:15:27 -0000      1.3
+++ e_widget_color_well.c       20 Aug 2006 23:29:41 -0000      1.4
@@ -76,6 +76,7 @@
    wd = e_widget_data_get(obj);
    if (!wd) return;
 
+   if (wd->dia) e_object_unref(E_OBJECT(wd->dia));
    E_FREE(wd);
 }
 
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_csel.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- e_widget_csel.c     20 Aug 2006 22:15:27 -0000      1.7
+++ e_widget_csel.c     20 Aug 2006 23:29:41 -0000      1.8
@@ -68,21 +68,33 @@
               {
                case E_COLOR_COMPONENT_R:
                   wd->cv->r = atoi(wd->values[i]);
+                  if (wd->cv->r > 255) wd->cv->r = 255;
+                  if (wd->cv->r < 0) wd->cv->r = 0;
                   break;
                case E_COLOR_COMPONENT_G:
                   wd->cv->g = atoi(wd->values[i]);
+                  if (wd->cv->g > 255) wd->cv->g = 255;
+                  if (wd->cv->g < 0) wd->cv->g = 0;
                   break;
                case E_COLOR_COMPONENT_B:
                   wd->cv->b = atoi(wd->values[i]);
+                  if (wd->cv->b > 255) wd->cv->b = 255;
+                  if (wd->cv->b < 0) wd->cv->b = 0;
                   break;
                case E_COLOR_COMPONENT_H:
                   wd->cv->h = atof(wd->values[i]);
+                  if (wd->cv->h > 360) wd->cv->h = 360;
+                  if (wd->cv->h < 0) wd->cv->h = 0;
                   break;
                case E_COLOR_COMPONENT_S:
                   wd->cv->s = atof(wd->values[i]);
+                  if (wd->cv->s > 1) wd->cv->s = 1;
+                  if (wd->cv->s < 0) wd->cv->s = 0;
                   break;
                case E_COLOR_COMPONENT_V:
                   wd->cv->v = atof(wd->values[i]);
+                  if (wd->cv->v > 1) wd->cv->v = 1;
+                  if (wd->cv->v < 0) wd->cv->v = 0;
                   break;
               }
             break;
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_spectrum.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_widget_spectrum.c 20 Aug 2006 21:18:30 -0000      1.3
+++ e_widget_spectrum.c 20 Aug 2006 23:29:41 -0000      1.4
@@ -84,6 +84,8 @@
    evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP, _e_wid_cb_up, 
obj);
    wd->o_event = o;
 
+   e_widget_spectrum_update(obj, 0);
+
    return obj;
 }
 



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to