billiob pushed a commit to branch master.
commit 71d4f155be9c81841d861d1451844043ed3cb3c8
Author: Boris Faure <[email protected]>
Date: Sat Sep 7 17:53:06 2013 +0200
change cursor/selection when changing theme
---
src/bin/options_theme.c | 1 +
src/bin/termio.c | 11 +++++++----
src/bin/termio.h | 1 +
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/bin/options_theme.c b/src/bin/options_theme.c
index 56f6207..dddda4c 100644
--- a/src/bin/options_theme.c
+++ b/src/bin/options_theme.c
@@ -70,6 +70,7 @@ _cb_op_theme_sel(void *data, Evas_Object *obj EINA_UNUSED,
void *event EINA_UNUS
if (!theme_apply(edje, config, "terminology/background"))
ERR("Couldn't find terminology theme!");
colors_term_init(termio_textgrid_get(t->term), edje);
+ termio_config_set(t->term, config);
}
static int
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 97867c0..5c3e9a8 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -3291,8 +3291,8 @@ _win_obj_del(void *data, Evas *e EINA_UNUSED, Evas_Object
*obj, void *event EINA
}
}
-static void
-_termio_config_set(Evas_Object *obj, Config *config)
+void
+termio_config_set(Evas_Object *obj, Config *config)
{
Termio *sd = evas_object_smart_data_get(obj);
Evas_Coord w = 2, h = 2;
@@ -3315,7 +3315,10 @@ _termio_config_set(Evas_Object *obj, Config *config)
evas_object_scale_set(sd->grid.obj, elm_config_scale_get());
evas_object_textgrid_font_set(sd->grid.obj, sd->font.name, sd->font.size);
- evas_object_textgrid_size_set(sd->grid.obj, 1, 1);
+ evas_object_textgrid_size_get(sd->grid.obj, &w, &h);
+ if (w < 1) w = 1;
+ if (h < 1) h = 1;
+ evas_object_textgrid_size_set(sd->grid.obj, w, h);
evas_object_textgrid_cell_size_get(sd->grid.obj, &w, &h);
if (w < 1) w = 1;
if (h < 1) h = 1;
@@ -4129,7 +4132,7 @@ termio_add(Evas_Object *parent, Config *config, const
char *cmd, Eina_Bool login
sd = evas_object_smart_data_get(obj);
if (!sd) return obj;
- _termio_config_set(obj, config);
+ termio_config_set(obj, config);
sd->glayer = g = elm_gesture_layer_add(parent);
elm_gesture_layer_attach(g, sd->event);
diff --git a/src/bin/termio.h b/src/bin/termio.h
index 485a311..f6e82dc 100644
--- a/src/bin/termio.h
+++ b/src/bin/termio.h
@@ -30,5 +30,6 @@ Evas_Object *termio_mirror_add(Evas_Object *obj);
const char *termio_title_get(Evas_Object *obj);
const char *termio_icon_name_get(Evas_Object *obj);
void termio_debugwhite_set(Evas_Object *obj, Eina_Bool dbg);
+void termio_config_set(Evas_Object *obj, Config *config);
#endif
--
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk