discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=e569758fef50b8e9d23b4bb10b6efa88537ea8a8

commit e569758fef50b8e9d23b4bb10b6efa88537ea8a8
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Apr 9 16:35:31 2015 -0400

    remove csel widget
    
    no longer used
---
 po/POTFILES.in          |   1 -
 src/bin/Makefile.mk     |   2 -
 src/bin/e_includes.h    |   1 -
 src/bin/e_widget_csel.c | 311 ------------------------------------------------
 src/bin/e_widget_csel.h |   6 -
 5 files changed, 321 deletions(-)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index 4c493c5..0d1f11f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -103,7 +103,6 @@ src/bin/e_widget_button.c
 src/bin/e_widget_check.c
 src/bin/e_widget_color_well.c
 src/bin/e_widget_config_list.c
-src/bin/e_widget_csel.c
 src/bin/e_widget_cslider.c
 src/bin/e_widget_entry.c
 src/bin/e_widget_filepreview.c
diff --git a/src/bin/Makefile.mk b/src/bin/Makefile.mk
index 279cbc5..a2ff154 100644
--- a/src/bin/Makefile.mk
+++ b/src/bin/Makefile.mk
@@ -167,7 +167,6 @@ src/bin/e_widget_button.h \
 src/bin/e_widget_check.h \
 src/bin/e_widget_color_well.h \
 src/bin/e_widget_config_list.h \
-src/bin/e_widget_csel.h \
 src/bin/e_widget_cslider.h \
 src/bin/e_widget_bgpreview.h \
 src/bin/e_widget_entry.h \
@@ -329,7 +328,6 @@ src/bin/e_widget.c \
 src/bin/e_widget_check.c \
 src/bin/e_widget_color_well.c \
 src/bin/e_widget_config_list.c \
-src/bin/e_widget_csel.c \
 src/bin/e_widget_cslider.c \
 src/bin/e_widget_bgpreview.c \
 src/bin/e_widget_entry.c \
diff --git a/src/bin/e_includes.h b/src/bin/e_includes.h
index 359aa73..a8d21f9 100644
--- a/src/bin/e_includes.h
+++ b/src/bin/e_includes.h
@@ -106,7 +106,6 @@
 #include "e_widget_spectrum.h"
 #include "e_widget_cslider.h"
 #include "e_widget_color_well.h"
-#include "e_widget_csel.h"
 #include "e_color_dialog.h"
 #include "e_sys.h"
 #include "e_obj_dialog.h"
diff --git a/src/bin/e_widget_csel.c b/src/bin/e_widget_csel.c
deleted file mode 100644
index e616ffe..0000000
--- a/src/bin/e_widget_csel.c
+++ /dev/null
@@ -1,311 +0,0 @@
-#include "e.h"
-
-typedef struct _E_Widget_Data E_Widget_Data;
-struct _E_Widget_Data
-{
-   Evas_Object *obj;
-   Eina_List   *sliders;
-   Eina_List   *entries;
-   Evas_Object *spectrum, *vert, *well;
-   E_Color     *cv;
-   char       **values;
-   int          mode;
-   int          changing;
-};
-
-static void
-_e_wid_del_hook(Evas_Object *obj)
-{
-   E_Widget_Data *wd;
-   int i = 0;
-
-   wd = e_widget_data_get(obj);
-   if (!wd) return;
-
-   for (i = 0; i < E_COLOR_COMPONENT_MAX; i++)
-     E_FREE(wd->values[i]);
-
-   E_FREE(wd->values);
-
-   eina_list_free(wd->sliders);
-   eina_list_free(wd->entries);
-
-   E_FREE(wd);
-}
-
-static void
-_e_wid_cb_radio_changed(void *data, Evas_Object *o EINA_UNUSED)
-{
-   E_Widget_Data *wd = data;
-
-   e_widget_spectrum_mode_set(wd->spectrum, wd->mode);
-   e_widget_cslider_mode_set(wd->vert, wd->mode);
-}
-
-static void
-_e_wid_cb_color_changed(void *data, Evas_Object *o)
-{
-   E_Widget_Data *wd = data;
-   Eina_List *l;
-   Evas_Object *eo, *so;
-   int changed = -1, i = 0;
-
-   if (wd->changing) return;
-
-   wd->changing = 1;
-
-   /* entry changed */
-   EINA_LIST_FOREACH(wd->entries, l, eo)
-     {
-        if (o == eo)
-          {
-             changed = i;
-             switch (i)
-               {
-                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;
-          }
-        i++;
-     }
-
-   if (changed != -1)
-     {
-        if (changed >= E_COLOR_COMPONENT_H)
-          e_color_update_hsv(wd->cv);
-        else if (changed >= E_COLOR_COMPONENT_R)
-          e_color_update_rgb(wd->cv);
-     }
-
-   if (o == wd->vert)
-     changed = wd->mode;
-   else
-     e_widget_cslider_update(wd->vert);
-
-   /* update the sliders */
-   i = 0;
-   EINA_LIST_FOREACH(wd->sliders, l, so)
-     {
-        if (o != so)
-          e_widget_cslider_update(so);
-        else
-          changed = i;
-        i++;
-     }
-
-   /* update the spectrum */
-   if (o != wd->spectrum /* && changed != -1*/)
-     e_widget_spectrum_update(wd->spectrum, 1);
-
-   e_widget_color_well_update(wd->well);
-
-   /* now update the text fields to show current values */
-   i = 0;
-   EINA_LIST_FOREACH(wd->entries, l, eo)
-     {
-        char buf[10];
-
-        if (o == eo) continue;
-        switch (i)
-          {
-           case E_COLOR_COMPONENT_R:
-             snprintf(buf, 10, "%i", wd->cv->r);
-             break;
-
-           case E_COLOR_COMPONENT_G:
-             snprintf(buf, 10, "%i", wd->cv->g);
-             break;
-
-           case E_COLOR_COMPONENT_B:
-             snprintf(buf, 10, "%i", wd->cv->b);
-             break;
-
-           case E_COLOR_COMPONENT_H:
-             snprintf(buf, 10, "%.0f", wd->cv->h);
-             break;
-
-           case E_COLOR_COMPONENT_S:
-             snprintf(buf, 10, "%.2f", wd->cv->s);
-             break;
-
-           case E_COLOR_COMPONENT_V:
-             snprintf(buf, 10, "%.2f", wd->cv->v);
-             break;
-
-           default:
-             break;
-          }
-        e_widget_entry_text_set(eo, buf);
-        i++;
-     }
-
-   wd->changing = 0;
-
-   e_widget_change(wd->obj);
-}
-
-static void
-_e_wid_cb_alpha_changed(void *data, Evas_Object *o EINA_UNUSED)
-{
-   _e_wid_cb_color_changed(data, NULL);
-}
-
-Evas_Object *
-e_widget_csel_add(Evas *evas, E_Color *color, Eina_Bool alpha_enabled)
-{
-   Evas_Object *obj, *o;
-   Evas_Object *frame, *table;
-   int i = 0;
-   E_Radio_Group *grp = NULL;
-   char *labels[6] = { N_("R"), N_("G"), N_("B"), N_("H"), N_("S"), N_("V") };
-   E_Widget_Data *wd;
-   Evas_Coord mw, mh;
-
-   obj = e_widget_add(evas);
-   e_widget_del_hook_set(obj, _e_wid_del_hook);
-
-   wd = calloc(1, sizeof(E_Widget_Data));
-   wd->mode = 1;
-   wd->cv = color;
-   wd->obj = obj;
-   e_widget_data_set(obj, wd);
-
-   table = e_widget_table_add(e_win_evas_win_get(evas), 0);
-   e_widget_sub_object_add(obj, table);
-   e_widget_resize_object_set(obj, table);
-
-   frame = e_widget_table_add(e_win_evas_win_get(evas), 0);
-   e_widget_sub_object_add(obj, frame);
-   grp = e_widget_radio_group_new(&wd->mode);
-
-   wd->values = calloc(E_COLOR_COMPONENT_MAX, sizeof(char *));
-
-   for (i = 0; i < E_COLOR_COMPONENT_MAX; i++)
-     {
-        wd->values[i] = calloc(10, sizeof(char));
-        switch (i)
-          {
-           case E_COLOR_COMPONENT_R:
-             snprintf(wd->values[i], 10, "%i", wd->cv->r);
-             break;
-
-           case E_COLOR_COMPONENT_G:
-             snprintf(wd->values[i], 10, "%i", wd->cv->g);
-             break;
-
-           case E_COLOR_COMPONENT_B:
-             snprintf(wd->values[i], 10, "%i", wd->cv->b);
-             break;
-
-           case E_COLOR_COMPONENT_H:
-             snprintf(wd->values[i], 10, "%.0f", wd->cv->h);
-             break;
-
-           case E_COLOR_COMPONENT_S:
-             snprintf(wd->values[i], 10, "%.2f", wd->cv->s);
-             break;
-
-           case E_COLOR_COMPONENT_V:
-             snprintf(wd->values[i], 10, "%.2f", wd->cv->v);
-             break;
-
-           default:
-             break;
-          }
-
-        o = e_widget_radio_add(evas, _(labels[i]), i, grp);
-        e_widget_sub_object_add(obj, o);
-        e_widget_on_change_hook_set(o, _e_wid_cb_radio_changed, wd);
-        e_widget_table_object_append(frame, o, 0, i, 1, 1, 1, 1, 0, 0);
-
-        o = e_widget_cslider_add(evas, i, wd->cv, 0, 0);
-        e_widget_sub_object_add(obj, o);
-        evas_object_show(o);
-        wd->sliders = eina_list_append(wd->sliders, o);
-        e_widget_on_change_hook_set(o, _e_wid_cb_color_changed, wd);
-        e_widget_size_min_set(o, 32, 16);
-        e_widget_table_object_append(frame, o, 1, i, 6, 1, 1, 1, 1, 0);
-
-        o = e_widget_entry_add(e_win_evas_win_get(evas), &(wd->values[i]), 
NULL, NULL, NULL);
-        e_widget_sub_object_add(obj, o);
-        evas_object_show(o);
-        wd->entries = eina_list_append(wd->entries, o);
-        e_widget_table_object_append(frame, o, 7, i, 3, 1, 1, 1, 1, 0);
-        e_widget_on_change_hook_set(o, _e_wid_cb_color_changed, wd);
-     }
-
-   if (alpha_enabled)
-     {
-        o = e_widget_label_add(evas, _("Alpha"));
-        e_widget_table_object_append(frame, o, 0, i, 1, 1, 1, 1, 0, 0);
-        o = e_widget_slider_add(evas, 1, 0, "%0.0f", 0, 255, 1, 0, NULL,
-                                &(wd->cv->a), 100);
-        e_widget_on_change_hook_set(o, _e_wid_cb_alpha_changed, wd);
-        e_widget_table_object_append(frame, o, 1, i, 10, 1, 1, 1, 0, 0);
-     }
-
-   e_widget_table_object_append(table, frame, 2, 0, 1, 2, 1, 0, 1, 0);
-
-   o = e_widget_spectrum_add(evas, wd->mode, wd->cv);
-   e_widget_sub_object_add(obj, o);
-   evas_object_show(o);
-   e_widget_on_change_hook_set(o, _e_wid_cb_color_changed, wd);
-   wd->spectrum = o;
-   e_widget_size_min_set(o, 120, 120);
-   e_widget_table_object_append(table, o, 0, 0, 1, 2, 1, 1, 1, 1);
-
-   o = e_widget_cslider_add(evas, wd->mode, wd->cv, 1, 1);
-   e_widget_sub_object_add(obj, o);
-   e_widget_on_change_hook_set(o, _e_wid_cb_color_changed, wd);
-   e_widget_size_min_set(o, 16, 16);
-   evas_object_show(o);
-   wd->vert = o;
-   e_widget_table_object_append(table, o, 1, 0, 1, 2, 0, 1, 0, 1);
-
-   o = e_widget_color_well_add(evas, wd->cv, 0);
-   e_widget_sub_object_add(obj, o);
-   evas_object_show(o);
-   wd->well = o;
-   e_widget_size_min_set(o, 32, 32);
-   e_widget_table_object_append(table, o, 0, 2, 3, 1, 1, 1, 0, 0);
-
-   e_widget_size_min_get(table, &mw, &mh);
-   e_widget_size_min_set(obj, mw, mh);
-
-   return obj;
-}
-
diff --git a/src/bin/e_widget_csel.h b/src/bin/e_widget_csel.h
deleted file mode 100644
index 0f4dbfe..0000000
--- a/src/bin/e_widget_csel.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef E_WIDGET_CSEL_H
-#define E_WIDGET_CSEL_H
-
-Evas_Object *e_widget_csel_add(Evas *evas, E_Color *color, Eina_Bool 
alpha_enabled);
-
-#endif

-- 


Reply via email to