354 |
if (CHANNEL(buffer)->topic) |
if (CHANNEL(buffer)->topic) |
355 |
{ |
{ |
356 |
buf = weechat_convert_encoding (cfg_look_charset_decode, |
buf = weechat_convert_encoding (cfg_look_charset_decode, |
357 |
local_charset, |
(cfg_look_charset_internal && cfg_look_charset_internal[0]) ? |
358 |
|
cfg_look_charset_internal : local_charset, |
359 |
CHANNEL(buffer)->topic); |
CHANNEL(buffer)->topic); |
360 |
mvwprintw (ptr_win->win_title, 0, 0, format, buf); |
mvwprintw (ptr_win->win_title, 0, 0, format, buf); |
361 |
free (buf); |
free (buf); |
916 |
{ |
{ |
917 |
t_gui_window *ptr_win; |
t_gui_window *ptr_win; |
918 |
t_weechat_hotlist *ptr_hotlist; |
t_weechat_hotlist *ptr_hotlist; |
919 |
char format_more[32]; |
char format_more[32], *string; |
920 |
int i, first_mode; |
int i, first_mode; |
921 |
|
|
922 |
/* make gcc happy */ |
/* make gcc happy */ |
958 |
COLOR_WIN_STATUS); |
COLOR_WIN_STATUS); |
959 |
wprintw (ptr_win->win_status, "%s", SERVER(ptr_win->buffer)->name); |
wprintw (ptr_win->win_status, "%s", SERVER(ptr_win->buffer)->name); |
960 |
if (SERVER(ptr_win->buffer)->is_away) |
if (SERVER(ptr_win->buffer)->is_away) |
961 |
wprintw (ptr_win->win_status, _("(away)")); |
{ |
962 |
|
string = weechat_convert_encoding (cfg_look_charset_decode, |
963 |
|
(cfg_look_charset_internal && cfg_look_charset_internal[0]) ? |
964 |
|
cfg_look_charset_internal : local_charset, |
965 |
|
_("(away)")); |
966 |
|
wprintw (ptr_win->win_status, string); |
967 |
|
free (string); |
968 |
|
} |
969 |
gui_window_set_color (ptr_win->win_status, |
gui_window_set_color (ptr_win->win_status, |
970 |
COLOR_WIN_STATUS_DELIMITERS); |
COLOR_WIN_STATUS_DELIMITERS); |
971 |
wprintw (ptr_win->win_status, "] "); |
wprintw (ptr_win->win_status, "] "); |
1043 |
wprintw (ptr_win->win_status, "%d:<DCC> ", |
wprintw (ptr_win->win_status, "%d:<DCC> ", |
1044 |
ptr_win->buffer->number); |
ptr_win->buffer->number); |
1045 |
else |
else |
1046 |
wprintw (ptr_win->win_status, _("%d:[not connected] "), |
{ |
1047 |
|
string = weechat_convert_encoding (cfg_look_charset_decode, |
1048 |
|
(cfg_look_charset_internal && cfg_look_charset_internal[0]) ? |
1049 |
|
cfg_look_charset_internal : local_charset, |
1050 |
|
_("%d:[not connected] ")); |
1051 |
|
wprintw (ptr_win->win_status, string, |
1052 |
ptr_win->buffer->number); |
ptr_win->buffer->number); |
1053 |
|
free (string); |
1054 |
|
} |
1055 |
} |
} |
1056 |
|
|
1057 |
/* display list of other active windows (if any) with numbers */ |
/* display list of other active windows (if any) with numbers */ |
1061 |
COLOR_WIN_STATUS_DELIMITERS); |
COLOR_WIN_STATUS_DELIMITERS); |
1062 |
wprintw (ptr_win->win_status, "["); |
wprintw (ptr_win->win_status, "["); |
1063 |
gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS); |
gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS); |
1064 |
wprintw (ptr_win->win_status, _("Act: ")); |
string = weechat_convert_encoding (cfg_look_charset_decode, |
1065 |
|
(cfg_look_charset_internal && cfg_look_charset_internal[0]) ? |
1066 |
|
cfg_look_charset_internal : local_charset, |
1067 |
|
_("Act: ")); |
1068 |
|
wprintw (ptr_win->win_status, string); |
1069 |
|
free (string); |
1070 |
for (ptr_hotlist = hotlist; ptr_hotlist; |
for (ptr_hotlist = hotlist; ptr_hotlist; |
1071 |
ptr_hotlist = ptr_hotlist->next_hotlist) |
ptr_hotlist = ptr_hotlist->next_hotlist) |
1072 |
{ |
{ |
1110 |
COLOR_WIN_STATUS_DELIMITERS); |
COLOR_WIN_STATUS_DELIMITERS); |
1111 |
wprintw (ptr_win->win_status, "["); |
wprintw (ptr_win->win_status, "["); |
1112 |
gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS); |
gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS); |
1113 |
wprintw (ptr_win->win_status, _("Lag: %.1f"), |
string = weechat_convert_encoding (cfg_look_charset_decode, |
1114 |
|
(cfg_look_charset_internal && cfg_look_charset_internal[0]) ? |
1115 |
|
cfg_look_charset_internal : local_charset, |
1116 |
|
_("Lag: %.1f")); |
1117 |
|
wprintw (ptr_win->win_status, string, |
1118 |
((float)(SERVER(ptr_win->buffer)->lag)) / 1000); |
((float)(SERVER(ptr_win->buffer)->lag)) / 1000); |
1119 |
|
free (string); |
1120 |
gui_window_set_color (ptr_win->win_status, |
gui_window_set_color (ptr_win->win_status, |
1121 |
COLOR_WIN_STATUS_DELIMITERS); |
COLOR_WIN_STATUS_DELIMITERS); |
1122 |
wprintw (ptr_win->win_status, "]"); |
wprintw (ptr_win->win_status, "]"); |
1125 |
|
|
1126 |
/* display "-MORE-" if last line is not displayed */ |
/* display "-MORE-" if last line is not displayed */ |
1127 |
gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS_MORE); |
gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS_MORE); |
1128 |
|
string = weechat_convert_encoding (cfg_look_charset_decode, |
1129 |
|
(cfg_look_charset_internal && cfg_look_charset_internal[0]) ? |
1130 |
|
cfg_look_charset_internal : local_charset, |
1131 |
|
_("-MORE-")); |
1132 |
if (ptr_win->sub_lines > 0) |
if (ptr_win->sub_lines > 0) |
1133 |
mvwprintw (ptr_win->win_status, 0, ptr_win->win_width - 7, |
mvwprintw (ptr_win->win_status, 0, ptr_win->win_width - 7, |
1134 |
_("-MORE-")); |
"%s", string); |
1135 |
else |
else |
1136 |
{ |
{ |
1137 |
snprintf (format_more, 32, "%%-%ds", strlen (_("-MORE-"))); |
snprintf (format_more, 32, "%%-%ds", strlen (string)); |
1138 |
mvwprintw (ptr_win->win_status, 0, ptr_win->win_width - 7, |
mvwprintw (ptr_win->win_status, 0, ptr_win->win_width - 7, |
1139 |
format_more, " "); |
format_more, " "); |
1140 |
} |
} |
1141 |
|
free (string); |
1142 |
|
|
1143 |
wrefresh (ptr_win->win_status); |
wrefresh (ptr_win->win_status); |
1144 |
refresh (); |
refresh (); |
2319 |
else |
else |
2320 |
buf2 = strdup (buf); |
buf2 = strdup (buf); |
2321 |
|
|
2322 |
buf3 = weechat_convert_encoding (cfg_look_charset_decode, local_charset, buf2); |
buf3 = weechat_convert_encoding (cfg_look_charset_decode, |
2323 |
|
(cfg_look_charset_internal && cfg_look_charset_internal[0]) ? |
2324 |
|
cfg_look_charset_internal : local_charset, |
2325 |
|
buf2); |
2326 |
|
|
2327 |
if (gui_init_ok) |
if (gui_init_ok) |
2328 |
{ |
{ |