[ekg2-devel] Obsługa <paused> w chatstates
Jakub Zawadzki
darkjames w darkjames.ath.cx
Pon, 21 Sty 2008, 14:43:08 CET
On Mon, Jan 21, 2008 at 12:39:50PM +0100, Wiesław Ochmiński wrote:
> Od razu przyznaję, że <paused> działa to tylko na userlist. Z założenia
> nie robiłem tego dla statusu, ale też moim założeniem było, by nie zepsuć
> dotychczasowego działania.
Witaj, dzieki za latke :)
Moje uwagi tylko nt. kodu.
> Index: plugins/jabber/jabber_handlers.c
> ===================================================================
> RCS file: /home/cvs/ekg2/plugins/jabber/jabber_handlers.c,v
> retrieving revision 1.154
> diff -u -r1.154 jabber_handlers.c
> --- plugins/jabber/jabber_handlers.c 20 Jan 2008 08:31:48 -0000 1.154
> +++ plugins/jabber/jabber_handlers.c 21 Jan 2008 11:28:25 -0000
> @@ -968,12 +969,13 @@
> * 2nd bit determines whether we've got chatstate-based update,
> * if its' on, then jabber:x:event can't replace the state;
> * 3rd bit determines whether the <composing/> is on
> + * 4th bit determines whether the <paused/> is on (+wiechu)
> */
> - int state = (!nbody && (composing & 4) ? EKG_XSTATE_TYPING : 0);
> + int state = (!nbody && (composing & 12) ? (composing & 4) ? EKG_XSTATE_TYPING : EKG_XSTATE_PAUSED : 0);
Ja tego nie pisalem, ale tam nie powinno byc (!nbody && composing & 4) ?
[zamiast composing & 4 ?] (analogicznie jak wczesniej)
Btw. Skad sie wziela ta 12?
(gdb) call/t 12
$1 = 1100
Chyba sie nie zgadza z komentarzem:
* 4th bit determines whether the <paused/> is on
(?)
> Index: ekg/themes.c
> ===================================================================
> RCS file: /home/cvs/ekg2/ekg/themes.c,v
> retrieving revision 1.217
> diff -u -r1.217 themes.c
> --- ekg/themes.c 20 Jan 2008 11:12:11 -0000 1.217
> +++ ekg/themes.c 21 Jan 2008 11:28:32 -0000
> @@ -1405,6 +1405,61 @@
> format_add("contacts_unknown_descr_typing", "%W*%M%1%n", 1);
> format_add("contacts_unknown_descr_full_typing", "%W*%M%1%n %2", 1);
>
> + /* paused */
> + format_add("statusbar_act_paused", "%b", 1);
> + format_add("statusbar_act_important_paused", "%C", 1);
> + format_add("contacts_avail_blink_paused", "%W%ix%Y%i%1%n", 1);
> + [i duzo innych]
Okej, to najwyzszy czas to przepisac...
Wiem, pamietam ze rozmawialismy na !ekg2 ze liczba formatek jest malo
wazna. Jednak sie z tego wycofuje :)
Pozdrawiam.
Więcej informacji o liście dyskusyjnej ekg2-devel