Commit b374952b authored by gi1242's avatar gi1242

Fix indent

parent f202aed1
......@@ -1829,9 +1829,9 @@ rxvt_read_child_cmdfd (rxvt_t* r, int page, unsigned int count)
if (bread != 0)
{
gettimeofday( &tp, NULL);
rxvt_dbgmsg ((DBG_DEBUG, DBG_COMMAND,
"output produced on epoch %i\n", tp.tv_sec));
gettimeofday( &tp, NULL);
rxvt_dbgmsg ((DBG_DEBUG, DBG_COMMAND,
"output produced on epoch %i\n", tp.tv_sec));
}
PVTS(r, page)->monitor_nbytes_read += bread;
PVTS(r, page)->nbytes_last_read = bread;
......@@ -1860,8 +1860,8 @@ rxvt_monitor_tab(rxvt_t* r,int i)
monitor_timeout = atoi( r->h->rs[Rs_monitorTimeout] );
monitor_timeout_time.tv_sec += (int) monitor_timeout/1000;
monitor_timeout_time.tv_usec +=
(monitor_timeout - (((int) monitor_timeout/1000) * 1000)) * 1000;
monitor_timeout_time.tv_usec +=
(monitor_timeout - (((int) monitor_timeout/1000) * 1000)) * 1000;
/* get current epoch time */
gettimeofday( &tp, NULL);
......@@ -1873,8 +1873,9 @@ rxvt_monitor_tab(rxvt_t* r,int i)
if(PVTS(r, i)->monitor_nbytes_read > 0)
{
PVTS(r, i)->monitor_tab = TAB_MON_INACTIVITY;
rxvt_msg (DBG_INFO, DBG_MACROS,
"Macro MonitorTab: decided to monitor inactivity on tab %i", i);
rxvt_msg (DBG_INFO, DBG_MACROS,
"Macro MonitorTab: decided to monitor inactivity on tab %i",
i);
}
else
{
......@@ -1886,32 +1887,32 @@ rxvt_monitor_tab(rxvt_t* r,int i)
PVTS(r, i)->monitor_start = tp;
}
/* monitor-type "INACTIVITY" : detect inactivity */
else if ((PVTS(r, i)->monitor_tab == TAB_MON_INACTIVITY) &&
(timercmp(&monitor_timeout_time,&tp, <)))
else if ((PVTS(r, i)->monitor_tab == TAB_MON_INACTIVITY) &&
(timercmp(&monitor_timeout_time,&tp, <)))
{
/* inactivity detected */
if (PVTS( r, i)->monitor_nbytes_read == 0)
{
rxvt_msg (DBG_INFO, DBG_MACROS,
"Macro MonitorTab: detected inactivity on tab %i", i);
execute_action = 1;
rxvt_msg (DBG_INFO, DBG_MACROS,
"Macro MonitorTab: detected inactivity on tab %i", i);
execute_action = 1;
}
/* activity detected, restarting monitoring */
else
{
rxvt_msg (DBG_DEBUG, DBG_MACROS,
"Macro MonitorTab: NOT detected inactivity on tab %i / %i ",
i, PVTS(r,i)->monitor_nbytes_read);
PVTS(r, i)->monitor_start = tp;
PVTS(r, i)->monitor_nbytes_read = 0 ;
rxvt_msg (DBG_DEBUG, DBG_MACROS,
"Macro MonitorTab: NOT detected inactivity on tab %i / %i ",
i, PVTS(r,i)->monitor_nbytes_read);
PVTS(r, i)->monitor_start = tp;
PVTS(r, i)->monitor_nbytes_read = 0;
}
}
/* monitor-type "ACTIVITY" : detect activity */
else if ((PVTS(r, i)->monitor_tab == TAB_MON_ACTIVITY) &&
(PVTS( r, i)->monitor_nbytes_read != 0))
{
rxvt_msg (DBG_INFO, DBG_MACROS,
"Macro MonitorTab: detected activity on tab %i", i);
rxvt_msg (DBG_INFO, DBG_MACROS,
"Macro MonitorTab: detected activity on tab %i", i);
execute_action = 1;
}
......@@ -1925,10 +1926,11 @@ rxvt_monitor_tab(rxvt_t* r,int i)
char expstr[maxLen];
/* execute a command if configured */
if( r->h->rs[Rs_monitorCommand] && *r->h->rs[Rs_monitorCommand] ){
if( r->h->rs[Rs_monitorCommand] && *r->h->rs[Rs_monitorCommand] )
{
/* interpolate percent arguments */
rxvt_percent_interpolate( r, i, (char *) r->h->rs[Rs_monitorCommand],
STRLEN(r->h->rs[Rs_monitorCommand]), (char*) expstr, maxLen );
STRLEN(r->h->rs[Rs_monitorCommand]), (char*) expstr, maxLen );
rxvt_async_exec( r, expstr );
}
......@@ -1940,30 +1942,32 @@ rxvt_monitor_tab(rxvt_t* r,int i)
rxvt_tabbar_highlight_tab (r, i, False);
/* mark tab as active, if it is not the active tab */
if (ATAB(r) != i){
PVTS(r, i)->monitor_tab = TAB_MON_NOTIFICATION;
if (ATAB(r) != i)
{
PVTS(r, i)->monitor_tab = TAB_MON_NOTIFICATION;
}
else
{
PVTS(r, i)->monitor_tab = TAB_MON_OFF;
PVTS(r, i)->monitor_tab = TAB_MON_OFF;
}
#ifdef BACKGROUND_IMAGE
if( r->tabBar.hasPixmap && ISSET_OPTION(r, Opt_tabPixmap))
{
PVTS(r, i)->monitor_tab = TAB_MON_OFF;
rxvt_dbgmsg ((DBG_INFO, DBG_TABBAR,
"Disabling background filling, background image is activated"));
PVTS(r, i)->monitor_tab = TAB_MON_OFF;
rxvt_dbgmsg ((DBG_INFO, DBG_TABBAR,
"Disabling background filling, background image is "
"activated"));
}
#endif
#ifdef TRANSPARENT
if ( ( r->h->am_transparent || r->h->am_pixmap_trans ) &&
ISSET_OPTION(r, Opt_transparent_tabbar))
{
PVTS(r, i)->monitor_tab = TAB_MON_OFF;
rxvt_dbgmsg ((DBG_INFO, DBG_TABBAR,
"Disabling background filling, option 'transparentTabbar' is enabled"
));
PVTS(r, i)->monitor_tab = TAB_MON_OFF;
rxvt_dbgmsg ((DBG_INFO, DBG_TABBAR,
"Disabling background filling, option 'transparentTabbar'"
"is enabled"));
}
#endif
rxvt_tabbar_expose (r, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment