REVERT! :)

Really though, judging from Daniel's comment it sounds like someone 
should revert it.

--
Tom.

On 23/02/12 18:12, Daniel Juyung Seo wrote:
> Dear Sanjeev,
>
> On Thu, Feb 23, 2012 at 11:52 AM, Enlightenment SVN
> <no-re...@enlightenment.org>  wrote:
>> Log:
>> Remove MAX, it is not useful for app. developers.
>
> This means new selection type will never be added?
>
> Daniel Juyung Seo (SeoZ)
>
>
>>
>>   Signed-off-by: Sanjeev BA<eflel...@gmail.com>
>>
>> Author:       sanjeev
>> Date:         2012-02-22 18:52:07 -0800 (Wed, 22 Feb 2012)
>> New Revision: 68291
>> Trac:         http://trac.enlightenment.org/e/changeset/68291
>>
>> Modified:
>>   trunk/elementary/src/lib/elm_cnp.c trunk/elementary/src/lib/elm_cnp.h
>>
>> Modified: trunk/elementary/src/lib/elm_cnp.c
>> ===================================================================
>> --- trunk/elementary/src/lib/elm_cnp.c  2012-02-23 02:52:00 UTC (rev 68290)
>> +++ trunk/elementary/src/lib/elm_cnp.c  2012-02-23 02:52:07 UTC (rev 68291)
>> @@ -324,7 +324,7 @@
>>       },
>>   };
>>
>> -static Cnp_Selection selections[ELM_SEL_TYPE_MAX] = {
>> +static Cnp_Selection selections[ELM_SEL_TYPE_CLIPBOARD + 1] = {
>>       ARRAYINIT(ELM_SEL_TYPE_PRIMARY) {
>>            .debug = "Primary",
>>            .ecore_sel = ECORE_X_SELECTION_PRIMARY,
>> @@ -339,6 +339,11 @@
>>            .clear = ecore_x_selection_secondary_clear,
>>            .request = ecore_x_selection_secondary_request,
>>       },
>> +     ARRAYINIT(ELM_SEL_TYPE_XDND) {
>> +          .debug = "XDnD",
>> +          .ecore_sel = ECORE_X_SELECTION_XDND,
>> +          .request = ecore_x_selection_xdnd_request,
>> +     },
>>       ARRAYINIT(ELM_SEL_TYPE_CLIPBOARD) {
>>            .debug = "Clipboard",
>>            .ecore_sel = ECORE_X_SELECTION_CLIPBOARD,
>> @@ -346,11 +351,6 @@
>>            .clear = ecore_x_selection_clipboard_clear,
>>            .request = ecore_x_selection_clipboard_request,
>>       },
>> -     ARRAYINIT(ELM_SEL_TYPE_XDND) {
>> -          .debug = "XDnD",
>> -          .ecore_sel = ECORE_X_SELECTION_XDND,
>> -          .request = ecore_x_selection_xdnd_request,
>> -     },
>>   };
>>
>>   /* Data for DND in progress */
>> @@ -400,7 +400,7 @@
>>
>>     if (top) xwin = elm_win_xwindow_get(top);
>>     else xwin = elm_win_xwindow_get(obj);
>> -   if ((!xwin) || (selection>= ELM_SEL_TYPE_MAX))
>> +   if ((!xwin) || (selection>  ELM_SEL_TYPE_CLIPBOARD))
>>       return EINA_FALSE;
>>     if (!_elm_cnp_init_count) _elm_cnp_init();
>>     if ((!selbuf)&&  (format != ELM_SEL_FORMAT_IMAGE))
>> @@ -438,7 +438,7 @@
>>   #ifdef HAVE_ELEMENTARY_X
>>     Cnp_Selection *sel;
>>
>> -   if ((unsigned int)selection>= (unsigned int)ELM_SEL_TYPE_MAX)
>> +   if ((unsigned int)selection>  (unsigned int)ELM_SEL_TYPE_CLIPBOARD)
>>       return EINA_FALSE;
>>     if (!_elm_cnp_init_count) _elm_cnp_init();
>>
>> @@ -470,7 +470,7 @@
>>     Evas_Object *top;
>>     Cnp_Selection *sel;
>>
>> -   if (selection>= ELM_SEL_TYPE_MAX)
>> +   if (selection>  ELM_SEL_TYPE_CLIPBOARD)
>>       return EINA_FALSE;
>>     if (!_elm_cnp_init_count) _elm_cnp_init();
>>
>> @@ -519,13 +519,13 @@
>>     Cnp_Selection *sel;
>>     int i;
>>
>> -   for (i = 0; i<  ELM_SEL_TYPE_MAX; i++)
>> +   for (i = 0; i<= ELM_SEL_TYPE_CLIPBOARD; i++)
>>       {
>>          if (selections[i].ecore_sel == ev->selection) break;
>>       }
>>     cnp_debug("selection %d clear\n", i);
>>     /* Not me... Don't care */
>> -   if (i == ELM_SEL_TYPE_MAX) return ECORE_CALLBACK_PASS_ON;
>> +   if (i>  ELM_SEL_TYPE_CLIPBOARD) return ECORE_CALLBACK_PASS_ON;
>>
>>     sel = selections + i;
>>     sel->active = EINA_FALSE;
>> @@ -556,9 +556,6 @@
>>     cnp_debug("selection notify callback: %d\n",ev->selection);
>>     switch (ev->selection)
>>       {
>> -      case ECORE_X_SELECTION_CLIPBOARD:
>> -         sel = selections + ELM_SEL_TYPE_CLIPBOARD;
>> -         break;
>>        case ECORE_X_SELECTION_PRIMARY:
>>           sel = selections + ELM_SEL_TYPE_PRIMARY;
>>           break;
>> @@ -568,6 +565,9 @@
>>        case ECORE_X_SELECTION_XDND:
>>           sel = selections + ELM_SEL_TYPE_XDND;
>>           break;
>> +      case ECORE_X_SELECTION_CLIPBOARD:
>> +         sel = selections + ELM_SEL_TYPE_CLIPBOARD;
>> +         break;
>>        default:
>>           return ECORE_CALLBACK_PASS_ON;
>>       }
>> @@ -600,7 +600,7 @@
>>          Cnp_Selection *sel = selections + *((int *)data);
>>          if (sel->active&&
>>              (sel->format>= ELM_SEL_FORMAT_TARGETS)&&
>> -            (sel->format<  ELM_SEL_FORMAT_MAX))
>> +            (sel->format<= ELM_SEL_FORMAT_HTML))
>>            return sel->format;
>>       }
>>     return ELM_SEL_FORMAT_NONE;
>>
>> Modified: trunk/elementary/src/lib/elm_cnp.h
>> ===================================================================
>> --- trunk/elementary/src/lib/elm_cnp.h  2012-02-23 02:52:00 UTC (rev 68290)
>> +++ trunk/elementary/src/lib/elm_cnp.h  2012-02-23 02:52:07 UTC (rev 68291)
>> @@ -1,24 +1,30 @@
>>   /**
>> - * @addtogroup CopyPaste
>> + * @defgroup CopyPaste
>> + *
>> + * Implement the copy and paste + clipboard functionality, in order to
>> + * share data across application windows.
>> + *
>> + * Contains functions to select a portion of text, stick it to a clipboard
>> + * and to paste the selection to an appropriate place.
>> + *
>> + *
>> + *
>>   * @{
>>   */
>> -
>>   typedef struct _Elm_Selection_Data Elm_Selection_Data;
>>   typedef Eina_Bool                (*Elm_Drop_Cb)(void *d, Evas_Object *o, 
>> Elm_Selection_Data *data);
>>
>>   /**
>> - * Types of X window selection property names.
>> + * Defines the types of selection property names.
>>   * Kindly refer to http://www.x.org/docs/X11/xlib.pdf
>>   * for more details.
>>   */
>>   typedef enum
>>   {
>>     ELM_SEL_TYPE_PRIMARY, //primary text selection
>> -   ELM_SEL_TYPE_SECONDARY,
>> +   ELM_SEL_TYPE_SECONDARY, // used when primary selection is in use.
>>     ELM_SEL_TYPE_XDND, //drag and drop
>> -   ELM_SEL_TYPE_CLIPBOARD,
>> -
>> -   ELM_SEL_TYPE_MAX,
>> +   ELM_SEL_TYPE_CLIPBOARD, // highlighted text
>>   } Elm_Sel_Type;
>>
>>   typedef enum
>> @@ -37,8 +43,6 @@
>>     ELM_SEL_FORMAT_VCARD = 0x08,
>>     /** Raw HTML-like things for widgets that want that stuff (hello 
>> webkit!) */
>>     ELM_SEL_FORMAT_HTML = 0x10,
>> -
>> -   ELM_SEL_FORMAT_MAX
>>   } Elm_Sel_Format;
>>
>>   struct _Elm_Selection_Data
>>
>>
>> ------------------------------------------------------------------------------
>> Virtualization&  Cloud Management Using Capacity Planning
>> Cloud computing makes use of virtualization - but cloud computing
>> also focuses on allowing computing to be delivered as a service.
>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>> _______________________________________________
>> enlightenment-svn mailing list
>> enlightenment-...@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
> ------------------------------------------------------------------------------
> Virtualization&  Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to