Merge "[C&P popup] add search button & change clipboard icon to text Change-Id: Iccaa...
authordeasung.kim <deasung.kim@samsung.com>
Mon, 16 Jan 2012 08:42:45 +0000 (17:42 +0900)
committerGerrit Code Review <gerrit2@localhost>
Mon, 16 Jan 2012 08:42:45 +0000 (17:42 +0900)
data/images/Makefile.am
data/images/copy&paste_icon_clipboard.png [moved from data/images/copypaste_icon_share.png with 67% similarity]
data/images/copy&paste_icon_search.png [moved from data/images/copypaste_icon_clipboard.png with 72% similarity]
data/images/copy&paste_icon_share.png [moved from data/images/copypaste_icon_search.png with 78% similarity]
debian/control
packaging/elementary.spec
src/modules/ctxpopup_copypasteUI/Makefile.am
src/modules/ctxpopup_copypasteUI/copypaste.c

index 88a4f7e..fd11ba6 100644 (file)
@@ -45,9 +45,9 @@ icon_22.png \
 icon_23.png \
 bubble.png \
 bubble_sh.png \
-copypaste_icon_clipboard.png \
-copypaste_icon_search.png \
-copypaste_icon_share.png \
+copy&paste_icon_clipboard.png \
+copy&paste_icon_search.png \
+copy&paste_icon_share.png \
 mystrale.jpg \
 mystrale_2.jpg \
 twofish.jpg \
similarity index 67%
rename from data/images/copypaste_icon_share.png
rename to data/images/copy&paste_icon_clipboard.png
index b83a7d2..0158875 100644 (file)
Binary files a/data/images/copypaste_icon_share.png and b/data/images/copy&paste_icon_clipboard.png differ
similarity index 72%
rename from data/images/copypaste_icon_clipboard.png
rename to data/images/copy&paste_icon_search.png
index 79ac80a..c925773 100644 (file)
Binary files a/data/images/copypaste_icon_clipboard.png and b/data/images/copy&paste_icon_search.png differ
similarity index 78%
rename from data/images/copypaste_icon_search.png
rename to data/images/copy&paste_icon_share.png
index bc8e48c..7d78c69 100644 (file)
Binary files a/data/images/copypaste_icon_search.png and b/data/images/copy&paste_icon_share.png differ
index 49f6966..0bc2ca2 100644 (file)
@@ -3,7 +3,7 @@ Section: x11
 Priority: optional
 Maintainer: Jaehwan Kim <jae.hwan.kim@samsung.com>, Chuneon Park <chuneon.park@samsung.com>, Juyung Seo <juyung.seo@samsung.com>, Myungjae Lee <mjae.lee@samsung.com>, Woohyun Jung <wh0705.jung@samsung.com>, Jihoon Kim <jihoon48.kim@samsung.com>, Jeonghyun Yun <jh0506.yun@samsung.com>, Seunggyun Kim <sgyun.kim@samsung.com>, Shinwoo Kim <cinoo.kim@samsung.com>
 Uploaders: Doyoun Kang <doyoun.kang@samsung.com>, Hyoyoung Chang <hyoyoung.chang@samsung.com>, Myoungwoon Kim <myoungwoon.kim@samsung.com>, Shinwoo Kim <cinoo.kim@samsung.com>, Tae-Hwan Kim <the81.kim@samsung.com>
-Build-Depends: debhelper (>= 6), cdbs, libecore-dev, libevas-dev, libeet-dev, libeet-bin, libedje-dev, pkg-config, libtool, libeina-dev, libefreet-dev, libethumb-dev
+Build-Depends: debhelper (>= 6), cdbs, libecore-dev, libevas-dev, libeet-dev, libeet-bin, libedje-dev, pkg-config, libtool, libeina-dev, libefreet-dev, libethumb-dev, libappsvc-dev
 Standards-Version: 3.8.1
 Homepage: http://www.enlightenment.org
 
index 22e53f2..b87fc82 100644 (file)
@@ -24,6 +24,7 @@ BuildRequires:  pkgconfig(evas)
 BuildRequires:  pkgconfig(libxml-2.0)
 BuildRequires:  pkgconfig(x11)
 BuildRequires:  pkgconfig(icu-i18n)
+BuildRequires:  pkgconfig(appsvc)
 BuildRequires:  edje-tools
 BuildRequires:  embryo
 BuildRequires:  eet-tools
index 3f31a04..a3e5dc8 100755 (executable)
@@ -29,5 +29,5 @@ pkg_LTLIBRARIES = module.la
 module_la_SOURCES = copypaste.c
 
 module_la_LIBADD = $(top_builddir)/src/lib/libelementary.la
-module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
+module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version -lappsvc
 module_la_LIBTOOLFLAGS = --tag=disable-static
index a08253b..d35e4ca 100644 (file)
@@ -1,6 +1,7 @@
 #include <Elementary.h>
 #include "elm_module_priv.h"
 #include "elm_priv.h"
+#include <appsvc/appsvc.h>
 
 Elm_Entry_Extension_data *ext_mod;
 static int _mod_hook_count = 0;
@@ -155,6 +156,31 @@ _cancel(void *data, Evas_Object *obj, void *event_info)
 }
 
 static void
+_search_menu(void *data, Evas_Object *obj, void *event_info)
+{
+   if(!ext_mod) return;
+
+   int ret;
+   bundle *b = bundle_create();
+   if (!b)
+     {
+        //printf("bundle_create() failed\n");
+        return;
+     }
+
+   appsvc_set_operation(b, APPSVC_OPERATION_SEARCH);
+   if (ext_mod->selmode)
+     {
+        char *selection = elm_entry_selection_get(ext_mod->caller);
+        if (selection)
+          appsvc_add_data(b, APPSVC_DATA_KEYWORD, selection);
+     }
+   appsvc_run_service(b, 0, NULL, NULL);
+   bundle_free(b);
+   _ctxpopup_hide(obj);
+}
+
+static void
 _clipboard_menu(void *data, Evas_Object *obj, void *event_info)
 {
    if(!ext_mod) return;
@@ -299,13 +325,14 @@ obj_longpress(Evas_Object *obj)
              if ((!ext_mod->password) && (ext_mod->editable))
 #endif
                {
-                  icon = elm_icon_add(ext_mod->popup);
-                  snprintf(buf, sizeof(buf), "%s/images/copypaste_icon_clipboard.png", PACKAGE_DATA_DIR);
-                  elm_icon_file_set(icon, buf, NULL);
-                  added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL, icon, _clipboard_menu, obj);
+                  added_item = elm_ctxpopup_item_append(ext_mod->popup, "Clipboard", NULL, _clipboard_menu, obj);  // Clipboard
                   //elm_ctxpopup_item_append(ext_mod->popup, "More", NULL, _clipboard_menu, obj );
                }
              // end for cbhm
+             icon = elm_icon_add(ext_mod->popup);
+             snprintf(buf, sizeof(buf), "%s/images/copy&paste_icon_search.png", PACKAGE_DATA_DIR);
+             elm_icon_file_set(icon, buf, NULL);
+             added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL, icon, _search_menu, obj);  // Search
           }
         else
           {
@@ -348,13 +375,14 @@ obj_longpress(Evas_Object *obj)
                   if (ext_mod->editable)
 #endif
                     {
-                       icon = elm_icon_add(ext_mod->popup);
-                       snprintf(buf, sizeof(buf), "%s/images/copypaste_icon_clipboard.png", PACKAGE_DATA_DIR);
-                       elm_icon_file_set(icon, buf, NULL);
-                       added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL, icon, _clipboard_menu, obj);
+                       added_item = elm_ctxpopup_item_append(ext_mod->popup, "Clipboard", NULL, _clipboard_menu, obj);  // Clipboard
                        //elm_ctxpopup_item_append(ext_mod->popup, "More", NULL, _clipboard_menu, obj );
                     }
                   // end for cbhm
+                  icon = elm_icon_add(ext_mod->popup);
+                  snprintf(buf, sizeof(buf), "%s/images/copy&paste_icon_search.png", PACKAGE_DATA_DIR);
+                  elm_icon_file_set(icon, buf, NULL);
+                  added_item = elm_ctxpopup_item_append(ext_mod->popup, NULL, icon, _search_menu, obj);  // Search
                }
           }
         EINA_LIST_FOREACH(ext_mod->items, l, it)