summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b0a706d)
raw | patch | inline | side by side (parent: b0a706d)
author | joncruz <joncruz@users.sourceforge.net> | |
Mon, 22 Sep 2008 07:32:45 +0000 (07:32 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Mon, 22 Sep 2008 07:32:45 +0000 (07:32 +0000) |
src/text-context.cpp | patch | blob | history |
diff --git a/src/text-context.cpp b/src/text-context.cpp
index 28384b620631baaba6a629e902f764b1ce92a01a..9d7fe3c03ae63970c941c574f349ca760e91e4b3 100644 (file)
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
{
SPTextContext *tc = SP_TEXT_CONTEXT(ec);
SPDesktop *desktop = ec->desktop;
+ GtkSettings* settings = gtk_settings_get_default();
+ gint timeout = 0;
+ g_object_get( settings, "gtk-cursor-blink-time", &timeout, NULL );
+ if (timeout < 0) {
+ timeout = 200;
+ } else {
+ timeout /= 2;
+ }
tc->cursor = sp_canvas_item_new(sp_desktop_controls(desktop), SP_TYPE_CTRLLINE, NULL);
sp_ctrlline_set_coords(SP_CTRLLINE(tc->cursor), 100, 0, 100, 100);
SP_CTRLRECT(tc->frame)->setColor(0x0000ff7f, false, 0);
sp_canvas_item_hide(tc->frame);
- tc->timeout = gtk_timeout_add(200, (GtkFunction) sp_text_context_timeout, ec);
+ tc->timeout = gtk_timeout_add(timeout, (GtkFunction) sp_text_context_timeout, ec);
tc->imc = gtk_im_multicontext_new();
if (tc->imc) {
sp_text_context_timeout(SPTextContext *tc)
{
if (tc->show) {
+ sp_canvas_item_show(tc->cursor);
if (tc->phase) {
tc->phase = 0;
- sp_canvas_item_hide(tc->cursor);
+ sp_ctrlline_set_rgba32(SP_CTRLLINE(tc->cursor), 0xffffffff);
} else {
tc->phase = 1;
- sp_canvas_item_show(tc->cursor);
+ sp_ctrlline_set_rgba32(SP_CTRLLINE(tc->cursor), 0x000000ff);
}
}