View Single Post
Old 08-26-2010, 04:20 PM   #41
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Hi everybody,

Quote:
Originally Posted by CoolDragon View Post
Still, works on QEMU, but not on device.
Even the simple label update works on qemu. That's why I think the problem is related to the e-ink technology and refresh implementation.

Quote:
Originally Posted by CoolDragon View Post
A little improvement:

If I replace the code in statusbar_timeout_clock() from:
Code:
     sprintf(now_str, "<big>%2.2d:%2.2d</big>", local->tm_hour, local->tm_min);
     gtk_label_set_markup(GTK_LABEL(label), now_str);
to
Code:
     gtk_button_set_label(GTK_BUTTON(g_menu_button), _(now_str));
Yes, that's the easy way but It doesn't work if there is some markup in the text, as our case (the big or bold tags). That's the reason I get label first and then set the text using gtk_label_set_markup() instead of xxx_set_text().

Quote:
Originally Posted by CoolDragon View Post
There is a better chance that turning pages will trigger an update of the clock. I don't know why, somebody else can explain?

Also, there is something true with regard to Mackx's "suspend" theory: turning pages does NOT ALWAYS re-draw the clock if the time between page turning is long enough (like several minutes), but if you turn pages fast enough (maybe less than 5 seconds , thus disables the 5-second suspend timeout), it is very likely to re-draw the clock.
I think Mackx is correct in his hypothesis.
Anyway, I think I'll leave the code as it is now... perhaps waking device juts to update the clock would drain the battery. And as a simple show menu refresh the clock I don't think is so awful to live with it.

Quote:
Originally Posted by Mackx View Post
Could this help? Found it in notepad_ipc.cpp:
Code:
    static void ipc_menu_update_toolbar(void)
    {
        eripc_send_varargs(eripcClient->context, NULL, NULL, ERIPC_BUS_SESSION,
                DBUS_SERVICE_POPUP_MENU, "updatesFinished", ERIPC_TYPE_INVALID);
    }
Uhmmm... I didn't notice the eripcClient is a global variable that can be used anywhere... interesting!
Iņigo is offline   Reply With Quote