good idea from gustavo - a g command for terminology's cmdbox.

g20x20 = make term 20x20 chars.



SVN revision: 75537
devs/lucas/wip
Carsten Haitzler 11 years ago
parent 93dd23541c
commit 141119f0d2
  1. 13
      src/bin/termcmd.c
  2. 15
      src/bin/termio.c
  3. 1
      src/bin/termio.h

@ -86,6 +86,19 @@ termcmd_do(Evas_Object *obj, Evas_Object *win, Evas_Object *bg, const char *cmd)
}
return EINA_TRUE;
}
if ((cmd[0] == 'g') || (cmd[0] == 'G')) // font size
{
int w = -1, h = -1;
if (sscanf(cmd, "g%ix%i", &w, &h) == 2)
{
if ((w > 0) && (h > 0))
{
termio_grid_size_set(obj, w, h);
}
}
return EINA_TRUE;
}
return EINA_FALSE;
obj = win = bg = NULL;
}

@ -770,7 +770,6 @@ _font_size_set(Evas_Object *obj, int size)
config->font.size = size;
gw = sd->grid.w;
gh = sd->grid.h;
evas_object_size_hint_min_get(obj, &mw, &mh);
sd->noreqsize = 1;
termio_config_update(obj);
sd->noreqsize = 0;
@ -786,6 +785,20 @@ termio_font_size_set(Evas_Object *obj, int size)
_font_size_set(obj, size);
}
void
termio_grid_size_set(Evas_Object *obj, int w, int h)
{
Termio *sd = evas_object_smart_data_get(obj);
Evas_Coord mw = 1, mh = 1;
if (w < 1) w = 1;
if (h < 1) h = 1;
if (!sd) return;
evas_object_size_hint_min_get(obj, &mw, &mh);
evas_object_data_del(obj, "sizedone");
evas_object_size_hint_request_set(obj, mw * w, mh * h);
}
static void
_smart_cb_key_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event)
{

@ -15,5 +15,6 @@ void termio_mouseover_suspend_pushpop(Evas_Object *obj, int dir);
void termio_size_get(Evas_Object *obj, int *w, int *h);
int termio_scroll_get(Evas_Object *obj);
void termio_font_size_set(Evas_Object *obj, int size);
void termio_grid_size_set(Evas_Object *obj, int w, int h);
#endif

Loading…
Cancel
Save