322 |
} |
} |
323 |
|
|
324 |
/* |
/* |
325 |
|
* gui_buffer_find_window: find a window displaying buffer |
326 |
|
*/ |
327 |
|
|
328 |
|
t_gui_window * |
329 |
|
gui_buffer_find_window (t_gui_buffer *buffer) |
330 |
|
{ |
331 |
|
t_gui_window *ptr_win; |
332 |
|
|
333 |
|
for (ptr_win = gui_windows; ptr_win; |
334 |
|
ptr_win = ptr_win->next_window) |
335 |
|
{ |
336 |
|
if (ptr_win->buffer == buffer) |
337 |
|
return ptr_win; |
338 |
|
} |
339 |
|
|
340 |
|
/* no window found */ |
341 |
|
return NULL; |
342 |
|
} |
343 |
|
|
344 |
|
/* |
345 |
* gui_buffer_servers_search: search servers buffer |
* gui_buffer_servers_search: search servers buffer |
346 |
* (when same buffer is used for all servers) |
* (when same buffer is used for all servers) |
347 |
*/ |
*/ |
877 |
time_t time_seconds; |
time_t time_seconds; |
878 |
struct tm *local_time; |
struct tm *local_time; |
879 |
int time_first_digit, time_last_digit; |
int time_first_digit, time_last_digit; |
880 |
char *pos, *buf2; |
char *buf2, *pos; |
881 |
int i; |
int i; |
882 |
va_list argptr; |
va_list argptr; |
883 |
static time_t seconds; |
static time_t seconds; |
918 |
if (!buf[0]) |
if (!buf[0]) |
919 |
return; |
return; |
920 |
|
|
921 |
if (!local_utf8 || !utf8_is_valid (buf)) |
if (gui_init_ok) |
922 |
buf2 = weechat_convert_encoding ((local_utf8) ? |
buf2 = channel_iconv_decode (SERVER(buffer), CHANNEL(buffer), buf); |
|
cfg_look_charset_decode_iso : cfg_look_charset_decode_utf, |
|
|
(cfg_look_charset_internal && cfg_look_charset_internal[0]) ? |
|
|
cfg_look_charset_internal : local_charset, |
|
|
buf); |
|
923 |
else |
else |
924 |
buf2 = strdup (buf); |
buf2 = strdup (buf); |
925 |
|
|
1031 |
buf2 = (char *)gui_color_decode ((unsigned char *)buffer, 0); |
buf2 = (char *)gui_color_decode ((unsigned char *)buffer, 0); |
1032 |
|
|
1033 |
if (buf2) |
if (buf2) |
1034 |
{ |
buf3 = channel_iconv_decode (NULL, NULL, buf2); |
|
if (!local_utf8 || !utf8_is_valid (buf2)) |
|
|
buf3 = weechat_convert_encoding ((local_utf8) ? |
|
|
cfg_look_charset_decode_iso : cfg_look_charset_decode_utf, |
|
|
(cfg_look_charset_internal && cfg_look_charset_internal[0]) ? |
|
|
cfg_look_charset_internal : local_charset, |
|
|
buf2); |
|
|
else |
|
|
buf3 = strdup (buf2); |
|
|
} |
|
1035 |
else |
else |
1036 |
buf3 = NULL; |
buf3 = NULL; |
1037 |
|
|