From adc571acfa553b194e9aa0c88aeaf98c565b31b9 Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Tue, 7 Jun 2011 21:14:21 +0900 Subject: [PATCH] [Build on Windows] entry, tickernoti, win and copypaste modules --- src/lib/elm_entry.c | 4 ++++ src/lib/elm_tickernoti.c | 7 ++++++- src/lib/elm_win.c | 4 ++-- src/modules/ctxpopup_copypasteUI/copypaste.c | 2 ++ src/modules/ctxpopup_copypasteshareUI/copypaste.c | 8 ++++++-- src/modules/popup_copypasteUI/copypaste.c | 2 ++ 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index aa1cf41..1289286 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -996,7 +996,9 @@ _clipboard_menu(void *data, Evas_Object *obj, void *event_info __UNUSED__) if (!wd) return; // start for cbhm +#ifdef HAVE_ELEMENTARY_X ecore_x_selection_secondary_set(elm_win_xwindow_get(obj), "",1); +#endif cnpwidgetdata = data; elm_cbhm_helper_init(obj); if (elm_entry_cnp_textonly_get(obj)) @@ -2625,8 +2627,10 @@ elm_entry_entry_insert(Evas_Object *obj, const char *entry) if (!wd) return; edje_object_part_text_insert(wd->ent, "elm.text", entry); // start for cbhm +#ifdef HAVE_ELEMENTARY_X if (cnpwidgetdata == obj) ecore_x_selection_secondary_set(elm_win_xwindow_get(obj), "",1); +#endif // end for cbhm wd->changed = EINA_TRUE; _sizing_eval(obj); diff --git a/src/lib/elm_tickernoti.c b/src/lib/elm_tickernoti.c index ec3e61d..f5b15b1 100644 --- a/src/lib/elm_tickernoti.c +++ b/src/lib/elm_tickernoti.c @@ -157,9 +157,10 @@ static Evas_Object elm_win_autodel_set (win, EINA_TRUE); elm_win_alpha_set (win, EINA_TRUE); +#ifdef HAVE_ELEMENTARY_X /* set top window */ _make_notification_window (win); - +#endif return win; } @@ -239,14 +240,18 @@ _show(void *data, Evas *e, Evas_Object *obj, void *event_info) if (wd->mode == ELM_TICKERNOTI_DEFAULT) { evas_object_hide (wd->win_detail); +#ifdef HAVE_ELEMENTARY_X _make_notification_window (wd->win_indi); +#endif evas_object_show (wd->win_indi); edje_object_signal_emit (wd->edje_indi, "effect,show", "bg_1line"); } else if (wd->mode == ELM_TICKERNOTI_DETAILVIEW) { evas_object_hide (wd->win_indi); +#ifdef HAVE_ELEMENTARY_X _make_notification_window (wd->win_detail); +#endif evas_object_show (wd->win_detail); edje_object_signal_emit (wd->edje_detail, "effect,show", "bg_2line"); } diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index bada87d..b53b510 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -2419,8 +2419,8 @@ elm_win_indicator_state_set(Evas_Object *obj, int show_state) if (strcmp(elm_widget_type_get(obj), "win")) return; win = elm_widget_data_get(obj); if (!win) return; - _elm_win_xwindow_get(win); #ifdef HAVE_ELEMENTARY_X + _elm_win_xwindow_get(win); if (win->xwin) return ecore_x_window_prop_property_set (win->xwin, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, ECORE_X_ATOM_CARDINAL, 32, &show_state, 1); @@ -2435,8 +2435,8 @@ elm_win_indicator_state_get(Evas_Object *obj) if (strcmp(elm_widget_type_get(obj), "win")) return -1; win = elm_widget_data_get(obj); if (!win) return -1; - _elm_win_xwindow_get(win); #ifdef HAVE_ELEMENTARY_X + _elm_win_xwindow_get(win); if (win->xwin) { int ret; diff --git a/src/modules/ctxpopup_copypasteUI/copypaste.c b/src/modules/ctxpopup_copypasteUI/copypaste.c index 2aa5e65..a8cc89b 100644 --- a/src/modules/ctxpopup_copypasteUI/copypaste.c +++ b/src/modules/ctxpopup_copypasteUI/copypaste.c @@ -104,7 +104,9 @@ _clipboard_menu(void *data, Evas_Object *obj, void *event_info) if(!ext_mod) return; // start for cbhm +#ifdef HAVE_ELEMENTARY_X ecore_x_selection_secondary_set(elm_win_xwindow_get(obj), "",1); +#endif ext_mod->cnpinit(data,obj,event_info); elm_cbhm_helper_init(obj); if (ext_mod->textonly) diff --git a/src/modules/ctxpopup_copypasteshareUI/copypaste.c b/src/modules/ctxpopup_copypasteshareUI/copypaste.c index 80d8b1f..fbef66d 100644 --- a/src/modules/ctxpopup_copypasteshareUI/copypaste.c +++ b/src/modules/ctxpopup_copypasteshareUI/copypaste.c @@ -79,11 +79,12 @@ static void _share(void *data, Evas_Object *obj, void *event_info) { char *str = NULL; +#ifdef HAVE_ELEMENTARY_X Ecore_X_Atom atom; - +#endif str = elm_entry_markup_to_utf8(elm_entry_selection_get(data)); if (!str) return; - +#ifdef HAVE_ELEMENTARY_X atom = ecore_x_atom_get("_TEXT_SHARE_TEST"); if (atom) { @@ -92,6 +93,7 @@ _share(void *data, Evas_Object *obj, void *event_info) atom, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 0, 0, 0, 0, 0); } +#endif free(str); evas_object_hide(obj); @@ -110,7 +112,9 @@ static void _clipboard_menu(void *data, Evas_Object *obj, void *event_info) { // start for cbhm +#ifdef HAVE_ELEMENTARY_X ecore_x_selection_secondary_set(elm_win_xwindow_get(obj), "",1); +#endif ext_mod->cnpinit(data,obj,event_info); elm_cbhm_helper_init(obj); if (ext_mod->textonly) diff --git a/src/modules/popup_copypasteUI/copypaste.c b/src/modules/popup_copypasteUI/copypaste.c index 9abb8e3..e038770 100644 --- a/src/modules/popup_copypasteUI/copypaste.c +++ b/src/modules/popup_copypasteUI/copypaste.c @@ -55,7 +55,9 @@ static void _clipboard_menu(void *data, Evas_Object *obj, void *event_info) { // start for cbhm +#ifdef HAVE_ELEMENTARY_X ecore_x_selection_secondary_set(elm_win_xwindow_get(obj), "",1); +#endif ext_mod->cnpinit(data,obj,event_info); elm_cbhm_helper_init(obj); if (ext_mod->textonly) -- 2.7.4