Changeset 2985 for vidalia/trunk

Show
Ignore:
Timestamp:
08/17/08 20:22:21 (3 months ago)
Author:
edmanm
Message:

If the current message log layout is right-to-left (e.g. if the user's
translation is Farsi), then use a custom item delegate for the log message
column whose sole purpose is to keep Qt from screwing with the message text.
Fixes ticket #396.

Location:
vidalia/trunk/src/vidalia/log
Files:
2 added
1 modified

Legend:

Unmodified
Added
Removed
  • vidalia/trunk/src/vidalia/log/logtreewidget.cpp

    r2950 r2985  
    1919#include "logtreewidget.h" 
    2020#include "logheaderview.h" 
     21#include "logmessagecolumndelegate.h" 
    2122 
    2223 
     
    2627{ 
    2728  setHeader(new LogHeaderView(this)); 
     29 
     30  /* Tor's log messages are always in English, so stop Qt from futzing with 
     31   * the message text if we're currently using a non-English RTL layout. */ 
     32  if (layoutDirection() == Qt::RightToLeft) { 
     33    setItemDelegateForColumn(LogTreeWidget::MessageColumn, 
     34                             new LogMessageColumnDelegate(this)); 
     35  } 
    2836 
    2937  /* Explicitly default to sorting messages chronologically */