aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-06-17 02:35:07 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-06-17 02:35:07 +0000
commit8fa238e2403b5996dec22fb452a55b58497531c5 (patch)
tree752bcf7328e2869796e6cc496e1c9292976d1e4f
parentadd some noise to make gradients look less "banded". (diff)
downloadterminology-8fa238e2403b5996dec22fb452a55b58497531c5.tar.gz
fix jump on change option to work.
SVN revision: 72257
-rw-r--r--src/bin/config.c2
-rw-r--r--src/bin/main.c18
-rw-r--r--src/bin/options.c2
-rw-r--r--src/bin/termio.c6
4 files changed, 24 insertions, 4 deletions
diff --git a/src/bin/config.c b/src/bin/config.c
index 54c95d4..def1a55 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -69,7 +69,7 @@ config_init(void)
config->theme = eina_stringshare_add("default.edj");
config->background = NULL;
config->translucent = 0;
- config->jump_on_change = 1;
+ config->jump_on_change = 0;
config->wordsep = eina_stringshare_add("'\"()[]{}=*!#$^\\:;,?` ");
}
}
diff --git a/src/bin/main.c b/src/bin/main.c
index 1b99be6..fa86266 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -7,6 +7,7 @@
const char *cmd = NULL;
static Evas_Object *win = NULL, *bg = NULL, *term = NULL;
+static Ecore_Timer *flush_timer = NULL;
static void
_cb_focus_in(void *data, Evas_Object *obj, void *event)
@@ -20,6 +21,7 @@ _cb_focus_out(void *data, Evas_Object *obj, void *event)
{
edje_object_signal_emit(bg, "focus,out", "terminology");
elm_object_focus_set(data, EINA_FALSE);
+ elm_cache_all_flush();
}
static void
@@ -47,6 +49,21 @@ _cb_options(void *data, Evas_Object *obj, void *event)
options_toggle(win, bg, term);
}
+static Eina_Bool
+_cb_flush(void *data)
+{
+ flush_timer = NULL;
+ elm_cache_all_flush();
+ return EINA_FALSE;
+}
+
+static void
+_cb_change(void *data, Evas_Object *obj, void *event)
+{
+ if (!flush_timer) flush_timer = ecore_timer_add(0.25, _cb_flush, NULL);
+ else ecore_timer_delay(flush_timer, 0.25);
+}
+
void
main_trans_update(void)
{
@@ -103,6 +120,7 @@ elm_main(int argc, char **argv)
_cb_size_hint, win);
edje_object_part_swallow(bg, "terminology.content", o);
evas_object_smart_callback_add(o, "options", _cb_options, NULL);
+ evas_object_smart_callback_add(o, "options", _cb_change, NULL);
evas_object_show(o);
main_trans_update();
diff --git a/src/bin/options.c b/src/bin/options.c
index b1380aa..a8429eb 100644
--- a/src/bin/options.c
+++ b/src/bin/options.c
@@ -71,7 +71,7 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
it_wp = elm_toolbar_item_append(o, "video-display", "Wallpaper",
_cb_op_wallpaper, NULL);
it_bh = elm_toolbar_item_append(o, "system-run", "Behavior",
- _cb_op_behavior, NULL);
+ _cb_op_behavior, term);
elm_box_pack_end(op_box, o);
evas_object_show(o);
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 76d9435..7cf383b 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -304,6 +304,7 @@ _smart_cb_change(void *data)
if (!sd) return;
sd->job = NULL;
_smart_apply(obj);
+ evas_object_smart_callback_call(obj, "changed", NULL);
}
static void
@@ -783,8 +784,9 @@ _smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
if ((ow == w) && (oh == h)) return;
evas_object_smart_changed(obj);
- if (sd->delayed_size_timer) ecore_timer_del(sd->delayed_size_timer);
- sd->delayed_size_timer = ecore_timer_add(0.0, _smart_cb_delayed_size, obj);
+ if (!sd->delayed_size_timer) sd->delayed_size_timer =
+ ecore_timer_add(0.0, _smart_cb_delayed_size, obj);
+ else ecore_timer_delay(sd->delayed_size_timer, 0.0);
evas_object_resize(sd->event, ow, oh);
}