Enlightenment CVS committal

Author  : codewarrior
Project : e17
Module  : proto

Dir     : e17/proto/estickies/src/bin


Modified Files:
        stickies.c 


Log Message:
- copy/cut/paste respects the selected text now
- control-a selects all text in the sticky


===================================================================
RCS file: /cvs/e/e17/proto/estickies/src/bin/stickies.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- stickies.c  18 Aug 2006 10:39:01 -0000      1.10
+++ stickies.c  21 Aug 2006 12:07:37 -0000      1.11
@@ -73,6 +73,17 @@
          {
             etk_clipboard_text_request(ETK_WIDGET(s->win));
          }
+       else if(!strcmp(ev->key, "a"))
+         {
+            Etk_Textblock_Iter *cursor;
+            Etk_Textblock_Iter *selection;
+            
+            cursor = 
etk_textblock_object_cursor_get(ETK_TEXT_VIEW(s->textview)->textblock_object);
+            selection = 
etk_textblock_object_selection_bound_get(ETK_TEXT_VIEW(s->textview)->textblock_object);
+            
+            etk_textblock_iter_backward_start(selection);
+            etk_textblock_iter_forward_end(cursor);
+         }
      }
 }
 
@@ -559,10 +570,9 @@
    cursor = 
etk_textblock_object_cursor_get(ETK_TEXT_VIEW(s->textview)->textblock_object);
    selection = 
etk_textblock_object_selection_bound_get(ETK_TEXT_VIEW(s->textview)->textblock_object);
    
-   /* TODO:
-    * handle the case where we are pasting and there's a selection
-    */
-   
+   if(cursor != selection)
+     etk_textblock_delete_range(ETK_TEXT_VIEW(s->textview)->textblock,
+                               cursor, selection);      
    etk_textblock_insert(ETK_TEXT_VIEW(s->textview)->textblock, cursor,
                        ev_text->text, strlen(ev_text->text));
 }



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