summaryrefslogtreecommitdiff
path: root/src/bin/controls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/controls.c')
-rw-r--r--src/bin/controls.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/bin/controls.c b/src/bin/controls.c
index e3eb124..3fb8658 100644
--- a/src/bin/controls.c
+++ b/src/bin/controls.c
@@ -50,17 +50,21 @@ _cb_ct_del_delay(void *data EINA_UNUSED)
50} 50}
51 51
52static void 52static void
53_cb_ct_copy(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) 53_cb_ct_copy(void *data EINA_UNUSED,
54 Evas_Object *obj EINA_UNUSED,
55 void *event EINA_UNUSED)
54{ 56{
57 termio_copy_clipboard(ct_term);
55 controls_toggle(ct_win, ct_bg, ct_term, ct_donecb, ct_donedata); 58 controls_toggle(ct_win, ct_bg, ct_term, ct_donecb, ct_donedata);
56 termio_copy_clipboard(data);
57} 59}
58 60
59static void 61static void
60_cb_ct_paste(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) 62_cb_ct_paste(void *data EINA_UNUSED,
63 Evas_Object *obj EINA_UNUSED,
64 void *event EINA_UNUSED)
61{ 65{
66 termio_paste_clipboard(ct_term);
62 controls_toggle(ct_win, ct_bg, ct_term, ct_donecb, ct_donedata); 67 controls_toggle(ct_win, ct_bg, ct_term, ct_donecb, ct_donedata);
63 termio_paste_clipboard(data);
64} 68}
65 69
66static void 70static void
@@ -245,21 +249,21 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term,
245 elm_box_pack_end(ct_boxh, o); 249 elm_box_pack_end(ct_boxh, o);
246 evas_object_show(o); 250 evas_object_show(o);
247 251
248 o = _button_add(win, "New", "new", _cb_ct_new, term); 252 o = _button_add(win, "New", "new", _cb_ct_new, NULL);
249 elm_box_pack_end(ct_box2, o); 253 elm_box_pack_end(ct_box2, o);
250 254
251 o = _sep_add_h(win); 255 o = _sep_add_h(win);
252 elm_box_pack_end(ct_box2, o); 256 elm_box_pack_end(ct_box2, o);
253 257
254 o = _button_add(win, "Split V", "split-h", _cb_ct_split_v, term); 258 o = _button_add(win, "Split V", "split-h", _cb_ct_split_v, NULL);
255 elm_box_pack_end(ct_box2, o); 259 elm_box_pack_end(ct_box2, o);
256 o = _button_add(win, "Split H", "split-v", _cb_ct_split_h, term); 260 o = _button_add(win, "Split H", "split-v", _cb_ct_split_h, NULL);
257 elm_box_pack_end(ct_box2, o); 261 elm_box_pack_end(ct_box2, o);
258 262
259 o = _sep_add_h(win); 263 o = _sep_add_h(win);
260 elm_box_pack_end(ct_box2, o); 264 elm_box_pack_end(ct_box2, o);
261 265
262 o = _button_add(win, "Close", "close", _cb_ct_close, term); 266 o = _button_add(win, "Close", "close", _cb_ct_close, NULL);
263 elm_box_pack_end(ct_box2, o); 267 elm_box_pack_end(ct_box2, o);
264 268
265 o = _sep_add_v(win); 269 o = _sep_add_v(win);
@@ -269,24 +273,24 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term,
269 elm_box_pack_end(ct_boxh, o); 273 elm_box_pack_end(ct_boxh, o);
270 evas_object_show(o); 274 evas_object_show(o);
271 275
272 o = _button_add(win, "Copy", "copy", _cb_ct_copy, term); 276 o = _button_add(win, "Copy", "copy", _cb_ct_copy, NULL);
273 evas_object_data_set(ct_frame, "bt_copy", o); 277 evas_object_data_set(ct_frame, "bt_copy", o);
274 if (!termio_selection_exists(term)) 278 if (!termio_selection_exists(term))
275 elm_object_disabled_set(o, EINA_TRUE); 279 elm_object_disabled_set(o, EINA_TRUE);
276 elm_box_pack_end(ct_box, o); 280 elm_box_pack_end(ct_box, o);
277 o = _button_add(win, "Paste", "paste", _cb_ct_paste, term); 281 o = _button_add(win, "Paste", "paste", _cb_ct_paste, NULL);
278 elm_box_pack_end(ct_box, o); 282 elm_box_pack_end(ct_box, o);
279 283
280 o = _sep_add_h(win); 284 o = _sep_add_h(win);
281 elm_box_pack_end(ct_box, o); 285 elm_box_pack_end(ct_box, o);
282 286
283 o = _button_add(win, "Settings", "settings", _cb_ct_options, term); 287 o = _button_add(win, "Settings", "settings", _cb_ct_options, NULL);
284 elm_box_pack_end(ct_box, o); 288 elm_box_pack_end(ct_box, o);
285 289
286 o = _sep_add_h(win); 290 o = _sep_add_h(win);
287 elm_box_pack_end(ct_box, o); 291 elm_box_pack_end(ct_box, o);
288 292
289 o = _button_add(win, "About", "about", _cb_ct_about, term); 293 o = _button_add(win, "About", "about", _cb_ct_about, NULL);
290 elm_box_pack_end(ct_box, o); 294 elm_box_pack_end(ct_box, o);
291 295
292 evas_object_event_callback_add(ct_frame, EVAS_CALLBACK_DEL, 296 evas_object_event_callback_add(ct_frame, EVAS_CALLBACK_DEL,
@@ -306,7 +310,7 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term,
306 edje_object_part_swallow(bg, "terminology.dismiss", o); 310 edje_object_part_swallow(bg, "terminology.dismiss", o);
307 evas_object_show(o); 311 evas_object_show(o);
308 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, 312 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
309 _cb_mouse_down, term); 313 _cb_mouse_down, NULL);
310 evas_object_event_callback_add(ct_over, EVAS_CALLBACK_DEL, 314 evas_object_event_callback_add(ct_over, EVAS_CALLBACK_DEL,
311 _cb_over_del, NULL); 315 _cb_over_del, NULL);
312 316