diff mcabber/src/screen.c @ 721:9cf31c9b1dc4

Use room topic as a description in the chat status line Thanks to Salvador for the idea.
author Mikael Berthe <mikael@lilotux.net>
date Sun, 05 Mar 2006 00:17:12 +0100
parents e5269eb416bb
children 23068490d063
line wrap: on
line diff
--- a/mcabber/src/screen.c	Sun Mar 05 00:03:06 2006 +0100
+++ b/mcabber/src/screen.c	Sun Mar 05 00:17:12 2006 +0100
@@ -716,10 +716,10 @@
     scr_ShowBuddyWindow();
 }
 
-//  update_chat_status_window(forceupdate)
+//  scr_UpdateChatStatus(forceupdate)
 // Redraw the buddy status bar.
 // Set forceupdate to TRUE if doupdate() must be called.
-static void update_chat_status_window(int forceupdate)
+void scr_UpdateChatStatus(int forceupdate)
 {
   unsigned short btype, isgrp, ismuc;
   const char *fullname;
@@ -771,6 +771,8 @@
     GSList *resources = buddy_getresources(BUDDATA(current_buddy));
     if (resources)
       msg = buddy_getstatusmsg(BUDDATA(current_buddy), resources->data);
+  } else if (ismuc) {
+    msg = buddy_gettopic(BUDDATA(current_buddy));
   }
   if (!msg)
     msg = "";
@@ -821,7 +823,7 @@
   if (!buddylist)
     offset = 0;
   else
-    update_chat_status_window(FALSE);
+    scr_UpdateChatStatus(FALSE);
 
   // Leave now if buddylist is empty or the roster is hidden
   if (!buddylist || !Roster_Width) {
@@ -1383,7 +1385,7 @@
 inline void scr_set_chatmode(int enable)
 {
   chatmode = enable;
-  update_chat_status_window(TRUE);
+  scr_UpdateChatStatus(TRUE);
 }
 
 //  scr_get_multimode()
@@ -1913,7 +1915,7 @@
         if (current_buddy)
           buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, FALSE);
         scr_RosterVisibility(1);
-        update_chat_status_window(FALSE);
+        scr_UpdateChatStatus(FALSE);
         top_panel(chatPanel);
         top_panel(inputPanel);
         update_panels();