any button now dismisses the popup dialog things.
SVN revision: 73083
This commit is contained in:
parent
84261ed6ec
commit
5afd73501f
5
TODO
5
TODO
|
@ -6,9 +6,6 @@ make it a first-class terminal:
|
|||
[ ] improve terminal emulation handling. known apps with problems:
|
||||
mc
|
||||
[ ] dnd text (to/from terminal)
|
||||
[ ] handle multibyte displays better (does handle utf8 only atm and
|
||||
then maybe not according to convention like double cell spacing
|
||||
for jp/kr/zh etc. needs textgrid work in evas)
|
||||
[ ] general input mode handling improvements (keypad, other key
|
||||
input, etc.)
|
||||
[ ] selection of themes
|
||||
|
@ -26,8 +23,6 @@ make it a first-class terminal:
|
|||
[ ] selection should have handles on the start/end so u can drag and
|
||||
change its size once there
|
||||
[ ] improve selection text extraction logic so its reliable
|
||||
[ ] clicking with ANY mouse button while options is up outside of
|
||||
options should dismiss it.
|
||||
|
||||
things in future to make it totally kick-butt:
|
||||
|
||||
|
|
|
@ -320,6 +320,46 @@ collections {
|
|||
target: "bell_strobe";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// overlayed options and controls
|
||||
part { name: "terminology.dismiss"; type: SWALLOW;
|
||||
description { state: "default" 0.0;
|
||||
}
|
||||
}
|
||||
part { name: "terminology.about"; type: SWALLOW;
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
fixed: 1 1;
|
||||
min: 198 198;
|
||||
max: 198 198;
|
||||
align: 0.5 0.0;
|
||||
visible: 0;
|
||||
rel1.relative: 0.0 1.0;
|
||||
rel2.relative: 1.0 1.0;
|
||||
}
|
||||
description { state: "visible" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
visible: 1;
|
||||
align: 0.5 0.5;
|
||||
rel1.relative: 0.0 0.0;
|
||||
rel2.relative: 1.0 1.0;
|
||||
}
|
||||
}
|
||||
program { name: "ab_show";
|
||||
signal: "about,show";
|
||||
source: "terminology";
|
||||
action: STATE_SET "visible" 0.0;
|
||||
transition: SPRING 1.2 2.0 6;
|
||||
target: "terminology.about";
|
||||
}
|
||||
program { name: "ab_hide";
|
||||
signal: "about,hide";
|
||||
source: "terminology";
|
||||
action: STATE_SET "default" 0.0;
|
||||
transition: DECELERATE 0.6;
|
||||
target: "terminology.about";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// overlayed options and controls
|
||||
part { name: "terminology.options"; type: SWALLOW;
|
||||
|
@ -367,40 +407,6 @@ collections {
|
|||
target: "terminology.options";
|
||||
}
|
||||
|
||||
part { name: "terminology.about"; type: SWALLOW;
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
fixed: 1 1;
|
||||
min: 198 198;
|
||||
max: 198 198;
|
||||
align: 0.5 0.0;
|
||||
visible: 0;
|
||||
rel1.relative: 0.0 1.0;
|
||||
rel2.relative: 1.0 1.0;
|
||||
}
|
||||
description { state: "visible" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
visible: 1;
|
||||
align: 0.5 0.5;
|
||||
rel1.relative: 0.0 0.0;
|
||||
rel2.relative: 1.0 1.0;
|
||||
}
|
||||
}
|
||||
program { name: "ab_show";
|
||||
signal: "about,show";
|
||||
source: "terminology";
|
||||
action: STATE_SET "visible" 0.0;
|
||||
transition: SPRING 1.2 2.0 6;
|
||||
target: "terminology.about";
|
||||
}
|
||||
program { name: "ab_hide";
|
||||
signal: "about,hide";
|
||||
source: "terminology";
|
||||
action: STATE_SET "default" 0.0;
|
||||
transition: DECELERATE 0.6;
|
||||
target: "terminology.about";
|
||||
}
|
||||
|
||||
part { name: "terminology.controls"; type: SWALLOW;
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <Elementary.h>
|
||||
#include "about.h"
|
||||
|
||||
static Evas_Object *ab_layout = NULL, *ab_over;
|
||||
static Evas_Object *ab_layout = NULL, *ab_over = NULL;
|
||||
static Eina_Bool ab_out = EINA_FALSE;
|
||||
static Ecore_Timer *ab_del_timer = NULL;
|
||||
static Evas_Object *saved_win = NULL;
|
||||
|
@ -90,10 +90,8 @@ about_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
|
|||
if (!ab_out)
|
||||
{
|
||||
ab_over = o = evas_object_rectangle_add(evas_object_evas_get(win));
|
||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_color_set(o, 0, 0, 0, 0);
|
||||
elm_win_resize_object_add(win, o);
|
||||
edje_object_part_swallow(bg, "terminology.dismiss", o);
|
||||
evas_object_show(o);
|
||||
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
|
||||
_cb_mouse_down, term);
|
||||
|
@ -111,6 +109,7 @@ about_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
|
|||
{
|
||||
evas_object_del(ab_over);
|
||||
ab_over = NULL;
|
||||
|
||||
edje_object_signal_emit(bg, "about,hide", "terminology");
|
||||
ab_out = EINA_FALSE;
|
||||
elm_object_focus_set(ab_layout, EINA_FALSE);
|
||||
|
|
|
@ -6,9 +6,11 @@
|
|||
#include "about.h"
|
||||
#include "termio.h"
|
||||
|
||||
static Evas_Object *ct_frame, *ct_box = NULL;
|
||||
static Evas_Object *ct_frame = NULL, *ct_box = NULL, *ct_over = NULL;
|
||||
static Eina_Bool ct_out = EINA_FALSE;
|
||||
static Ecore_Timer *ct_del_timer = NULL;
|
||||
static Evas_Object *saved_win = NULL;
|
||||
static Evas_Object *saved_bg = NULL;
|
||||
|
||||
static Evas_Object *ct_win, *ct_bg, *ct_term;
|
||||
|
||||
|
@ -50,11 +52,19 @@ _cb_ct_about(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __U
|
|||
about_toggle(ct_win, ct_bg, ct_term);
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *ev __UNUSED__)
|
||||
{
|
||||
controls_toggle(saved_win, saved_bg, data);
|
||||
}
|
||||
|
||||
void
|
||||
controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
|
||||
{
|
||||
Evas_Object *o;
|
||||
|
||||
saved_win = win;
|
||||
saved_bg = bg;
|
||||
if (!ct_out)
|
||||
{
|
||||
if (options_active_get())
|
||||
|
@ -125,6 +135,13 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
|
|||
}
|
||||
if (!ct_out)
|
||||
{
|
||||
ct_over = o = evas_object_rectangle_add(evas_object_evas_get(win));
|
||||
evas_object_color_set(o, 0, 0, 0, 0);
|
||||
edje_object_part_swallow(bg, "terminology.dismiss", o);
|
||||
evas_object_show(o);
|
||||
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
|
||||
_cb_mouse_down, term);
|
||||
|
||||
ct_win = win;
|
||||
ct_bg = bg;
|
||||
ct_term = term;
|
||||
|
@ -139,6 +156,9 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
|
|||
}
|
||||
else
|
||||
{
|
||||
evas_object_del(ct_over);
|
||||
ct_over = NULL;
|
||||
|
||||
edje_object_signal_emit(bg, "controls,hide", "terminology");
|
||||
ct_out = EINA_FALSE;
|
||||
elm_object_focus_set(ct_frame, EINA_FALSE);
|
||||
|
|
|
@ -11,9 +11,12 @@
|
|||
#include "termio.h"
|
||||
|
||||
static Evas_Object *op_frame, *op_box = NULL, *op_toolbar = NULL,
|
||||
*op_opbox = NULL, *op_tbox = NULL, *op_temp = NULL;
|
||||
*op_opbox = NULL, *op_tbox = NULL, *op_temp = NULL,
|
||||
*op_over = NULL;
|
||||
static Eina_Bool op_out = EINA_FALSE;
|
||||
static Ecore_Timer *op_del_timer = NULL;
|
||||
static Evas_Object *saved_win = NULL;
|
||||
static Evas_Object *saved_bg = NULL;
|
||||
|
||||
static void
|
||||
_cb_op_font(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
|
||||
|
@ -70,11 +73,19 @@ _cb_op_del_delay(void *data __UNUSED__)
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *ev __UNUSED__)
|
||||
{
|
||||
options_toggle(saved_win, saved_bg, data);
|
||||
}
|
||||
|
||||
void
|
||||
options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
|
||||
{
|
||||
Evas_Object *o;
|
||||
|
||||
saved_win = win;
|
||||
saved_bg = bg;
|
||||
if (!op_frame)
|
||||
{
|
||||
Elm_Object_Item *it_fn;
|
||||
|
@ -145,6 +156,13 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
|
|||
}
|
||||
if (!op_out)
|
||||
{
|
||||
op_over = o = evas_object_rectangle_add(evas_object_evas_get(win));
|
||||
evas_object_color_set(o, 0, 0, 0, 0);
|
||||
edje_object_part_swallow(bg, "terminology.dismiss", o);
|
||||
evas_object_show(o);
|
||||
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
|
||||
_cb_mouse_down, term);
|
||||
|
||||
edje_object_signal_emit(bg, "options,show", "terminology");
|
||||
op_out = EINA_TRUE;
|
||||
elm_object_focus_set(op_toolbar, EINA_TRUE);
|
||||
|
@ -156,6 +174,9 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
|
|||
}
|
||||
else
|
||||
{
|
||||
evas_object_del(op_over);
|
||||
op_over = NULL;
|
||||
|
||||
edje_object_signal_emit(bg, "options,hide", "terminology");
|
||||
op_out = EINA_FALSE;
|
||||
elm_object_focus_set(op_frame, EINA_FALSE);
|
||||
|
|
Loading…
Reference in New Issue