diff mcabber/src/screen.c @ 1503:c74cfe7fd848

Add option --show-roster to command chat_disable. This makes it possible to change the Esc binding so that the roster doesn't automatically comes back when hitting Escape. (Issue reported by Maxim Vuets)
author Mikael Berthe <mikael@lilotux.net>
date Sat, 23 Aug 2008 21:01:14 +0200
parents 50dbbca69b55
children 9fafea381eb8
line wrap: on
line diff
--- a/mcabber/src/screen.c	Sat Aug 23 19:47:49 2008 +0300
+++ b/mcabber/src/screen.c	Sat Aug 23 21:01:14 2008 +0200
@@ -665,7 +665,7 @@
   settings_set(SETTINGS_TYPE_BINDING, "517", "iline fword");
   settings_set(SETTINGS_TYPE_BINDING, "518", "iline fword");
   settings_set(SETTINGS_TYPE_BINDING, "12", "screen_refresh");    // Ctrl-l
-  settings_set(SETTINGS_TYPE_BINDING, "27", "chat_disable");      // Esc
+  settings_set(SETTINGS_TYPE_BINDING, "27", "chat_disable --show-roster");// Esc
   settings_set(SETTINGS_TYPE_BINDING, "M27", "chat_disable");     // Esc-Esc
   settings_set(SETTINGS_TYPE_BINDING, "4", "iline send_multiline"); // Ctrl-d
   settings_set(SETTINGS_TYPE_BINDING, "M117", "iline word_upcase"); // Meta-u
@@ -3173,14 +3173,15 @@
   redrawwin(stdscr);
 }
 
-void readline_disable_chat_mode(void)
+void readline_disable_chat_mode(guint show_roster)
 {
   scr_CheckAutoAway(TRUE);
   currentWindow = NULL;
   chatmode = FALSE;
   if (current_buddy)
     buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, FALSE);
-  scr_RosterVisibility(1);
+  if (show_roster)
+    scr_RosterVisibility(1);
   scr_UpdateChatStatus(FALSE);
   top_panel(chatPanel);
   top_panel(inputPanel);