summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/themes/default.edc1
-rw-r--r--data/themes/images/icon_miniview.pngbin0 -> 523 bytes
-rw-r--r--src/bin/controls.c58
3 files changed, 41 insertions, 18 deletions
diff --git a/data/themes/default.edc b/data/themes/default.edc
index 5616114..66970b2 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -3544,6 +3544,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
3544 ICON("new", "icon_new.png"); 3544 ICON("new", "icon_new.png");
3545 ICON("split-h", "icon_split_h.png"); 3545 ICON("split-h", "icon_split_h.png");
3546 ICON("split-v", "icon_split_v.png"); 3546 ICON("split-v", "icon_split_v.png");
3547 ICON("mini-view", "icon_miniview.png");
3547 ICON("close", "icon_close.png"); 3548 ICON("close", "icon_close.png");
3548 ICON("copy", "icon_copy.png"); 3549 ICON("copy", "icon_copy.png");
3549 ICON("paste", "icon_paste.png"); 3550 ICON("paste", "icon_paste.png");
diff --git a/data/themes/images/icon_miniview.png b/data/themes/images/icon_miniview.png
new file mode 100644
index 0000000..e68ef0a
--- /dev/null
+++ b/data/themes/images/icon_miniview.png
Binary files differ
diff --git a/src/bin/controls.c b/src/bin/controls.c
index d18320e..365cd3a 100644
--- a/src/bin/controls.c
+++ b/src/bin/controls.c
@@ -7,8 +7,8 @@
7#include "termio.h" 7#include "termio.h"
8#include "main.h" 8#include "main.h"
9 9
10static Evas_Object *ct_frame = NULL, *ct_boxh = NULL, *ct_box = NULL; 10static Evas_Object *ct_frame = NULL, *ct_boxh = NULL, *ct_boxv = NULL;
11static Evas_Object *ct_box2 = NULL, *ct_over = NULL; 11static Evas_Object *ct_box = NULL, *ct_box2 = NULL, *ct_box3 = NULL, *ct_over = NULL;
12static Eina_Bool ct_out = EINA_FALSE; 12static Eina_Bool ct_out = EINA_FALSE;
13static Ecore_Timer *ct_del_timer = NULL; 13static Ecore_Timer *ct_del_timer = NULL;
14static Evas_Object *ct_win = NULL, *ct_bg = NULL, *ct_term = NULL; 14static Evas_Object *ct_win = NULL, *ct_bg = NULL, *ct_term = NULL;
@@ -86,6 +86,12 @@ _cb_ct_split_h(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
86} 86}
87 87
88static void 88static void
89_cb_ct_miniview(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
90{
91 term_miniview_toggle(termio_term_get(ct_term));
92}
93
94static void
89_cb_ct_close(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) 95_cb_ct_close(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
90{ 96{
91 main_close(ct_win, ct_term); 97 main_close(ct_win, ct_term);
@@ -240,36 +246,41 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term,
240 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); 246 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
241 elm_object_text_set(o, _("Controls")); 247 elm_object_text_set(o, _("Controls"));
242 248
249 ct_boxv = o = elm_box_add(win);
250 elm_box_horizontal_set(o, EINA_FALSE);
251 elm_object_content_set(ct_frame, o);
252 evas_object_show(o);
253
243 ct_boxh = o = elm_box_add(win); 254 ct_boxh = o = elm_box_add(win);
255 elm_box_pack_end(ct_boxv, o);
244 elm_box_horizontal_set(o, EINA_TRUE); 256 elm_box_horizontal_set(o, EINA_TRUE);
245 elm_object_content_set(ct_frame, o);
246 evas_object_show(o); 257 evas_object_show(o);
247 258
248 ct_box2 = o = elm_box_add(win); 259 ct_box = o = elm_box_add(win);
249 elm_box_pack_end(ct_boxh, o); 260 elm_box_pack_end(ct_boxh, o);
250 evas_object_show(o); 261 evas_object_show(o);
251 262
252 o = _button_add(win, _("New"), "new", _cb_ct_new, NULL); 263 o = _button_add(win, _("New"), "new", _cb_ct_new, NULL);
253 elm_box_pack_end(ct_box2, o); 264 elm_box_pack_end(ct_box, o);
254 265
255 o = _sep_add_h(win); 266 o = _sep_add_h(win);
256 elm_box_pack_end(ct_box2, o); 267 elm_box_pack_end(ct_box, o);
257 268
258 o = _button_add(win, _("Split V"), "split-h", _cb_ct_split_v, NULL); 269 o = _button_add(win, _("Split V"), "split-h", _cb_ct_split_v, NULL);
259 elm_box_pack_end(ct_box2, o); 270 elm_box_pack_end(ct_box, o);
260 o = _button_add(win, _("Split H"), "split-v", _cb_ct_split_h, NULL); 271 o = _button_add(win, _("Split H"), "split-v", _cb_ct_split_h, NULL);
261 elm_box_pack_end(ct_box2, o); 272 elm_box_pack_end(ct_box, o);
262 273
263 o = _sep_add_h(win); 274 o = _sep_add_h(win);
264 elm_box_pack_end(ct_box2, o); 275 elm_box_pack_end(ct_box, o);
265 276
266 o = _button_add(win, _("Close"), "close", _cb_ct_close, NULL); 277 o = _button_add(win, _("Miniview"), "mini-view", _cb_ct_miniview, NULL);
267 elm_box_pack_end(ct_box2, o); 278 elm_box_pack_end(ct_box, o);
268 279
269 o = _sep_add_v(win); 280 o = _sep_add_v(win);
270 elm_box_pack_end(ct_boxh, o); 281 elm_box_pack_end(ct_boxh, o);
271 282
272 ct_box = o = elm_box_add(win); 283 ct_box2 = o = elm_box_add(win);
273 elm_box_pack_end(ct_boxh, o); 284 elm_box_pack_end(ct_boxh, o);
274 evas_object_show(o); 285 evas_object_show(o);
275 286
@@ -277,21 +288,32 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term,
277 evas_object_data_set(ct_frame, "bt_copy", o); 288 evas_object_data_set(ct_frame, "bt_copy", o);
278 if (!termio_selection_exists(term)) 289 if (!termio_selection_exists(term))
279 elm_object_disabled_set(o, EINA_TRUE); 290 elm_object_disabled_set(o, EINA_TRUE);
280 elm_box_pack_end(ct_box, o); 291 elm_box_pack_end(ct_box2, o);
292
281 o = _button_add(win, _("Paste"), "paste", _cb_ct_paste, NULL); 293 o = _button_add(win, _("Paste"), "paste", _cb_ct_paste, NULL);
282 elm_box_pack_end(ct_box, o); 294 elm_box_pack_end(ct_box2, o);
283 295
284 o = _sep_add_h(win); 296 o = _sep_add_h(win);
285 elm_box_pack_end(ct_box, o); 297 elm_box_pack_end(ct_box2, o);
286 298
287 o = _button_add(win, _("Settings"), "settings", _cb_ct_options, NULL); 299 o = _button_add(win, _("Settings"), "settings", _cb_ct_options, NULL);
288 elm_box_pack_end(ct_box, o); 300 elm_box_pack_end(ct_box2, o);
289 301
290 o = _sep_add_h(win); 302 o = _sep_add_h(win);
291 elm_box_pack_end(ct_box, o); 303 elm_box_pack_end(ct_box2, o);
292 304
293 o = _button_add(win, _("About"), "about", _cb_ct_about, NULL); 305 o = _button_add(win, _("About"), "about", _cb_ct_about, NULL);
294 elm_box_pack_end(ct_box, o); 306 elm_box_pack_end(ct_box2, o);
307
308 o = _sep_add_h(win);
309 elm_box_pack_end(ct_boxv, o);
310
311 ct_box3 = o = elm_box_add(win);
312 elm_box_pack_end(ct_boxv, o);
313 evas_object_show(o);
314
315 o = _button_add(win, _("Close Terminal"), "close", _cb_ct_close, NULL);
316 elm_box_pack_end(ct_box3, o);
295 317
296 evas_object_event_callback_add(ct_frame, EVAS_CALLBACK_DEL, 318 evas_object_event_callback_add(ct_frame, EVAS_CALLBACK_DEL,
297 _cb_frame_del, NULL); 319 _cb_frame_del, NULL);