Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/screen.c @ 462:d580e87c11ed
Add "/buffer %n"
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 29 Sep 2005 21:28:39 +0200 |
parents | 8827bbef84a1 |
children | e4840b288be0 |
comparison
equal
deleted
inserted
replaced
461:1d8f5b3a5f2b | 462:d580e87c11ed |
---|---|
1091 doupdate(); | 1091 doupdate(); |
1092 } else | 1092 } else |
1093 scr_LogPrint(LPRINT_NORMAL, "Search string not found"); | 1093 scr_LogPrint(LPRINT_NORMAL, "Search string not found"); |
1094 } | 1094 } |
1095 | 1095 |
1096 // scr_BufferPercent(n) | |
1097 // Jump to the specified position in the buffer, in % | |
1098 void scr_BufferPercent(int pc) | |
1099 { | |
1100 window_entry_t *win_entry; | |
1101 GList *search_res; | |
1102 | |
1103 // Get win_entry | |
1104 if (!current_buddy) return; | |
1105 win_entry = scr_SearchWindow(CURRENT_JID); | |
1106 if (!win_entry) return; | |
1107 | |
1108 if (pc < 0 || pc > 100) { | |
1109 scr_LogPrint(LPRINT_NORMAL, "Bad % value"); | |
1110 return; | |
1111 } | |
1112 | |
1113 search_res = hbuf_jump_percent(win_entry->hbuf, pc); | |
1114 | |
1115 win_entry->cleared = FALSE; | |
1116 win_entry->top = search_res; | |
1117 | |
1118 // Refresh the window | |
1119 scr_UpdateWindow(win_entry); | |
1120 | |
1121 // Finished :) | |
1122 update_panels(); | |
1123 doupdate(); | |
1124 } | |
1125 | |
1096 // scr_set_chatmode() | 1126 // scr_set_chatmode() |
1097 // Public function to (un)set chatmode... | 1127 // Public function to (un)set chatmode... |
1098 inline void scr_set_chatmode(int enable) | 1128 inline void scr_set_chatmode(int enable) |
1099 { | 1129 { |
1100 chatmode = enable; | 1130 chatmode = enable; |