make min size 1x1 for warning fix, add 2 todo's and make configs

versioned finally. :)



SVN revision: 73336
devs/lucas/wip
Carsten Haitzler 11 years ago
parent 2f9e9628cc
commit 5adb2747b8
  1. 2
      TODO
  2. 25
      src/bin/config.c
  3. 1
      src/bin/config.h
  4. 6
      src/bin/media.c

@ -2,6 +2,8 @@
here's a short list of things i think we can do in the short to medium term to
make it a first-class terminal:
[ ] ecore-fb doesnt seem to do keyrpeat?
[ ] ecore-fb ctrl, alt broken.
[ ] blink and blink2 attributes need to be supported
[ ] improve terminal emulation handling. known apps with problems:
mc

@ -3,6 +3,8 @@
#include <Elementary.h>
#include "config.h"
#define CONF_VER 1
#define LIM(v, min, max) {if (v >= max) v = max; else if (v <= min) v = min;}
static Eet_Data_Descriptor *edd_base = NULL;
@ -42,6 +44,8 @@ config_init(void)
(&eddc, sizeof(eddc), "Config", sizeof(Config));
edd_base = eet_data_descriptor_stream_new(&eddc);
EET_DATA_DESCRIPTOR_ADD_BASIC
(edd_base, Config, "version", version, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC
(edd_base, Config, "font.name", font.name, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC
@ -146,7 +150,18 @@ config_load(const char *key)
eet_close(ef);
if (config)
{
LIM(config->font.size, 3, 400);
if (config->version < CONF_VER)
{
// currently no upgrade path so reset config.
config_del(config);
config = NULL;
}
else
{
LIM(config->font.size, 3, 400);
LIM(config->scrollback, 0, 200000);
LIM(config->vidmod, 0, 3)
}
}
}
if (!config)
@ -207,6 +222,7 @@ config_load(const char *key)
config = calloc(1, sizeof(Config));
if (config)
{
config->version = CONF_VER;
config->font.bitmap = EINA_TRUE;
config->font.name = eina_stringshare_add("nexus.pcf");
config->font.size = 10;
@ -252,6 +268,13 @@ config_del(Config *config)
eina_stringshare_del(config->theme);
eina_stringshare_del(config->background);
eina_stringshare_del(config->wordsep);
eina_stringshare_del(config->helper.email);
eina_stringshare_del(config->helper.url.general);
eina_stringshare_del(config->helper.url.video);
eina_stringshare_del(config->helper.url.image);
eina_stringshare_del(config->helper.local.general);
eina_stringshare_del(config->helper.local.video);
eina_stringshare_del(config->helper.local.image);
eina_stringshare_del(config->config_key); /* not in eet */
free(config);

@ -7,6 +7,7 @@ typedef struct _Config Config;
struct _Config
{
int version;
struct {
const char *name;
int size;

@ -141,7 +141,7 @@ _type_img_calc(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_
}
else
{
int iw, ih;
int iw = 1, ih = 1;
if (sd->mode == MEDIA_BG)
{
@ -225,7 +225,7 @@ _type_scale_calc(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Eva
}
else
{
int iw, ih;
int iw = 1, ih = 1;
if (sd->mode == MEDIA_BG)
{
@ -529,7 +529,7 @@ _type_mov_calc(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_
}
else
{
int iw = 0, ih = 0;
int iw = 1, ih = 1;
double ratio;
ratio = emotion_object_ratio_get(sd->o_img);

Loading…
Cancel
Save