Add me to authors, and make selection work a bit better.
authorBrett Nash <nash@nash.id.au>
Tue, 22 Jun 2010 05:12:08 +0000 (05:12 +0000)
committerBrett Nash <nash@nash.id.au>
Tue, 22 Jun 2010 05:12:08 +0000 (05:12 +0000)
SVN revision: 49792

AUTHORS
src/lib/elm_cnp_helper.c
src/lib/elm_entry.c

diff --git a/AUTHORS b/AUTHORS
index 8df9a5c0da634d23f9883b510e70a238f95a46fb..8aec86f2ae3fd563454173bd80bcfb6eddfac49c 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -13,3 +13,4 @@ Brian Wang <brian.wang.0721@gmail.com>
 Mike Blumenkrantz (zmike) <mike@zentific.com>
 Saumsung Electronics <tbd>
 Samsung SAIT <tbd>
+Brett Nash <nash@nash.id.au>
index af8927b10c8aebd02d7e856ed38d844ad7789e90..220b79331ca83ee61999273549b79060e137940b 100644 (file)
@@ -138,7 +138,7 @@ elm_selection_set(enum _elm_sel_type selection, Evas_Object *widget,
    sel->active = 1;
    sel->widget = widget;
    sel->set(elm_win_xwindow_get(elm_widget_top_get(widget)),
-        &selection, sizeof(void *));
+        &selection, sizeof(int));
    sel->format = format;
    sel->selbuf = strdup(selbuf);
    return true;
index 51c293ccbb728f2c72c2dc8143b249f015fd9e2e..cdcf3cfbe1ac9dc98fcff6d1ed950c1176425db2 100644 (file)
@@ -925,23 +925,17 @@ _signal_selection_start(void *data, Evas_Object *obj __UNUSED__, const char *emi
      }
    wd->have_selection = EINA_TRUE;
    evas_object_smart_callback_call(data, SIG_SELECTION_START, NULL);
+#ifdef HAVE_ELEMENTARY_X
    if (wd->sel_notify_handler)
      {
-       char *txt = _mkup_to_text(elm_entry_selection_get(data));
-
-       if (txt)
-         {
-#ifdef HAVE_ELEMENTARY_X
-            Evas_Object *top;
+       char *txt = elm_entry_selection_get(data);
+       Evas_Object *top;
 
-            top = elm_widget_top_get(data);
-            if ((top) && (elm_win_xwindow_get(top)))
-              ecore_x_selection_primary_set(elm_win_xwindow_get(top), txt,
-                                             strlen(txt));
-#endif
-            free(txt);
-         }
+       top = elm_widget_top_get(data);
+       if ((top) && (elm_win_xwindow_get(top)))
+            elm_selection_set(ELM_SEL_PRIMARY, data, ELM_SEL_MARKUP, txt);
      }
+#endif
 }
 
 static void
@@ -972,17 +966,8 @@ _signal_selection_cleared(void *data, Evas_Object *obj __UNUSED__, const char *e
 
             top = elm_widget_top_get(data);
             if ((top) && (elm_win_xwindow_get(top)))
-              {
-                 char *t;
-
-                 t = _mkup_to_text(wd->cut_sel);
-                 if (t)
-                   {
-                      ecore_x_selection_primary_set(elm_win_xwindow_get(top),
-                                                     t, strlen(t));
-                      free(t);
-                   }
-              }
+                elm_selection_set(ELM_SEL_PRIMARY, data, ELM_SEL_MARKUP,
+                                      wd->cut_sel);
 #endif
             eina_stringshare_del(wd->cut_sel);
             wd->cut_sel = NULL;