update TODO and add tmp changes checkbox.

SVN revision: 72284
This commit is contained in:
Carsten Haitzler 2012-06-17 09:43:47 +00:00
parent 27cdf9753d
commit a93b94e2fd
5 changed files with 38 additions and 6 deletions

4
TODO
View File

@ -3,7 +3,7 @@ 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:
[X] evas textgrid needs creating and to be used
[ ] underline and strikethrough need supporting at termio level
[X] underline and strikethrough need supporting at termio level
[ ] blink and blink2 attributes need to be supported
[ ] improve terminal emulation handling (i know it doesn't handle gfx
chars and it definitely has an incomplete escape handling core -
@ -15,7 +15,7 @@ make it a first-class terminal:
then maybe not according to convention)
[ ] general input mode handling improvements (keypad, other key
input, mousereporting etc.)
[ ] save of config after options changes (option checkbox for
[X] save of config after options changes (option checkbox for
temporary local only changes)
[ ] selection of themes
[ ] selection of background "wallpapers" (and support them at all -

View File

@ -5,6 +5,7 @@
static Eet_Data_Descriptor *edd_base = NULL;
Config *config = NULL;
Eina_Bool config_tmp = EINA_FALSE;
static const char *
_homedir(void)
@ -105,7 +106,8 @@ config_save(void)
Eet_File *ef;
char buf[4096], buf2[4096], *home;
int ok;
if (config_tmp) return;
home = (char *)_homedir();
snprintf(buf, sizeof(buf), "%s/.terminology/config/standard", home);
ecore_file_mkpath(buf);

View File

@ -18,6 +18,7 @@ struct _Config
};
extern Config *config;
extern Eina_Bool config_tmp;
void config_init(void);
void config_shutdown(void);

View File

@ -163,17 +163,20 @@ elm_main(int argc, char **argv)
}
else
config->theme = eina_stringshare_add(argv[i]);
config_tmp = EINA_TRUE;
}
else if ((!strcmp(argv[i], "-b")) && (i < (argc - 1)))
{
i++;
if (config->background) eina_stringshare_del(config->background);
config->background = eina_stringshare_add(argv[i]);
config_tmp = EINA_TRUE;
}
else if ((!strcmp(argv[i], "-m")) && (i < (argc - 1)))
{
i++;
config->mute = atoi(argv[i]);
config_tmp = EINA_TRUE;
}
else if ((!strcmp(argv[i], "-vm")) && (i < (argc - 1)))
{
@ -182,6 +185,7 @@ elm_main(int argc, char **argv)
else if (!strcmp(argv[i], "gstreamer")) config->vidmod = 1;
else if (!strcmp(argv[i], "xine")) config->vidmod = 2;
else if (!strcmp(argv[i], "generic")) config->vidmod = 3;
config_tmp = EINA_TRUE;
}
}

View File

@ -3,8 +3,10 @@
#include "options_font.h"
#include "options_behavior.h"
#include "options_video.h"
#include "config.h"
static Evas_Object *op_frame, *op_box = NULL, *op_toolbar = NULL, *op_opbox = NULL;
static Evas_Object *op_frame, *op_box = NULL, *op_toolbar = NULL,
*op_opbox = NULL, *op_tbox = NULL, *op_temp = NULL;
static Eina_Bool op_out = EINA_FALSE;
static void
@ -42,6 +44,12 @@ _cb_op_behavior(void *data, Evas_Object *obj, void *event)
options_behavior(op_opbox, data);
}
static void
_cb_op_tmp_chg(void *data, Evas_Object *obj, void *event)
{
config_tmp = elm_check_state_get(obj);
}
void
options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
{
@ -67,7 +75,15 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
elm_box_pack_end(op_box, o);
evas_object_show(o);
op_tbox = o = elm_box_add(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);
elm_box_pack_end(op_box, o);
evas_object_show(o);
op_toolbar = o = elm_toolbar_add(win);
evas_object_size_hint_weight_set(o, 0.0, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(o, 0.5, 0.0);
elm_toolbar_horizontal_set(o, EINA_FALSE);
elm_object_style_set(o, "item_horizontal");
evas_object_size_hint_weight_set(o, 0.0, 0.0);
@ -89,12 +105,21 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
it_bh = elm_toolbar_item_append(o, "system-run",
"Behavior", _cb_op_behavior, term);
elm_box_pack_end(op_box, o);
elm_box_pack_end(op_tbox, o);
evas_object_show(o);
elm_toolbar_item_selected_set(it_fn, EINA_TRUE);
op_temp = o = elm_check_add(win);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 1.0);
elm_object_text_set(o, "Temporary");
elm_check_state_set(o, config_tmp);
elm_box_pack_end(op_tbox, o);
evas_object_show(o);
evas_object_smart_callback_add(o, "changed", _cb_op_tmp_chg, NULL);
evas_smart_objects_calculate(evas_object_evas_get(win));
// evas_smart_objects_calculate(evas_object_evas_get(win));
edje_object_part_swallow(bg, "terminology.options", op_frame);
evas_object_show(o);
}