Menu

#7 Remember last sent message in ggz-gtk

open-works-for-me
nobody
None
5
2002-01-17
2002-01-12
No

This patch adds a cache of the messages sent, just
like in IRC. You can use Up/Down to cycle throught
the last messages. The size of the cache is controled
by a CHAT_MAXIMUM_CACHE value defined in the
beggining of client.c

The code seems to be working pretty well, but it
wasn't tested for memory leaks yet. (don't know the
best way of doing it with the libggz tools)

Besides, the ggz_list created isn't destroyed (where
it should be better to do that?)

A last point, there is some weird duplication of code
in chat_entry_activated and send_button_clicked.
Maybe creating a chat_entry_add_cache call might be
better (or maybe don't... I don't think this cache
code will change much more)

To apply the patch, just run "patch < client.diff" in
the ggz-gtk subdir.

Discussion

  • Ismael Orenstein

    Patch

     
  • Ismael Orenstein

    Logged In: YES
    user_id=17587

    Updated the patch. Fixed a little bug when repeated
    messages confused it. Now it seems to be working very fine.

     
  • Ismael Orenstein

    • status: open --> open-works-for-me
     
  • Ismael Orenstein

    Patch

     
  • Ismael Orenstein

    Logged In: YES
    user_id=17587

    Ops, my bad... uploaded two files with the same comment...
    the correct one is the one with file id 16273

    (I guess it is second one in the list)

     

Log in to post a comment.