Changeset 2922 for vidalia/trunk/src

Show
Ignore:
Timestamp:
08/02/08 21:19:40 (4 months ago)
Author:
edmanm
Message:

Remove the horizontal scroll bar behavior. It was really annoying and
unnecessary since long messages have tooltips anyway.

Location:
vidalia/trunk/src/vidalia/log
Files:
6 modified

Legend:

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

    r2362 r2922  
    4545 
    4646 
    47 /** Resizes the column headers based on the longest message item. */ 
    48 void 
    49 LogHeaderView::resize(int hint) 
    50 { 
    51   int size = sectionSize(COL_MESG); 
    52   if (hint > size) { 
    53     /* The message is wider than the window, so expand the column */ 
    54     setStretchLastSection(false); 
    55     resizeSection(COL_MESG, hint); 
    56   } else if (hint < size) { 
    57     /* The message is short, so just stretch the last column to the end */ 
    58     setStretchLastSection(true); 
    59   } 
    60 } 
    61  
  • vidalia/trunk/src/vidalia/log/logheaderview.h

    r2362 r2922  
    3131  /** Resets all column widths back to their defaults. */ 
    3232  void resetColumnWidths(); 
    33   /** Resizes the column headers based on the longest message item. */ 
    34   void resize(int hint); 
    3533}; 
    3634 
  • vidalia/trunk/src/vidalia/log/logtreewidget.cpp

    r2921 r2922  
    8181    /* Set the default column widths the first time this is shown */ 
    8282    ((LogHeaderView *)header())->resetColumnWidths(); 
    83     /* Adjust the message column properly */ 
    84     adjustMessageColumn(); 
    8583    shown = true; 
    8684  } 
     
    9492  /* Clear the messages */ 
    9593  clear(); 
    96 } 
    97  
    98 /** Adjusts the message column width to accomodate long messages. */ 
    99 void 
    100 LogTreeWidget::adjustMessageColumn() 
    101 { 
    102   /* Adjust the message column, based on the longest item. */ 
    103   ((LogHeaderView *)header())->resize(sizeHintForColumn(MessageColumn)); 
    104 } 
    105  
    106 /** Adds a message log item. */ 
    107 void 
    108 LogTreeWidget::addMessageItem(LogTreeItem *item) 
    109 { 
    110   /* Add the new item. */ 
    111   addTopLevelItem(item); 
    112   /* Adjust the column headers to accomodate a long message, if necesssary */ 
    113   adjustMessageColumn(); 
    11494} 
    11595 
     
    192172   *       message is not sorted until the message log has focus again. 
    193173   */ 
    194   setSortingEnabled(false);  
    195   addMessageItem(item); 
     174  setSortingEnabled(false); 
     175  addTopLevelItem(item); 
    196176  setSortingEnabled(true); 
    197177 
  • vidalia/trunk/src/vidalia/log/logtreewidget.h

    r2921 r2922  
    6464  QList<LogTreeItem *> find(QString text, bool highlight = true); 
    6565 
    66   /** Adjusts the message column, for long messages. */ 
    67   void adjustMessageColumn(); 
    68  
    6966public slots: 
    7067  /** Clears all contents on the message log and resets the counter. */ 
     
    8077 
    8178private: 
    82   /** Adds a message log item. */ 
    83   void addMessageItem(LogTreeItem *item); 
    8479  /** Casts a QList of one pointer type to another. */ 
    8580  QList<LogTreeItem *> qlist_cast(QList<QTreeWidgetItem *> inlist); 
  • vidalia/trunk/src/vidalia/log/messagelog.cpp

    r2533 r2922  
    8181{ 
    8282  _logFile.close(); 
    83 } 
    84  
    85 /** Responds to the user resizing the message log. */ 
    86 void 
    87 MessageLog::resizeEvent(QResizeEvent *event) 
    88 { 
    89   Q_UNUSED(event); 
    90  
    91   /* Let the message list know that it may need to add a scrollbar */ 
    92   ui.lstMessages->adjustMessageColumn(); 
    9383} 
    9484 
  • vidalia/trunk/src/vidalia/log/messagelog.h

    r2362 r2922  
    6464  void help(); 
    6565 
    66 protected: 
    67   /** Responds to the user resizing the message log. */ 
    68   void resizeEvent(QResizeEvent *event); 
    69    
    7066private:   
    7167  /** Create and bind actions to events **/