/[weechat]/weechat/src/gui/curses/gui-input.c
ViewVC logotype

Diff of /weechat/src/gui/curses/gui-input.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.52 by flashcode, Tue Sep 13 17:04:34 2005 UTC revision 1.53 by flashcode, Tue Oct 18 17:46:54 2005 UTC
# Line 242  gui_main_loop () Line 242  gui_main_loop ()
242      static struct timeval timeout, tv;      static struct timeval timeout, tv;
243      static struct timezone tz;      static struct timezone tz;
244      t_irc_server *ptr_server;      t_irc_server *ptr_server;
245      int old_min, old_sec, diff;      t_gui_buffer *ptr_buffer;
246        int old_day, old_min, old_sec, diff;
247        char text_time[1024];
248      time_t new_time;      time_t new_time;
249      struct tm *local_time;      struct tm *local_time;
250    
251      quit_weechat = 0;      quit_weechat = 0;
252    
253        new_time = time (NULL);
254        local_time = localtime (&new_time);
255        old_day = local_time->tm_mday;
256        
257      old_min = -1;      old_min = -1;
258      old_sec = -1;      old_sec = -1;
259      check_away = 0;      check_away = 0;
# Line 260  gui_main_loop () Line 267  gui_main_loop ()
267          {          {
268              old_min = local_time->tm_min;              old_min = local_time->tm_min;
269              gui_draw_buffer_infobar (gui_current_window->buffer, 1);              gui_draw_buffer_infobar (gui_current_window->buffer, 1);
270                
271                if (cfg_look_day_change
272                    && (local_time->tm_mday != old_day))
273                {
274                    for (ptr_buffer = gui_buffers; ptr_buffer;
275                         ptr_buffer = ptr_buffer->next_buffer)
276                    {
277                        if (!ptr_buffer->dcc)
278                        {
279                            strftime (text_time, sizeof (text_time),
280                                      cfg_look_day_change_timestamp, local_time);
281                            gui_printf_nolog_notime (ptr_buffer,
282                                                     _("Day changed to %s\n"),
283                                                     text_time);
284                        }
285                    }
286                }
287                old_day = local_time->tm_mday;
288          }          }
289                    
290          /* second has changed ? */          /* second has changed ? */

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26